diff --git a/www/ungoogled-chromium/Makefile b/www/ungoogled-chromium/Makefile index 081297f4d758..f75f5f61a3b4 100644 --- a/www/ungoogled-chromium/Makefile +++ b/www/ungoogled-chromium/Makefile @@ -1,414 +1,414 @@ PORTNAME= ungoogled-chromium -PORTVERSION= 123.0.6312.122 +PORTVERSION= 124.0.6367.60 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 \ rustc:lang/rust \ 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 \ ${LOCALBASE}/libdata/pkgconfig/Qt5Core.pc:devel/qt5-core \ ${LOCALBASE}/libdata/pkgconfig/Qt5Widgets.pc:x11-toolkits/qt5-widgets LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-core \ libatspi.so:accessibility/at-spi2-core \ libspeechd.so:accessibility/speech-dispatcher \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libepoll-shim.so:devel/libepoll-shim \ libevent.so:devel/libevent \ libffi.so:devel/libffi \ 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 \ libdav1d.so:multimedia/dav1d \ 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 gmake gnome \ iconv:wchar_t jpeg localbase:ldflags ninja perl5 pkgconfig \ python:build qt:5 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 USE_QT= buildtools:build 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} \ moc=${PREFIX}/bin/moc-qt5 # 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+= enable_widevine=true \ fatal_linker_warnings=false \ icu_use_data_file=false \ is_clang=true \ optimize_webui=true \ toolkit_views=true \ use_allocator_shim=false \ use_aura=true \ use_custom_libcxx=true \ use_custom_libunwind=true \ use_lld=true \ use_partition_alloc=true \ use_partition_alloc_as_malloc=false \ use_sysroot=false \ use_system_freetype=false \ use_system_harfbuzz=true \ use_system_libffi=true \ use_system_libjpeg=true \ use_udev=false \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" \ ffmpeg_branding="${FFMPEG_BRAND}" # 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_backup_ref_ptr_support=false \ enable_log_error_not_reached=true \ enable_hangout_services_extension=false \ enable_mdns=false \ 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 PIPEWIRE TEST WIDEVINE OPTIONS_DEFAULT= CODECS CUPS DRIVER KERBEROS PIPEWIRE 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+=proprietary_codecs=true \ FFMPEG_BRAND="Chrome" CODECS_VARS_OFF= GN_ARGS+=proprietary_codecs=false \ FFMPEG_BRAND="Chromium" 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 PIPEWIRE_DESC= Screen capture via PipeWire PIPEWIRE_LIB_DEPENDS= libpipewire-0.3.so:multimedia/pipewire PIPEWIRE_VARS= GN_ARGS+=rtc_use_pipewire=true \ GN_ARGS+=rtc_link_pipewire=true PIPEWIRE_VARS_OFF= GN_ARGS+=rtc_use_pipewire=false \ GN_ARGS+=rtc_link_pipewire=false 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 WIDEVINE_DESC= Depend on foreign-cdm to enable playback of DRM content WIDEVINE_RUN_DEPENDS= foreign-cdm>0:www/foreign-cdm .include "Makefile.tests" TEST_DISTFILES= chromium-${DISTVERSION}-testdata${EXTRACT_SUFX} \ test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz:external TEST_ALL_TARGET= ${TEST_TARGETS} .include .include # for COMPILER_VERSION .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} < 170 LLVM_DEFAULT= 17 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 # - map ffmpeg target to ${ARCH} .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " FFMPEG_TARGET= arm64 .elif ${ARCH} == amd64 BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" FFMPEG_TARGET= x64 .elif ${ARCH} == i386 BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" FFMPEG_TARGET= ia32 .endif FFMPEG_BDIR= ${WRKSRC}/build.${FFMPEG_TARGET}.freebsd/${FFMPEG_BRAND} FFMPEG_CDIR= ${WRKSRC}/third_party/ffmpeg/chromium/config/${FFMPEG_BRAND}/freebsd/${FFMPEG_TARGET} # 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} # rust RUSTC_VERSION!= rustc -V 2>/dev/null || true MAKE_ENV+= RUSTC_BOOTSTRAP=1 GN_ARGS+= enable_rust=true \ rust_sysroot_absolute="${LOCALBASE}" \ rustc_version="${RUSTC_VERSION}" 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 \ dav1d flac fontconfig freetype harfbuzz-ng icu libdrm libevent libpng \ libusb libwebp libxml libxslt openh264 opus || ${FALSE} # Chromium uses an unreleased version of FFmpeg, so configure it cd ${WRKSRC}/third_party/ffmpeg && \ ${PYTHON_CMD} chromium/scripts/build_ffmpeg.py freebsd ${FFMPEG_TARGET} \ --config-only --branding=${FFMPEG_BRAND} cd ${FFMPEG_BDIR} && ${GMAKE} ffversion.h ${MKDIR} ${FFMPEG_CDIR} .for _e in config.h config.asm config_components.h libavcodec libavformat libavutil -${CP} -pR ${FFMPEG_BDIR}/${_e} ${FFMPEG_CDIR} .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}${PREFIX}/share/man/man1/ungoogled-chromium.1 @${SED} -i "" -e 's,\@\@PACKAGE\@\@,chromium,g;s,\@\@MENUNAME\@\@,Chromium Web Browser,g' \ ${STAGEDIR}${PREFIX}/share/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} ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/vk_swiftshader_icd.json ${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/distinfo b/www/ungoogled-chromium/distinfo index bc703b8167b7..48739ad45d84 100644 --- a/www/ungoogled-chromium/distinfo +++ b/www/ungoogled-chromium/distinfo @@ -1,9 +1,9 @@ -TIMESTAMP = 1712941251 -SHA256 (chromium-123.0.6312.122.tar.xz) = c883f192af7cb76cf46de4044349645b0fb0b5c42a1c0f7950a24c825c17f885 -SIZE (chromium-123.0.6312.122.tar.xz) = 3488275388 -SHA256 (ungoogled-chromium-123.0.6312.122-1.tar.gz) = 41bcd3b62218d02806063f247316c59f2beb899905457ab00bce7ce342f443fd -SIZE (ungoogled-chromium-123.0.6312.122-1.tar.gz) = 668203 -SHA256 (chromium-123.0.6312.122-testdata.tar.xz) = f9075629ea813e184977811fd95c9edf3ca499d83af4e934706a0b344c874cbf -SIZE (chromium-123.0.6312.122-testdata.tar.xz) = 279875756 +TIMESTAMP = 1713858634 +SHA256 (chromium-124.0.6367.60.tar.xz) = ebd553527149cb8477a522df90acd6cea2388a6f431e2db589a0301df1d0cae2 +SIZE (chromium-124.0.6367.60.tar.xz) = 3432734968 +SHA256 (ungoogled-chromium-124.0.6367.60-1.tar.gz) = 10996c17d79b4bf1baccc3138e6103c39379ca2f5bdc72092e67e4dda7a527a7 +SIZE (ungoogled-chromium-124.0.6367.60-1.tar.gz) = 667143 +SHA256 (chromium-124.0.6367.60-testdata.tar.xz) = 42fcb4454bb703343843b7b7b4c7c28cbc9e0f885f5e38748268aeeb00ce9d29 +SIZE (chromium-124.0.6367.60-testdata.tar.xz) = 279785420 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 index 651a50c7693e..37e125a126fd 100644 --- a/www/ungoogled-chromium/files/patch-BUILD.gn +++ b/www/ungoogled-chromium/files/patch-BUILD.gn @@ -1,89 +1,89 @@ ---- BUILD.gn.orig 2024-03-22 14:16:19 UTC +--- BUILD.gn.orig 2024-04-23 07:42:17 UTC +++ BUILD.gn @@ -64,7 +64,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) @@ -96,7 +96,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", -@@ -428,7 +427,7 @@ group("gn_all") { +@@ -427,7 +426,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", -@@ -620,6 +619,15 @@ group("gn_all") { +@@ -619,6 +618,15 @@ group("gn_all") { } } + 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:dump_syms", -@@ -666,7 +674,7 @@ group("gn_all") { +@@ -665,7 +673,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)" ] } -@@ -1087,7 +1095,7 @@ if (use_blink && !is_cronet_build) { +@@ -1086,7 +1094,7 @@ if (use_blink && !is_cronet_build) { ] } - if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos) { + if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos && !is_bsd) { script_test("chrome_wpt_tests") { script = "//third_party/blink/tools/run_wpt_tests.py" args = [ -@@ -1178,7 +1186,7 @@ if (use_blink && !is_cronet_build) { +@@ -1177,7 +1185,7 @@ if (use_blink && !is_cronet_build) { data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ] } - if (!is_win && !is_android) { + if (!is_win && !is_android && !is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } -@@ -1187,7 +1195,7 @@ if (use_blink && !is_cronet_build) { +@@ -1186,7 +1194,7 @@ if (use_blink && !is_cronet_build) { 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)" ] } -@@ -1637,7 +1645,7 @@ group("chromium_builder_perf") { +@@ -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-base_BUILD.gn b/www/ungoogled-chromium/files/patch-base_BUILD.gn index ded8e83a42f1..e6a1bf006c83 100644 --- a/www/ungoogled-chromium/files/patch-base_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-base_BUILD.gn @@ -1,162 +1,156 @@ ---- base/BUILD.gn.orig 2024-03-22 14:16:19 UTC +--- base/BUILD.gn.orig 2024-04-23 07:42:17 UTC +++ base/BUILD.gn -@@ -192,7 +192,7 @@ buildflag_header("ios_cronet_buildflags") { +@@ -200,7 +200,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" -@@ -1126,11 +1126,23 @@ component("base") { +@@ -1131,11 +1131,23 @@ 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) { if (is_apple) { sources += [ "allocator/early_zone_registration_apple.h" ] -@@ -1150,7 +1162,7 @@ component("base") { +@@ -1155,7 +1167,7 @@ component("base") { # Allow more direct string conversions on platforms with native utf8 # strings - if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia) { + if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia || is_bsd) { defines += [ "SYSTEM_NATIVE_UTF8" ] } -@@ -2106,6 +2118,22 @@ component("base") { +@@ -2113,6 +2125,22 @@ component("base") { ] } + if (is_openbsd) { + sources += [ + "process/process_handle_openbsd.cc", + "process/process_iterator_openbsd.cc", + "process/process_metrics_openbsd.cc", + "system/sys_info_openbsd.cc", + ] + } else if (is_freebsd) { + sources += [ + "process/process_handle_freebsd.cc", + "process/process_iterator_freebsd.cc", + "process/process_metrics_freebsd.cc", + "system/sys_info_freebsd.cc", + ] + } + # iOS if (is_ios) { sources += [ -@@ -2241,6 +2269,31 @@ component("base") { +@@ -2249,6 +2277,33 @@ component("base") { } } + if (is_bsd) { + sources -= [ + "files/file_path_watcher_inotify.cc", + "files/scoped_file_linux.cc", ++ "process/set_process_title_linux.cc", ++ "process/set_process_title_linux.h", + "system/sys_info_linux.cc", + "process/process_iterator_linux.cc", + "process/process_linux.cc", + "process/process_metrics_linux.cc", + "process/process_handle_linux.cc", + "profiler/stack_copier_signal.cc", + "profiler/stack_copier_signal.h", + "profiler/thread_delegate_posix.cc", + "profiler/thread_delegate_posix.h", + "threading/platform_thread_linux.cc", + "stack_canary_linux.cc", + "stack_canary_linux.h", + ] + sources += [ + "files/file_path_watcher_kqueue.cc", + "files/file_path_watcher_kqueue.h", + "files/file_path_watcher_bsd.cc", + "threading/platform_thread_bsd.cc", + ] + } + if (use_blink) { sources += [ "files/file_path_watcher.cc", -@@ -2251,7 +2304,7 @@ component("base") { +@@ -2259,7 +2314,7 @@ component("base") { } if (dep_libevent) { - deps += [ "//third_party/libevent" ] + public_deps += [ "//third_party/libevent" ] } if (use_libevent) { -@@ -3027,7 +3080,7 @@ if (is_apple) { +@@ -3072,7 +3127,7 @@ if (is_apple) { } } -if (!is_nacl && (is_linux || is_chromeos)) { +if (!is_nacl && !is_bsd && (is_linux || is_chromeos)) { # This test must compile with -fstack-protector-all source_set("stack_canary_linux_unittests") { testonly = true -@@ -3675,14 +3728,14 @@ test("base_unittests") { +@@ -3716,7 +3771,7 @@ test("base_unittests") { ] } - if (is_linux || is_chromeos) { -+ if ((is_linux || is_chromeos) && !is_bsd) { ++ if (!is_bsd && (is_linux || is_chromeos)) { sources += [ "debug/proc_maps_linux_unittest.cc", "files/scoped_file_linux_unittest.cc", - "nix/mime_util_xdg_unittest.cc", - ] - -- if (!is_nacl) { -+ if (!is_nacl && !is_bsd) { - deps += [ ":stack_canary_linux_unittests" ] - } - } -@@ -3701,7 +3754,7 @@ test("base_unittests") { +@@ -3743,7 +3798,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_base_address_posix_unittest.cc", "profiler/stack_copier_signal_unittest.cc", -@@ -3712,7 +3765,7 @@ test("base_unittests") { +@@ -3754,7 +3809,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" ] } -@@ -3980,7 +4033,7 @@ test("base_unittests") { +@@ -4022,7 +4077,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_dispatcher_tls.h b/www/ungoogled-chromium/files/patch-base_allocator_dispatcher_tls.h index 122247d1d432..444fa64c4e5e 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_dispatcher_tls.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_dispatcher_tls.h @@ -1,11 +1,11 @@ ---- base/allocator/dispatcher/tls.h.orig 2023-11-04 07:08:51 UTC +--- base/allocator/dispatcher/tls.h.orig 2024-04-23 07:42:17 UTC +++ base/allocator/dispatcher/tls.h -@@ -74,7 +74,7 @@ struct BASE_EXPORT MMapAllocator { - partition_alloc::PartitionPageSize(); - #elif BUILDFLAG(IS_APPLE) +@@ -76,7 +76,7 @@ struct BASE_EXPORT MMapAllocator { + constexpr static size_t AllocationChunkSize = 16384; + #elif BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS) constexpr static size_t AllocationChunkSize = 16384; -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) constexpr static size_t AllocationChunkSize = 16384; #else constexpr static size_t AllocationChunkSize = 4096; diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni index 9882ab1dac47..4c5f2d0ca3b5 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni @@ -1,20 +1,20 @@ ---- base/allocator/partition_allocator/partition_alloc.gni.orig 2024-03-22 14:16:19 UTC +--- base/allocator/partition_allocator/partition_alloc.gni.orig 2024-04-23 07:42:17 UTC +++ base/allocator/partition_allocator/partition_alloc.gni -@@ -30,7 +30,7 @@ if (is_nacl) { - } +@@ -33,7 +33,7 @@ if (is_nacl) { + use_large_empty_slot_span_ring = is_mac has_memory_tagging = - current_cpu == "arm64" && is_clang && !is_asan && (is_linux || is_android) + current_cpu == "arm64" && is_clang && !is_asan && !is_bsd && (is_linux || is_android) declare_args() { # Causes all the allocations to be routed via allocator_shim.cc. Usually, -@@ -357,7 +357,7 @@ declare_args() { +@@ -351,7 +351,7 @@ declare_args() { # dependencies that use partition_allocator are compiled in AOSP against a # version of glibc that does not include pkeys syscall numbers. enable_pkeys = - (is_linux || is_chromeos) && target_cpu == "x64" && !is_cronet_build + !is_bsd && (is_linux || is_chromeos) && target_cpu == "x64" && !is_cronet_build } assert(!enable_pkeys || ((is_linux || is_chromeos) && target_cpu == "x64"), "Pkeys are only supported on x64 linux and ChromeOS") diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn index 372c63248989..6ed59dc622c7 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig 2024-03-22 14:16:19 UTC +--- base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig 2024-04-23 07:42:17 UTC +++ base/allocator/partition_allocator/src/partition_alloc/BUILD.gn -@@ -858,7 +858,7 @@ if (is_clang_or_gcc) { +@@ -851,7 +851,7 @@ if (is_clang_or_gcc) { configs -= [ "//build/config/compiler:enable_arc" ] } } - if (is_chromeos || is_linux) { + if ((is_chromeos || is_linux) && !is_bsd) { shim_headers += [ "shim/allocator_shim_override_cpp_symbols.h", "shim/allocator_shim_override_glibc_weak_symbols.h", diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h index 062ae211d75a..a75b6c620b86 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h @@ -1,20 +1,20 @@ ---- base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h.orig 2024-02-25 20:22:18 UTC +--- base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h.orig 2024-04-23 07:42:17 UTC +++ base/allocator/partition_allocator/src/partition_alloc/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) && !BUILDFLAG(IS_BSD) // We shouldn't allocate system pages at all for sanitizer builds. However, // we do, and if random hint addresses interfere with address ranges -@@ -126,7 +126,7 @@ AslrMask(uintptr_t bits) { +@@ -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_src_partition__alloc_page__allocator.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h index cf46fed6f74e..9c9f80ace75e 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/page_allocator.h.orig 2024-02-25 20:22:18 UTC +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator.h.orig 2024-04-23 07:42:17 UTC +++ base/allocator/partition_allocator/src/partition_alloc/page_allocator.h -@@ -256,7 +256,7 @@ bool DecommitAndZeroSystemPages(void* address, +@@ -259,7 +259,7 @@ bool DecommitAndZeroSystemPages(void* address, // 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_src_partition__alloc_page__allocator__constants.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h index d3bc48b0842c..49bb4f4e9ad1 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h @@ -1,38 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h.orig 2024-02-25 20:22:18 UTC +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h.orig 2024-04-23 07:42:17 UTC +++ base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h -@@ -25,7 +25,7 @@ - // elimination. +@@ -26,7 +26,7 @@ #define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) --#elif (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)) && defined(ARCH_CPU_ARM64) -+#elif (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) + #elif (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS)) || \ +- (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) ++ ((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 -@@ -92,7 +92,7 @@ PageAllocationGranularityShift() { - return 14; // 16kB - #elif BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS) - return static_cast(vm_page_shift); --#elif (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)) && defined(ARCH_CPU_ARM64) -+#elif (BUILDFLAG(IS_ANDROID) || 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); -@@ -113,7 +113,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_ANDROID) || BUILDFLAG(IS_LINUX)) && defined(ARCH_CPU_ARM64) -+#elif (BUILDFLAG(IS_ANDROID) || 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); -@@ -153,7 +153,7 @@ PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONS - SystemPageSize() { - #if (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ - (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_ARM64)) || \ -- (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 Android/Linux to avoid << - // on a non-constexpr. diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__address__space.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__address__space.cc deleted file mode 100644 index 60d77fc19b01..000000000000 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__address__space.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_address_space.cc.orig 2024-02-25 20:22:18 UTC -+++ base/allocator/partition_allocator/src/partition_alloc/partition_address_space.cc -@@ -421,7 +421,7 @@ void PartitionAddressSpace::UninitThreadIsolatedPoolFo - } - #endif - --#if (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)) && defined(ARCH_CPU_ARM64) -+#if (BUILDFLAG(IS_ANDROID) || 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_src_partition__alloc_partition__alloc__config.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h index ed2d611605c4..02cfd2bdb7bd 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h @@ -1,20 +1,20 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig 2024-02-25 20:22:18 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig 2024-04-23 07:42:17 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h @@ -251,7 +251,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. #define PA_CONFIG_HAS_ATFORK_HANDLER() \ - (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // PartitionAlloc uses PartitionRootEnumerator to acquire all // PartitionRoots at BeforeFork and to release at AfterFork. @@ -299,7 +299,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) + // Also enabled on ARM64 macOS and iOS, as the 16kiB pages on this platform lead + // to larger slot spans. +-#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_ARM64)) ++#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_BSD) #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() 1 #else #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() 0 diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h index 44896d379a92..6cc6c41bd125 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h @@ -1,21 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h.orig 2024-02-25 20:22:18 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h.orig 2024-04-23 07:42:17 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h -@@ -112,7 +112,7 @@ PartitionPageShift() { - } - #elif (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ - (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_ARM64)) || \ -- (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) -+ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) - PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t - PartitionPageShift() { - return PageAllocationGranularityShift() + 2; -@@ -314,7 +314,8 @@ constexpr size_t kNumPools = kMaxPoolHandle - 1; +@@ -313,7 +313,7 @@ constexpr size_t kNumPools = kMaxPoolHandle - 1; // 8GB for each of the glued pools). #if BUILDFLAG(HAS_64_BIT_POINTERS) #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || \ - BUILDFLAG(ENABLE_POINTER_COMPRESSION) -+ BUILDFLAG(ENABLE_POINTER_COMPRESSION) || \ -+ BUILDFLAG(IS_BSD) ++ BUILDFLAG(ENABLE_POINTER_COMPRESSION) || 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_src_partition__alloc_partition__page__constants.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__page__constants.h deleted file mode 100644 index 41e4f9c75188..000000000000 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__page__constants.h +++ /dev/null @@ -1,11 +0,0 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h.orig 2024-02-25 20:22:18 UTC -+++ base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h -@@ -16,7 +16,7 @@ namespace partition_alloc::internal { - // (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_ANDROID) || BUILDFLAG(IS_LINUX)) && defined(ARCH_CPU_ARM64) -+#elif (BUILDFLAG(IS_ANDROID) || 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). diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc index ae4d14863fe3..c838279c607b 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc @@ -1,38 +1,29 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig 2024-02-25 20:22:18 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig 2024-04-23 07:42:17 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_root.cc @@ -47,7 +47,7 @@ #include "wow64apiset.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #endif -@@ -278,7 +278,7 @@ void PartitionAllocMallocInitOnce() { +@@ -279,7 +279,7 @@ void PartitionAllocMallocInitOnce() { 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. -@@ -377,7 +377,7 @@ static size_t PartitionPurgeSlotSpan(PartitionRoot* ro - (PartitionPageSize() * kMaxPartitionPagesPerRegularSlotSpan) / - MinPurgeableSlotSize(); - #elif BUILDFLAG(IS_APPLE) || \ -- ((BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)) && \ -+ ((BUILDFLAG(IS_ANDROID) || 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, -@@ -942,7 +942,7 @@ void PartitionRoot::Init(PartitionOptions opts) { +@@ -950,7 +950,7 @@ void PartitionRoot::Init(PartitionOptions opts) { // 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_base__paths__posix.cc b/www/ungoogled-chromium/files/patch-base_base__paths__posix.cc index 9fd6f5ce5b82..3bd086bb0886 100644 --- a/www/ungoogled-chromium/files/patch-base_base__paths__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_base__paths__posix.cc @@ -1,108 +1,108 @@ ---- base/base_paths_posix.cc.orig 2023-11-04 07:08:51 UTC +--- base/base_paths_posix.cc.orig 2024-04-23 07:42:17 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" @@ -26,9 +27,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 @@ -48,8 +53,7 @@ bool PathProviderPosix(int key, FilePath* result) { *result = bin_dir; return true; #elif BUILDFLAG(IS_FREEBSD) - int name[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; -- absl::optional bin_dir = StringSysctl(name, std::size(name)); -+ absl::optional bin_dir = StringSysctl({ CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }); +- std::optional bin_dir = StringSysctl(name, std::size(name)); ++ std::optional bin_dir = StringSysctl({ CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }); if (!bin_dir.has_value() || bin_dir.value().length() <= 1) { NOTREACHED() << "Unable to resolve path."; return false; @@ -65,13 +69,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) ++ if ((kd = kvm_openfiles(NULL, NULL, NULL, (int)KVM_NO_FILES, errbuf)) == NULL) + goto out; + + if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, cpid, + sizeof(struct kinfo_file), &cnt)) == NULL) + goto out; + + for (int i = 0; i < cnt; i++) { + if (files[i].fd_fd == KERN_FILE_TEXT && + files[i].va_fsid == static_cast(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_debug_debugger__posix.cc b/www/ungoogled-chromium/files/patch-base_debug_debugger__posix.cc index 2215c8de0bab..b5c2ec083686 100644 --- a/www/ungoogled-chromium/files/patch-base_debug_debugger__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_debug_debugger__posix.cc @@ -1,68 +1,69 @@ ---- base/debug/debugger_posix.cc.orig 2022-10-01 07:40:07 UTC +--- base/debug/debugger_posix.cc.orig 2024-04-23 07:42:17 UTC +++ base/debug/debugger_posix.cc -@@ -35,6 +35,10 @@ +@@ -36,6 +36,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)); +- mib[5] = (info_size / sizeof(struct kinfo_proc)); ++ mib[5] = static_cast((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 index 85e84ead7a7b..5a1b0e4f68df 100644 --- a/www/ungoogled-chromium/files/patch-base_debug_elf__reader.cc +++ b/www/ungoogled-chromium/files/patch-base_debug_elf__reader.cc @@ -1,18 +1,13 @@ ---- base/debug/elf_reader.cc.orig 2023-09-17 07:59:53 UTC +--- base/debug/elf_reader.cc.orig 2024-04-23 07:42:17 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 !BUILDFLAG(IS_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 +@@ -45,6 +45,10 @@ using Xword = Elf64_Xword; + + constexpr char kGnuNoteName[] = "GNU"; - size_t section_size = bits::AlignUp(current_note->n_namesz, 4u) + - bits::AlignUp(current_note->n_descsz, 4u) + ++#ifndef NT_GNU_BUILD_ID ++#define NT_GNU_BUILD_ID 3 ++#endif ++ + // Returns a pointer to the header of the ELF binary mapped into memory, or a + // null pointer if the header is invalid. Here and below |elf_mapped_base| is a + // pointer to the start of the ELF image. diff --git a/www/ungoogled-chromium/files/patch-base_debug_stack__trace.cc b/www/ungoogled-chromium/files/patch-base_debug_stack__trace.cc index 18f30776b747..4df9e4c087ae 100644 --- a/www/ungoogled-chromium/files/patch-base_debug_stack__trace.cc +++ b/www/ungoogled-chromium/files/patch-base_debug_stack__trace.cc @@ -1,21 +1,29 @@ ---- base/debug/stack_trace.cc.orig 2023-12-23 12:33:28 UTC +--- base/debug/stack_trace.cc.orig 2024-04-23 07:42:17 UTC +++ base/debug/stack_trace.cc -@@ -266,7 +266,9 @@ void StackTrace::Print() const { - } - - void StackTrace::OutputToStream(std::ostream* os) const { -+#if !BUILDFLAG(IS_BSD) - OutputToStreamWithPrefix(os, nullptr); -+#endif - } - - std::string StackTrace::ToString() const { -@@ -274,7 +276,7 @@ std::string StackTrace::ToString() const { +@@ -247,7 +247,7 @@ bool StackTrace::WillSymbolizeToStreamForTesting() { + // Symbols are not expected to be reliable when gn args specifies + // symbol_level=0. + return false; +-#elif defined(__UCLIBC__) || defined(_AIX) ++#elif defined(__UCLIBC__) || defined(_AIX) || BUILDFLAG(IS_BSD) + // StackTrace::OutputToStream() is not implemented under uclibc, nor AIX. + // See https://crbug.com/706728 + return false; +@@ -291,7 +291,7 @@ std::string StackTrace::ToString() const { } std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const { std::stringstream stream; -#if !defined(__UCLIBC__) && !defined(_AIX) +#if !defined(__UCLIBC__) && !defined(_AIX) && !BUILDFLAG(IS_BSD) - OutputToStreamWithPrefix(&stream, prefix_string); - #endif - return stream.str(); + if (ShouldSuppressOutput()) { + return "Backtrace suppressed."; + } +@@ -301,7 +301,7 @@ std::string StackTrace::ToStringWithPrefix(const char* + } + + std::ostream& operator<<(std::ostream& os, const StackTrace& s) { +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if !defined(__UCLIBC__) && !defined(_AIX) && !BUILDFLAG(IS_BSD) + s.OutputToStream(&os); + #else + os << "StackTrace::OutputToStream not implemented."; diff --git a/www/ungoogled-chromium/files/patch-base_debug_stack__trace__posix.cc b/www/ungoogled-chromium/files/patch-base_debug_stack__trace__posix.cc index 0cb049fb2255..7fa69cf288de 100644 --- a/www/ungoogled-chromium/files/patch-base_debug_stack__trace__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_debug_stack__trace__posix.cc @@ -1,101 +1,101 @@ ---- base/debug/stack_trace_posix.cc.orig 2023-11-04 07:08:51 UTC +--- base/debug/stack_trace_posix.cc.orig 2024-04-23 07:42:17 UTC +++ base/debug/stack_trace_posix.cc @@ -41,7 +41,7 @@ // execinfo.h and backtrace(3) are really only present in glibc and in macOS // libc. #if BUILDFLAG(IS_APPLE) || \ - (defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__AIX)) + (defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__AIX) && !BUILDFLAG(IS_BSD)) #define HAVE_BACKTRACE #include #endif @@ -59,8 +59,10 @@ #include #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +#if !BUILDFLAG(IS_BSD) #include +#endif #include "base/debug/proc_maps_linux.h" #endif -@@ -302,7 +304,7 @@ void PrintToStderr(const char* output) { +@@ -301,7 +303,7 @@ void PrintToStderr(const char* output) { std::ignore = HANDLE_EINTR(write(STDERR_FILENO, output, strlen(output))); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void AlarmSignalHandler(int signal, siginfo_t* info, void* void_context) { // We have seen rare cases on AMD linux where the default signal handler // either does not run or a thread (Probably an AMD driver thread) prevents -@@ -319,7 +321,11 @@ void AlarmSignalHandler(int signal, siginfo_t* info, v +@@ -318,7 +320,11 @@ void AlarmSignalHandler(int signal, siginfo_t* info, v "Warning: Default signal handler failed to terminate process.\n"); PrintToStderr("Calling exit_group() directly to prevent timeout.\n"); // See: https://man7.org/linux/man-pages/man2/exit_group.2.html +#if BUILDFLAG(IS_BSD) + _exit(EXIT_FAILURE); +#else syscall(SYS_exit_group, EXIT_FAILURE); +#endif } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || // BUILDFLAG(IS_CHROMEOS) -@@ -536,7 +542,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf +@@ -535,7 +541,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf _exit(EXIT_FAILURE); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Set an alarm to trigger in case the default handler does not terminate // the process. See 'AlarmSignalHandler' for more details. struct sigaction action; -@@ -561,6 +567,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf +@@ -560,6 +566,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf // signals that do not re-raise autonomously), such as signals delivered via // kill() and asynchronous hardware faults such as SEGV_MTEAERR, which would // otherwise be lost when re-raising the signal via raise(). +#if !BUILDFLAG(IS_BSD) long retval = syscall(SYS_rt_tgsigqueueinfo, getpid(), syscall(SYS_gettid), info->si_signo, info); if (retval == 0) { -@@ -575,6 +582,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf +@@ -574,6 +581,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf if (errno != EPERM) { _exit(EXIT_FAILURE); } +#endif #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || // BUILDFLAG(IS_CHROMEOS) -@@ -764,6 +772,7 @@ class SandboxSymbolizeHelper { +@@ -763,6 +771,7 @@ class SandboxSymbolizeHelper { return -1; } +#if !BUILDFLAG(IS_BSD) // This class is copied from // third_party/crashpad/crashpad/util/linux/scoped_pr_set_dumpable.h. // It aims at ensuring the process is dumpable before opening /proc/self/mem. -@@ -856,11 +865,15 @@ class SandboxSymbolizeHelper { +@@ -855,11 +864,15 @@ class SandboxSymbolizeHelper { r.base = cur_base; } } +#endif // Parses /proc/self/maps in order to compile a list of all object file names // for the modules that are loaded in the current process. // Returns true on success. bool CacheMemoryRegions() { +#if BUILDFLAG(IS_BSD) + return false; +#else // Reads /proc/self/maps. std::string contents; if (!ReadProcMaps(&contents)) { -@@ -878,6 +891,7 @@ class SandboxSymbolizeHelper { +@@ -877,6 +890,7 @@ class SandboxSymbolizeHelper { is_initialized_ = true; return true; +#endif } // Opens all object files and caches their file descriptors. 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 index 6e03bee4018c..215e5bb7a419 100644 --- a/www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc @@ -1,53 +1,53 @@ ---- base/files/file_util_posix.cc.orig 2024-02-25 20:22:18 UTC +--- base/files/file_util_posix.cc.orig 2024-04-23 07:42:17 UTC +++ base/files/file_util_posix.cc -@@ -779,33 +779,34 @@ bool CreateDirectoryAndGetError(const FilePath& full_p +@@ -816,33 +816,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); - errno = 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 index 8cf070b985d7..c453bd902b37 100644 --- a/www/ungoogled-chromium/files/patch-base_files_file__util__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_files_file__util__unittest.cc @@ -1,20 +1,20 @@ ---- base/files/file_util_unittest.cc.orig 2024-02-25 20:22:18 UTC +--- base/files/file_util_unittest.cc.orig 2024-04-23 07:42:17 UTC +++ base/files/file_util_unittest.cc -@@ -3869,7 +3869,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { +@@ -3870,7 +3870,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"; -@@ -4592,7 +4592,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles +@@ -4651,7 +4651,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_memory_platform__shared__memory__region.h b/www/ungoogled-chromium/files/patch-base_memory_platform__shared__memory__region.h index 65e0cbb2ce11..cbf4842a0c90 100644 --- 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 @@ -1,29 +1,29 @@ ---- base/memory/platform_shared_memory_region.h.orig 2023-07-21 09:49:17 UTC +--- base/memory/platform_shared_memory_region.h.orig 2024-04-23 07:42:17 UTC +++ base/memory/platform_shared_memory_region.h -@@ -16,7 +16,7 @@ - - #include +@@ -17,7 +17,7 @@ + #include "base/unguessable_token.h" + #include "build/build_config.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) namespace content { class SandboxIPCHandler; } -@@ -83,7 +83,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { +@@ -84,7 +84,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: -@@ -215,7 +215,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { +@@ -216,7 +216,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_posix_unix__domain__socket.cc b/www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket.cc index a361dc6d8ccf..e2e5341a3cf4 100644 --- a/www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket.cc +++ b/www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket.cc @@ -1,39 +1,57 @@ ---- base/posix/unix_domain_socket.cc.orig 2022-10-01 07:40:07 UTC +--- base/posix/unix_domain_socket.cc.orig 2024-04-23 07:42:17 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 +@@ -77,7 +77,7 @@ bool UnixDomainSocket::SendMsg(int fd, + + struct cmsghdr* cmsg; + msg.msg_control = control_buffer; +-#if BUILDFLAG(IS_APPLE) ++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) + msg.msg_controllen = checked_cast(control_len); + #else + msg.msg_controllen = control_len; +@@ -85,7 +85,7 @@ bool UnixDomainSocket::SendMsg(int fd, + cmsg = CMSG_FIRSTHDR(&msg); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; +-#if BUILDFLAG(IS_APPLE) ++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) + cmsg->cmsg_len = checked_cast(CMSG_LEN(sizeof(int) * fds.size())); + #else + cmsg->cmsg_len = CMSG_LEN(sizeof(int) * fds.size()); @@ -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_process_internal__linux.h b/www/ungoogled-chromium/files/patch-base_process_internal__linux.h new file mode 100644 index 000000000000..1a80e0cbdbcf --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_internal__linux.h @@ -0,0 +1,20 @@ +--- base/process/internal_linux.h.orig 2024-04-23 07:42:17 UTC ++++ base/process/internal_linux.h +@@ -138,6 +138,9 @@ TimeDelta ClockTicksToTimeDelta(int64_t clock_ticks); + // arguments to the lambda. + template + void ForEachProcessTask(base::ProcessHandle process, Lambda&& lambda) { ++#if BUILDFLAG(IS_BSD) ++ return; ++#else + // Iterate through the different threads tracked in /proc//task. + FilePath fd_path = GetProcPidDir(process).Append("task"); + +@@ -157,6 +160,7 @@ void ForEachProcessTask(base::ProcessHandle process, L + FilePath task_path = fd_path.Append(tid_str); + lambda(tid, task_path); + } ++#endif + } + + } // namespace internal 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 index c736c91cab41..37170cefca55 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__handle__freebsd.cc +++ b/www/ungoogled-chromium/files/patch-base_process_process__handle__freebsd.cc @@ -1,25 +1,25 @@ ---- base/process/process_handle_freebsd.cc.orig 2023-11-04 07:08:51 UTC +--- base/process/process_handle_freebsd.cc.orig 2024-04-23 07:42:17 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 -@@ -19,10 +20,13 @@ namespace base { +@@ -20,10 +21,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 index 35879219717e..e2b771b179ef 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__handle__openbsd.cc +++ b/www/ungoogled-chromium/files/patch-base_process_process__handle__openbsd.cc @@ -1,133 +1,133 @@ ---- base/process/process_handle_openbsd.cc.orig 2024-03-22 14:16:19 UTC +--- base/process/process_handle_openbsd.cc.orig 2024-04-23 07:42:17 UTC +++ base/process/process_handle_openbsd.cc @@ -3,48 +3,112 @@ // found in the LICENSE file. #include "base/process/process_handle.h" +#include "base/files/file_util.h" #include +#include +#include +#include +#include #include #include #include +#include + 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; - mib[5] = (length / sizeof(struct kinfo_proc)); + info = (struct kinfo_proc *)malloc(length); - if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) - return -1; + mib[5] = static_cast((length / sizeof(struct kinfo_proc))); - return info.p_ppid; + if (sysctl(mib, std::size(mib), info, &length, NULL, 0) < 0) { + ppid = -1; + goto out; + } + + ppid = info->p_ppid; + +out: + free(info); + return ppid; } FilePath GetProcessExecutablePath(ProcessHandle process) { - struct kinfo_proc kp; + struct kinfo_file *files; + kvm_t *kd = NULL; + char errbuf[_POSIX2_LINE_MAX]; + char **retvalargs, *cpath, retval[PATH_MAX]; + int cnt; size_t len; - int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process, - sizeof(struct kinfo_proc), 0 }; + char *tokens[2]; + struct stat sb; -+ FilePath *result = nullptr; ++ FilePath result; - if (sysctl(mib, std::size(mib), NULL, &len, NULL, 0) == -1) - return FilePath(); - mib[5] = (len / sizeof(struct kinfo_proc)); - if (sysctl(mib, std::size(mib), &kp, &len, NULL, 0) < 0) - return FilePath(); - if ((kp.p_flag & P_SYSTEM) != 0) - return FilePath(); - if (strcmp(kp.p_comm, "chrome") == 0) - return FilePath(kp.p_comm); + int mib[] = { CTL_KERN, KERN_PROC_ARGS, process, KERN_PROC_ARGV }; - return FilePath(); + if ((cpath = getenv("CHROME_EXE_PATH")) != NULL) -+ *result = FilePath(cpath); ++ result = FilePath(cpath); + else -+ *result = FilePath("/usr/local/chrome/chrome"); ++ result = FilePath("/usr/local/chrome/chrome"); + + if (sysctl(mib, std::size(mib), NULL, &len, NULL, 0) != -1) { + retvalargs = static_cast(malloc(len)); + if (!retvalargs) -+ return *result; ++ return result; + + if (sysctl(mib, std::size(mib), retvalargs, &len, NULL, 0) < 0) { + free(retvalargs); -+ return *result; ++ return result; + } + + if ((*tokens = strtok(retvalargs[0], ":")) == NULL) { + free(retvalargs); -+ return *result; ++ return result; + } + + free(retvalargs); + + if (tokens[0] == NULL) -+ return *result; ++ return result; + + if (realpath(tokens[0], retval) == NULL) -+ return *result; ++ return result; + + if (stat(retval, &sb) < 0) -+ return *result; ++ return result; + -+ if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, ++ if ((kd = kvm_openfiles(NULL, NULL, NULL, (int)KVM_NO_FILES, + errbuf)) == NULL) -+ return *result; ++ return result; + + if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, process, + sizeof(struct kinfo_file), &cnt)) == NULL) { + kvm_close(kd); -+ return *result; ++ return result; + } + + 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) { + kvm_close(kd); -+ *result = FilePath(retval); ++ result = FilePath(retval); + } + } + } + -+ return *result; ++ return result; } } // namespace base diff --git a/www/ungoogled-chromium/files/patch-base_process_process__metrics.cc b/www/ungoogled-chromium/files/patch-base_process_process__metrics.cc index 2fdde30d8a3a..dd601c3e43f7 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__metrics.cc +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics.cc @@ -1,54 +1,49 @@ ---- base/process/process_metrics.cc.orig 2023-06-05 19:39:05 UTC +--- base/process/process_metrics.cc.orig 2024-04-23 07:42:17 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::Dict SystemMetrics::ToDict() const { Value::Dict res; res.Set("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::Dict meminfo = memory_info_.ToDict(); meminfo.Merge(vmstat_info_.ToDict()); res.Set("meminfo", std::move(meminfo)); @@ -100,7 +100,6 @@ std::unique_ptr ProcessMetrics::Create #endif // !BUILDFLAG(IS_MAC) } -#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX) double ProcessMetrics::GetPlatformIndependentCPUUsage( TimeDelta cumulative_cpu) { TimeTicks time = TimeTicks::Now(); -@@ -126,7 +125,6 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( - double ProcessMetrics::GetPlatformIndependentCPUUsage() { - return GetPlatformIndependentCPUUsage(GetCumulativeCPUUsage()); +@@ -130,10 +129,9 @@ std::optional ProcessMetrics::GetPlatformIndep + } + return GetPlatformIndependentCPUUsage(cpu_usage.value()); } -#endif - #if BUILDFLAG(IS_WIN) - double ProcessMetrics::GetPreciseCPUUsage(TimeDelta cumulative_cpu) { -@@ -157,7 +155,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 index a7e383cdc65d..c6c8c908512d 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__metrics.h +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics.h @@ -1,120 +1,115 @@ ---- base/process/process_metrics.h.orig 2024-03-22 14:16:19 UTC +--- base/process/process_metrics.h.orig 2024-04-23 07:42:17 UTC +++ base/process/process_metrics.h -@@ -37,7 +37,7 @@ +@@ -38,7 +38,7 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) #include #include #include -@@ -50,7 +50,7 @@ namespace base { - // Full declaration is in process_metrics_iocounters.h. - struct IoCounters; +@@ -48,7 +48,7 @@ + + namespace base { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Minor and major page fault counts since the process creation. // Both counts are process-wide, and exclude child processes. // -@@ -105,7 +105,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -103,7 +103,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; -@@ -163,7 +163,7 @@ class BASE_EXPORT ProcessMetrics { - #endif // BUILDFLAG(IS_WIN) +@@ -137,7 +137,7 @@ class BASE_EXPORT ProcessMetrics { + [[nodiscard]] std::optional GetCumulativeCPUUsage(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Emits the cumulative CPU usage for all currently active threads since they // were started into the output parameter (replacing its current contents). // Threads that have already terminated will not be reported. Thus, the sum of -@@ -219,7 +219,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -182,7 +182,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; -@@ -240,7 +240,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -203,7 +203,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) -@@ -262,9 +262,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -225,12 +225,10 @@ class BASE_EXPORT ProcessMetrics { // Used to store the previous times and CPU usage counts so we can // compute the CPU usage between calls. TimeTicks last_cpu_time_; -#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX) TimeDelta last_cumulative_cpu_; -#endif - #if BUILDFLAG(IS_WIN) - TimeTicks last_cpu_time_for_precise_cpu_usage_; -@@ -272,7 +270,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_; -@@ -313,7 +311,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de +@@ -271,7 +269,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. // -@@ -348,7 +346,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -306,7 +304,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 -@@ -363,7 +361,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -321,7 +319,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; -@@ -400,7 +398,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK +@@ -358,7 +356,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. -@@ -594,7 +592,7 @@ class BASE_EXPORT SystemMetrics { +@@ -552,7 +550,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 index c4a7e32e3b24..b5ffa0f8a7fb 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__metrics__freebsd.cc +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics__freebsd.cc @@ -1,305 +1,304 @@ ---- base/process/process_metrics_freebsd.cc.orig 2023-03-10 11:01:21 UTC +--- base/process/process_metrics_freebsd.cc.orig 2024-04-23 07:42:17 UTC +++ base/process/process_metrics_freebsd.cc -@@ -3,20 +3,39 @@ +@@ -3,42 +3,57 @@ // 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; +-ProcessMetrics::ProcessMetrics(ProcessHandle process) +- : process_(process), +- last_cpu_(0) {} + while (pagesize > 1) { + pageshift++; + pagesize >>= 1; + } -+ + + return pageshift; +} +} + - ProcessMetrics::ProcessMetrics(ProcessHandle process) -- : process_(process), -- last_cpu_(0) {} -+ : process_(process) {} - ++ProcessMetrics::ProcessMetrics(ProcessHandle process) : process_(process) {} ++ // static std::unique_ptr ProcessMetrics::CreateProcessMetrics( -@@ -24,22 +43,19 @@ std::unique_ptr ProcessMetrics::Create + ProcessHandle process) { return WrapUnique(new ProcessMetrics(process)); } --double ProcessMetrics::GetPlatformIndependentCPUUsage() { -+TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { +-std::optional ProcessMetrics::GetPlatformIndependentCPUUsage() { ++std::optional ProcessMetrics::GetCumulativeCPUUsage() { 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); + struct timeval tv; + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_ }; + if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) -- return 0; -+ return TimeDelta(); +- return std::nullopt; ++ return std::optional(TimeDelta()); -- return (info.ki_pctcpu / FSCALE) * 100.0; -+ return Microseconds(info.ki_runtime); +- return std::optional(double{info.ki_pctcpu} / FSCALE * 100.0); ++ return std::optional(Microseconds(info.ki_runtime)); } --TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { +-std::optional ProcessMetrics::GetCumulativeCPUUsage() { - NOTREACHED(); -- return TimeDelta(); +- return std::nullopt; -} - - bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const { - return false; - } -@@ -65,6 +81,230 @@ size_t GetSystemCommitCharge() { + size_t GetSystemCommitCharge() { + int mib[2], pagesize; + unsigned long mem_total, mem_free, mem_inactive; +@@ -60,6 +75,230 @@ size_t GetSystemCommitCharge() { pagesize = getpagesize(); 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::Dict SystemDiskInfo::ToDict() const { + Value::Dict res; -+ ++ + // Write out uint64_t variables as doubles. + // Note: this may discard some precision, but for JS there's no other option. + res.Set("reads", static_cast(reads)); + res.Set("reads_merged", static_cast(reads_merged)); + res.Set("sectors_read", static_cast(sectors_read)); + res.Set("read_time", static_cast(read_time)); + res.Set("writes", static_cast(writes)); + res.Set("writes_merged", static_cast(writes_merged)); + res.Set("sectors_written", static_cast(sectors_written)); + res.Set("write_time", static_cast(write_time)); + res.Set("io", static_cast(io)); + res.Set("io_time", static_cast(io_time)); + res.Set("weighted_io_time", static_cast(weighted_io_time)); + + NOTIMPLEMENTED(); -+ ++ + return res; +} + +Value::Dict SystemMemoryInfoKB::ToDict() const { + Value::Dict res; + res.Set("total", total); + res.Set("free", free); + res.Set("available", available); + res.Set("buffers", buffers); + res.Set("cached", cached); + res.Set("active_anon", active_anon); + res.Set("inactive_anon", inactive_anon); + res.Set("active_file", active_file); + res.Set("inactive_file", inactive_file); + res.Set("swap_total", swap_total); + res.Set("swap_free", swap_free); + res.Set("swap_used", swap_total - swap_free); + res.Set("dirty", dirty); + res.Set("reclaimable", reclaimable); + + NOTIMPLEMENTED(); + + return res; +} + +Value::Dict VmStatInfo::ToDict() const { + Value::Dict res; + // TODO(crbug.com/1334256): Make base::Value able to hold uint64_t and remove + // casts below. + res.Set("pswpin", static_cast(pswpin)); + res.Set("pswpout", static_cast(pswpout)); + res.Set("pgmajfault", static_cast(pgmajfault)); + + NOTIMPLEMENTED(); + + 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 index 9d28322389c4..8c70c822abf5 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc @@ -1,227 +1,232 @@ ---- base/process/process_metrics_openbsd.cc.orig 2024-02-25 20:22:18 UTC +--- base/process/process_metrics_openbsd.cc.orig 2024-04-23 07:42:17 UTC +++ base/process/process_metrics_openbsd.cc -@@ -6,14 +6,23 @@ +@@ -6,73 +6,49 @@ #include #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,52 +33,26 @@ bool ProcessMetrics::GetIOCounters(IoCounters* io_coun - return false; - } +-namespace { ++ProcessMetrics::ProcessMetrics(ProcessHandle process) : process_(process) {} --static int GetProcessCPU(pid_t pid) { -+TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { +-static std::optional GetProcessCPU(pid_t pid) { ++std::optional 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; +- if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) < 0) { +- return std::nullopt; +- } + 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(); + if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) { +- return std::nullopt; ++ return std::optional(TimeDelta()); + } -- return info.p_pctcpu; --} +- return std::optional(info.p_pctcpu); + tv.tv_sec = info.p_rtime_sec; + tv.tv_usec = info.p_rtime_usec; ++ ++ return std::optional(Microseconds(TimeValToMicroseconds(tv))); + } --double ProcessMetrics::GetPlatformIndependentCPUUsage() { +-} // namespace +- + // static + std::unique_ptr ProcessMetrics::CreateProcessMetrics( + ProcessHandle process) { + return WrapUnique(new ProcessMetrics(process)); + } + +-std::optional 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; +- return std::optional(0.0); - } - -- int cpu = GetProcessCPU(process_); +- const std::optional cpu = GetProcessCPU(process_); +- if (!cpu.has_value()) { +- return std::nullopt; +- } - - last_cpu_time_ = time; -- double percentage = static_cast((cpu * 100.0) / FSCALE); +- return std::optional(double{cpu.value()} / FSCALE * 100.0); +-} - -- return percentage; -+ return Microseconds(TimeValToMicroseconds(tv)); - } - --TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { +-std::optional ProcessMetrics::GetCumulativeCPUUsage() { - NOTREACHED(); -- return TimeDelta(); +- return std::nullopt; -} - -ProcessMetrics::ProcessMetrics(ProcessHandle process) - : process_(process), - last_cpu_(0) {} - size_t GetSystemCommitCharge() { int mib[] = { CTL_VM, VM_METER }; - int pagesize; + size_t pagesize; struct vmtotal vmtotal; unsigned long mem_total, mem_free, mem_inactive; size_t len = sizeof(vmtotal); -@@ -81,9 +64,136 @@ size_t GetSystemCommitCharge() { +@@ -84,9 +60,136 @@ size_t GetSystemCommitCharge() { mem_free = vmtotal.t_free; mem_inactive = vmtotal.t_vm - vmtotal.t_avm; - pagesize = getpagesize(); + pagesize = checked_cast(getpagesize()); return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize); +} + +int ProcessMetrics::GetOpenFdCount() const { +#if 0 + 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; +#endif + return getdtablecount(); +} + +int ProcessMetrics::GetOpenFdSoftLimit() const { + return getdtablesize(); +// return GetMaxFds(); +} + +uint64_t ProcessMetrics::GetVmSwapBytes() const { + NOTIMPLEMENTED(); + return 0; +} + +bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo) { + NOTIMPLEMENTED_LOG_ONCE(); + return false; +} + +bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) { + NOTIMPLEMENTED(); + return false; +} + +bool GetVmStatInfo(VmStatInfo* vmstat) { + NOTIMPLEMENTED(); + return false; +} + +int ProcessMetrics::GetIdleWakeupsPerSecond() { + NOTIMPLEMENTED(); + return 0; +} + +Value::Dict SystemMemoryInfoKB::ToDict() const { + Value::Dict res; + res.Set("total", total); + res.Set("free", free); + res.Set("available", available); + res.Set("buffers", buffers); + res.Set("cached", cached); + res.Set("active_anon", active_anon); + res.Set("inactive_anon", inactive_anon); + res.Set("active_file", active_file); + res.Set("inactive_file", inactive_file); + res.Set("swap_total", swap_total); + res.Set("swap_free", swap_free); + res.Set("swap_used", swap_total - swap_free); + res.Set("dirty", dirty); + res.Set("reclaimable", reclaimable); + + NOTIMPLEMENTED(); + + return res; +} + +Value::Dict VmStatInfo::ToDict() const { + Value::Dict res; + res.Set("pswpin", static_cast(pswpin)); + res.Set("pswpout", static_cast(pswpout)); + res.Set("pgmajfault", static_cast(pgmajfault)); + + NOTIMPLEMENTED(); + + return res; +} + +SystemDiskInfo::SystemDiskInfo() { + reads = 0; + reads_merged = 0; + sectors_read = 0; + read_time = 0; + writes = 0; + writes_merged = 0; + sectors_written = 0; + write_time = 0; + io = 0; + io_time = 0; + weighted_io_time = 0; +} + +SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo&) = default; + +SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default; + +Value::Dict SystemDiskInfo::ToDict() const { + Value::Dict res; + + // Write out uint64_t variables as doubles. + // Note: this may discard some precision, but for JS there's no other option. + res.Set("reads", static_cast(reads)); + res.Set("reads_merged", static_cast(reads_merged)); + res.Set("sectors_read", static_cast(sectors_read)); + res.Set("read_time", static_cast(read_time)); + res.Set("writes", static_cast(writes)); + res.Set("writes_merged", static_cast(writes_merged)); + res.Set("sectors_written", static_cast(sectors_written)); + res.Set("write_time", static_cast(write_time)); + res.Set("io", static_cast(io)); + res.Set("io_time", static_cast(io_time)); + res.Set("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__unittest.cc b/www/ungoogled-chromium/files/patch-base_process_process__metrics__unittest.cc index a65bb10b94b5..dfaddb7e8a6d 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__metrics__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics__unittest.cc @@ -1,12 +1,12 @@ ---- base/process/process_metrics_unittest.cc.orig 2024-02-25 20:22:18 UTC +--- base/process/process_metrics_unittest.cc.orig 2024-04-23 07:42:17 UTC +++ base/process/process_metrics_unittest.cc -@@ -54,7 +54,8 @@ +@@ -56,7 +56,8 @@ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) || \ + BUILDFLAG(IS_BSD) #define ENABLE_CPU_TESTS 1 #else #define ENABLE_CPU_TESTS 0 diff --git a/www/ungoogled-chromium/files/patch-base_profiler_module__cache.cc b/www/ungoogled-chromium/files/patch-base_profiler_module__cache.cc index 3952155ee7a0..3efd75658a50 100644 --- a/www/ungoogled-chromium/files/patch-base_profiler_module__cache.cc +++ b/www/ungoogled-chromium/files/patch-base_profiler_module__cache.cc @@ -1,11 +1,11 @@ ---- base/profiler/module_cache.cc.orig 2023-12-23 12:33:28 UTC +--- base/profiler/module_cache.cc.orig 2024-04-23 07:42:17 UTC +++ base/profiler/module_cache.cc -@@ -37,7 +37,7 @@ std::string TransformModuleIDToSymbolServerFormat(Stri +@@ -38,7 +38,7 @@ std::string TransformModuleIDToSymbolServerFormat(std: // Android and Linux Chrome builds use the "breakpad" format to index their // build id, so we transform the build id for these platforms. All other // platforms keep their symbols indexed by the original build ID. -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Linux ELF module IDs are 160bit integers, which we need to mangle // down to 128bit integers to match the id that Breakpad outputs. // Example on version '66.0.3359.170' x64: diff --git a/www/ungoogled-chromium/files/patch-base_profiler_sampling__profiler__thread__token.cc b/www/ungoogled-chromium/files/patch-base_profiler_sampling__profiler__thread__token.cc index f59002f90fd0..630036dcceee 100644 --- a/www/ungoogled-chromium/files/patch-base_profiler_sampling__profiler__thread__token.cc +++ b/www/ungoogled-chromium/files/patch-base_profiler_sampling__profiler__thread__token.cc @@ -1,20 +1,20 @@ ---- base/profiler/sampling_profiler_thread_token.cc.orig 2023-02-11 09:11:04 UTC +--- base/profiler/sampling_profiler_thread_token.cc.orig 2024-04-23 07:42:17 UTC +++ base/profiler/sampling_profiler_thread_token.cc @@ -6,7 +6,7 @@ #include "build/build_config.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include "base/profiler/stack_base_address_posix.h" @@ -18,7 +18,7 @@ SamplingProfilerThreadToken GetSamplingProfilerCurrent PlatformThreadId id = PlatformThread::CurrentId(); #if BUILDFLAG(IS_ANDROID) return {id, pthread_self()}; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - absl::optional maybe_stack_base = + std::optional maybe_stack_base = GetThreadStackBaseAddress(id, pthread_self()); return {id, maybe_stack_base}; diff --git a/www/ungoogled-chromium/files/patch-base_profiler_sampling__profiler__thread__token.h b/www/ungoogled-chromium/files/patch-base_profiler_sampling__profiler__thread__token.h index a39fe8f28213..a1924283d37f 100644 --- a/www/ungoogled-chromium/files/patch-base_profiler_sampling__profiler__thread__token.h +++ b/www/ungoogled-chromium/files/patch-base_profiler_sampling__profiler__thread__token.h @@ -1,20 +1,20 @@ ---- base/profiler/sampling_profiler_thread_token.h.orig 2023-02-11 09:11:04 UTC +--- base/profiler/sampling_profiler_thread_token.h.orig 2024-04-23 07:42:17 UTC +++ base/profiler/sampling_profiler_thread_token.h -@@ -12,7 +12,7 @@ +@@ -13,7 +13,7 @@ #if BUILDFLAG(IS_ANDROID) #include -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #endif -@@ -26,7 +26,7 @@ struct SamplingProfilerThreadToken { +@@ -27,7 +27,7 @@ struct SamplingProfilerThreadToken { PlatformThreadId id; #if BUILDFLAG(IS_ANDROID) pthread_t pthread_id; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Due to the sandbox, we can only retrieve the stack base address for the // current thread. We must grab it during // GetSamplingProfilerCurrentThreadToken() and not try to get it later. diff --git a/www/ungoogled-chromium/files/patch-base_profiler_stack__base__address__posix.cc b/www/ungoogled-chromium/files/patch-base_profiler_stack__base__address__posix.cc index 0c2a3062495e..aa0e482e38fc 100644 --- a/www/ungoogled-chromium/files/patch-base_profiler_stack__base__address__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_profiler_stack__base__address__posix.cc @@ -1,50 +1,59 @@ ---- base/profiler/stack_base_address_posix.cc.orig 2023-02-11 09:11:04 UTC +--- base/profiler/stack_base_address_posix.cc.orig 2024-04-23 07:42:17 UTC +++ base/profiler/stack_base_address_posix.cc @@ -17,6 +17,10 @@ #include "base/files/scoped_file.h" #endif +#if BUILDFLAG(IS_BSD) +#include +#endif + #if BUILDFLAG(IS_CHROMEOS) extern "C" void* __libc_stack_end; #endif -@@ -45,7 +49,21 @@ absl::optional GetAndroidMainThreadStackBas +@@ -45,7 +49,21 @@ std::optional GetAndroidMainThreadStackBase #if !BUILDFLAG(IS_LINUX) uintptr_t GetThreadStackBaseAddressImpl(pthread_t pthread_id) { +#if BUILDFLAG(IS_OPENBSD) + stack_t ss; + void *address; + size_t size; + if (pthread_stackseg_np(pthread_id, &ss) != 0) + return 0; + size = ss.ss_size; + address = (void*)((size_t) ss.ss_sp - ss.ss_size); +#else pthread_attr_t attr; +#if BUILDFLAG(IS_FREEBSD) + int result; + pthread_attr_init(&attr); + pthread_attr_get_np(pthread_id, &attr); +#else // pthread_getattr_np will crash on ChromeOS & Linux if we are in the sandbox // and pthread_id refers to a different thread, due to the use of // sched_getaffinity(). @@ -58,12 +76,14 @@ uintptr_t GetThreadStackBaseAddressImpl(pthread_t pthr << logging::SystemErrorCodeToString(result); // See crbug.com/617730 for limitations of this approach on Linux-like // systems. +#endif void* address; size_t size; result = pthread_attr_getstack(&attr, &address, &size); CHECK_EQ(result, 0) << "pthread_attr_getstack returned " << logging::SystemErrorCodeToString(result); pthread_attr_destroy(&attr); +#endif const uintptr_t base_address = reinterpret_cast(address) + size; return base_address; } +@@ -80,7 +100,7 @@ std::optional GetThreadStackBaseAddress(Pla + // trying to work around the problem. + return std::nullopt; + #else +- const bool is_main_thread = id == GetCurrentProcId(); ++ const bool is_main_thread = id == checked_cast(GetCurrentProcId()); + if (is_main_thread) { + #if BUILDFLAG(IS_ANDROID) + // The implementation of pthread_getattr_np() in Bionic reads proc/self/maps 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 index e7729a1c6aef..c7cbb2eb27ee 100644 --- 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 @@ -1,11 +1,11 @@ ---- base/profiler/stack_sampling_profiler_test_util.cc.orig 2023-05-05 12:12:41 UTC +--- base/profiler/stack_sampling_profiler_test_util.cc.orig 2024-04-23 07:42:17 UTC +++ base/profiler/stack_sampling_profiler_test_util.cc -@@ -36,7 +36,7 @@ +@@ -37,7 +37,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_thread__delegate__posix.cc b/www/ungoogled-chromium/files/patch-base_profiler_thread__delegate__posix.cc index 6c25d7a5eb52..b757d966f758 100644 --- a/www/ungoogled-chromium/files/patch-base_profiler_thread__delegate__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_profiler_thread__delegate__posix.cc @@ -1,20 +1,20 @@ ---- base/profiler/thread_delegate_posix.cc.orig 2022-10-29 17:50:56 UTC +--- base/profiler/thread_delegate_posix.cc.orig 2024-04-23 07:42:17 UTC +++ base/profiler/thread_delegate_posix.cc -@@ -13,7 +13,7 @@ +@@ -14,7 +14,7 @@ + #include "base/process/process_handle.h" #include "build/build_config.h" - #include "third_party/abseil-cpp/absl/types/optional.h" -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) #include "base/profiler/stack_base_address_posix.h" #endif -@@ -22,7 +22,7 @@ namespace base { +@@ -23,7 +23,7 @@ namespace base { std::unique_ptr ThreadDelegatePosix::Create( SamplingProfilerThreadToken thread_token) { - absl::optional base_address; + std::optional base_address; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base_address = thread_token.stack_base_address; #else base_address = diff --git a/www/ungoogled-chromium/files/patch-base_synchronization_lock__impl.h b/www/ungoogled-chromium/files/patch-base_synchronization_lock__impl.h index 0c9e47bfcc8c..49632565037f 100644 --- a/www/ungoogled-chromium/files/patch-base_synchronization_lock__impl.h +++ b/www/ungoogled-chromium/files/patch-base_synchronization_lock__impl.h @@ -1,23 +1,23 @@ ---- base/synchronization/lock_impl.h.orig 2024-03-22 14:16:19 UTC +--- base/synchronization/lock_impl.h.orig 2024-04-23 07:42:17 UTC +++ base/synchronization/lock_impl.h -@@ -105,6 +105,10 @@ void LockImpl::Unlock() { +@@ -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); -@@ -125,6 +129,9 @@ void LockImpl::Unlock() { +@@ -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_system_sys__info.h b/www/ungoogled-chromium/files/patch-base_system_sys__info.h index 4ba8bcc9e887..1debe80e3b03 100644 --- a/www/ungoogled-chromium/files/patch-base_system_sys__info.h +++ b/www/ungoogled-chromium/files/patch-base_system_sys__info.h @@ -1,20 +1,20 @@ ---- base/system/sys_info.h.orig 2024-02-03 15:42:55 UTC +--- base/system/sys_info.h.orig 2024-04-23 07:42:17 UTC +++ base/system/sys_info.h -@@ -318,6 +318,8 @@ class BASE_EXPORT SysInfo { +@@ -322,6 +322,8 @@ class BASE_EXPORT SysInfo { static void ResetCpuSecurityMitigationsEnabledForTesting(); #endif + static uint64_t MaxSharedMemorySize(); + private: friend class test::ScopedAmountOfPhysicalMemoryOverride; FRIEND_TEST_ALL_PREFIXES(SysInfoTest, AmountOfAvailablePhysicalMemory); -@@ -330,7 +332,7 @@ class BASE_EXPORT SysInfo { +@@ -334,7 +336,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__unittest.cc b/www/ungoogled-chromium/files/patch-base_system_sys__info__unittest.cc index 9d711ef21811..f322ac2087c7 100644 --- a/www/ungoogled-chromium/files/patch-base_system_sys__info__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_system_sys__info__unittest.cc @@ -1,20 +1,20 @@ ---- base/system/sys_info_unittest.cc.orig 2023-08-18 10:26:52 UTC +--- base/system/sys_info_unittest.cc.orig 2024-04-23 07:42:17 UTC +++ base/system/sys_info_unittest.cc -@@ -263,12 +263,16 @@ TEST_F(SysInfoTest, GetHardwareInfo) { +@@ -264,12 +264,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_threading_platform__thread.h b/www/ungoogled-chromium/files/patch-base_threading_platform__thread.h new file mode 100644 index 000000000000..9f4ebd22b2ee --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_threading_platform__thread.h @@ -0,0 +1,11 @@ +--- base/threading/platform_thread.h.orig 2024-04-23 07:42:17 UTC ++++ base/threading/platform_thread.h +@@ -46,6 +46,8 @@ typedef DWORD PlatformThreadId; + typedef zx_koid_t PlatformThreadId; + #elif BUILDFLAG(IS_APPLE) + typedef mach_port_t PlatformThreadId; ++#elif BUILDFLAG(IS_BSD) ++typedef uint64_t PlatformThreadId; + #elif BUILDFLAG(IS_POSIX) + typedef pid_t PlatformThreadId; + #endif diff --git a/www/ungoogled-chromium/files/patch-base_threading_platform__thread__bsd.cc b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__bsd.cc index bf464ebcaa62..9a05b85578fa 100644 --- a/www/ungoogled-chromium/files/patch-base_threading_platform__thread__bsd.cc +++ b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__bsd.cc @@ -1,34 +1,34 @@ ---- base/threading/platform_thread_bsd.cc.orig 2023-09-17 07:59:53 UTC +--- base/threading/platform_thread_bsd.cc.orig 2024-04-23 07:42:17 UTC +++ base/threading/platform_thread_bsd.cc @@ -0,0 +1,31 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// Description: These are stubs for *BSD. + +#include "base/threading/platform_thread.h" + +namespace base { +namespace internal { + +bool CanSetThreadTypeToRealtimeAudio() { + return false; +} + +bool SetCurrentThreadTypeForPlatform(ThreadType thread_type, + MessagePumpType pump_type_hint) { + return false; +} + -+absl::optional ++std::optional +GetCurrentThreadPriorityForPlatformForTest() { -+ return absl::nullopt; ++ return std::nullopt; +} +} // namespace internal + +// static +void PlatformThreadBase::SetName(const std::string& name) { + SetNameCommon(name); +} + +} // namespace base 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 index 9ee8cbb51a68..12e9bc5093bd 100644 --- a/www/ungoogled-chromium/files/patch-base_threading_platform__thread__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__posix.cc @@ -1,45 +1,54 @@ ---- base/threading/platform_thread_posix.cc.orig 2024-02-25 20:22:18 UTC +--- base/threading/platform_thread_posix.cc.orig 2024-04-23 07:42:17 UTC +++ base/threading/platform_thread_posix.cc @@ -78,12 +78,12 @@ void* ThreadFunc(void* params) { if (!thread_params->joinable) base::DisallowSingleton(); -#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(USE_STARSCAN) +#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(USE_STARSCAN) && !BUILDFLAG(IS_BSD) partition_alloc::internal::PCScan::NotifyThreadCreated( partition_alloc::internal::GetStackPointer()); #endif -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) #if BUILDFLAG(IS_APPLE) PlatformThread::SetCurrentThreadRealtimePeriodValue( delegate->GetRealtimePeriod()); -@@ -357,7 +357,7 @@ void PlatformThreadBase::Detach(PlatformThreadHandle t +@@ -267,6 +267,8 @@ PlatformThreadId PlatformThreadBase::CurrentId() { + return reinterpret_cast(pthread_self()); + #elif BUILDFLAG(IS_POSIX) && BUILDFLAG(IS_AIX) + return pthread_self(); ++#elif BUILDFLAG(IS_BSD) ++ return reinterpret_cast(pthread_self()); + #elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_AIX) + return reinterpret_cast(pthread_self()); + #endif +@@ -357,7 +359,7 @@ void PlatformThreadBase::Detach(PlatformThreadHandle t // static bool PlatformThreadBase::CanChangeThreadType(ThreadType from, ThreadType to) { -#if BUILDFLAG(IS_NACL) +#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD) return false; #else if (from >= to) { -@@ -378,6 +378,9 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type, +@@ -378,6 +380,9 @@ 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)) return; -@@ -400,7 +403,7 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type, +@@ -400,7 +405,7 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type, // static ThreadPriorityForTest PlatformThreadBase::GetCurrentThreadPriorityForTest() { -#if BUILDFLAG(IS_NACL) +#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD) NOTIMPLEMENTED(); return ThreadPriorityForTest::kNormal; #else 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 index f3c276aa16fa..96f932b7ca80 100644 --- 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 @@ -1,30 +1,30 @@ ---- base/trace_event/malloc_dump_provider.cc.orig 2024-02-25 20:22:18 UTC +--- base/trace_event/malloc_dump_provider.cc.orig 2024-04-23 07:42:17 UTC +++ base/trace_event/malloc_dump_provider.cc -@@ -25,6 +25,8 @@ +@@ -24,6 +24,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_BSD) +#include #else #include #endif -@@ -182,7 +184,7 @@ void ReportAppleAllocStats(size_t* total_virtual_size, +@@ -181,7 +183,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, -@@ -353,6 +355,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump +@@ -366,6 +368,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump &allocated_objects_count); #elif BUILDFLAG(IS_FUCHSIA) // TODO(fuchsia): Port, see https://crbug.com/706592. +#elif BUILDFLAG(IS_BSD) + total_virtual_size = 0; + allocated_objects_size = 0; #else ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size, &allocated_objects_size, &allocated_objects_count); diff --git a/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 index 465661f64f61..79c476eb0880 100644 --- 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 @@ -1,20 +1,20 @@ ---- base/trace_event/process_memory_dump.cc.orig 2024-03-22 14:16:19 UTC +--- base/trace_event/process_memory_dump.cc.orig 2024-04-23 07:42:17 UTC +++ base/trace_event/process_memory_dump.cc -@@ -113,7 +113,7 @@ absl::optional ProcessMemoryDump::CountResiden +@@ -113,7 +113,7 @@ std::optional ProcessMemoryDump::CountResident #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]); -@@ -135,7 +135,7 @@ absl::optional ProcessMemoryDump::CountResiden +@@ -135,7 +135,7 @@ std::optional ProcessMemoryDump::CountResident 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-build_config_clang_BUILD.gn b/www/ungoogled-chromium/files/patch-build_config_clang_BUILD.gn index 3be378f04fdf..6886a6e71cea 100644 --- a/www/ungoogled-chromium/files/patch-build_config_clang_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-build_config_clang_BUILD.gn @@ -1,11 +1,11 @@ ---- build/config/clang/BUILD.gn.orig 2024-03-22 14:16:19 UTC +--- build/config/clang/BUILD.gn.orig 2024-04-23 07:42:17 UTC +++ build/config/clang/BUILD.gn -@@ -194,7 +194,7 @@ template("clang_lib") { +@@ -203,7 +203,7 @@ template("clang_lib") { # Adds a dependency on the Clang runtime library clang_rt.builtins. clang_lib("compiler_builtins") { - if (!toolchain_has_rust) { + if (!toolchain_has_rust || is_bsd) { # Since there's no Rust in the toolchain, there's no concern that we'll use # the Rust stdlib's intrinsics here. # diff --git a/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn b/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn index 48241529c84c..705b34985fa8 100644 --- a/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn @@ -1,136 +1,141 @@ ---- build/config/compiler/BUILD.gn.orig 2024-03-22 14:16:19 UTC +--- build/config/compiler/BUILD.gn.orig 2024-04-23 07:42:17 UTC +++ build/config/compiler/BUILD.gn @@ -204,7 +204,7 @@ declare_args() { # This greatly reduces the size of debug builds, at the cost of # debugging information which is required by some specialized # debugging tools. - simple_template_names = is_clang && !is_nacl && !is_win && !is_apple + simple_template_names = is_clang && !is_nacl && !is_win && !is_apple && !is_bsd } declare_args() { @@ -268,13 +268,16 @@ config("default_include_dirs") { # Compiler instrumentation can introduce dependencies in DSOs to symbols in # the executable they are loaded into, so they are unresolved at link-time. config("no_unresolved_symbols") { - if (!using_sanitizer && + if (!using_sanitizer && !is_bsd && (is_linux || is_chromeos || is_android || is_fuchsia)) { ldflags = [ "-Wl,-z,defs", "-Wl,--as-needed", ] } + if (current_cpu == "x86" && is_openbsd) { + ldflags = [ "-Wl,-z,notext", "-Wl,--strip-all" ] + } } # compiler --------------------------------------------------------------------- @@ -515,6 +518,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ if (use_gold) { @@ -590,7 +597,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 ] if (save_reproducers_on_lld_crash && use_lld) { ldflags += [ -@@ -1174,7 +1181,7 @@ config("compiler_cpu_abi") { +@@ -1180,7 +1187,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" ] -@@ -1189,7 +1196,7 @@ config("compiler_cpu_abi") { +@@ -1195,7 +1202,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" ] -@@ -1524,7 +1531,7 @@ config("compiler_deterministic") { +@@ -1530,7 +1537,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", -@@ -1576,7 +1583,7 @@ config("compiler_deterministic") { +@@ -1582,7 +1589,7 @@ config("compiler_deterministic") { } config("clang_revision") { - if (is_clang && clang_base_path == default_clang_base_path) { + if (is_clang && !is_bsd && clang_base_path == default_clang_base_path) { update_args = [ "--print-revision", "--verify-version=$clang_version", -@@ -1877,12 +1884,9 @@ config("default_warnings") { +@@ -1890,9 +1897,6 @@ config("default_warnings") { # TODO(crbug.com/1494809): Evaluate and possibly enable. "-Wno-vla-extension", - - # TODO(https://crbug.com/1490607): Fix and re-enable. - "-Wno-thread-safety-reference-return", ] + cflags_cc += [ +@@ -1900,7 +1904,7 @@ config("default_warnings") { + "-Wenum-compare-conditional", + ] + - if (!is_nacl) { + if (!is_nacl && !is_bsd) { cflags_cc += [ # TODO(https://crbug.com/1513724): Fix and re-enable. "-Wno-c++11-narrowing-const-reference", -@@ -2100,7 +2104,7 @@ config("no_chromium_code") { +@@ -2089,7 +2093,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", -@@ -2619,7 +2623,7 @@ config("afdo_optimize_size") { +@@ -2597,7 +2601,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. -@@ -2646,7 +2650,7 @@ config("afdo") { +@@ -2624,7 +2628,7 @@ config("afdo") { cflags += [ "-Wno-backend-plugin" ] inputs = [ _clang_sample_profile ] } - } else if (auto_profile_path != "" && is_a_target_toolchain) { + } else if (auto_profile_path != "" && is_a_target_toolchain && !is_bsd) { cflags = [ "-fauto-profile=${auto_profile_path}" ] inputs = [ auto_profile_path ] } -@@ -2810,7 +2814,8 @@ config("symbols") { +@@ -2788,7 +2792,8 @@ config("symbols") { configs += [ "//build/config:compress_debug_sections" ] } - 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_rust.gni b/www/ungoogled-chromium/files/patch-build_config_rust.gni index 94e7c5092e2a..dc83fd8001bf 100644 --- a/www/ungoogled-chromium/files/patch-build_config_rust.gni +++ b/www/ungoogled-chromium/files/patch-build_config_rust.gni @@ -1,13 +1,13 @@ ---- build/config/rust.gni.orig 2024-03-22 14:16:19 UTC +--- build/config/rust.gni.orig 2024-04-23 07:42:17 UTC +++ build/config/rust.gni -@@ -280,6 +280,10 @@ if (is_linux || is_chromeos) { +@@ -277,6 +277,10 @@ if (is_linux || is_chromeos) { } } +if (is_bsd) { + rust_abi_target = string_replace(rust_abi_target, "linux-gnu", current_os) +} + assert(!toolchain_has_rust || rust_abi_target != "") # This variable is passed to the Rust libstd build. diff --git a/www/ungoogled-chromium/files/patch-build_linux_unbundle_libwebp.gn b/www/ungoogled-chromium/files/patch-build_linux_unbundle_libwebp.gn new file mode 100644 index 000000000000..f329541cc6a7 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_linux_unbundle_libwebp.gn @@ -0,0 +1,27 @@ +--- build/linux/unbundle/libwebp.gn.orig 2024-04-23 07:42:17 UTC ++++ build/linux/unbundle/libwebp.gn +@@ -22,6 +22,8 @@ shim_headers("libwebp_shim") { + "webp/mux.h", + "webp/mux_types.h", + "webp/types.h", ++ "webp/sharpyuv/sharpyuv.h", ++ "webp/sharpyuv/sharpyuv_csp.h", + ] + } + +@@ -30,6 +32,14 @@ source_set("libwebp_webp") { + public_configs = [ ":system_libwebp" ] + } + ++source_set("libwebp_sharpyuv") { ++ deps = [ ":libwebp_shim" ] ++ public_configs = [ ":system_libwebp" ] ++} ++ + group("libwebp") { +- deps = [ ":libwebp_webp" ] ++ deps = [ ++ ":libwebp_webp", ++ ":libwebp_sharpyuv", ++ ] + } diff --git a/www/ungoogled-chromium/files/patch-cc_BUILD.gn b/www/ungoogled-chromium/files/patch-cc_BUILD.gn index 6b1a320bedea..fe6630409f10 100644 --- a/www/ungoogled-chromium/files/patch-cc_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-cc_BUILD.gn @@ -1,19 +1,19 @@ ---- cc/BUILD.gn.orig 2024-03-22 14:16:19 UTC +--- cc/BUILD.gn.orig 2024-04-23 07:42:17 UTC +++ cc/BUILD.gn -@@ -678,7 +678,7 @@ cc_test_static_library("test_support") { +@@ -681,7 +681,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" ] } if (skia_use_dawn) { -@@ -937,7 +937,6 @@ cc_test("cc_unittests") { +@@ -940,7 +940,6 @@ cc_test("cc_unittests") { data = [ "//components/test/data/viz/" ] 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_chrome__main__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc index de3cf21047f8..0459ec4b8d77 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc +++ b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc @@ -1,130 +1,144 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/app/chrome_main_delegate.cc @@ -146,7 +146,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 -@@ -188,16 +188,16 @@ +@@ -189,20 +189,20 @@ #include "v8/include/v8.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/environment.h" #endif +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "base/nix/scoped_xdg_activation_token_injector.h" + #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 -@@ -337,7 +337,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -346,7 +346,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 -@@ -422,7 +422,7 @@ bool HandleVersionSwitches(const base::CommandLine& co +@@ -431,7 +431,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) || -@@ -481,7 +481,7 @@ void AddFeatureFlagsToCommandLine( +@@ -477,7 +477,7 @@ void SetCrashpadUploadConsentPostLogin() { } #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) void SIGTERMProfilingShutdown(int signal) { content::Profiling::Stop(); struct sigaction sigact; -@@ -636,7 +636,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -559,7 +559,7 @@ std::optional AcquireProcessSingleton( + // process can be exited. + ChromeProcessSingleton::CreateInstance(user_data_dir); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Read the xdg-activation token and set it in the command line for the + // duration of the notification in order to ensure this is propagated to an + // already running browser process if it exists. +@@ -643,7 +643,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. -@@ -763,7 +763,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat +@@ -770,7 +770,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::GetCommon().RecordStartupProcessCreationTime( -@@ -1116,7 +1116,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv - +@@ -1155,7 +1155,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv + chrome::GetChannel() == version_info::Channel::DEV; const bool emit_crashes = #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - chrome::GetChannel() == version_info::Channel::CANARY || - chrome::GetChannel() == version_info::Channel::DEV; + is_canary_dev; #else -@@ -1130,7 +1130,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv - base::InitializeCpuReductionExperiment(); - base::sequence_manager::internal::SequenceManagerImpl::InitializeFeatures(); - base::sequence_manager::internal::ThreadController::InitializeFeatures(); + false; +@@ -1174,7 +1174,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv + // for more context. + base::sequence_manager::internal::ThreadController::InitializeFeatures( + /*record_sample_metadata=*/is_canary_dev); -#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::InitFeaturesPostFieldTrial(); -@@ -1276,7 +1276,7 @@ std::optional ChromeMainDelegate::BasicStartupCom +@@ -1323,7 +1323,7 @@ std::optional ChromeMainDelegate::BasicStartupCom // 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 -@@ -1306,7 +1306,7 @@ std::optional ChromeMainDelegate::BasicStartupCom +@@ -1353,7 +1353,7 @@ std::optional ChromeMainDelegate::BasicStartupCom #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 -@@ -1703,7 +1703,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1750,7 +1750,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)) { -@@ -1804,7 +1804,7 @@ absl::variant Chrome +@@ -1851,7 +1851,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_browser_BUILD.gn b/www/ungoogled-chromium/files/patch-chrome_browser_BUILD.gn index b9c351764dc8..f5900cb6ed8d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-chrome_browser_BUILD.gn @@ -1,16 +1,16 @@ ---- chrome/browser/BUILD.gn.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/BUILD.gn.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/BUILD.gn -@@ -6490,6 +6490,13 @@ static_library("browser") { +@@ -6529,6 +6529,13 @@ static_library("browser") { } } + if (is_bsd) { + sources -= [ + "metrics/bluetooth_metrics_provider.cc", + "metrics/bluetooth_metrics_provider.h", + ] + } + if (is_linux && use_dbus) { sources += [ "dbus_memory_pressure_evaluator_linux.cc", diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc b/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc index 5c0c1274fd29..888787c8e904 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc @@ -1,218 +1,209 @@ ---- chrome/browser/about_flags.cc.orig 2024-04-04 19:16:34 UTC +--- chrome/browser/about_flags.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/about_flags.cc @@ -235,7 +235,7 @@ #include "ui/ui_features.h" #include "url/url_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 -@@ -327,7 +327,7 @@ +@@ -323,7 +323,7 @@ #include "device/vr/public/cpp/features.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "ui/ozone/public/ozone_switches.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -@@ -336,7 +336,7 @@ +@@ -332,7 +332,7 @@ #include "chrome/browser/win/titlebar_config.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/profile_management/profile_management_features.h" + #include "components/supervised_user/core/common/features.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) - -@@ -493,7 +493,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap +@@ -490,7 +490,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, -@@ -1375,7 +1375,7 @@ const FeatureEntry::FeatureVariation kChromeRefresh202 +@@ -1385,7 +1385,7 @@ const FeatureEntry::FeatureVariation kChromeRefresh202 nullptr}}; #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 kShortcutBoostSingleUrl[] = { {"ShortcutBoostSearchScore", "0"}, {"ShortcutBoostNonTopHitThreshold", "0"}, -@@ -3688,7 +3688,7 @@ const flags_ui::FeatureEntry::FeatureVariation +@@ -3705,7 +3705,7 @@ const flags_ui::FeatureEntry::FeatureVariation std::size(kParcelTrackingTestDataOutForDelivery), nullptr}, }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const flags_ui::FeatureEntry::FeatureParam kDesktopPWAsLinkCapturingDefaultOn[] = {{"on_by_default", "true"}}; const flags_ui::FeatureEntry::FeatureParam -@@ -4434,7 +4434,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4504,7 +4504,7 @@ const FeatureEntry kFeatureEntries[] = { }, #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { "fluent-overlay-scrollbars", flag_descriptions::kFluentOverlayScrollbarsName, -@@ -4873,7 +4873,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4945,7 +4945,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kWebAppUniversalInstall)}, #endif // !BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"shortcuts-not-apps", flag_descriptions::kShortcutsNotAppsName, flag_descriptions::kShortcutsNotAppsDescription, kOsMac | kOsWin | kOsLinux | kOsFuchsia, -@@ -5002,7 +5002,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5070,7 +5070,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) {"pulseaudio-loopback-for-cast", flag_descriptions::kPulseaudioLoopbackForCastName, flag_descriptions::kPulseaudioLoopbackForCastDescription, kOsLinux, -@@ -5018,7 +5018,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5086,7 +5086,7 @@ const FeatureEntry kFeatureEntries[] = { MULTI_VALUE_TYPE(kOzonePlatformHintRuntimeChoices)}, #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, -@@ -5301,7 +5301,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(feed::kRefreshFeedOnRestart)}, - #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)}, -@@ -5952,7 +5952,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5990,7 +5990,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)}, #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-actions-ui-simplification", - flag_descriptions::kOmniboxActionsUISimplificationName, - flag_descriptions::kOmniboxActionsUISimplificationDescription, kOsDesktop, -@@ -6809,7 +6809,7 @@ const FeatureEntry kFeatureEntries[] = { + {"omnibox-domain-suggestions", + flag_descriptions::kOmniboxDomainSuggestionsName, + flag_descriptions::kOmniboxDomainSuggestionsDescription, kOsDesktop, +@@ -6861,7 +6861,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kParallelDownloadingDescription, kOsAll, FEATURE_VALUE_TYPE(download::features::kParallelDownloading)}, -#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(net::features::kAsyncDns)}, -@@ -7794,7 +7794,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7866,7 +7866,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(ash::features::kPrivacyIndicators)}, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"enable-network-service-sandbox", flag_descriptions::kEnableNetworkServiceSandboxName, flag_descriptions::kEnableNetworkServiceSandboxDescription, -@@ -7827,7 +7827,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE( - supervised_user::kFilterWebsitesForSupervisedUsersOnDesktopAndIOS)}, +@@ -7890,7 +7890,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(media::kV4L2FlatStatefulVideoDecoder)}, + #endif -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"enable-family-link-extensions-permissions", flag_descriptions:: kEnableExtensionsPermissionsForSupervisedUsersOnDesktopName, -@@ -8725,7 +8725,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8742,7 +8742,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(ash::features::kWallpaperPerDesk)}, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"enable-get-all-screens-media", flag_descriptions::kGetAllScreensMediaName, flag_descriptions::kGetAllScreensMediaDescription, kOsCrOS | kOsLacros | kOsLinux, -@@ -8767,7 +8767,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8784,7 +8784,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, -@@ -9056,7 +9056,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9053,7 +9053,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) {"policy-indication-for-managed-default-search", flag_descriptions::kPolicyIndicationForManagedDefaultSearchName, flag_descriptions::kPolicyIndicationForManagedDefaultSearchDescription, -@@ -9360,7 +9360,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9349,7 +9349,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"media-session-enter-picture-in-picture", flag_descriptions::kMediaSessionEnterPictureInPictureName, flag_descriptions::kMediaSessionEnterPictureInPictureDescription, -@@ -10350,7 +10350,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10289,7 +10289,7 @@ const FeatureEntry kFeatureEntries[] = { kOsDesktop | kOsAndroid, FEATURE_VALUE_TYPE(features::kProcessPerSiteUpToMainFrameThreshold)}, -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"camera-mic-effects", flag_descriptions::kCameraMicEffectsName, flag_descriptions::kCameraMicEffectsDescription, static_cast(kOsMac | kOsWin | kOsLinux), -@@ -10381,7 +10381,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10327,7 +10327,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kSiteInstanceGroupsForDataUrls)}, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"site-search-settings-policy", flag_descriptions::kSiteSearchSettingsPolicyName, flag_descriptions::kSiteSearchSettingsPolicyDescription, kOsAll, -@@ -10511,7 +10511,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10461,7 +10461,7 @@ const FeatureEntry kFeatureEntries[] = { password_manager::features::kFillingAcrossAffiliatedWebsitesAndroid)}, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"third-party-profile-management", flag_descriptions::kThirdPartyProfileManagementName, flag_descriptions::kThirdPartyProfileManagementDescription, -@@ -10854,7 +10854,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10813,7 +10813,7 @@ const FeatureEntry kFeatureEntries[] = { trusted_vault::kTrustedVaultFrequentDegradedRecoverabilityPolling)}, #endif -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"restart-to-gain-access-to-keychain", flag_descriptions::kRestartToGainAccessToKeychainName, flag_descriptions::kRestartToGainAccessToKeychainDescription, -@@ -11108,7 +11108,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -11087,7 +11087,7 @@ const FeatureEntry kFeatureEntries[] = { // Controls the view mode for (history) sync screen. #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) {"minor-mode-restrictions-for-history-sync-opt-in", flag_descriptions::kMinorModeRestrictionsForHistorySyncOptInName, flag_descriptions::kMinorModeRestrictionsForHistorySyncOptInDescription, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc b/www/ungoogled-chromium/files/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc index 404a68d59f09..45263de046bd 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc @@ -1,11 +1,11 @@ ---- chrome/browser/apps/app_service/publishers/extension_apps.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/apps/app_service/publishers/extension_apps.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/apps/app_service/publishers/extension_apps.cc -@@ -24,7 +24,7 @@ ExtensionApps::~ExtensionApps() = default; +@@ -23,7 +23,7 @@ ExtensionApps::ExtensionApps(AppServiceProxy* proxy) + ExtensionApps::~ExtensionApps() = default; bool ExtensionApps::Accepts(const extensions::Extension* extension) { - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (extensions::IsExtensionUnsupportedDeprecatedApp(profile(), extension->id())) { return false; diff --git a/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 index 4e2a3daec9ce..b22085d05d77 100644 --- 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 @@ -1,20 +1,65 @@ ---- chrome/browser/apps/platform_apps/platform_app_launch.cc.orig 2023-06-05 19:39:05 UTC +--- chrome/browser/apps/platform_apps/platform_app_launch.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/apps/platform_apps/platform_app_launch.cc -@@ -20,7 +20,7 @@ +@@ -19,7 +19,7 @@ + #include "extensions/common/constants.h" #include "extensions/common/extension.h" - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_navigator.h" #include "chrome/browser/ui/browser_window.h" -@@ -138,7 +138,7 @@ bool OpenExtensionApplicationTab(Profile* profile, con +@@ -86,7 +86,7 @@ bool OpenExtensionApplicationWindow(Profile* profile, + if (launch_container == LaunchContainer::kLaunchContainerTab) + return false; + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (OpenDeprecatedApplicationPrompt(profile, app_id)) { + return false; + } +@@ -118,7 +118,7 @@ content::WebContents* OpenExtensionApplicationTab(Prof + if (launch_container != apps::LaunchContainer::kLaunchContainerTab) + return nullptr; + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (OpenDeprecatedApplicationPrompt(profile, app_id)) { + return nullptr; + } +@@ -134,7 +134,7 @@ content::WebContents* OpenExtensionApplicationTab(Prof + return app_tab; } - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool OpenDeprecatedApplicationPrompt(Profile* profile, const std::string& app_id) { if (!extensions::IsExtensionUnsupportedDeprecatedApp(profile, app_id)) +@@ -170,7 +170,7 @@ bool OpenExtensionApplicationWithReenablePrompt( + if (!GetPlatformApp(profile, app_id)) + return false; + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (OpenDeprecatedApplicationPrompt(profile, app_id)) { + return false; + } +@@ -192,7 +192,7 @@ content::WebContents* OpenExtensionAppShortcutWindow(P + ->enabled_extensions() + .GetAppByURL(url); + if (app) { +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (OpenDeprecatedApplicationPrompt(profile, app->id())) { + return nullptr; + } +@@ -215,7 +215,7 @@ void RecordExtensionAppLaunchOnTabRestored(Profile* pr + if (!extension) + return; + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (OpenDeprecatedApplicationPrompt(profile, extension->id())) { + return; + } diff --git a/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 index 86f1be78d5a7..76295ae50402 100644 --- 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 @@ -1,11 +1,11 @@ ---- chrome/browser/apps/platform_apps/platform_app_launch.h.orig 2023-06-05 19:39:05 UTC +--- chrome/browser/apps/platform_apps/platform_app_launch.h.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/apps/platform_apps/platform_app_launch.h -@@ -37,7 +37,7 @@ bool OpenExtensionApplicationWindow(Profile* profile, - bool OpenExtensionApplicationTab(Profile* profile, const std::string& app_id); +@@ -39,7 +39,7 @@ content::WebContents* OpenExtensionApplicationTab(Prof + const std::string& app_id); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || 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_background_background__mode__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_background_background__mode__manager.cc index ece1dd30ddda..f8100616154e 100644 --- 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 @@ -1,11 +1,11 @@ ---- chrome/browser/background/background_mode_manager.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/background/background_mode_manager.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/background/background_mode_manager.cc -@@ -870,7 +870,7 @@ gfx::ImageSkia GetStatusTrayIcon() { +@@ -872,7 +872,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_browser__features.cc b/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc index 80b884cb638b..76aa17c2c440 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc @@ -1,20 +1,20 @@ ---- chrome/browser/browser_features.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/browser_features.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/browser_features.cc -@@ -44,7 +44,7 @@ const base::FeatureParam kSpareRendererWarmupDel +@@ -76,7 +76,7 @@ const base::FeatureParam kSpareRendererWarmupDel BASE_FEATURE(kDestroyProfileOnBrowserClose, "DestroyProfileOnBrowserClose", #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT); #else base::FEATURE_DISABLED_BY_DEFAULT); -@@ -328,7 +328,7 @@ BASE_FEATURE(kNewTabPageTriggerForPrerender2, +@@ -337,7 +337,7 @@ BASE_FEATURE(kSandboxExternalProtocolBlockedWarning, BASE_FEATURE(kSupportSearchSuggestionForPrerender2, "SupportSearchSuggestionForPrerender2", #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT); #else base::FEATURE_DISABLED_BY_DEFAULT); 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 index 5532fcee08cb..5923cc4bafd1 100644 --- 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 @@ -1,81 +1,81 @@ ---- chrome/browser/chrome_browser_interface_binders.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -128,13 +128,13 @@ +@@ -129,13 +129,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 -@@ -222,7 +222,7 @@ +@@ -224,7 +224,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/companion/visual_query/visual_query_suggestions_service_factory.h" #include "chrome/browser/ui/web_applications/sub_apps_service_impl.h" #include "chrome/browser/ui/webui/discards/discards.mojom.h" -@@ -831,7 +831,7 @@ void BindScreen2xMainContentExtractor( +@@ -834,7 +834,7 @@ void BindScreen2xMainContentExtractor( #endif #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) void BindVisualSuggestionsModelProvider( content::RenderFrameHost* frame_host, mojo::PendingReceiver< -@@ -1027,7 +1027,7 @@ void PopulateChromeFrameBinders( +@@ -1030,7 +1030,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)); -@@ -1035,7 +1035,7 @@ void PopulateChromeFrameBinders( +@@ -1038,7 +1038,7 @@ void PopulateChromeFrameBinders( #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(blink::features::kDesktopPWAsSubApps) && !render_frame_host->GetParentOrOuterDocument()) { // The service binder will reject non-primary main frames, but we still need -@@ -1122,7 +1122,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1125,7 +1125,7 @@ void PopulateChromeWebUIFrameBinders( commerce::CommerceInternalsUI>(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); -@@ -1134,7 +1134,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1137,7 +1137,7 @@ void PopulateChromeWebUIFrameBinders( #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 -@@ -1687,7 +1687,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1704,7 +1704,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 index e5e03eefa8ba..78613f9eae28 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main.cc @@ -1,104 +1,118 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -246,11 +246,11 @@ +@@ -246,15 +246,15 @@ // 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/crashpad.h" #endif -@@ -283,14 +283,14 @@ +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "base/nix/xdg_util.h" + #endif + +@@ -287,14 +287,14 @@ // 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" #include "ui/base/pointer/touch_ui_controller.h" #endif -#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/headless/headless_mode_metrics.h" // nogncheck #include "chrome/browser/headless/headless_mode_util.h" // nogncheck #include "components/headless/select_file_dialog/headless_select_file_dialog.h" -@@ -352,14 +352,14 @@ +@@ -361,14 +361,14 @@ #endif // BUILDFLAG(IS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER) #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "sql/database.h" #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) namespace { #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) constexpr base::FilePath::CharType kMediaHistoryDatabaseName[] = FILE_PATH_LITERAL("Media History"); -@@ -1074,7 +1074,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -523,7 +523,7 @@ void ProcessSingletonNotificationCallbackImpl( + } + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Set the global activation token sent as a command line switch by another + // browser process. This also removes the switch after use to prevent any side + // effects of leaving it in the command line after this point. +@@ -1090,7 +1090,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 . -@@ -1122,7 +1122,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1138,7 +1138,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( -@@ -1321,7 +1321,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1329,7 +1329,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Delete the media history database if it still exists. // TODO(crbug.com/1198344): Remove this. base::ThreadPool::PostTask( -@@ -1370,7 +1370,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1378,7 +1378,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* *UrlLanguageHistogramFactory::GetForBrowserContext(profile)); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode()) { headless::ReportHeadlessActionMetrics(); } -@@ -1478,7 +1478,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl( +@@ -1486,7 +1486,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl( // In headless mode provide alternate SelectFileDialog factory overriding // any platform specific SelectFileDialog implementation that may have been // set. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode()) { headless::HeadlessSelectFileDialogFactory::SetUp(); } -@@ -2012,7 +2012,7 @@ bool ChromeBrowserMainParts::ProcessSingletonNotificat +@@ -2026,7 +2026,7 @@ bool ChromeBrowserMainParts::ProcessSingletonNotificat // Drop the request if headless mode is in effect or the request is from // a headless Chrome process. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode() || command_line.HasSwitch(switches::kHeadless)) { return false; 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 index afdc7b3724a7..54e29af84e54 100644 --- 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 @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_browser_main_extra_parts_linux.cc.orig 2024-02-25 20:22:18 UTC +--- chrome/browser/chrome_browser_main_extra_parts_linux.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/chrome_browser_main_extra_parts_linux.cc -@@ -117,7 +117,7 @@ ChromeBrowserMainExtraPartsLinux::ChromeBrowserMainExt +@@ -169,7 +169,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__extra__parts__ozone.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__extra__parts__ozone.cc index bcafeb8a72c3..86c2968cd68f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__extra__parts__ozone.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__extra__parts__ozone.cc @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_browser_main_extra_parts_ozone.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/chrome_browser_main_extra_parts_ozone.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/chrome_browser_main_extra_parts_ozone.cc -@@ -31,7 +31,7 @@ void ChromeBrowserMainExtraPartsOzone::PostCreateMainM +@@ -27,7 +27,7 @@ void ChromeBrowserMainExtraPartsOzone::PostCreateMainM } void ChromeBrowserMainExtraPartsOzone::PostMainMessageLoopRun() { -#if !BUILDFLAG(IS_CHROMEOS_LACROS) && !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_CHROMEOS_LACROS) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // Lacros's `PostMainMessageLoopRun` must be called at the very end of // `PostMainMessageLoopRun` in // `ChromeBrowserMainPartsLacros::PostMainMessageLoopRun`. 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 index a99339f28dd2..5e29d78b8400 100644 --- 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 @@ -1,151 +1,152 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -456,7 +456,7 @@ +@@ -459,7 +459,7 @@ #include "storage/browser/file_system/external_mount_points.h" // 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) #include "chrome/browser/chrome_browser_main_linux.h" #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" #elif BUILDFLAG(IS_ANDROID) -@@ -564,12 +564,12 @@ +@@ -568,12 +568,12 @@ // 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 -@@ -580,14 +580,14 @@ +@@ -584,7 +584,7 @@ #include "chrome/browser/apps/link_capturing/web_app_link_capturing_delegate.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/chrome_browser_main_extra_parts_enterprise.h" + #include "chrome/browser/enterprise/profile_management/oidc_auth_response_capture_navigation_throttle.h" #include "chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.h" - #include "chrome/browser/ui/webui/app_settings/web_app_settings_navigation_throttle.h" +@@ -592,7 +592,7 @@ #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) -@@ -603,7 +603,7 @@ +@@ -608,7 +608,7 @@ #include "components/lens/lens_features.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/chrome_browser_main_extra_parts_linux.h" #elif BUILDFLAG(IS_OZONE) #include "chrome/browser/chrome_browser_main_extra_parts_ozone.h" -@@ -1470,7 +1470,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre +@@ -1477,7 +1477,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre #if BUILDFLAG(IS_CHROMEOS) registry->RegisterBooleanPref(prefs::kNativeClientForceAllowed, false); #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOutOfProcessSystemDnsResolutionEnabled, true); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) -@@ -1591,7 +1591,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1601,7 +1601,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) -@@ -1628,7 +1628,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1638,7 +1638,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 -@@ -1649,7 +1649,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1659,7 +1659,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 BUILDFLAG(IS_OZONE) main_parts->AddParts(std::make_unique()); -@@ -1668,7 +1668,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1678,7 +1678,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo chrome::AddMetricsExtraParts(main_parts.get()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) main_parts->AddParts( std::make_unique< chrome::enterprise_util::ChromeBrowserMainExtraPartsEnterprise>()); -@@ -2808,7 +2808,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2832,7 +2832,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)) { -@@ -4491,7 +4491,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -4536,7 +4536,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, -@@ -5046,7 +5046,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5090,7 +5090,7 @@ 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); -@@ -5056,7 +5056,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5104,7 +5104,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati #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); -@@ -5087,7 +5087,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5135,7 +5135,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati } #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MaybeAddThrottle(browser_switcher::BrowserSwitcherNavigationThrottle:: MaybeCreateThrottleFor(handle), &throttles); -@@ -7005,7 +7005,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS +@@ -7059,7 +7059,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS bool ChromeContentBrowserClient::ShouldRunOutOfProcessSystemDnsResolution() { // This enterprise policy is supported on Android, but the feature will not be // launched there. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // This is possibly called before `g_browser_process` is initialized. PrefService* local_state; if (g_browser_process) { diff --git a/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 index ace433099e95..bb249cfff275 100644 --- 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 @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_content_browser_client.h.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -497,7 +497,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -500,7 +500,7 @@ class ChromeContentBrowserClient : public content::Con bool IsPluginAllowedToUseDevChannelAPIs( content::BrowserContext* browser_context, const GURL& url) override; -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) void GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, diff --git a/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 index f522c2290fb7..d54bad32b2c6 100644 --- 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 @@ -1,20 +1,20 @@ ---- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1645,7 +1645,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1671,7 +1671,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferredForFile( const base::FilePath& path) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) { return !download_prefs_->ShouldOpenPdfInSystemReader(); } -@@ -1711,7 +1711,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow +@@ -1737,7 +1737,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()) { 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 index ef9196a137e9..3f26c0aa5f87 100644 --- 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 @@ -1,29 +1,29 @@ ---- chrome/browser/download/download_item_model.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/download/download_item_model.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/download/download_item_model.cc -@@ -744,7 +744,7 @@ bool DownloadItemModel::IsCommandChecked( +@@ -749,7 +749,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(); -@@ -790,7 +790,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand +@@ -795,7 +795,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); -@@ -1065,7 +1065,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe +@@ -1145,7 +1145,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 index cc7e525f14a6..15de4d0b4b0d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc @@ -1,90 +1,90 @@ ---- chrome/browser/download/download_prefs.cc.orig 2024-02-25 20:22:18 UTC +--- chrome/browser/download/download_prefs.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/download/download_prefs.cc @@ -11,6 +11,7 @@ #include #include "base/check.h" +#include "base/command_line.h" #include "base/feature_list.h" #include "base/files/file_util.h" #include "base/functional/bind.h" -@@ -63,6 +64,10 @@ +@@ -64,6 +65,10 @@ #include "chrome/browser/flags/android/chrome_feature_list.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + using content::BrowserContext; using content::BrowserThread; using content::DownloadManager; -@@ -73,7 +78,7 @@ namespace { +@@ -74,7 +79,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; -@@ -179,7 +184,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi +@@ -180,7 +185,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 -@@ -298,7 +303,7 @@ void DownloadPrefs::RegisterProfilePrefs( +@@ -299,7 +304,7 @@ void DownloadPrefs::RegisterProfilePrefs( registry->RegisterFilePathPref(prefs::kSaveFileDefaultDirectory, default_download_path); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOpenPdfDownloadInSystemReader, false); #endif #if BUILDFLAG(IS_ANDROID) -@@ -461,7 +466,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens +@@ -462,7 +467,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; -@@ -493,7 +498,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons +@@ -494,7 +499,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(); -@@ -533,7 +538,7 @@ void DownloadPrefs::SaveAutoOpenState() { +@@ -534,7 +539,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; -@@ -657,7 +662,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa +@@ -686,7 +691,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_enterprise_browser__management_browser__management__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_browser__management_browser__management__service.cc new file mode 100644 index 000000000000..fb9628d756c5 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_browser__management_browser__management__service.cc @@ -0,0 +1,29 @@ +--- chrome/browser/enterprise/browser_management/browser_management_service.cc.orig 2024-04-23 07:42:17 UTC ++++ chrome/browser/enterprise/browser_management/browser_management_service.cc +@@ -21,7 +21,7 @@ namespace policy { + + namespace { + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void UpdateEnterpriseLogo( + Profile* profile, + base::OnceCallbackGetPrefs()); + pref_change_registrar_.Add( +@@ -114,7 +114,7 @@ const gfx::Image& BrowserManagementMetadata::GetManage + return management_logo_; + } + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void BrowserManagementMetadata::UpdateManagementLogo(Profile* profile) { + UpdateEnterpriseLogo( + profile, base::BindOnce(&BrowserManagementMetadata::SetManagementLogo, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_browser__management_browser__management__service.h b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_browser__management_browser__management__service.h new file mode 100644 index 000000000000..c2693b395b37 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_browser__management_browser__management__service.h @@ -0,0 +1,11 @@ +--- chrome/browser/enterprise/browser_management/browser_management_service.h.orig 2024-04-23 07:42:17 UTC ++++ chrome/browser/enterprise/browser_management/browser_management_service.h +@@ -28,7 +28,7 @@ class BrowserManagementMetadata { + + const gfx::Image& GetManagementLogo() const; + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + private: + void UpdateManagementLogo(Profile* profile); + void SetManagementLogo( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc index 95d985ee55f5..dc9dceabff4f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc @@ -1,11 +1,11 @@ ---- chrome/browser/enterprise/connectors/connectors_service.cc.orig 2024-02-25 20:22:18 UTC +--- chrome/browser/enterprise/connectors/connectors_service.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/enterprise/connectors/connectors_service.cc -@@ -513,7 +513,7 @@ bool ConnectorsService::ConnectorsEnabled() const { +@@ -519,7 +519,7 @@ bool ConnectorsService::ConnectorsEnabled() const { Profile* profile = Profile::FromBrowserContext(context_); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On desktop, the guest profile is actually the primary OTR profile of // the "regular" guest profile. The regular guest profile is never used // directly by users. Also, user are not able to create child OTR profiles diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc index 5e6539a670ea..5c336c495347 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc @@ -1,38 +1,38 @@ ---- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc @@ -58,7 +58,7 @@ #include "base/strings/utf_string_conversions.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h" #include "components/device_signals/core/browser/signals_aggregator.h" #include "components/device_signals/core/common/signals_constants.h" @@ -132,7 +132,7 @@ void UploadSecurityEventReport(base::Value::Dict event std::move(upload_callback)); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void PopulateSignals(base::Value::Dict event, policy::CloudPolicyClient* client, std::string name, -@@ -427,7 +427,7 @@ void RealtimeReportingClient::ReportPastEvent(const st +@@ -420,7 +420,7 @@ void RealtimeReportingClient::ReportPastEvent(const st /*include_profile_user_name=*/false); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void AddCrowdstrikeSignalsToEvent( base::Value::Dict& event, -@@ -486,7 +486,7 @@ void RealtimeReportingClient::ReportEventWithTimestamp +@@ -479,7 +479,7 @@ void RealtimeReportingClient::ReportEventWithTimestamp if (include_profile_user_name) { event.Set(kKeyProfileUserName, GetProfileUserName()); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) Profile* profile = Profile::FromBrowserContext(context_); device_signals::SignalsAggregator* signals_aggregator = enterprise_signals::SignalsAggregatorFactory::GetForProfile(profile); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_watermark_watermark__view.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_watermark_watermark__view.cc new file mode 100644 index 000000000000..c5bc0bdf6dcb --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_watermark_watermark__view.cc @@ -0,0 +1,20 @@ +--- chrome/browser/enterprise/watermark/watermark_view.cc.orig 2024-04-23 07:42:17 UTC ++++ chrome/browser/enterprise/watermark/watermark_view.cc +@@ -33,7 +33,7 @@ const gfx::Font& WatermarkFont() { + "Segoe UI", + #elif BUILDFLAG(IS_MAC) + "SF Pro Text", +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + "Ubuntu", + #elif BUILDFLAG(IS_CHROMEOS) + "Google Sans", +@@ -45,7 +45,7 @@ const gfx::Font& WatermarkFont() { + } + + gfx::Font::Weight WatermarkFontWeight() { +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return gfx::Font::Weight::SEMIBOLD; + #else + return gfx::Font::Weight::MEDIUM; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn index 0ed424d0e9e8..c8d6a576c705 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn @@ -1,13 +1,13 @@ ---- chrome/browser/extensions/BUILD.gn.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1370,6 +1370,10 @@ static_library("extensions") { +@@ -1378,6 +1378,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_api__browser__context__keyed__service__factories.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc index 9750db8e83d7..ed089bbbe716 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc -@@ -44,7 +44,7 @@ - #include "extensions/browser/api/networking_private/networking_private_delegate_factory.h" +@@ -45,7 +45,7 @@ #include "printing/buildflags/buildflags.h" + #include "services/screen_ai/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 -@@ -126,7 +126,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt +@@ -127,7 +127,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt 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_api_management_chrome__management__api__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_management_chrome__management__api__delegate.cc new file mode 100644 index 000000000000..77f64d76bdcd --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_management_chrome__management__api__delegate.cc @@ -0,0 +1,11 @@ +--- chrome/browser/extensions/api/management/chrome_management_api_delegate.cc.orig 2024-04-23 07:42:17 UTC ++++ chrome/browser/extensions/api/management/chrome_management_api_delegate.cc +@@ -408,7 +408,7 @@ bool ChromeManagementAPIDelegate::LaunchAppFunctionDel + apps::LaunchContainer launch_container = + GetLaunchContainer(extensions::ExtensionPrefs::Get(context), extension); + Profile* profile = Profile::FromBrowserContext(context); +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (extensions::IsExtensionUnsupportedDeprecatedApp(profile, + extension->id())) { + return false; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc index abad5bf3cfdc..511449fd268c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc -@@ -603,7 +603,7 @@ void PasswordsPrivateDelegateImpl::OnFetchingFamilyMem +@@ -605,7 +605,7 @@ void PasswordsPrivateDelegateImpl::OnFetchingFamilyMem } void PasswordsPrivateDelegateImpl::OsReauthTimeoutCall() { -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) PasswordsPrivateEventRouter* router = PasswordsPrivateEventRouterFactory::GetForProfile(profile_); if (router) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc index 17522d5bc003..85be5e5534d1 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc @@ -1,13 +1,13 @@ ---- chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc -@@ -281,7 +281,9 @@ bool ChromeRuntimeAPIDelegate::GetPlatformInfo(Platfor +@@ -284,7 +284,9 @@ bool ChromeRuntimeAPIDelegate::GetPlatformInfo(Platfor } else if (strcmp(os, "linux") == 0) { info->os = extensions::api::runtime::PlatformOs::kLinux; } else if (strcmp(os, "openbsd") == 0) { - info->os = extensions::api::runtime::PlatformOs::kOpenbsd; + info->os = extensions::api::runtime::PlatformOs::kLinux; + } else if (strcmp(os, "freebsd") == 0) { + info->os = extensions::api::runtime::PlatformOs::kLinux; } else if (strcmp(os, "fuchsia") == 0) { info->os = extensions::api::runtime::PlatformOs::kFuchsia; } else { 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 index 268842ffbf5c..41bd2c2701aa 100644 --- 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 @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -203,7 +203,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -202,7 +202,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist (*s_allowlist)[::prefs::kSidePanelHorizontalAlignment] = settings_api::PrefType::kBoolean; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kUseCustomChromeFrame] = settings_api::PrefType::kBoolean; #endif -@@ -212,7 +212,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -211,7 +211,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist // Appearance settings. (*s_allowlist)[::prefs::kCurrentThemeID] = settings_api::PrefType::kString; (*s_allowlist)[::prefs::kPolicyThemeColor] = settings_api::PrefType::kNumber; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kSystemTheme] = settings_api::PrefType::kNumber; #endif (*s_allowlist)[::prefs::kHomePage] = settings_api::PrefType::kUrl; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc index 1b42bf0cd460..f9f8384b1120 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/tabs/tabs_api.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/extensions/api/tabs/tabs_api.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/extensions/api/tabs/tabs_api.cc -@@ -866,7 +866,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio +@@ -867,7 +867,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio // minimized. // TODO(crbug.com/1410400): Remove this workaround when linux is fixed. // TODO(crbug.com/1410400): Find a fix for wayland as well. -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) if (new_window->initial_show_state() == ui::SHOW_STATE_MINIMIZED) { new_window->window()->Minimize(); } diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc index fc107f3eb034..b61c2fc8a084 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/webstore_private/webstore_private_api.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/extensions/api/webstore_private/webstore_private_api.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/extensions/api/webstore_private/webstore_private_api.cc -@@ -892,7 +892,7 @@ void WebstorePrivateBeginInstallWithManifest3Function: - RequestExtensionApproval(contents); - return; - } +@@ -922,7 +922,7 @@ void WebstorePrivateBeginInstallWithManifest3Function: + #if BUILDFLAG(IS_CHROMEOS) + RequestExtensionApproval(contents); + return; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Shows a parental permission dialog directly bypassing the extension // install dialog view. The parental permission dialog contains a superset // of data from the extension install dialog: requested extension diff --git a/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 index 62490b670e34..f191562dc942 100644 --- 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 @@ -1,11 +1,11 @@ ---- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2024-02-25 20:22:18 UTC +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -315,7 +315,7 @@ const struct { +@@ -316,7 +316,7 @@ const struct { FILE_PATH_LITERAL("Library/Mobile Documents/com~apple~CloudDocs"), 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. {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), kBlockAllChildren}, // And security sensitive data in /proc and /sys. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc index 3aec5ff203e6..e838890d920d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc @@ -1,92 +1,92 @@ ---- chrome/browser/flag_descriptions.cc.orig 2024-04-04 19:16:34 UTC +--- chrome/browser/flag_descriptions.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/flag_descriptions.cc -@@ -2940,7 +2940,7 @@ const char kCbdTimeframeRequiredDescription[] = +@@ -2950,7 +2950,7 @@ const char kCbdTimeframeRequiredDescription[] = "value to the list."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) const char kPolicyIndicationForManagedDefaultSearchName[] = "Enable policy indication for managed Default Search provider"; const char kPolicyIndicationForManagedDefaultSearchDescription[] = -@@ -3265,7 +3265,7 @@ const char kSiteInstanceGroupsForDataUrlsDescription[] +@@ -3263,7 +3263,7 @@ const char kSiteInstanceGroupsForDataUrlsDescription[] "but in the same SiteInstanceGroup, and thus the same process."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kSiteSearchSettingsPolicyName[] = "Enable SiteSearchSettings policy"; const char kSiteSearchSettingsPolicyDescription[] = "Allow site search engines to be defined by the SiteSearchSettings policy."; -@@ -7494,7 +7494,7 @@ const char kLacrosMergeIcuDataFileDescription[] = +@@ -7500,7 +7500,7 @@ const char kLacrosMergeIcuDataFileDescription[] = "Enables sharing common areas of icudtl.dat between Ash and Lacros."; #endif // #if BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kGetAllScreensMediaName[] = "GetAllScreensMedia API"; const char kGetAllScreensMediaDescription[] = "When enabled, the getAllScreensMedia API for capturing multiple screens " -@@ -7740,7 +7740,7 @@ const char kV4L2FlatStatefulVideoDecoderDescription[] +@@ -7760,7 +7760,7 @@ const char kV4L2FlatStatefulVideoDecoderDescription[] // Linux ----------------------------------------------------------------------- -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kOzonePlatformHintChoiceDefault[] = "Default"; const char kOzonePlatformHintChoiceAuto[] = "Auto"; const char kOzonePlatformHintChoiceX11[] = "X11"; -@@ -7788,7 +7788,7 @@ const char kZeroCopyVideoCaptureDescription[] = +@@ -7808,7 +7808,7 @@ const char kZeroCopyVideoCaptureDescription[] = #endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #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."; -@@ -7803,7 +7803,7 @@ const char kEnableProtoApiForClassifyUrlDescription[] +@@ -7823,7 +7823,7 @@ const char kEnableProtoApiForClassifyUrlDescription[] "instead of JSON."; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kEnableNetworkServiceSandboxName[] = "Enable the network service sandbox."; const char kEnableNetworkServiceSandboxDescription[] = -@@ -7835,7 +7835,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti +@@ -7855,7 +7855,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti "Bluetooth"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const char kSkipUndecryptablePasswordsName[] = "Skip undecryptable passwords to use the available decryptable " "passwords."; -@@ -7855,7 +7855,7 @@ const char kRestartToGainAccessToKeychainDescription[] +@@ -7875,7 +7875,7 @@ const char kRestartToGainAccessToKeychainDescription[] "to restart Chrome to gain access to computer's password manager."; #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) -@@ -7956,7 +7956,7 @@ const char kElementCaptureDescription[] = +@@ -7976,7 +7976,7 @@ const char kElementCaptureDescription[] = #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."; -@@ -8005,7 +8005,7 @@ const char kComposeTextSelectionDescription[] = +@@ -8025,7 +8025,7 @@ const char kComposeTextSelectionDescription[] = "Enables feature for different heuristics for selecting text for Compose"; #endif // BUILDFLAG(ENABLE_COMPOSE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const char kThirdPartyProfileManagementName[] = "Third party profile management"; const char kThirdPartyProfileManagementDescription[] = diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h index 4b993d9ba591..260df9739052 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h @@ -1,90 +1,90 @@ ---- chrome/browser/flag_descriptions.h.orig 2024-04-04 19:16:34 UTC +--- chrome/browser/flag_descriptions.h.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/flag_descriptions.h -@@ -1697,7 +1697,7 @@ extern const char kCbdTimeframeRequiredName[]; +@@ -1712,7 +1712,7 @@ extern const char kCbdTimeframeRequiredName[]; extern const char kCbdTimeframeRequiredDescription[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) extern const char kPolicyIndicationForManagedDefaultSearchName[]; extern const char kPolicyIndicationForManagedDefaultSearchDescription[]; #endif -@@ -1882,7 +1882,7 @@ extern const char kSiteInstanceGroupsForDataUrlsName[] +@@ -1893,7 +1893,7 @@ extern const char kSiteInstanceGroupsForDataUrlsName[] extern const char kSiteInstanceGroupsForDataUrlsDescription[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kSiteSearchSettingsPolicyName[]; extern const char kSiteSearchSettingsPolicyDescription[]; #endif -@@ -4308,7 +4308,7 @@ extern const char kLacrosMergeIcuDataFileName[]; +@@ -4326,7 +4326,7 @@ extern const char kLacrosMergeIcuDataFileName[]; extern const char kLacrosMergeIcuDataFileDescription[]; #endif // #if BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kGetAllScreensMediaName[]; extern const char kGetAllScreensMediaDescription[]; #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -4448,7 +4448,7 @@ extern const char kV4L2FlatStatefulVideoDecoderDescrip +@@ -4474,7 +4474,7 @@ extern const char kV4L2FlatStatefulVideoDecoderDescrip // Linux --------------------------------------------------------------------- -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kOzonePlatformHintChoiceDefault[]; extern const char kOzonePlatformHintChoiceAuto[]; extern const char kOzonePlatformHintChoiceX11[]; -@@ -4490,7 +4490,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa +@@ -4516,7 +4516,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa extern const char kWebBluetoothConfirmPairingSupportDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kSkipUndecryptablePasswordsName[]; extern const char kSkipUndecryptablePasswordsDescription[]; -@@ -4501,13 +4501,13 @@ extern const char kRestartToGainAccessToKeychainName[] +@@ -4527,13 +4527,13 @@ extern const char kRestartToGainAccessToKeychainName[] extern const char kRestartToGainAccessToKeychainDescription[]; #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) || -@@ -4518,7 +4518,7 @@ extern const char kEnableProtoApiForClassifyUrlName[]; +@@ -4544,7 +4544,7 @@ extern const char kEnableProtoApiForClassifyUrlName[]; extern const char kEnableProtoApiForClassifyUrlDescription[]; #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kEnableNetworkServiceSandboxName[]; extern const char kEnableNetworkServiceSandboxDescription[]; -@@ -4595,7 +4595,7 @@ extern const char kElementCaptureDescription[]; +@@ -4621,7 +4621,7 @@ extern const char kElementCaptureDescription[]; #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[]; -@@ -4629,7 +4629,7 @@ extern const char kComposeTextSelectionName[]; +@@ -4655,7 +4655,7 @@ extern const char kComposeTextSelectionName[]; extern const char kComposeTextSelectionDescription[]; #endif // BUILDFLAG(ENABLE_COMPOSE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extern const char kThirdPartyProfileManagementName[]; extern const char kThirdPartyProfileManagementDescription[]; 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 index b15645e93c98..7219cb6e234c 100644 --- 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 @@ -1,55 +1,55 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2024-02-25 20:22:18 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc -@@ -79,8 +79,10 @@ +@@ -80,8 +80,10 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if defined(__GLIBC__) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if defined(__GLIBC__) && (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" -@@ -105,7 +107,7 @@ +@@ -106,7 +108,7 @@ #include "chromeos/crosapi/cpp/crosapi_constants.h" #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/pressure/pressure_metrics_reporter.h" #endif // BUILDFLAG(IS_LINUX) -@@ -114,7 +116,7 @@ +@@ -115,7 +117,7 @@ #include "components/user_manager/user_manager.h" #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/power_metrics/system_power_monitor.h" #endif -@@ -838,7 +840,7 @@ void RecordStartupMetrics() { +@@ -858,7 +860,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, -@@ -1142,11 +1144,11 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt +@@ -1162,11 +1164,11 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt } #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) pressure_metrics_reporter_ = std::make_unique(); #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::trace_event::TraceLog::GetInstance()->AddEnabledStateObserver( power_metrics::SystemPowerMonitor::GetInstance()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/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 index c5b9dc78928f..dee6be7d3a5f 100644 --- 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 @@ -1,92 +1,83 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -193,7 +193,7 @@ +@@ -194,7 +194,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 -@@ -210,7 +210,7 @@ +@@ -211,7 +211,7 @@ #include "chrome/browser/metrics/power/power_metrics_provider_mac.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/bluetooth_metrics_provider.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -586,7 +586,7 @@ void ChromeMetricsServiceClient::RegisterPrefs(PrefReg +@@ -577,7 +577,7 @@ void ChromeMetricsServiceClient::RegisterPrefs(PrefReg #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) metrics::structured::StructuredMetricsService::RegisterPrefs(registry); #if !BUILDFLAG(IS_CHROMEOS_ASH) -@@ -773,7 +773,7 @@ void ChromeMetricsServiceClient::Initialize() { +@@ -749,7 +749,7 @@ void ChromeMetricsServiceClient::Initialize() { RegisterUKMProviders(); } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) metrics::structured::Recorder::GetInstance()->SetUiTaskRunner( base::SequencedTaskRunner::GetCurrentDefault()); #endif -@@ -820,7 +820,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -796,7 +796,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 -@@ -905,7 +905,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -881,7 +881,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) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) metrics_service_->RegisterMetricsProvider( std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || -@@ -1015,7 +1015,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -991,7 +991,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) -@@ -1180,7 +1180,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve - } - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) - // Begin initializing the structured metrics system. Initialization must wait - // until a profile is added, because it reads keys stored within the user's - // cryptohome. We only initialize for profiles that are valid candidates -@@ -1211,7 +1211,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1170,7 +1170,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve // 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_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) // This creates the DesktopProfileSessionDurationsServices if it didn't exist // already. metrics::DesktopProfileSessionDurationsServiceFactory::GetForBrowserContext( -@@ -1554,7 +1554,7 @@ void ChromeMetricsServiceClient::CreateStructuredMetri +@@ -1513,7 +1513,7 @@ void ChromeMetricsServiceClient::CreateStructuredMetri recorder = std::make_unique( cros_system_profile_provider_.get()); -#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Make sure that Structured Metrics recording delegates have been created // before the service is created. This is handled in other places for ChromeOS diff --git a/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 index ef175527ea26..e9314cf7a67a 100644 --- 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 @@ -1,11 +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.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/metrics/power/process_metrics_recorder_util.cc -@@ -59,7 +59,7 @@ void RecordProcessHistograms(const char* histogram_suf +@@ -65,7 +65,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 index daf5d12a2891..17c12aa4968c 100644 --- 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 @@ -1,29 +1,29 @@ ---- chrome/browser/metrics/power/process_monitor.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/metrics/power/process_monitor.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/metrics/power/process_monitor.cc -@@ -65,7 +65,7 @@ ProcessMonitor::Metrics SampleMetrics(base::ProcessMet - #endif +@@ -61,7 +61,7 @@ ProcessMonitor::Metrics SampleMetrics(base::ProcessMet + metrics.cpu_usage = process_metrics.GetPlatformIndependentCPUUsage(); #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) metrics.idle_wakeups = process_metrics.GetIdleWakeupsPerSecond(); #endif #if BUILDFLAG(IS_MAC) -@@ -81,7 +81,7 @@ void ScaleMetrics(ProcessMonitor::Metrics* metrics, do - metrics->cpu_usage *= factor; +@@ -79,7 +79,7 @@ void ScaleMetrics(ProcessMonitor::Metrics* metrics, do + } #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) metrics->idle_wakeups *= factor; #endif -@@ -172,7 +172,7 @@ ProcessMonitor::Metrics& operator+=(ProcessMonitor::Me - lhs.cpu_usage += rhs.cpu_usage; +@@ -167,7 +167,7 @@ ProcessMonitor::Metrics& operator+=(ProcessMonitor::Me + } #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 index bf7f9bbd9294..b469c58d8eb0 100644 --- 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 @@ -1,11 +1,11 @@ ---- chrome/browser/metrics/power/process_monitor.h.orig 2022-12-02 17:56:32 UTC +--- chrome/browser/metrics/power/process_monitor.h.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/metrics/power/process_monitor.h -@@ -75,7 +75,7 @@ class ProcessMonitor : public content::BrowserChildPro - double cpu_usage = 0.0; +@@ -76,7 +76,7 @@ class ProcessMonitor : public content::BrowserChildPro + std::optional cpu_usage; #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Returns the number of average idle cpu wakeups per second since the last // time the metric was sampled. int idle_wakeups = 0; diff --git a/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 index 14f5c5ec6f9e..18feef497e82 100644 --- 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 @@ -1,174 +1,174 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/net/system_network_context_manager.cc @@ -94,7 +94,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/branded_strings.h" #include "ui/base/l10n/l10n_util.h" @@ -139,7 +139,7 @@ SystemNetworkContextManager* g_system_network_context_ // received a failed launch for a sandboxed network service. bool g_previously_failed_to_launch_sandboxed_service = false; -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Whether kerberos library loading will work in the network service due to the // sandbox. bool g_network_service_will_allow_gssapi_library_load = false; @@ -147,7 +147,7 @@ bool g_network_service_will_allow_gssapi_library_load const char* kGssapiDesiredPref = #if BUILDFLAG(IS_CHROMEOS) prefs::kKerberosEnabled; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) prefs::kReceivedHttpAuthNegotiateHeader; #endif #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) @@ -193,7 +193,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) @@ -208,7 +208,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut local_state->GetString(prefs::kAuthAndroidNegotiateAccountType); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auth_dynamic_params->allow_gssapi_library_load = local_state->GetBoolean(kGssapiDesiredPref); #endif // BUILDFLAG(IS_CHROMEOS) @@ -218,7 +218,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut void OnNewHttpAuthDynamicParams( network::mojom::HttpAuthDynamicParamsPtr& params) { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // The kerberos library is incompatible with the network service sandbox, so // if library loading is now enabled, the network service needs to be // restarted. It will be restarted unsandboxed because is @@ -260,11 +260,11 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() if (g_previously_failed_to_launch_sandboxed_service) { return NetworkSandboxState::kDisabledBecauseOfFailedLaunch; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* local_state = g_browser_process->local_state(); #endif -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // The network service sandbox and the kerberos library are incompatible. // If kerberos is enabled by policy, disable the network service sandbox. if (g_network_service_will_allow_gssapi_library_load || @@ -280,7 +280,7 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() } #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (local_state && local_state->HasPrefPath(prefs::kNetworkServiceSandboxEnabled)) { return local_state->GetBoolean(prefs::kNetworkServiceSandboxEnabled) @@ -510,7 +510,7 @@ void SystemNetworkContextManager::DeleteInstance() { g_system_network_context_manager = nullptr; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) SystemNetworkContextManager::GssapiLibraryLoadObserver:: GssapiLibraryLoadObserver(SystemNetworkContextManager* owner) : owner_(owner) {} @@ -568,7 +568,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) @@ -582,7 +582,7 @@ SystemNetworkContextManager::SystemNetworkContextManag auth_pref_callback); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) pref_change_registrar_.Add(kGssapiDesiredPref, auth_pref_callback); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) @@ -608,7 +608,7 @@ SystemNetworkContextManager::SystemNetworkContextManag #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) pref_change_registrar_.Add( prefs::kEnforceLocalAnchorConstraintsEnabled, base::BindRepeating(&SystemNetworkContextManager:: @@ -663,7 +663,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) @@ -687,7 +687,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, -1); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Note that the default value is not relevant because the pref is only // evaluated when it is managed. registry->RegisterBooleanPref(prefs::kEnforceLocalAnchorConstraintsEnabled, @@ -696,11 +696,11 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterListPref(prefs::kExplicitlyAllowedNetworkPorts); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kNetworkServiceSandboxEnabled, true); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kReceivedHttpAuthNegotiateHeader, false); #endif // BUILDFLAG(IS_LINUX) @@ -753,7 +753,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea OnNewHttpAuthDynamicParams(http_auth_dynamic_params); network_service->ConfigureHttpAuthPrefs(std::move(http_auth_dynamic_params)); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gssapi_library_loader_observer_.Install(network_service); #endif // BUILDFLAG(IS_LINUX) @@ -970,7 +970,7 @@ bool SystemNetworkContextManager::IsNetworkSandboxEnab break; } -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!enabled) { g_network_service_will_allow_gssapi_library_load = true; } -@@ -1062,7 +1062,7 @@ void SystemNetworkContextManager::UpdateExplicitlyAllo +@@ -1055,7 +1055,7 @@ void SystemNetworkContextManager::UpdateExplicitlyAllo } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) void SystemNetworkContextManager::UpdateEnforceLocalAnchorConstraintsEnabled() { const PrefService::Preference* enforce_local_anchor_constraints_enabled_pref = local_state_->FindPreference( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.h b/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.h index b7bbe9fe53a9..a54ccb1ae668 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.h @@ -1,29 +1,29 @@ ---- chrome/browser/net/system_network_context_manager.h.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/net/system_network_context_manager.h.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/net/system_network_context_manager.h -@@ -204,7 +204,7 @@ class SystemNetworkContextManager { +@@ -200,7 +200,7 @@ class SystemNetworkContextManager { class URLLoaderFactoryForSystem; class NetworkProcessLaunchWatcher; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class GssapiLibraryLoadObserver : public network::mojom::GssapiLibraryLoadObserver { public: -@@ -240,7 +240,7 @@ class SystemNetworkContextManager { +@@ -236,7 +236,7 @@ class SystemNetworkContextManager { void UpdateExplicitlyAllowedNetworkPorts(); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Applies the current value of the kEnforceLocalAnchorConstraintsEnabled // pref to the enforcement state. void UpdateEnforceLocalAnchorConstraintsEnabled(); -@@ -290,7 +290,7 @@ class SystemNetworkContextManager { +@@ -286,7 +286,7 @@ class SystemNetworkContextManager { std::unique_ptr network_annotation_monitor_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) GssapiLibraryLoadObserver gssapi_library_loader_observer_{this}; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc index a92cb7200c6c..050911b82314 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc @@ -1,11 +1,20 @@ ---- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/password_manager/chrome_password_manager_client.cc -@@ -670,7 +670,7 @@ void ChromePasswordManagerClient::NotifyUserCredential +@@ -467,7 +467,7 @@ bool ChromePasswordManagerClient::ShowKeyboardReplacin + + bool ChromePasswordManagerClient::CanUseBiometricAuthForFilling( + device_reauth::DeviceAuthenticator* authenticator) { +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (!GetLocalStatePrefs() || !GetPrefs() || !authenticator) { + return false; + } +@@ -690,7 +690,7 @@ void ChromePasswordManagerClient::NotifyUserCredential } void ChromePasswordManagerClient::NotifyKeychainError() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) PasswordsClientUIDelegate* manage_passwords_ui_controller = PasswordsClientUIDelegateFromWebContents(web_contents()); manage_passwords_ui_controller->OnKeychainError(); 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 index cc687607ab05..0b8335d7562c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_platform__util__linux.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_platform__util__linux.cc @@ -1,12 +1,12 @@ ---- chrome/browser/platform_util_linux.cc.orig 2024-02-25 20:22:18 UTC +--- chrome/browser/platform_util_linux.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/platform_util_linux.cc -@@ -300,7 +300,9 @@ void RunCommand(const std::string& command, - - base::LaunchOptions options; +@@ -300,7 +300,9 @@ void OnLaunchOptionsCreated(const std::string& command + argv.push_back(command); + argv.push_back(arg); options.current_directory = working_directory; +#if !BUILDFLAG(IS_BSD) options.allow_new_privs = true; +#endif // xdg-open can fall back on mailcap which eventually might plumb through // to a command that needs a terminal. Set the environment variable telling // it that we definitely don't have a terminal available and that it should diff --git a/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 index a77c92bf6c8f..bd756567e331 100644 --- 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 @@ -1,252 +1,254 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -226,19 +226,20 @@ +@@ -231,19 +231,20 @@ #include "components/spellcheck/browser/pref_names.h" #endif // BUILDFLAG(ENABLE_SPELLCHECK) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/action.h" #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #include "components/device_signals/core/browser/pref_names.h" // nogncheck due to crbug.com/1125897 #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "components/enterprise/idle/idle_timeout_policy_handler.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) || \ + BUILDFLAG(IS_BSD) #include "chrome/browser/privacy_sandbox/privacy_sandbox_policy_handler.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || -@@ -253,13 +254,13 @@ +@@ -258,13 +259,13 @@ #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/battery_saver_policy_handler.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/search_engines/site_search_policy_handler.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) -@@ -825,14 +826,14 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -839,14 +840,14 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kManagedDefaultGeolocationSetting, base::Value::Type::INTEGER }, #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ - || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) + || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { key::kRequireOnlineRevocationChecksForLocalAnchors, prefs::kCertRevocationCheckingRequiredLocalAnchors, base::Value::Type::BOOLEAN }, #endif // #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) // || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ - || BUILDFLAG(IS_FUCHSIA) + || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) { key::kFullscreenAllowed, prefs::kFullscreenAllowed, base::Value::Type::BOOLEAN }, -@@ -1605,7 +1606,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1625,7 +1626,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kGSSAPILibraryName, prefs::kGSSAPILibraryName, base::Value::Type::STRING }, -@@ -1650,7 +1651,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1673,7 +1674,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kNetworkServiceSandboxEnabled, prefs::kNetworkServiceSandboxEnabled, base::Value::Type::BOOLEAN }, -@@ -1676,18 +1677,18 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1699,12 +1700,12 @@ 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 }, +@@ -1713,7 +1714,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + base::Value::Type::STRING }, #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 }, -@@ -1700,7 +1701,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1726,7 +1727,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 }, -@@ -1798,7 +1799,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1824,7 +1825,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { key::kAlternativeBrowserPath, browser_switcher::prefs::kAlternativeBrowserPath, base::Value::Type::STRING }, -@@ -1896,7 +1897,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - base::Value::Type::BOOLEAN }, - #endif // BUILDFLAG(IS_CHROMEOS) - --#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // TODO(crbug.com/1454054): replace the - // kGetDisplayMediaSetSelectAllScreensAllowedForUrls policy by a policy that - // matches the name of the new `getAllScreensMedia` API. -@@ -1905,7 +1906,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1931,7 +1932,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::LIST }, - #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) + #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 }, -@@ -1930,7 +1931,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1956,7 +1957,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = #endif // BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) { key::kEnforceLocalAnchorConstraintsEnabled, prefs::kEnforceLocalAnchorConstraintsEnabled, base::Value::Type::BOOLEAN }, -@@ -1991,7 +1992,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2014,7 +2015,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = ash::prefs::kUrlParameterToAutofillSAMLUsername, base::Value::Type::STRING }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) { key::kTabDiscardingExceptions, performance_manager::user_tuning::prefs::kManagedTabDiscardingExceptions, base::Value::Type::LIST }, -@@ -2019,7 +2020,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2042,7 +2043,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kCloudApAuthEnabled, base::Value::Type::INTEGER }, #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kOutOfProcessSystemDnsResolutionEnabled, prefs::kOutOfProcessSystemDnsResolutionEnabled, base::Value::Type::BOOLEAN }, -@@ -2042,7 +2043,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2068,7 +2069,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kManagedPrivateNetworkAccessRestrictionsEnabled, base::Value::Type::BOOLEAN }, #if BUILDFLAG(ENABLE_EXTENSIONS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kExtensionInstallTypeBlocklist, extensions::pref_names::kExtensionInstallTypeBlocklist, base::Value::Type::LIST}, -@@ -2063,7 +2064,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2089,7 +2090,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = optimization_guide::model_execution::prefs::kWallpaperSearchEnterprisePolicyAllowed, base::Value::Type::INTEGER}, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) { key::kChromeForTestingAllowed, prefs::kChromeForTestingAllowed, base::Value::Type::BOOLEAN }, -@@ -2178,7 +2179,7 @@ std::unique_ptr BuildH +@@ -2208,7 +2209,7 @@ std::unique_ptr BuildH // Policies for all platforms - End #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) handlers->AddHandler( std::make_unique()); // Note: This needs to be created after `DefaultSearchPolicyHandler`. -@@ -2186,7 +2187,7 @@ std::unique_ptr BuildH +@@ -2216,7 +2217,7 @@ std::unique_ptr BuildH // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) handlers->AddHandler( std::make_unique(chrome_schema)); - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -2362,7 +2363,7 @@ std::unique_ptr BuildH + +@@ -2405,7 +2406,7 @@ std::unique_ptr BuildH #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) handlers->AddHandler( std::make_unique()); handlers->AddHandler( -@@ -2420,7 +2421,7 @@ std::unique_ptr BuildH +@@ -2463,7 +2464,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()); handlers->AddHandler( -@@ -2821,7 +2822,7 @@ std::unique_ptr BuildH +@@ -2498,7 +2499,7 @@ std::unique_ptr BuildH + SimpleSchemaValidatingPolicyHandler::RECOMMENDED_PROHIBITED, + SimpleSchemaValidatingPolicyHandler::MANDATORY_ALLOWED))); + +-#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) ++#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + handlers->AddHandler( + std::make_unique(chrome_schema)); + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +@@ -2875,7 +2876,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( -@@ -2829,7 +2830,7 @@ std::unique_ptr BuildH +@@ -2883,7 +2884,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)); -@@ -2846,7 +2847,7 @@ std::unique_ptr BuildH +@@ -2900,7 +2901,7 @@ std::unique_ptr BuildH /*new_policy_handler=*/std::make_unique< first_party_sets::FirstPartySetsOverridesPolicyHandler>( - policy::key::kRelatedWebsiteSetsOverrides, chrome_schema))); + key::kRelatedWebsiteSetsOverrides, chrome_schema))); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) handlers->AddHandler(std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -2871,7 +2872,7 @@ std::unique_ptr BuildH +@@ -2927,7 +2928,7 @@ std::unique_ptr BuildH base::Value::Type::BOOLEAN))); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS_ASH) 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 index 138e29ab1a46..9f12bd84aa8f 100644 --- 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 @@ -1,20 +1,20 @@ ---- chrome/browser/policy/device_management_service_configuration.cc.orig 2023-07-21 09:49:17 UTC +--- chrome/browser/policy/device_management_service_configuration.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/policy/device_management_service_configuration.cc -@@ -22,7 +22,7 @@ +@@ -24,7 +24,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 +@@ -102,7 +102,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 index 540650e1c18e..e5ca4d4ae5e9 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_prefs_browser__prefs.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_prefs_browser__prefs.cc @@ -1,57 +1,57 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -486,18 +486,18 @@ +@@ -485,18 +485,18 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "components/device_signals/core/browser/pref_names.h" // nogncheck due to crbug.com/1125897 #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 -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #endif -@@ -532,7 +532,7 @@ +@@ -531,7 +531,7 @@ #include "chrome/browser/sessions/session_service_log.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/color/system_theme.h" #endif -@@ -1681,7 +1681,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) +@@ -1711,7 +1711,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) registry->RegisterBooleanPref(prefs::kOopPrintDriversAllowedByPolicy, true); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kChromeForTestingAllowed, true); #endif -@@ -2024,12 +2024,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -2053,12 +2053,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) device_signals::RegisterProfilePrefs(registry); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry); enterprise_signin::RegisterProfilePrefs(registry); #endif diff --git a/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 index 4328cd53a150..df798fa0d4eb 100644 --- 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 @@ -1,11 +1,11 @@ ---- chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/prefs/pref_service_incognito_allowlist.cc -@@ -175,7 +175,7 @@ const char* const kPersistentPrefNames[] = { +@@ -184,7 +184,7 @@ const char* const kPersistentPrefNames[] = { prefs::kShowFullscreenToolbar, #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Toggleing custom frames affects all open windows in the profile, hence // should be written to the regular profile when changed in incognito mode. prefs::kUseCustomChromeFrame, diff --git a/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 index 14bcaf018fb2..508fabb9ad37 100644 --- 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 @@ -1,29 +1,29 @@ ---- chrome/browser/printing/print_backend_service_manager.cc.orig 2024-02-25 20:22:18 UTC +--- chrome/browser/printing/print_backend_service_manager.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/printing/print_backend_service_manager.cc @@ -34,7 +34,7 @@ #include "printing/printing_context.h" #include "printing/printing_features.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "content/public/common/content_switches.h" #endif -@@ -853,7 +853,7 @@ PrintBackendServiceManager::GetServiceFromBundle( +@@ -861,7 +861,7 @@ PrintBackendServiceManager::GetServiceFromBundle( host.BindNewPipeAndPassReceiver(), content::ServiceProcessHost::Options() .WithDisplayName(IDS_UTILITY_PROCESS_PRINT_BACKEND_SERVICE_NAME) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) .WithExtraCommandLineSwitches({switches::kMessageLoopTypeUi}) #endif .Pass()); -@@ -1026,7 +1026,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate +@@ -1038,7 +1038,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 (HasQueryWithUiClientForRemoteId(remote_id)) { return std::nullopt; 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 index 8cb33944c747..1359d7429c32 100644 --- 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 @@ -1,110 +1,110 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -316,7 +316,7 @@ +@@ -320,7 +320,7 @@ #include "chromeos/constants/chromeos_features.h" #endif -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/messaging_layer/util/manual_test_heartbeat_event_factory.h" #endif -@@ -407,18 +407,18 @@ +@@ -411,18 +411,18 @@ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.h" #include "chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.h" #include "chrome/browser/enterprise/signals/user_permission_service_factory.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/idle_service_factory.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/browser_switcher/browser_switcher_service_factory.h" - #include "chrome/browser/enterprise/connectors/analysis/local_binary_upload_service_factory.h" - #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h" -@@ -647,7 +647,7 @@ void ChromeBrowserMainExtraPartsProfiles:: + #include "chrome/browser/enterprise/client_certificates/certificate_provisioning_service_factory.h" + #include "chrome/browser/enterprise/client_certificates/certificate_store_factory.h" +@@ -657,7 +657,7 @@ void ChromeBrowserMainExtraPartsProfiles:: DiceBoundSessionCookieServiceFactory::GetInstance(); #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) #endif // BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) browser_switcher::BrowserSwitcherServiceFactory::GetInstance(); #endif browser_sync::UserEventServiceFactory::GetInstance(); -@@ -766,26 +766,26 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -780,26 +780,26 @@ void ChromeBrowserMainExtraPartsProfiles:: enterprise_commands::UserRemoteCommandsServiceFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) enterprise_connectors::DeviceTrustConnectorServiceFactory::GetInstance(); enterprise_connectors::DeviceTrustServiceFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) enterprise_idle::IdleServiceFactory::GetInstance(); #endif #if !BUILDFLAG(IS_CHROMEOS_ASH) enterprise_reporting::CloudProfileReportingServiceFactory::GetInstance(); #endif enterprise_reporting::LegacyTechServiceFactory::GetInstance(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_signals::SignalsAggregatorFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) enterprise_signals::UserPermissionServiceFactory::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_signin::EnterpriseSigninServiceFactory::GetInstance(); #endif #if BUILDFLAG(ENABLE_SESSION_SERVICE) -@@ -909,7 +909,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -923,7 +923,7 @@ 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 -@@ -1011,7 +1011,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1026,7 +1026,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if BUILDFLAG(IS_CHROMEOS) policy::PolicyCertServiceFactory::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) policy::ProfileTokenPolicyWebSigninServiceFactory::GetInstance(); + policy::UserPolicyOidcSigninServiceFactory::GetInstance(); #endif - policy::UserCloudPolicyInvalidatorFactory::GetInstance(); -@@ -1052,7 +1052,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1068,7 +1068,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_ANDROID) ProfileStatisticsFactory::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) ProfileTokenWebSigninInterceptorFactory::GetInstance(); + OidcAuthenticationSigninInterceptorFactory::GetInstance(); #endif - #if !BUILDFLAG(IS_ANDROID) -@@ -1070,7 +1070,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1087,7 +1087,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif ReduceAcceptLanguageFactory::GetInstance(); RendererUpdaterFactory::GetInstance(); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) reporting::ManualTestHeartbeatEventFactory::GetInstance(); #endif #if BUILDFLAG(IS_CHROMEOS_LACROS) 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 index 3444d09df957..074ade11f8c2 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc @@ -1,40 +1,40 @@ ---- chrome/browser/profiles/profile_impl.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/profiles/profile_impl.cc @@ -265,6 +265,10 @@ #include "chrome/browser/spellchecker/spellcheck_service.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + using bookmarks::BookmarkModel; using content::BrowserThread; using content::DownloadManagerDelegate; -@@ -596,7 +600,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async +@@ -598,7 +602,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async #else { #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ProfileManager* profile_manager = g_browser_process->profile_manager(); ProfileAttributesEntry* entry = profile_manager->GetProfileAttributesStorage() -@@ -873,7 +877,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) +@@ -880,7 +884,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_renderer__preferences__util.cc b/www/ungoogled-chromium/files/patch-chrome_browser_renderer__preferences__util.cc index abefa3235fa4..99c80ae45824 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_renderer__preferences__util.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_renderer__preferences__util.cc @@ -1,29 +1,29 @@ ---- chrome/browser/renderer_preferences_util.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/renderer_preferences_util.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/renderer_preferences_util.cc -@@ -38,7 +38,7 @@ +@@ -39,7 +39,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" -@@ -150,7 +150,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc +@@ -154,7 +154,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)) auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(profile); if (linux_ui_theme) { if (ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme()) { -@@ -173,7 +173,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc +@@ -177,7 +177,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_screen__ai_screen__ai__install__state.cc b/www/ungoogled-chromium/files/patch-chrome_browser_screen__ai_screen__ai__install__state.cc index fa95a65e5483..1cc09af76a6b 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_screen__ai_screen__ai__install__state.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_screen__ai_screen__ai__install__state.cc @@ -1,20 +1,20 @@ ---- chrome/browser/screen_ai/screen_ai_install_state.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/screen_ai/screen_ai_install_state.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/screen_ai/screen_ai_install_state.cc -@@ -24,7 +24,7 @@ - #include "content/public/browser/browser_thread.h" +@@ -23,7 +23,7 @@ + #include "services/screen_ai/public/cpp/utilities.h" #include "ui/accessibility/accessibility_features.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/cpu.h" #include "base/files/file_util.h" #endif -@@ -36,7 +36,7 @@ const char kMinExpectedVersion[] = "123.1"; +@@ -35,7 +35,7 @@ const char kMinExpectedVersion[] = "123.1"; bool IsDeviceCompatible() { // Check if the CPU has the required instruction set to run the Screen AI // library. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!base::CPU().has_sse41()) { return false; } diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_screen__ai_screen__ai__service__router.cc b/www/ungoogled-chromium/files/patch-chrome_browser_screen__ai_screen__ai__service__router.cc new file mode 100644 index 000000000000..5623c1b850e4 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_screen__ai_screen__ai__service__router.cc @@ -0,0 +1,20 @@ +--- chrome/browser/screen_ai/screen_ai_service_router.cc.orig 2024-04-23 07:42:17 UTC ++++ chrome/browser/screen_ai/screen_ai_service_router.cc +@@ -281,7 +281,7 @@ void ScreenAIServiceRouter::LaunchIfNotRunning() { + base::FilePath binary_path = state_instance->get_component_binary_path(); + #if BUILDFLAG(IS_WIN) + std::vector preload_libraries = {binary_path}; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + std::vector extra_switches = { + base::StringPrintf("--%s=%s", screen_ai::GetBinaryPathSwitch(), + binary_path.MaybeAsASCII().c_str())}; +@@ -295,7 +295,7 @@ void ScreenAIServiceRouter::LaunchIfNotRunning() { + .WithPreloadedLibraries( + preload_libraries, + content::ServiceProcessHostPreloadLibraries::GetPassKey()) +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + .WithExtraCommandLineSwitches(extra_switches) + #endif // BUILDFLAG(IS_WIN) + .Pass()); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc new file mode 100644 index 000000000000..10c706b41458 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc @@ -0,0 +1,11 @@ +--- chrome/browser/supervised_user/supervised_user_extensions_delegate_impl.cc.orig 2024-04-23 07:42:17 UTC ++++ chrome/browser/supervised_user/supervised_user_extensions_delegate_impl.cc +@@ -180,7 +180,7 @@ void SupervisedUserExtensionsDelegateImpl::RequestExte + return; + } + } +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + CHECK(contents.value()); + content::WebContents* web_contents = contents.value().get(); + if (CanInstallExtensions()) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc new file mode 100644 index 000000000000..cb892c797c1d --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc @@ -0,0 +1,20 @@ +--- chrome/browser/supervised_user/supervised_user_extensions_manager.cc.orig 2024-04-23 07:42:17 UTC ++++ chrome/browser/supervised_user/supervised_user_extensions_manager.cc +@@ -305,7 +305,7 @@ void SupervisedUserExtensionsManager:: + ActivateManagementPolicyAndUpdateRegistration() { + SetActiveForSupervisedUsers(); + UpdateManagementPolicyRegistration(); +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + MaybeMarkExtensionsLocallyParentApproved(); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + } +@@ -417,7 +417,7 @@ bool SupervisedUserExtensionsManager::ShouldBlockExten + return false; + } + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void SupervisedUserExtensionsManager:: + MaybeMarkExtensionsLocallyParentApproved() { + if (!is_active_policy_for_supervised_users_) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h new file mode 100644 index 000000000000..02240d926162 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h @@ -0,0 +1,11 @@ +--- chrome/browser/supervised_user/supervised_user_extensions_manager.h.orig 2024-04-23 07:42:17 UTC ++++ chrome/browser/supervised_user/supervised_user_extensions_manager.h +@@ -143,7 +143,7 @@ class SupervisedUserExtensionsManager : public Extensi + // launched. + bool ShouldBlockExtension(const std::string& extension_id) const; + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Triggers an one-time migration of the present extensions as parent-approved + // when the feature + // `kEnableSupervisedUserSkipParentApprovalToInstallExtensions` becomes diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc index 31a569c5f122..c4597335b674 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc @@ -1,38 +1,38 @@ ---- chrome/browser/sync/chrome_sync_client.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/sync/chrome_sync_client.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/sync/chrome_sync_client.cc -@@ -110,7 +110,7 @@ +@@ -112,7 +112,7 @@ #endif // BUILDFLAG(ENABLE_SPELLCHECK) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_keyed_service.h" #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h" #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || -@@ -456,7 +456,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy +@@ -460,7 +460,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy #endif // !BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(features::kTabGroupsSave)) { controllers.push_back(std::make_unique( syncer::SAVED_TAB_GROUP, -@@ -469,7 +469,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy +@@ -473,7 +473,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy // Chrome prefers OS provided spell checkers where they exist. So only sync the // custom dictionary on platforms that typically don't provide one. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Dictionary sync is enabled by default. if (GetPrefService()->GetBoolean(spellcheck::prefs::kSpellCheckEnable)) { controllers.push_back( -@@ -625,7 +625,7 @@ base::WeakPtr +@@ -629,7 +629,7 @@ base::WeakPtr ChromeSyncClient::GetControllerDelegateForModelType(syncer::ModelType type) { switch (type) { #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) case syncer::SAVED_TAB_GROUP: { DCHECK(base::FeatureList::IsEnabled(features::kTabGroupsSave)); - return SavedTabGroupServiceFactory::GetForProfile(profile_) + return tab_groups::SavedTabGroupServiceFactory::GetForProfile(profile_) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_sync_sync__service__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_sync_sync__service__factory.cc index 6116d0f49428..a78e4f5220b5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_sync_sync__service__factory.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_sync_sync__service__factory.cc @@ -1,29 +1,29 @@ ---- chrome/browser/sync/sync_service_factory.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/sync/sync_service_factory.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/sync/sync_service_factory.cc @@ -84,7 +84,7 @@ #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h" #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || // BUILDFLAG(IS_WIN) @@ -130,7 +130,7 @@ std::unique_ptr BuildSyncService( // TODO(crbug.com/1052397): Reassess whether the following block needs to be // included in lacros-chrome 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)) syncer::SyncPrefs prefs(profile->GetPrefs()); local_sync_backend_enabled = prefs.IsLocalSyncEnabled(); @@ -264,7 +264,7 @@ SyncServiceFactory::SyncServiceFactory() DependsOn(ProfilePasswordStoreFactory::GetInstance()); DependsOn(PowerBookmarkServiceFactory::GetInstance()); #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - DependsOn(SavedTabGroupServiceFactory::GetInstance()); + DependsOn(tab_groups::SavedTabGroupServiceFactory::GetInstance()); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || // BUILDFLAG(IS_WIN) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc b/www/ungoogled-chromium/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc index 1d3dac42152b..3c5f278af7bb 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc @@ -1,47 +1,47 @@ ---- chrome/browser/task_manager/sampling/task_group_sampler.cc.orig 2023-03-10 11:01:21 UTC +--- chrome/browser/task_manager/sampling/task_group_sampler.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/task_manager/sampling/task_group_sampler.cc -@@ -45,7 +45,7 @@ TaskGroupSampler::TaskGroupSampler( +@@ -46,7 +46,7 @@ TaskGroupSampler::TaskGroupSampler( const OnCpuRefreshCallback& on_cpu_refresh, const OnSwappedMemRefreshCallback& on_swapped_mem_refresh, const OnIdleWakeupsCallback& on_idle_wakeups, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const OnOpenFdCountCallback& on_open_fd_count, #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) const OnProcessPriorityCallback& on_process_priority) -@@ -55,7 +55,7 @@ TaskGroupSampler::TaskGroupSampler( +@@ -56,7 +56,7 @@ TaskGroupSampler::TaskGroupSampler( on_cpu_refresh_callback_(on_cpu_refresh), on_swapped_mem_refresh_callback_(on_swapped_mem_refresh), on_idle_wakeups_callback_(on_idle_wakeups), -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) on_open_fd_count_callback_(on_open_fd_count), #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) on_process_priority_callback_(on_process_priority) { -@@ -85,7 +85,7 @@ void TaskGroupSampler::Refresh(int64_t refresh_flags) +@@ -86,7 +86,7 @@ void TaskGroupSampler::Refresh(int64_t refresh_flags) base::BindOnce(on_swapped_mem_refresh_callback_)); } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (TaskManagerObserver::IsResourceRefreshEnabled(REFRESH_TYPE_IDLE_WAKEUPS, refresh_flags)) { blocking_pool_runner_->PostTaskAndReplyWithResult( -@@ -95,7 +95,7 @@ void TaskGroupSampler::Refresh(int64_t refresh_flags) +@@ -96,7 +96,7 @@ void TaskGroupSampler::Refresh(int64_t refresh_flags) } #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (TaskManagerObserver::IsResourceRefreshEnabled(REFRESH_TYPE_FD_COUNT, refresh_flags)) { blocking_pool_runner_->PostTaskAndReplyWithResult( -@@ -144,7 +144,7 @@ int TaskGroupSampler::RefreshIdleWakeupsPerSecond() { +@@ -150,7 +150,7 @@ int TaskGroupSampler::RefreshIdleWakeupsPerSecond() { return process_metrics_->GetIdleWakeupsPerSecond(); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) int TaskGroupSampler::RefreshOpenFdCount() { DCHECK_CALLED_ON_VALID_SEQUENCE(worker_pool_sequenced_checker_); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_actions_chrome__action__id.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_actions_chrome__action__id.h index 37924f69dbde..a16a3b2b3259 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_actions_chrome__action__id.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_actions_chrome__action__id.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/actions/chrome_action_id.h.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/actions/chrome_action_id.h.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/actions/chrome_action_id.h -@@ -526,7 +526,7 @@ +@@ -510,7 +510,7 @@ IDC_CONTENT_CONTEXT_QUICK_ANSWERS_INLINE_ANSWER) \ E(kActionContentContextQuickAnswersInlineQuery, \ IDC_CONTENT_CONTEXT_QUICK_ANSWERS_INLINE_QUERY) -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define CHROME_PLATFORM_SPECIFIC_ACTION_IDS \ E(kUseSystemTitleBar, IDC_USE_SYSTEM_TITLE_BAR) \ E(kRestoreWindow, IDC_RESTORE_WINDOW) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc new file mode 100644 index 000000000000..f1c3176d602c --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc @@ -0,0 +1,20 @@ +--- chrome/browser/ui/autofill/payments/desktop_payments_window_manager.cc.orig 2024-04-23 07:42:17 UTC ++++ chrome/browser/ui/autofill/payments/desktop_payments_window_manager.cc +@@ -25,7 +25,7 @@ namespace autofill::payments { + DesktopPaymentsWindowManager::DesktopPaymentsWindowManager( + ContentAutofillClient* client) + : client_(CHECK_DEREF(client)) { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + scoped_observation_.Observe(BrowserList::GetInstance()); + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) + } +@@ -48,7 +48,7 @@ void DesktopPaymentsWindowManager::WebContentsDestroye + } + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + void DesktopPaymentsWindowManager::OnBrowserSetLastActive(Browser* browser) { + // If there is an ongoing payments window manager pop-up flow, and the + // original tab's WebContents become active, activate the pop-up's diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h new file mode 100644 index 000000000000..d799dd88a600 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h @@ -0,0 +1,38 @@ +--- chrome/browser/ui/autofill/payments/desktop_payments_window_manager.h.orig 2024-04-23 07:42:17 UTC ++++ chrome/browser/ui/autofill/payments/desktop_payments_window_manager.h +@@ -11,7 +11,7 @@ + #include "components/autofill/core/browser/payments/payments_window_manager.h" + #include "content/public/browser/web_contents_observer.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + #include "base/scoped_observation.h" + #include "chrome/browser/ui/browser_list.h" + #include "chrome/browser/ui/browser_list_observer.h" +@@ -30,7 +30,7 @@ namespace payments { + // WebContents of the original tab that the pop-up is created in. If there is a + // pop-up currently present, `this` will observe the WebContents of that pop-up. + class DesktopPaymentsWindowManager : public PaymentsWindowManager, +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + public BrowserListObserver, + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) + public content::WebContentsObserver { +@@ -47,7 +47,7 @@ class DesktopPaymentsWindowManager : public PaymentsWi + // content::WebContentsObserver: + void WebContentsDestroyed() override; + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + // BrowserListObserver: + void OnBrowserSetLastActive(Browser* browser) override; + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +@@ -99,7 +99,7 @@ class DesktopPaymentsWindowManager : public PaymentsWi + // ContentAutofillClient that owns `this`. + const raw_ref client_; + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + base::ScopedObservation scoped_observation_{ + this}; + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__ui__prefs.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__ui__prefs.cc new file mode 100644 index 000000000000..0a28278f77d8 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__ui__prefs.cc @@ -0,0 +1,11 @@ +--- chrome/browser/ui/browser_ui_prefs.cc.orig 2024-04-23 07:42:17 UTC ++++ chrome/browser/ui/browser_ui_prefs.cc +@@ -168,7 +168,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistry + registry->RegisterDictionaryPref(prefs::kHttpsUpgradeFallbacks); + registry->RegisterDictionaryPref(prefs::kHttpsUpgradeNavigations); + registry->RegisterBooleanPref(prefs::kHttpsOnlyModeAutoEnabled, false); +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + registry->RegisterStringPref(prefs::kEnterpriseLogoUrl, std::string()); + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) + } diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.cc index 15d1096cd7be..5d61535c8af5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/chrome_pages.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/chrome_pages.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/chrome_pages.cc -@@ -80,7 +80,7 @@ +@@ -81,7 +81,7 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/web_applications/web_app_utils.h" #endif -@@ -701,7 +701,7 @@ void ShowShortcutCustomizationApp(Profile* profile, +@@ -715,7 +715,7 @@ void ShowShortcutCustomizationApp(Profile* profile, } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) void ShowWebAppSettingsImpl(Browser* browser, Profile* profile, const std::string& app_id, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.h index d2306a5edcbe..cb815572f574 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.h @@ -1,20 +1,20 @@ ---- chrome/browser/ui/chrome_pages.h.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/ui/chrome_pages.h.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/chrome_pages.h @@ -38,7 +38,7 @@ enum class ConsentLevel; } // namespace signin #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) namespace web_app { enum class AppSettingsPageEntryPoint; } // namespace web_app -@@ -258,7 +258,7 @@ void ShowShortcutCustomizationApp(Profile* profile, +@@ -262,7 +262,7 @@ void ShowShortcutCustomizationApp(Profile* profile, #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Show chrome://app-settings/ page. void ShowWebAppSettings(Browser* browser, const std::string& app_id, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc index 6db14528d554..3ffd0d67d5d0 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc.orig 2024-02-25 20:22:18 UTC +--- chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc -@@ -2005,7 +2005,7 @@ const gfx::VectorIcon& GetSharingHubVectorIcon() { +@@ -1989,7 +1989,7 @@ const gfx::VectorIcon& GetSharingHubVectorIcon() { OmniboxFieldTrial::IsChromeRefreshActionChipIconsEnabled() ? omnibox::kShareWinChromeRefreshIcon : omnibox::kShareWinIcon; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return OmniboxFieldTrial::IsChromeRefreshIconsEnabled() || OmniboxFieldTrial::IsChromeRefreshActionChipIconsEnabled() ? omnibox::kShareLinuxChromeRefreshIcon diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc index f7e05ffa2768..6ee8dab4b1bf 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/passwords/manage_passwords_ui_controller.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/passwords/manage_passwords_ui_controller.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/passwords/manage_passwords_ui_controller.cc @@ -88,7 +88,7 @@ int ManagePasswordsUIController::save_fallback_timeout namespace { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Should be kept in sync with constant declared in // bubble_controllers/relaunch_chrome_bubble_controller.cc. constexpr int kMaxNumberOfTimesKeychainErrorBubbleIsShown = 3; -@@ -478,7 +478,7 @@ void ManagePasswordsUIController::OnBiometricAuthBefor +@@ -477,7 +477,7 @@ void ManagePasswordsUIController::OnBiometricAuthBefor } void ManagePasswordsUIController::OnKeychainError() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) CHECK(!dialog_controller_); PrefService* prefs = Profile::FromBrowserContext(web_contents()->GetBrowserContext()) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_signin_signin__view__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_signin_signin__view__controller.cc index 224d7ee92629..edc0c2ce74d6 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_signin_signin__view__controller.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_signin_signin__view__controller.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/signin/signin_view_controller.cc.orig 2024-02-25 20:22:18 UTC +--- chrome/browser/ui/signin/signin_view_controller.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/signin/signin_view_controller.cc -@@ -254,7 +254,7 @@ void SigninViewController::ShowModalManagedUserNoticeD +@@ -255,7 +255,7 @@ void SigninViewController::ShowModalManagedUserNoticeD bool show_link_data_option, signin::SigninChoiceCallback callback) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) CloseModalSignin(); dialog_ = std::make_unique( SigninViewControllerDelegate::CreateManagedUserNoticeDelegate( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc index ef75fda44f6d..3d742fe162c2 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/startup/bad_flags_prompt.cc.orig 2023-11-04 07:08:51 UTC +--- chrome/browser/ui/startup/bad_flags_prompt.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/startup/bad_flags_prompt.cc -@@ -103,7 +103,7 @@ const char* const kBadFlags[] = { +@@ -104,7 +104,7 @@ const char* const kBadFlags[] = { // 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) // Speech dispatcher is buggy, it can crash and it can make Chrome freeze. // http://crbug.com/327295 switches::kEnableSpeechDispatcher, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc index 67b5ec69c116..e14424f680a5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc @@ -1,38 +1,38 @@ ---- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/startup/startup_browser_creator.cc @@ -135,7 +135,7 @@ #include "chrome/credential_provider/common/gcp_strings.h" #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/headless/headless_mode_util.h" #include "chrome/browser/ui/startup/web_app_info_recorder_utils.h" #include "components/headless/policy/headless_mode_policy.h" -@@ -941,7 +941,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -962,7 +962,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( TRACE_EVENT0("startup", "StartupBrowserCreator::ProcessCmdLineImpl"); ComputeAndRecordLaunchMode(command_line); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode() && headless::HeadlessModePolicy::IsHeadlessModeDisabled( g_browser_process->local_state())) { -@@ -1046,7 +1046,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1060,7 +1060,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( silent_launch = true; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Writes open and installed web apps to the specified file without // launching a new browser window or tab. if (base::FeatureList::IsEnabled(features::kListWebAppsSwitch) && -@@ -1257,7 +1257,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1270,7 +1270,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( CHECK_EQ(profile_info.mode, StartupProfileMode::kBrowserWindow) << "Failed launch with app: couldn't pick a profile"; std::string app_id = command_line.GetSwitchValueASCII(switches::kAppId); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If Chrome Apps are deprecated and |app_id| is a Chrome App, display the // deprecation UI instead of launching the app. if (apps::OpenDeprecatedApplicationPrompt(privacy_safe_profile, app_id)) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_tab__helpers.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_tab__helpers.cc index c7a5a1179613..403a95a60210 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_tab__helpers.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_tab__helpers.cc @@ -1,26 +1,26 @@ ---- chrome/browser/ui/tab_helpers.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/tab_helpers.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/tab_helpers.cc -@@ -234,7 +234,7 @@ +@@ -233,7 +233,7 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/blocked_content/framebust_block_tab_helper.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/hats/hats_helper.h" -@@ -659,12 +659,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con +@@ -656,12 +656,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con // 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_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) metrics::DesktopSessionDurationObserver::CreateForWebContents(web_contents); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled( features::kHappinessTrackingSurveysForDesktopDemo) || base::FeatureList::IsEnabled(features::kTrustSafetySentimentSurvey) || diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.cc index 0398be6bddf0..8ca662ecc227 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/ui_features.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/ui_features.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/ui_features.cc -@@ -357,7 +357,7 @@ BASE_FEATURE(kTopChromeWebUIUsesSpareRenderer, +@@ -410,7 +410,7 @@ BASE_FEATURE(kTopChromeWebUIUsesSpareRenderer, "TopChromeWebUIUsesSpareRenderer", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables alternate update-related text to be displayed in browser app menu // button, menu item and confirmation dialog. BASE_FEATURE(kUpdateTextOptions, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h index 83591f4d10a0..4646275a0a88 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/ui_features.h.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/ui_features.h.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/ui_features.h -@@ -223,7 +223,7 @@ BASE_DECLARE_FEATURE(kToolbarUseHardwareBitmapDraw); +@@ -264,7 +264,7 @@ BASE_DECLARE_FEATURE(kToolbarUseHardwareBitmapDraw); BASE_DECLARE_FEATURE(kTopChromeWebUIUsesSpareRenderer); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kUpdateTextOptions); extern const base::FeatureParam kUpdateTextOptionNumber; #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__linux.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__linux.cc index d69681e7a04a..cc1287c2f2fb 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__linux.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__linux.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/frame/browser_frame_view_linux.cc.orig 2024-02-25 20:22:18 UTC +--- chrome/browser/ui/views/frame/browser_frame_view_linux.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/views/frame/browser_frame_view_linux.cc -@@ -77,7 +77,7 @@ void BrowserFrameViewLinux::OnWindowButtonOrderingChan +@@ -60,7 +60,7 @@ gfx::ShadowValues BrowserFrameViewLinux::GetShadowValu void BrowserFrameViewLinux::PaintRestoredFrameBorder( gfx::Canvas* canvas) const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const bool tiled = frame()->tiled(); #else const bool tiled = false; -@@ -103,7 +103,7 @@ bool BrowserFrameViewLinux::ShouldDrawRestoredFrameSha +@@ -104,7 +104,7 @@ void BrowserFrameViewLinux::OnWindowButtonOrderingChan } float BrowserFrameViewLinux::GetRestoredCornerRadiusDip() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const bool tiled = frame()->tiled(); #else const bool tiled = false; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc index 152414d2dc3f..ad91fdb83e01 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc @@ -1,29 +1,20 @@ ---- chrome/browser/ui/views/frame/browser_non_client_frame_view_factory_views.cc.orig 2024-02-25 20:22:18 UTC +--- chrome/browser/ui/views/frame/browser_non_client_frame_view_factory_views.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/views/frame/browser_non_client_frame_view_factory_views.cc @@ -16,7 +16,7 @@ #include "chrome/browser/ui/views/frame/browser_frame_view_win.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/views/frame/browser_frame_view_layout_linux.h" #include "chrome/browser/ui/views/frame/browser_frame_view_layout_linux_native.h" #include "chrome/browser/ui/views/frame/browser_frame_view_linux_native.h" @@ -33,7 +33,7 @@ namespace { std::unique_ptr CreateOpaqueBrowserFrameView( BrowserFrame* frame, BrowserView* browser_view) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* profile = browser_view->browser()->profile(); auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(profile); auto* theme_service_factory = ThemeServiceFactory::GetForProfile(profile); -@@ -85,7 +85,7 @@ std::unique_ptr CreateBrows - if (browser_view->browser()->is_type_picture_in_picture()) { - auto view = - std::make_unique(frame, browser_view); --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - auto* profile = browser_view->browser()->profile(); - auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(profile); - auto* theme_service_factory = ThemeServiceFactory::GetForProfile(profile); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc index 417113ef4087..e23f67e418ee 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/frame/browser_view.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/views/frame/browser_view.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -2208,7 +2208,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra +@@ -2238,7 +2238,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra // CrOS cleanup is done. // 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)) contents_web_view_->SetFastResize(is_dragging); if (!is_dragging) { // When tab dragging is ended, we need to make sure the web contents get diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc index 8abbe603e7dd..e53357b2afc1 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc @@ -1,92 +1,92 @@ ---- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc @@ -59,7 +59,7 @@ #include "ui/aura/window.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/browser/themes/theme_service.h" + #include "chrome/browser/themes/theme_service_factory.h" #include "chrome/browser/ui/views/frame/browser_frame_view_paint_utils_linux.h" - #include "chrome/browser/ui/views/frame/desktop_browser_frame_aura_linux.h" - #endif -@@ -86,7 +86,7 @@ constexpr int kContentSettingIconSize = 16; +@@ -89,7 +89,7 @@ constexpr int kContentSettingIconSize = 16; // The height of the controls bar at the top of the window. constexpr int kTopControlsHeight = 34; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Frame border when window shadow is not drawn. constexpr int kFrameBorderThickness = 4; #endif -@@ -181,7 +181,7 @@ class WindowEventObserver : public ui::EventObserver { +@@ -184,7 +184,7 @@ class WindowEventObserver : public ui::EventObserver { gfx::Rect input_bounds = pip_browser_frame_view_->GetLocalBounds(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Calculate input bounds for Linux. This is needed because the input bounds // is not necessary the same as the local bounds on Linux. if (pip_browser_frame_view_->ShouldDrawFrameShadow()) { -@@ -571,7 +571,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow +@@ -585,7 +585,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow AddChildView(std::move(auto_pip_setting_overlay)); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - frame_background_ = std::make_unique(); - #endif - -@@ -774,7 +774,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( + auto* profile = browser_view->browser()->profile(); + auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(profile); + auto* theme_service_factory = ThemeServiceFactory::GetForProfile(profile); +@@ -804,7 +804,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( for (ContentSettingImageView* view : content_setting_views_) view->SetIconColor(color_provider->GetColor(kColorPipWindowForeground)); -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // On Linux the top bar background will be drawn in OnPaint(). top_bar_container_view_->SetBackground(views::CreateSolidBackground( color_provider->GetColor(kColorPipWindowTopBarBackground))); -@@ -853,7 +853,7 @@ void PictureInPictureBrowserFrameView::RemovedFromWidg +@@ -886,7 +886,7 @@ void PictureInPictureBrowserFrameView::RemovedFromWidg BrowserNonClientFrameView::RemovedFromWidget(); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gfx::Insets PictureInPictureBrowserFrameView::MirroredFrameBorderInsets() const { auto border = FrameBorderInsets(); -@@ -1107,7 +1107,7 @@ void PictureInPictureBrowserFrameView::AnimationProgre +@@ -1147,7 +1147,7 @@ void PictureInPictureBrowserFrameView::AnimationProgre // views::View implementations: void PictureInPictureBrowserFrameView::OnPaint(gfx::Canvas* canvas) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Draw the PiP window frame borders and shadows, including the top bar // background. if (window_frame_provider_) { -@@ -1231,7 +1231,7 @@ void PictureInPictureBrowserFrameView::UpdateTopBarVie +@@ -1281,7 +1281,7 @@ void PictureInPictureBrowserFrameView::UpdateTopBarVie } gfx::Insets PictureInPictureBrowserFrameView::FrameBorderInsets() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (window_frame_provider_) { const auto insets = window_frame_provider_->GetFrameThicknessDip(); const bool tiled = frame()->tiled(); -@@ -1249,7 +1249,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor +@@ -1299,7 +1299,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor } gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return FrameBorderInsets(); #elif !BUILDFLAG(IS_CHROMEOS_ASH) return gfx::Insets(kResizeBorder); -@@ -1270,7 +1270,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie +@@ -1320,7 +1320,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie top_height + border_thickness.bottom()); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - void PictureInPictureBrowserFrameView::SetWindowFrameProvider( - ui::WindowFrameProvider* window_frame_provider) { - DCHECK(window_frame_provider); + bool PictureInPictureBrowserFrameView::ShouldDrawFrameShadow() const { + return static_cast( + frame()->native_browser_frame()) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h index 2dd2a60d9139..19d44fa9ea63 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h @@ -1,47 +1,47 @@ ---- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h @@ -27,7 +27,7 @@ #include "ui/views/layout/flex_layout_view.h" #include "ui/views/widget/widget_observer.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/window_frame_provider.h" #endif @@ -35,7 +35,7 @@ // parent window, so to prevent cutting off important dialogs we resize the // picture-in-picture window to fit them. While ChromeOS Ash also uses Aura, it // does not have this issue so we do not resize on ChromeOS Ash. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #define RESIZE_DOCUMENT_PICTURE_IN_PICTURE_TO_DIALOG 1 #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_CHROMEOS_LACROS) @@ -101,7 +101,7 @@ class PictureInPictureBrowserFrameView void Layout(PassKey) override; void AddedToWidget() override; void RemovedFromWidget() override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gfx::Insets MirroredFrameBorderInsets() const override; gfx::Insets GetInputInsets() const override; SkRRect GetRestoredClipRegion() const override; @@ -192,7 +192,7 @@ class PictureInPictureBrowserFrameView // Returns true if there's an overlay view that's currently shown. bool IsOverlayViewVisible() const; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Sets the window frame provider so that it will be used for drawing. - void SetWindowFrameProvider(ui::WindowFrameProvider* window_frame_provider); + // Returns whether a client-side shadow should be drawn for the window. + bool ShouldDrawFrameShadow() const; -@@ -370,7 +370,7 @@ class PictureInPictureBrowserFrameView +@@ -368,7 +368,7 @@ class PictureInPictureBrowserFrameView // `top_bar_color_animation_`. std::optional current_foreground_color_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Used to draw window frame borders and shadow on Linux when GTK theme is // enabled. raw_ptr window_frame_provider_ = nullptr; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc index aa30e8146d89..ff12b140fed6 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/profiles/profile_menu_view_base.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc -@@ -703,7 +703,7 @@ void ProfileMenuViewBase::SetProfileIdentityInfo( +@@ -726,7 +726,7 @@ void ProfileMenuViewBase::SetProfileIdentityInfo( // 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) // crbug.com/1161166: Orca does not read the accessible window title of the // bubble, so we duplicate it in the top-level menu item. To be revisited // after considering other options, including fixes on the AT side. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tab__search__bubble__host.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tab__search__bubble__host.cc index a15d866ae574..2940f726d88a 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tab__search__bubble__host.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tab__search__bubble__host.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/tab_search_bubble_host.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/views/tab_search_bubble_host.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/views/tab_search_bubble_host.cc -@@ -296,7 +296,7 @@ bool TabSearchBubbleHost::ShouldTabSearchRenderBeforeT +@@ -263,7 +263,7 @@ bool TabSearchBubbleHost::ShouldTabSearchRenderBeforeT // Mac should have tabsearch on the right side. Windows >= Win10 has the // Tab Search button as a FrameCaptionButton, but it still needs to be on the // left if it exists. -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return features::IsChromeRefresh2023(); #else return false; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc index 2f6877135917..9fec2f64158e 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc @@ -1,56 +1,56 @@ ---- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/views/tabs/tab_drag_controller.cc -@@ -94,7 +94,7 @@ +@@ -93,7 +93,7 @@ #include "components/remote_cocoa/browser/window.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/aura/client/drag_drop_client.h" #endif -@@ -214,7 +214,7 @@ bool IsWindowDragUsingSystemDragDropAllowed() { +@@ -213,7 +213,7 @@ bool IsWindowDragUsingSystemDragDropAllowed() { void UpdateSystemDnDDragImage(TabDragContext* attached_context, const gfx::ImageSkia& image) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) aura::Window* root_window = attached_context->GetWidget()->GetNativeWindow()->GetRootWindow(); if (aura::client::GetDragDropClient(root_window)) { -@@ -395,7 +395,7 @@ TabDragController::Liveness TabDragController::Init( +@@ -403,7 +403,7 @@ TabDragController::Liveness TabDragController::Init( // synchronous on desktop Linux, so use that. // - ChromeOS Ash // Releasing capture on Ash cancels gestures so avoid it. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) - can_release_capture_ = false; + ref->can_release_capture_ = false; #endif - start_point_in_screen_ = gfx::Point(source_view_offset, mouse_offset.y()); -@@ -1039,7 +1039,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon + ref->start_point_in_screen_ = +@@ -1051,7 +1051,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon // 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)) // EndMoveLoop is going to snap the window back to its original location. // Hide it so users don't see this. Hiding a window in Linux aura causes // it to lose capture so skip it. -@@ -2088,7 +2088,7 @@ void TabDragController::CompleteDrag() { +@@ -2103,7 +2103,7 @@ void TabDragController::CompleteDrag() { } // If source window was maximized - maximize the new window as well. -#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) // Keeping maximized state breaks snap to Grid on Windows when dragging // tabs from maximized windows. TODO:(crbug.com/727051) Explore doing this // for other desktop OS's. kMaximizedStateRetainedOnTabDrag in -@@ -2559,7 +2559,7 @@ TabDragController::Liveness TabDragController::GetLoca +@@ -2533,7 +2533,7 @@ TabDragController::Liveness TabDragController::GetLoca } // 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) // Exclude windows which are pending deletion via Browser::TabStripEmpty(). // These windows can be returned in the Linux Aura port because the browser // window which was used for dragging is not hidden once all of its tabs are diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc index 4f1664da61f8..8f626d7784df 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc -@@ -373,7 +373,7 @@ TabHoverCardBubbleView::TabHoverCardBubbleView(Tab* ta +@@ -371,7 +371,7 @@ TabHoverCardBubbleView::TabHoverCardBubbleView(Tab* ta // not become active. Setting this to false creates the need to explicitly // hide the hovercard on press, touch, and keyboard events. SetCanActivate(false); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) set_accept_events(false); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__controller.cc deleted file mode 100644 index d7c26cf27665..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__controller.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/ui/views/tabs/tab_hover_card_controller.cc.orig 2024-02-25 20:22:18 UTC -+++ chrome/browser/ui/views/tabs/tab_hover_card_controller.cc -@@ -82,7 +82,7 @@ void FixWidgetStackOrder(views::Widget* widget, const - return; - } - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Ensure the hover card Widget assumes the highest z-order to avoid occlusion - // by other secondary UI Widgets (such as the omnibox Widget, see - // crbug.com/1226536). diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc index ea625bec7bdf..2c308ed1e182 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/user_education/browser_user_education_service.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/views/user_education/browser_user_education_service.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/views/user_education/browser_user_education_service.cc -@@ -771,7 +771,7 @@ void MaybeRegisterChromeFeaturePromos( +@@ -790,7 +790,7 @@ void MaybeRegisterChromeFeaturePromos( FeaturePromoSpecification::AcceleratorInfo()) .SetBubbleArrow(HelpBubbleArrow::kTopLeft))); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // kIPHDesktopPWAsLinkCapturingLaunch: registry.RegisterFeature(std::move( FeaturePromoSpecification::CreateForCustomAction( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc index a6ce671a030a..6230a259e2ad 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc @@ -1,83 +1,83 @@ ---- chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc -@@ -512,7 +512,7 @@ std::string GetFileExtension(FileExtension file_extens +@@ -514,7 +514,7 @@ std::string GetFileExtension(FileExtension file_extens } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_BSD) SiteConfig GetSiteConfigurationFromAppName(const std::string& app_name) { SiteConfig config; bool is_app_found = false; -@@ -2093,7 +2093,7 @@ void WebAppIntegrationTestDriver::DeletePlatformShortc +@@ -2101,7 +2101,7 @@ void WebAppIntegrationTestDriver::DeletePlatformShortc if (app_name.empty()) { app_name = GetSiteConfiguration(site).app_name; } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ASSERT_TRUE(override_registration_->test_override->IsShortcutCreated( profile(), app_id, app_name)); ASSERT_TRUE( -@@ -3407,7 +3407,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginEna +@@ -3415,7 +3415,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginEna app_state->id, app_state->name); ASSERT_TRUE(icon_color.has_value()); ASSERT_THAT(site_config.icon_color, testing::Eq(icon_color.value())); -#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ASSERT_TRUE(override_registration_->test_override->IsRunOnOsLoginEnabled( profile(), app_state->id, app_state->name)); #endif -@@ -3422,7 +3422,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3430,7 +3430,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis GetAppBySiteMode(after_state_change_action_state_.get(), profile(), site); ASSERT_TRUE(app_state); base::ScopedAllowBlockingForTesting allow_blocking; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ASSERT_FALSE(override_registration_->test_override->IsRunOnOsLoginEnabled( profile(), app_state->id, app_state->name)); #endif -@@ -3432,7 +3432,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3440,7 +3440,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis void WebAppIntegrationTestDriver::CheckSiteHandlesFile( Site site, FileExtension file_extension) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!BeforeStateCheckAction(__FUNCTION__)) { return; } -@@ -3448,7 +3448,7 @@ void WebAppIntegrationTestDriver::CheckSiteHandlesFile +@@ -3456,7 +3456,7 @@ void WebAppIntegrationTestDriver::CheckSiteHandlesFile void WebAppIntegrationTestDriver::CheckSiteNotHandlesFile( Site site, FileExtension file_extension) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!BeforeStateCheckAction(__FUNCTION__)) { return; } -@@ -4271,7 +4271,7 @@ base::FilePath WebAppIntegrationTestDriver::GetShortcu +@@ -4279,7 +4279,7 @@ base::FilePath WebAppIntegrationTestDriver::GetShortcu base::FilePath shortcut_dir, const std::string& app_name, const webapps::AppId& app_id) { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return override_registration_->test_override->GetShortcutPath( profile(), shortcut_dir, app_id, app_name); #else -@@ -4471,7 +4471,7 @@ bool WebAppIntegrationTestDriver::IsShortcutAndIconCre +@@ -4479,7 +4479,7 @@ bool WebAppIntegrationTestDriver::IsShortcutAndIconCre const webapps::AppId& id) { base::ScopedAllowBlockingForTesting allow_blocking; bool is_shortcut_and_icon_correct = false; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool is_shortcut_correct = override_registration_->test_override->IsShortcutCreated(profile, id, name); -@@ -4515,7 +4515,7 @@ bool WebAppIntegrationTestDriver::DoIconColorsMatch(Pr +@@ -4523,7 +4523,7 @@ bool WebAppIntegrationTestDriver::DoIconColorsMatch(Pr do_icon_colors_match = (expected_icon_pixel_color == shortcut_pixel_color_apps_folder.value()); } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) SkColor expected_icon_pixel_color = GetSiteConfigurationFromAppName(name).icon_color; std::optional actual_color_install_icon_size = diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__dialogs.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__dialogs.h index 3e860acb2b02..30f2683ca37a 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__dialogs.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__dialogs.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/web_applications/web_app_dialogs.h.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/ui/web_applications/web_app_dialogs.h.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/web_applications/web_app_dialogs.h -@@ -21,7 +21,7 @@ +@@ -22,7 +22,7 @@ #include "ui/gfx/native_widget_types.h" static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)); + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)); class GURL; class Profile; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.h index 5a0fd0ec21d9..7104f7505596 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/web_applications/web_app_ui_manager_impl.h.orig 2024-02-25 20:22:18 UTC +--- chrome/browser/ui/web_applications/web_app_ui_manager_impl.h.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/web_applications/web_app_ui_manager_impl.h -@@ -221,7 +221,7 @@ class WebAppUiManagerImpl : public BrowserListObserver +@@ -222,7 +222,7 @@ class WebAppUiManagerImpl : public BrowserListObserver UninstallCompleteCallback uninstall_complete_callback, webapps::UninstallResultCode uninstall_code); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void ShowIPHPromoForAppsLaunchedViaLinkCapturing(const Browser* browser, const webapps::AppId& app_id, bool is_activated); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc index 3f3f4d60781f..a174e6672e55 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/app_home/app_home_page_handler.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/webui/app_home/app_home_page_handler.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/webui/app_home/app_home_page_handler.cc -@@ -392,7 +392,7 @@ app_home::mojom::AppInfoPtr AppHomePageHandler::Create +@@ -391,7 +391,7 @@ app_home::mojom::AppInfoPtr AppHomePageHandler::Create + app_info->start_url = start_url; bool deprecated_app = false; - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* context = extension_system_->extension_service()->GetBrowserContext(); deprecated_app = extensions::IsExtensionUnsupportedDeprecatedApp(context, extension->id()); -@@ -456,7 +456,7 @@ void AppHomePageHandler::FillExtensionInfoList( +@@ -454,7 +454,7 @@ void AppHomePageHandler::FillExtensionInfoList( + continue; } - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* context = extension_system_->extension_service()->GetBrowserContext(); const bool is_deprecated_app = extensions::IsExtensionUnsupportedDeprecatedApp(context, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc index e66fee5f6e6b..8e3bfeb1e0a8 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc @@ -1,92 +1,92 @@ ---- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -201,7 +201,7 @@ +@@ -202,7 +202,7 @@ #include "chrome/browser/ui/webui/chromeos/chrome_url_disabled/chrome_url_disabled_ui.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/webui_js_error/webui_js_error_ui.h" #endif -@@ -227,17 +227,17 @@ +@@ -228,17 +228,17 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/discards/discards_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/sandbox/sandbox_internals_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h" #endif -@@ -389,7 +389,7 @@ bool IsAboutUI(const GURL& url) { +@@ -390,7 +390,7 @@ bool IsAboutUI(const GURL& url) { #if !BUILDFLAG(IS_ANDROID) || url.host_piece() == chrome::kChromeUITermsHost #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) || url.host_piece() == chrome::kChromeUILinuxProxyConfigHost #endif #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -624,7 +624,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -625,7 +625,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we if (url.host_piece() == chrome::kChromeUIMobileSetupHost) return &NewWebUI; #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIWebUIJsErrorHost) return &NewWebUI; #endif -@@ -680,7 +680,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -681,7 +681,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we if (url.host_piece() == chrome::kChromeUINaClHost) return &NewWebUI; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) if (url.host_piece() == chrome::kChromeUITabModalConfirmDialogHost) -@@ -735,27 +735,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -736,27 +736,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we } #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUISandboxHost) { return &NewWebUI; } #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIConnectorsInternalsHost) return &NewWebUI; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIDiscardsHost) return &NewWebUI; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIBrowserSwitchHost) return &NewWebUI; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIWebAppSettingsHost) return &NewWebUI; #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc index 1a05ddef3407..9c45d8a0a559 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/webui/connectors_internals/device_trust_utils.cc.orig 2023-11-04 07:08:51 UTC +--- chrome/browser/ui/webui/connectors_internals/device_trust_utils.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/webui/connectors_internals/device_trust_utils.cc -@@ -6,7 +6,7 @@ - +@@ -7,7 +7,7 @@ #include "build/build_config.h" + #include "components/enterprise/buildflags/buildflags.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "base/base64url.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/policy/chrome_browser_policy_connector.h" -@@ -29,7 +29,7 @@ namespace utils { +@@ -38,7 +38,7 @@ namespace enterprise_connectors::utils { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) connectors_internals::mojom::KeyTrustLevel ParseTrustLevel( BPKUR::KeyTrustLevel trust_level) { -@@ -97,7 +97,7 @@ connectors_internals::mojom::Int32ValuePtr ToMojomValu +@@ -189,7 +189,7 @@ connectors_internals::mojom::CertificateMetadataPtr Co } // namespace connectors_internals::mojom::KeyInfoPtr GetKeyInfo() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) auto* key_manager = g_browser_process->browser_policy_connector() ->chrome_browser_cloud_management_controller() ->GetDeviceTrustKeyManager(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_realbox_realbox__handler.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_realbox_realbox__handler.cc deleted file mode 100644 index 97852f7b0b09..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_realbox_realbox__handler.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/ui/webui/realbox/realbox_handler.cc.orig 2024-03-22 14:16:19 UTC -+++ chrome/browser/ui/webui/realbox/realbox_handler.cc -@@ -148,7 +148,7 @@ const char* kMacShareIconResourceName = - #elif BUILDFLAG(IS_WIN) - const char* kWinShareIconResourceName = - "//resources/cr_components/omnibox/icons/win_share.svg"; --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const char* kLinuxShareIconResourceName = - "//resources/cr_components/omnibox/icons/share.svg"; - #else -@@ -207,7 +207,7 @@ static void DefineChromeRefreshRealboxIcons() { - #elif BUILDFLAG(IS_WIN) - kWinShareIconResourceName = - "//resources/cr_components/omnibox/icons/win_share_cr23.svg"; --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - kLinuxShareIconResourceName = - "//resources/cr_components/omnibox/icons/share_cr23.svg"; - #else -@@ -837,7 +837,7 @@ std::string RealboxHandler::PedalVectorIconToResourceN - icon.name == omnibox::kShareWinChromeRefreshIcon.name) { - return kWinShareIconResourceName; - } --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - if (icon.name == omnibox::kShareIcon.name || - icon.name == omnibox::kShareLinuxChromeRefreshIcon.name) { - return kLinuxShareIconResourceName; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc index 3e99e51dafc2..3073a959eeeb 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc @@ -1,65 +1,65 @@ ---- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc @@ -137,7 +137,7 @@ #include "ash/webui/settings/public/constants/routes.mojom.h" #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) #include "ui/display/screen.h" #endif @@ -156,7 +156,7 @@ #include "chrome/browser/ui/webui/certificate_manager_localized_strings_provider.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui_factory.h" #include "ui/ozone/public/ozone_platform.h" #endif @@ -259,7 +259,7 @@ void AddCommonStrings(content::WebUIDataSource* html_s html_source->AddBoolean("isChildAccount", profile->IsChild()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool allow_qt_theme = base::FeatureList::IsEnabled(ui::kAllowQt); #else bool allow_qt_theme = false; @@ -289,7 +289,7 @@ void AddA11yStrings(content::WebUIDataSource* html_sou {"focusHighlightLabel", IDS_SETTINGS_ACCESSIBILITY_FOCUS_HIGHLIGHT_DESCRIPTION}, #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"overscrollHistoryNavigationTitle", IDS_SETTINGS_OVERSCROLL_HISTORY_NAVIGATION_TITLE}, {"overscrollHistoryNavigationSubtitle", -@@ -431,7 +431,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -432,7 +432,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht {"huge", IDS_SETTINGS_HUGE_FONT_SIZE}, {"sidePanelAlignLeft", IDS_SETTINGS_SIDE_PANEL_ALIGN_LEFT}, {"sidePanelAlignRight", IDS_SETTINGS_SIDE_PANEL_ALIGN_RIGHT}, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"gtkTheme", IDS_SETTINGS_GTK_THEME}, {"useGtkTheme", IDS_SETTINGS_USE_GTK_THEME}, {"qtTheme", IDS_SETTINGS_QT_THEME}, -@@ -441,7 +441,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -442,7 +442,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht #else {"resetToDefaultTheme", IDS_SETTINGS_RESET_TO_DEFAULT_THEME}, #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, #endif #if BUILDFLAG(IS_MAC) -@@ -466,7 +466,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -467,7 +467,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht // 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_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) bool show_custom_chrome_frame = ui::OzonePlatform::GetInstance() ->GetPlatformRuntimeProperties() .supports_server_side_window_decorations; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extension__status__utils.h b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extension__status__utils.h index 97f9e5141b0a..5b8f50f4cb04 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extension__status__utils.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extension__status__utils.h @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/extension_status_utils.h.orig 2023-06-05 19:39:05 UTC +--- chrome/browser/web_applications/extension_status_utils.h.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/web_applications/extension_status_utils.h -@@ -56,7 +56,7 @@ bool ClearExternalExtensionUninstalled(content::Browse +@@ -55,7 +55,7 @@ bool IsExternalExtensionUninstalled(content::BrowserCo + bool ClearExternalExtensionUninstalled(content::BrowserContext* context, const std::string& extension_id); - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - // Returns whether |extension_id| is a Chrome App and should be blocked by the - // Chrome Apps Deprecation. Policy installed Chrome Apps are still allowed, and - // all apps are allowed if the deprecation feature flag is not enabled. +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // If this method returns true, then |extension_id| will not be launchable. + // + // The eventual goal is that this method should return true for all hosted apps, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extensions_extension__status__utils.cc b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extensions_extension__status__utils.cc index 9bbfd7ead3b3..6541452ab81a 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extensions_extension__status__utils.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extensions_extension__status__utils.cc @@ -1,20 +1,20 @@ ---- chrome/browser/web_applications/extensions/extension_status_utils.cc.orig 2023-06-05 19:39:05 UTC +--- chrome/browser/web_applications/extensions/extension_status_utils.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/web_applications/extensions/extension_status_utils.cc -@@ -26,7 +26,7 @@ namespace { +@@ -25,7 +25,7 @@ namespace { + const char* g_preinstalled_app_for_testing = nullptr; - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(b/268221237): Remove this allow-list. const char kDefaultAllowedExtensionIds[] = "alhngdkjgnedakdlnamimgfihgkmenbh," -@@ -116,7 +116,7 @@ bool ClearExternalExtensionUninstalled(content::Browse +@@ -114,7 +114,7 @@ bool ClearExternalExtensionUninstalled(content::Browse + extension_id); } - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool IsExtensionUnsupportedDeprecatedApp(content::BrowserContext* context, const std::string& extension_id) { if (testing::g_enable_chrome_apps_for_testing) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut__manager.cc index fe9dd4651566..abf32ed550a4 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut__manager.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/os_integration/web_app_shortcut_manager.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/web_applications/os_integration/web_app_shortcut_manager.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/web_applications/os_integration/web_app_shortcut_manager.cc -@@ -440,7 +440,7 @@ std::unique_ptr WebAppShortcutManager::B +@@ -441,7 +441,7 @@ std::unique_ptr WebAppShortcutManager::B } } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const std::vector& shortcuts_menu_item_infos = app->shortcuts_menu_item_infos(); DCHECK_LE(shortcuts_menu_item_infos.size(), kMaxApplicationDockMenuItems); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc index 67d9b1c17afe..4a10e8f67117 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/policy/web_app_policy_manager.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/web_applications/policy/web_app_policy_manager.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/web_applications/policy/web_app_policy_manager.cc -@@ -112,7 +112,7 @@ namespace web_app { +@@ -111,7 +111,7 @@ namespace web_app { BASE_FEATURE(kDesktopPWAsForceUnregisterOSIntegration, "DesktopPWAsForceUnregisterOSIntegration", -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__helpers.cc b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__helpers.cc new file mode 100644 index 000000000000..25d8580d98b4 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__helpers.cc @@ -0,0 +1,11 @@ +--- chrome/browser/web_applications/web_app_helpers.cc.orig 2024-04-23 07:42:17 UTC ++++ chrome/browser/web_applications/web_app_helpers.cc +@@ -146,7 +146,7 @@ bool IsValidWebAppUrl(const GURL& app_url) { + + bool allow_extension_apps = true; + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + // Stop allowing apps to be extension urls when the shortcuts are separated - + // they can be extension urls instead. + allow_extension_apps = diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc index 092da893aa37..66bff4b00c84 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc @@ -1,11 +1,11 @@ ---- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/browser/webauthn/chrome_authenticator_request_delegate.cc -@@ -805,7 +805,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureDisc +@@ -859,7 +859,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureDisc g_observer->ConfiguringCable(request_type); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // No caBLEv1 on Linux. It tends to crash bluez. if (base::Contains(pairings_from_extension, device::CableDiscoveryData::Version::V1, diff --git a/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc b/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc index aad0a8049a53..cb2784be8c59 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc @@ -1,65 +1,65 @@ ---- chrome/common/chrome_features.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/common/chrome_features.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/common/chrome_features.cc @@ -81,7 +81,7 @@ BASE_FEATURE(kUseAdHocSigningForWebAppShims, #endif // BUILDFLAG(IS_MAC) #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) // Enables or disables the Autofill survey triggered by opening a prompt to // save address info. BASE_FEATURE(kAutofillAddressSurvey, @@ -99,7 +99,7 @@ BASE_FEATURE(kAutofillPasswordSurvey, base::FEATURE_DISABLED_BY_DEFAULT); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Enables the Restart background mode optimization. When all Chrome UI is // closed and it goes in the background, allows to restart the browser to // discard memory. -@@ -321,7 +321,7 @@ BASE_FEATURE(kDesktopPWAsEnforceWebAppSettingsPolicy, +@@ -302,7 +302,7 @@ BASE_FEATURE(kDesktopPWAsEnforceWebAppSettingsPolicy, BASE_FEATURE(kDesktopPWAsRunOnOsLogin, "DesktopPWAsRunOnOsLogin", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -360,7 +360,7 @@ BASE_FEATURE(kDesktopPWAsTabStripSettings, +@@ -341,7 +341,7 @@ BASE_FEATURE(kDesktopPWAsTabStripSettings, base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Controls whether Chrome Apps are supported. See https://crbug.com/1221251. // If the feature is disabled, Chrome Apps continue to work. If enabled, Chrome // Apps will not launch and will be marked in the UI as deprecated. -@@ -394,7 +394,7 @@ const base::FeatureParam kDnsOverHttpsFallbackPa - const base::FeatureParam kDnsOverHttpsShowUiParam { - &kDnsOverHttps, "ShowUi", +@@ -375,7 +375,7 @@ const base::FeatureParam kDnsOverHttpsFallbackPa + const base::FeatureParam kDnsOverHttpsShowUiParam{&kDnsOverHttps, + "ShowUi", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - true + true #else - false -@@ -969,7 +969,7 @@ BASE_FEATURE(kLacrosSharedComponentsDir, + false +@@ -913,7 +913,7 @@ BASE_FEATURE(kLacrosSharedComponentsDir, base::FEATURE_ENABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) BASE_FEATURE(kLinuxLowMemoryMonitor, "LinuxLowMemoryMonitor", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -982,7 +982,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit +@@ -926,7 +926,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit &kLinuxLowMemoryMonitor, "critical_level", 255}; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_FEATURE(kListWebAppsSwitch, "ListWebAppsSwitch", base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.h b/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.h index acc51931cc6b..b5c64493a67c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.h @@ -1,45 +1,45 @@ ---- chrome/common/chrome_features.h.orig 2024-03-22 14:16:19 UTC +--- chrome/common/chrome_features.h.orig 2024-04-23 07:42:17 UTC +++ chrome/common/chrome_features.h @@ -60,13 +60,13 @@ BASE_DECLARE_FEATURE(kUseAdHocSigningForWebAppShims); #endif // BUILDFLAG(IS_MAC) #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) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillAddressSurvey); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillCardSurvey); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillPasswordSurvey); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kBackgroundModeAllowRestart); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -228,7 +228,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -216,7 +216,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kChromeAppsDeprecation); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kShortcutsNotApps); -@@ -572,7 +572,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -543,7 +543,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kLacrosSharedComponentsDir); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kLinuxLowMemoryMonitor); COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam kLinuxLowMemoryMonitorModerateLevel; -@@ -580,7 +580,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -551,7 +551,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam kLinuxLowMemoryMonitorCriticalLevel; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kListWebAppsSwitch); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.cc b/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.cc index 32da60c4b382..38eed01451e2 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.cc @@ -1,19 +1,19 @@ ---- chrome/common/chrome_switches.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/common/chrome_switches.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/common/chrome_switches.cc -@@ -876,14 +876,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- +@@ -881,14 +881,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- #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) const char kEnableNewAppMenuIcon[] = "enable-new-app-menu-icon"; // Causes the browser to launch directly in guest mode. const char kGuest[] = "guest"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Writes open and installed web apps for each profile to the specified file // without launching a new browser window or tab. Pass a absolute file path to // specify where to output the information. Can be used together with optional diff --git a/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.h b/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.h index a542535f7132..4355b4577b29 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.h @@ -1,17 +1,17 @@ ---- chrome/common/chrome_switches.h.orig 2024-03-22 14:16:19 UTC +--- chrome/common/chrome_switches.h.orig 2024-04-23 07:42:17 UTC +++ chrome/common/chrome_switches.h -@@ -276,12 +276,12 @@ extern const char kAllowNaClSocketAPI[]; +@@ -277,12 +277,12 @@ extern const char kAllowNaClSocketAPI[]; #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) extern const char kEnableNewAppMenuIcon[]; extern const char kGuest[]; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extern const char kListApps[]; extern const char kProfileBaseName[]; extern const char kProfileManagementAttributes[]; diff --git a/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h b/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h index e27303609dc7..1344c214d1a1 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h @@ -1,91 +1,91 @@ ---- chrome/common/pref_names.h.orig 2024-03-22 14:16:19 UTC +--- chrome/common/pref_names.h.orig 2024-04-23 07:42:17 UTC +++ chrome/common/pref_names.h -@@ -1304,7 +1304,7 @@ inline constexpr char kUseAshProxy[] = "lacros.proxy.u +@@ -1288,7 +1288,7 @@ inline constexpr char kUseAshProxy[] = "lacros.proxy.u // 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) // Linux specific preference on whether we should match the system theme. inline constexpr char kSystemTheme[] = "extensions.theme.system_theme"; #endif -@@ -1435,7 +1435,7 @@ inline constexpr char kShowUpdatePromotionInfoBar[] = +@@ -1428,7 +1428,7 @@ inline constexpr char kShowUpdatePromotionInfoBar[] = "browser.show_update_promotion_info_bar"; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Boolean that is false if we should show window manager decorations. If // true, we draw a custom chrome frame (thicker title bar and blue border). inline constexpr char kUseCustomChromeFrame[] = "browser.custom_chrome_frame"; -@@ -1995,7 +1995,7 @@ inline constexpr char kDownloadDefaultDirectory[] = +@@ -1997,7 +1997,7 @@ inline constexpr char kDownloadDefaultDirectory[] = inline constexpr char kDownloadDirUpgraded[] = "download.directory_upgrade"; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) inline constexpr char kOpenPdfDownloadInSystemReader[] = "download.open_pdf_in_system_reader"; #endif -@@ -2427,14 +2427,14 @@ inline constexpr char kMediaStorageIdSalt[] = "media.s +@@ -2431,14 +2431,14 @@ inline constexpr char kMediaStorageIdSalt[] = "media.s inline constexpr char kMediaCdmOriginData[] = "media.cdm.origin_data"; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // A boolean pref to determine whether or not the network service is running // sandboxed. inline constexpr char kNetworkServiceSandboxEnabled[] = "net.network_service_sandbox"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Records whether the user has seen an HTTP auth "negotiate" header. inline constexpr char kReceivedHttpAuthNegotiateHeader[] = "net.received_http_auth_negotiate_headers"; -@@ -2512,7 +2512,7 @@ inline constexpr char kAmbientAuthenticationInPrivateM +@@ -2516,7 +2516,7 @@ inline constexpr char kAmbientAuthenticationInPrivateM inline constexpr char kBasicAuthOverHttpEnabled[] = "auth.basic_over_http_enabled"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Boolean that specifies whether OK-AS-DELEGATE flag from KDC is respected // along with kAuthNegotiateDelegateAllowlist. inline constexpr char kAuthNegotiateDelegateByKdcPolicy[] = -@@ -3030,7 +3030,7 @@ inline constexpr char kDeviceWeeklyScheduledSuspend[] +@@ -3034,7 +3034,7 @@ inline constexpr char kDeviceWeeklyScheduledSuspend[] #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Defines administrator-set availability of Chrome for Testing. inline constexpr char kChromeForTestingAllowed[] = "chrome_for_testing.allowed"; #endif -@@ -3580,7 +3580,7 @@ inline constexpr char kFileOrDirectoryPickerWithoutGes +@@ -3584,7 +3584,7 @@ inline constexpr char kFileOrDirectoryPickerWithoutGes inline constexpr char kSandboxExternalProtocolBlocked[] = "profile.sandbox_external_protocol_blocked"; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Boolean that indicates if system notifications are allowed to be used in // place of Chrome notifications. inline constexpr char kAllowSystemNotifications[] = -@@ -3629,7 +3629,7 @@ inline constexpr char kCACertificateManagementAllowed[ +@@ -3633,7 +3633,7 @@ inline constexpr char kCACertificateManagementAllowed[ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) inline constexpr char kEnforceLocalAnchorConstraintsEnabled[] = "enforce_local_anchor_constraints_enabled"; #endif -@@ -3943,7 +3943,7 @@ inline constexpr char kThrottleNonVisibleCrossOriginIf +@@ -3941,7 +3941,7 @@ inline constexpr char kPrintingOAuth2AuthorizationServ inline constexpr char kNewBaseUrlInheritanceBehaviorAllowed[] = "new_base_url_inheritance_behavior_allowed"; -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If this exists and is true, Chrome may run system DNS resolution out of the // network process. If false, Chrome will run system DNS resolution in the // network process. If non-existent, Chrome will decide where to run system DNS diff --git a/www/ungoogled-chromium/files/patch-chrome_common_url__constants.h b/www/ungoogled-chromium/files/patch-chrome_common_url__constants.h index 182adc9e463e..34cfd1b1e1ef 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_url__constants.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_url__constants.h @@ -1,11 +1,11 @@ ---- chrome/common/url_constants.h.orig 2024-03-22 14:16:19 UTC +--- chrome/common/url_constants.h.orig 2024-04-23 07:42:17 UTC +++ chrome/common/url_constants.h -@@ -842,7 +842,7 @@ inline constexpr char kPhoneHubPermissionLearnMoreURL[ +@@ -848,7 +848,7 @@ inline constexpr char kPhoneHubPermissionLearnMoreURL[ "https://support.9oo91e.qjz9zk/chromebook?p=multidevice"; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // "Learn more" URL for the chrome apps deprecation dialog. inline constexpr char kChromeAppsDeprecationLearnMoreURL[] = "https://support.9oo91e.qjz9zk/chrome?p=chrome_app_deprecation"; diff --git a/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.cc b/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.cc index 9aa5a32be0f6..747435509fbe 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.cc @@ -1,68 +1,68 @@ ---- chrome/common/webui_url_constants.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/common/webui_url_constants.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/common/webui_url_constants.cc -@@ -512,18 +512,18 @@ const char kOsUISystemURL[] = "os://system"; +@@ -518,18 +518,18 @@ const char kOsUISystemURL[] = "os://system"; const char kOsUIVersionURL[] = "os://version"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kChromeUIWebUIJsErrorHost[] = "webuijserror"; const char kChromeUIWebUIJsErrorURL[] = "chrome://webuijserror/"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) const char kChromeUIConnectorsInternalsHost[] = "connectors-internals"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kChromeUIDiscardsHost[] = "discards"; const char kChromeUIDiscardsURL[] = "chrome://discards/"; #endif -@@ -538,14 +538,14 @@ const char kChromeUILinuxProxyConfigHost[] = "linux-pr +@@ -544,14 +544,14 @@ const char kChromeUILinuxProxyConfigHost[] = "linux-pr #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) const char kChromeUISandboxHost[] = "sandbox"; #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) || BUILDFLAG(IS_FUCHSIA) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) const char kChromeUIBrowserSwitchHost[] = "browser-switch"; const char kChromeUIBrowserSwitchURL[] = "chrome://browser-switch/"; const char kChromeUIIntroHost[] = "intro"; -@@ -564,7 +564,7 @@ const char kChromeUIProfilePickerUrl[] = "chrome://pro +@@ -570,7 +570,7 @@ const char kChromeUIProfilePickerUrl[] = "chrome://pro const char kChromeUIProfilePickerStartupQuery[] = "startup"; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) const char kChromeUITabModalConfirmDialogHost[] = "tab-modal-confirm-dialog"; -@@ -644,7 +644,7 @@ const char kCookiesSubPagePath[] = "/cookies"; +@@ -650,7 +650,7 @@ const char kCookiesSubPagePath[] = "/cookies"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kChromeUIWebAppSettingsURL[] = "chrome://app-settings/"; const char kChromeUIWebAppSettingsHost[] = "app-settings"; #endif -@@ -875,7 +875,7 @@ const char* const kChromeDebugURLs[] = { +@@ -879,7 +879,7 @@ const char* const kChromeDebugURLs[] = { blink::kChromeUIGpuJavaCrashURL, kChromeUIJavaCrashURL, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) kChromeUIWebUIJsErrorURL, #endif kChromeUIQuitURL, diff --git a/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.h b/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.h index 3ba9f3d8bb00..2ce79c5a4fd2 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.h @@ -1,57 +1,57 @@ ---- chrome/common/webui_url_constants.h.orig 2024-03-22 14:16:19 UTC +--- chrome/common/webui_url_constants.h.orig 2024-04-23 07:42:17 UTC +++ chrome/common/webui_url_constants.h -@@ -432,24 +432,24 @@ extern const char kOsUISystemURL[]; +@@ -437,24 +437,24 @@ extern const char kOsUISystemURL[]; extern const char kOsUIVersionURL[]; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kChromeUIWebUIJsErrorHost[]; extern const char kChromeUIWebUIJsErrorURL[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) extern const char kChromeUIConnectorsInternalsHost[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kChromeUIDiscardsHost[]; extern const char kChromeUIDiscardsURL[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kChromeUIWebAppSettingsURL[]; extern const char kChromeUIWebAppSettingsHost[]; #endif -@@ -464,14 +464,14 @@ extern const char kChromeUILinuxProxyConfigHost[]; +@@ -469,14 +469,14 @@ extern const char kChromeUILinuxProxyConfigHost[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) extern const char kChromeUISandboxHost[]; #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) || BUILDFLAG(IS_FUCHSIA) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) extern const char kChromeUIBrowserSwitchHost[]; extern const char kChromeUIBrowserSwitchURL[]; extern const char kChromeUIIntroHost[]; -@@ -487,7 +487,7 @@ extern const char kChromeUIProfilePickerUrl[]; +@@ -492,7 +492,7 @@ extern const char kChromeUIProfilePickerUrl[]; extern const char kChromeUIProfilePickerStartupQuery[]; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) extern const char kChromeUITabModalConfirmDialogHost[]; diff --git a/www/ungoogled-chromium/files/patch-chrome_renderer_chrome__render__frame__observer.cc b/www/ungoogled-chromium/files/patch-chrome_renderer_chrome__render__frame__observer.cc index ea1a8fbbe7f6..edbb866dc46e 100644 --- a/www/ungoogled-chromium/files/patch-chrome_renderer_chrome__render__frame__observer.cc +++ b/www/ungoogled-chromium/files/patch-chrome_renderer_chrome__render__frame__observer.cc @@ -1,11 +1,11 @@ ---- chrome/renderer/chrome_render_frame_observer.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/renderer/chrome_render_frame_observer.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/renderer/chrome_render_frame_observer.cc -@@ -353,7 +353,7 @@ void ChromeRenderFrameObserver::WillDetach(blink::Deta +@@ -360,7 +360,7 @@ void ChromeRenderFrameObserver::WillDetach(blink::Deta void ChromeRenderFrameObserver::DraggableRegionsChanged() { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Only the main frame is allowed to control draggable regions, to avoid other // frames manipulate the regions in the browser process. if (!render_frame()->IsMainFrame()) diff --git a/www/ungoogled-chromium/files/patch-chrome_services_speech_audio__source__fetcher__impl.cc b/www/ungoogled-chromium/files/patch-chrome_services_speech_audio__source__fetcher__impl.cc index 7aca1c62597d..dfb431a3d427 100644 --- a/www/ungoogled-chromium/files/patch-chrome_services_speech_audio__source__fetcher__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_services_speech_audio__source__fetcher__impl.cc @@ -1,11 +1,11 @@ ---- chrome/services/speech/audio_source_fetcher_impl.cc.orig 2023-11-04 07:08:51 UTC +--- chrome/services/speech/audio_source_fetcher_impl.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/services/speech/audio_source_fetcher_impl.cc -@@ -129,7 +129,7 @@ void AudioSourceFetcherImpl::Start( +@@ -132,7 +132,7 @@ void AudioSourceFetcherImpl::Start( // TODO(crbug.com/1185978): Check implementation / sandbox policy on Mac and // Windows. -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) is_started_ = true; // Initialize the AudioCapturerSource with |this| as the CaptureCallback, // get the parameters for the device ID, then start audio capture. diff --git a/www/ungoogled-chromium/files/patch-chrome_updater_util_posix__util.cc b/www/ungoogled-chromium/files/patch-chrome_updater_util_posix__util.cc index 3f184cecebd6..b5a1a66557ad 100644 --- a/www/ungoogled-chromium/files/patch-chrome_updater_util_posix__util.cc +++ b/www/ungoogled-chromium/files/patch-chrome_updater_util_posix__util.cc @@ -1,11 +1,11 @@ ---- chrome/updater/util/posix_util.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/updater/util/posix_util.cc.orig 2024-04-23 07:42:17 UTC +++ chrome/updater/util/posix_util.cc -@@ -18,7 +18,7 @@ +@@ -20,7 +20,7 @@ #include "chrome/updater/updater_branding.h" #include "chrome/updater/util/util.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/updater/util/linux_util.h" #endif diff --git a/www/ungoogled-chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc b/www/ungoogled-chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc index 97a008c3f919..a7abfe0ac55f 100644 --- a/www/ungoogled-chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc +++ b/www/ungoogled-chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc @@ -1,12 +1,12 @@ ---- components/autofill/core/browser/personal_data_manager.cc.orig 2024-03-22 14:16:19 UTC +--- components/autofill/core/browser/personal_data_manager.cc.orig 2024-04-23 07:42:17 UTC +++ components/autofill/core/browser/personal_data_manager.cc -@@ -2329,7 +2329,8 @@ bool PersonalDataManager::ShouldShowCardsFromAccountOp +@@ -1022,7 +1022,8 @@ bool PersonalDataManager::ShouldShowCardsFromAccountOp // 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) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) // This option should only be shown for users that have not enabled the Sync // Feature and that have server credit cards available. // TODO(crbug.com/40066949): Simplify once ConsentLevel::kSync and diff --git a/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc b/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc index 37efb3de3055..e8cd08ce914e 100644 --- a/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc +++ b/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/common/autofill_payments_features.cc.orig 2024-02-25 20:22:18 UTC +--- components/autofill/core/common/autofill_payments_features.cc.orig 2024-04-23 07:42:17 UTC +++ components/autofill/core/common/autofill_payments_features.cc -@@ -281,7 +281,7 @@ BASE_FEATURE(kAutofillEnableVirtualCards, +@@ -276,7 +276,7 @@ BASE_FEATURE(kAutofillEnableVirtualCards, bool ShouldShowImprovedUserConsentForCreditCardSave() { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) // The new user consent UI is fully launched on MacOS, Windows and Linux. return true; diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__configurations.cc b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__configurations.cc index 82f6b3b96fb4..9a4e2e7ffd4c 100644 --- a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__configurations.cc +++ b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__configurations.cc @@ -1,30 +1,39 @@ ---- components/feature_engagement/public/feature_configurations.cc.orig 2024-03-22 14:16:19 UTC +--- components/feature_engagement/public/feature_configurations.cc.orig 2024-04-23 07:42:17 UTC +++ components/feature_engagement/public/feature_configurations.cc -@@ -93,7 +93,7 @@ std::optional CreateNewUserGestureInPro +@@ -94,7 +94,7 @@ std::optional CreateNewUserGestureInPro std::optional GetClientSideFeatureConfig( const base::Feature* feature) { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // The IPH bubble for link capturing has a trigger set to ANY so that it // always shows up. The per app specific guardrails are independently stored -@@ -112,7 +112,7 @@ std::optional GetClientSideFeatureConfi +@@ -113,7 +113,7 @@ std::optional GetClientSideFeatureConfi #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (kIPHPasswordsAccountStorageFeature.name == feature->name) { std::optional config = FeatureConfig(); config->valid = true; -@@ -1555,7 +1555,8 @@ std::optional GetClientSideFeatureConfi +@@ -1393,7 +1393,8 @@ std::optional GetClientSideFeatureConfi #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) if (kIPHAutofillExternalAccountProfileSuggestionFeature.name == feature->name) { +@@ -1965,7 +1966,7 @@ std::optional GetClientSideFeatureConfi + } + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + if (kIPHDeepScanPromptRemovalFeature.name == feature->name) { + std::optional config = FeatureConfig(); + config->valid = true; diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.cc b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.cc index 4a13c440459a..61c514c4142d 100644 --- a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.cc +++ b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.cc @@ -1,30 +1,30 @@ ---- components/feature_engagement/public/feature_constants.cc.orig 2024-03-22 14:16:19 UTC +--- components/feature_engagement/public/feature_constants.cc.orig 2024-04-23 07:42:17 UTC +++ components/feature_engagement/public/feature_constants.cc @@ -18,7 +18,7 @@ BASE_FEATURE(kIPHDemoMode, "IPH_DemoMode", base::FEATU BASE_FEATURE(kIPHDummyFeature, "IPH_Dummy", base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) BASE_FEATURE(kIPHBatterySaverModeFeature, "IPH_BatterySaverMode", base::FEATURE_ENABLED_BY_DEFAULT); -@@ -611,7 +611,8 @@ const char kGestureInProductHelpDaysBetweenOccurrences +@@ -584,7 +584,8 @@ BASE_FEATURE(kDefaultBrowserTriggerCriteriaExperiment, #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) BASE_FEATURE(kIPHAutofillExternalAccountProfileSuggestionFeature, "IPH_AutofillExternalAccountProfileSuggestion", base::FEATURE_ENABLED_BY_DEFAULT); -@@ -736,7 +737,7 @@ BASE_FEATURE(kIPHScalableIphGamingFeature, +@@ -712,7 +713,7 @@ BASE_FEATURE(kIPHScalableIphGamingFeature, base::FEATURE_DISABLED_BY_DEFAULT); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // This can be enabled by default, as the DesktopPWAsLinkCapturing // flag is needed for the IPH linked to this feature to work, and // use-cases to show the IPH are guarded by that flag. diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.h b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.h index 352abcb784ab..aeb469101d29 100644 --- a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.h +++ b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.h @@ -1,29 +1,29 @@ ---- components/feature_engagement/public/feature_constants.h.orig 2024-03-22 14:16:19 UTC +--- components/feature_engagement/public/feature_constants.h.orig 2024-04-23 07:42:17 UTC +++ components/feature_engagement/public/feature_constants.h @@ -20,7 +20,7 @@ BASE_DECLARE_FEATURE(kIPHDemoMode); BASE_DECLARE_FEATURE(kIPHDummyFeature); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kIPHBatterySaverModeFeature); BASE_DECLARE_FEATURE(kIPHCompanionSidePanelFeature); BASE_DECLARE_FEATURE(kIPHCompanionSidePanelRegionSearchFeature); -@@ -255,7 +255,7 @@ extern const char kGestureInProductHelpDaysBetweenOccu +@@ -244,7 +244,7 @@ BASE_DECLARE_FEATURE(kDefaultBrowserTriggerCriteriaExp #endif // BUILDFLAG(IS_IOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) BASE_DECLARE_FEATURE(kIPHAutofillExternalAccountProfileSuggestionFeature); - BASE_DECLARE_FEATURE(kIPHAutofillVirtualCardCVCSuggestionFeature); -@@ -303,7 +303,7 @@ BASE_DECLARE_FEATURE(kIPHScalableIphHelpAppBasedTenFea + BASE_DECLARE_FEATURE(kIPHAutofillManualFallbackFeature); +@@ -293,7 +293,7 @@ BASE_DECLARE_FEATURE(kIPHScalableIphHelpAppBasedTenFea BASE_DECLARE_FEATURE(kIPHScalableIphGamingFeature); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kIPHDesktopPWAsLinkCapturingLaunch); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.cc b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.cc index f61c241635e9..430bf66ae3cd 100644 --- a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.cc +++ b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.cc @@ -1,29 +1,29 @@ ---- components/feature_engagement/public/feature_list.cc.orig 2024-03-22 14:16:19 UTC +--- components/feature_engagement/public/feature_list.cc.orig 2024-04-23 07:42:17 UTC +++ components/feature_engagement/public/feature_list.cc -@@ -157,7 +157,7 @@ const base::Feature* const kAllFeatures[] = { - &kIPHiOSPostDefaultAbandonmentPromoFeature, +@@ -147,7 +147,7 @@ const base::Feature* const kAllFeatures[] = { + &kIPHiOSOverflowMenuCustomizationFeature, #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) &kIPHBatterySaverModeFeature, &kIPHCompanionSidePanelFeature, &kIPHCompanionSidePanelRegionSearchFeature, -@@ -213,7 +213,7 @@ const base::Feature* const kAllFeatures[] = { +@@ -203,7 +203,7 @@ const base::Feature* const kAllFeatures[] = { #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) &kIPHAutofillExternalAccountProfileSuggestionFeature, - &kIPHAutofillVirtualCardCVCSuggestionFeature, -@@ -261,7 +261,7 @@ const base::Feature* const kAllFeatures[] = { + &kIPHAutofillManualFallbackFeature, +@@ -252,7 +252,7 @@ const base::Feature* const kAllFeatures[] = { &kIPHScalableIphGamingFeature, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) &kIPHDesktopPWAsLinkCapturingLaunch, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.h b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.h index 550dc3b8e92f..ca5ea46ce725 100644 --- a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.h +++ b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.h @@ -1,56 +1,56 @@ ---- components/feature_engagement/public/feature_list.h.orig 2024-03-22 14:16:19 UTC +--- components/feature_engagement/public/feature_list.h.orig 2024-04-23 07:42:17 UTC +++ components/feature_engagement/public/feature_list.h -@@ -290,7 +290,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSPostDefaultAbandonmentPr +@@ -266,7 +266,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSOverflowMenuCustomizatio #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) DEFINE_VARIATION_PARAM(kIPHBatterySaverModeFeature, "IPH_BatterySaverMode"); DEFINE_VARIATION_PARAM(kIPHCompanionSidePanelFeature, "IPH_CompanionSidePanel"); DEFINE_VARIATION_PARAM(kIPHCompanionSidePanelRegionSearchFeature, -@@ -386,7 +386,7 @@ DEFINE_VARIATION_PARAM(kIPHBackNavigationMenuFeature, +@@ -362,7 +362,7 @@ DEFINE_VARIATION_PARAM(kIPHBackNavigationMenuFeature, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) DEFINE_VARIATION_PARAM(kIPHAutofillExternalAccountProfileSuggestionFeature, "IPH_AutofillExternalAccountProfileSuggestion"); -@@ -470,7 +470,7 @@ DEFINE_VARIATION_PARAM(kIPHScalableIphHelpAppBasedTenF +@@ -448,7 +448,7 @@ DEFINE_VARIATION_PARAM(kIPHScalableIphHelpAppBasedTenF DEFINE_VARIATION_PARAM(kIPHScalableIphGamingFeature, "IPH_ScalableIphGaming"); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) DEFINE_VARIATION_PARAM(kIPHDesktopPWAsLinkCapturingLaunch, "IPH_DesktopPWAsLinkCapturingLaunch"); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -618,7 +618,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation - VARIATION_ENTRY(kIPHiOSSwipeToolbarToChangeTabFeature), - VARIATION_ENTRY(kIPHiOSPostDefaultAbandonmentPromoFeature), +@@ -598,7 +598,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation + VARIATION_ENTRY(kIPHiOSPromoGenericDefaultBrowserFeature), + VARIATION_ENTRY(kIPHiOSOverflowMenuCustomizationFeature), #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) VARIATION_ENTRY(kIPHBatterySaverModeFeature), VARIATION_ENTRY(kIPHCompanionSidePanelFeature), VARIATION_ENTRY(kIPHCompanionSidePanelRegionSearchFeature), -@@ -674,7 +674,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -654,7 +654,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) VARIATION_ENTRY(kIPHAutofillExternalAccountProfileSuggestionFeature), - VARIATION_ENTRY(kIPHAutofillVirtualCardCVCSuggestionFeature), -@@ -722,7 +722,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation + VARIATION_ENTRY(kIPHAutofillManualFallbackFeature), +@@ -703,7 +703,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation VARIATION_ENTRY(kIPHScalableIphGamingFeature), #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) VARIATION_ENTRY(kIPHDesktopPWAsLinkCapturingLaunch), #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan.cc b/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan.cc index 60ee712cd947..27613fd82fc5 100644 --- a/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan.cc +++ b/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan.cc @@ -1,11 +1,11 @@ ---- components/gwp_asan/client/gwp_asan.cc.orig 2024-03-22 14:16:19 UTC +--- components/gwp_asan/client/gwp_asan.cc.orig 2024-04-23 07:42:17 UTC +++ components/gwp_asan/client/gwp_asan.cc -@@ -71,7 +71,7 @@ namespace { +@@ -72,7 +72,7 @@ namespace { // ProcessSamplingBoost is the multiplier to increase the // ProcessSamplingProbability in scenarios where we want to perform additional // testing (e.g., on canary/dev builds). -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) constexpr int kDefaultMaxAllocations = 50; constexpr int kDefaultMaxMetadata = 210; constexpr int kDefaultTotalPages = kCpuIs64Bit ? 2048 : kDefaultMaxMetadata * 2; diff --git a/www/ungoogled-chromium/files/patch-components_gwp__asan_crash__handler_crash__analyzer.cc b/www/ungoogled-chromium/files/patch-components_gwp__asan_crash__handler_crash__analyzer.cc index 1f384b26fd00..371650d56278 100644 --- a/www/ungoogled-chromium/files/patch-components_gwp__asan_crash__handler_crash__analyzer.cc +++ b/www/ungoogled-chromium/files/patch-components_gwp__asan_crash__handler_crash__analyzer.cc @@ -1,20 +1,20 @@ ---- components/gwp_asan/crash_handler/crash_analyzer.cc.orig 2024-03-22 14:16:19 UTC +--- components/gwp_asan/crash_handler/crash_analyzer.cc.orig 2024-04-23 07:42:17 UTC +++ components/gwp_asan/crash_handler/crash_analyzer.cc -@@ -31,7 +31,7 @@ +@@ -30,7 +30,7 @@ #include "third_party/crashpad/crashpad/snapshot/process_snapshot.h" #include "third_party/crashpad/crashpad/util/process/process_memory.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include #elif BUILDFLAG(IS_APPLE) #include -@@ -91,7 +91,7 @@ bool CrashAnalyzer::GetExceptionInfo( +@@ -90,7 +90,7 @@ bool CrashAnalyzer::GetExceptionInfo( crashpad::VMAddress CrashAnalyzer::GetAccessAddress( const crashpad::ExceptionSnapshot& exception) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) if (exception.Exception() == SIGSEGV || exception.Exception() == SIGBUS) return exception.ExceptionAddress(); #elif BUILDFLAG(IS_APPLE) diff --git a/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc b/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc index 5516c52790e0..e94b1c029044 100644 --- a/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc +++ b/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc @@ -1,11 +1,11 @@ ---- components/network_session_configurator/browser/network_session_configurator.cc.orig 2024-02-25 20:22:18 UTC +--- components/network_session_configurator/browser/network_session_configurator.cc.orig 2024-04-23 07:42:17 UTC +++ components/network_session_configurator/browser/network_session_configurator.cc -@@ -827,7 +827,7 @@ net::URLRequestContextBuilder::HttpCacheParams::Type C +@@ -817,7 +817,7 @@ net::URLRequestContextBuilder::HttpCacheParams::Type C // backport, having it behave differently than in stable would be a bigger // problem. TODO: Does this work in later macOS releases? #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return net::URLRequestContextBuilder::HttpCacheParams::DISK_SIMPLE; #else return net::URLRequestContextBuilder::HttpCacheParams::DISK_BLOCKFILE; diff --git a/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc b/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc index 070290fcde80..2d4f3f63200e 100644 --- a/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc +++ b/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc @@ -1,11 +1,11 @@ ---- components/network_session_configurator/browser/network_session_configurator_unittest.cc.orig 2024-02-25 20:22:18 UTC +--- components/network_session_configurator/browser/network_session_configurator_unittest.cc.orig 2024-04-23 07:42:17 UTC +++ components/network_session_configurator/browser/network_session_configurator_unittest.cc -@@ -793,7 +793,7 @@ TEST_F(NetworkSessionConfiguratorTest, HostRules) { +@@ -781,7 +781,7 @@ TEST_F(NetworkSessionConfiguratorTest, HostRules) { TEST_F(NetworkSessionConfiguratorTest, DefaultCacheBackend) { #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) EXPECT_EQ(net::URLRequestContextBuilder::HttpCacheParams::DISK_SIMPLE, ChooseCacheType()); #else diff --git a/www/ungoogled-chromium/files/patch-components_omnibox_browser_omnibox__edit__model.cc b/www/ungoogled-chromium/files/patch-components_omnibox_browser_omnibox__edit__model.cc deleted file mode 100644 index c09a09c17567..000000000000 --- a/www/ungoogled-chromium/files/patch-components_omnibox_browser_omnibox__edit__model.cc +++ /dev/null @@ -1,10 +0,0 @@ ---- components/omnibox/browser/omnibox_edit_model.cc.orig 2024-02-03 15:42:55 UTC -+++ components/omnibox/browser/omnibox_edit_model.cc -@@ -24,6 +24,7 @@ - #include "base/trace_event/typed_macros.h" - #include "build/branding_buildflags.h" - #include "build/build_config.h" -+#include "build/branding_buildflags.h" - #include "components/bookmarks/browser/bookmark_model.h" - #include "components/dom_distiller/core/url_constants.h" - #include "components/dom_distiller/core/url_utils.h" diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.cc index 5486c9abcb63..59b0e71e5110 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.cc +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.cc @@ -1,20 +1,20 @@ ---- components/password_manager/core/browser/features/password_features.cc.orig 2024-03-22 14:16:19 UTC +--- components/password_manager/core/browser/features/password_features.cc.orig 2024-04-23 07:42:17 UTC +++ components/password_manager/core/browser/features/password_features.cc -@@ -24,7 +24,7 @@ BASE_FEATURE(kButterOnDesktopFollowup, +@@ -30,7 +30,7 @@ BASE_FEATURE(kButterOnDesktopFollowup, BASE_FEATURE(kClearUndecryptablePasswordsOnSync, "ClearUndecryptablePasswordsInSync", -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -99,7 +99,7 @@ BASE_FEATURE(kPasswordManagerLogToTerminal, - "PasswordManagerLogToTerminal", +@@ -99,7 +99,7 @@ BASE_FEATURE(kPasswordManualFallbackAvailable, + "PasswordManualFallbackAvailable", base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_FEATURE(kRestartToGainAccessToKeychain, "RestartToGainAccessToKeychain", - base::FEATURE_DISABLED_BY_DEFAULT); + base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.h b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.h index f50cb1c40766..4ca7fe5a0eb8 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.h +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.h @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/features/password_features.h.orig 2024-03-22 14:16:19 UTC +--- components/password_manager/core/browser/features/password_features.h.orig 2024-04-23 07:42:17 UTC +++ components/password_manager/core/browser/features/password_features.h -@@ -95,7 +95,7 @@ BASE_DECLARE_FEATURE(kPasswordManagerEnableSenderServi - // terminal. - BASE_DECLARE_FEATURE(kPasswordManagerLogToTerminal); +@@ -94,7 +94,7 @@ BASE_DECLARE_FEATURE(kPasswordManagerLogToTerminal); + // Enables triggering password suggestions through the context menu. + BASE_DECLARE_FEATURE(kPasswordManualFallbackAvailable); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables "Needs access to keychain, restart chrome" bubble and banner. BASE_DECLARE_FEATURE(kRestartToGainAccessToKeychain); #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__form__manager.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__form__manager.cc index 125f63c168ff..f0a52bb5f267 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__form__manager.cc +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__form__manager.cc @@ -1,29 +1,29 @@ ---- components/password_manager/core/browser/password_form_manager.cc.orig 2024-03-22 14:16:19 UTC +--- components/password_manager/core/browser/password_form_manager.cc.orig 2024-04-23 07:42:17 UTC +++ components/password_manager/core/browser/password_form_manager.cc @@ -58,7 +58,7 @@ #include "components/webauthn/android/webauthn_cred_man_delegate.h" #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "components/os_crypt/sync/os_crypt.h" #endif @@ -229,7 +229,7 @@ bool ShouldUploadCrowdsourcingVotes(const FormOrDigest return false; } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool ShouldShowKeychainErrorBubble( std::optional backend_error) { if (!backend_error.has_value()) { -@@ -800,7 +800,7 @@ void PasswordFormManager::OnFetchCompleted() { +@@ -833,7 +833,7 @@ void PasswordFormManager::OnFetchCompleted() { error.value().type); } -#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (ShouldShowKeychainErrorBubble( form_fetcher_->GetProfileStoreBackendError())) { client_->NotifyKeychainError(); diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager.cc index 841c8136d4fd..60e78499983f 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager.cc +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager.cc @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/password_manager.cc.orig 2024-03-22 14:16:19 UTC +--- components/password_manager/core/browser/password_manager.cc.orig 2024-04-23 07:42:17 UTC +++ components/password_manager/core/browser/password_manager.cc -@@ -361,7 +361,7 @@ void PasswordManager::RegisterProfilePrefs( +@@ -363,7 +363,7 @@ void PasswordManager::RegisterProfilePrefs( registry->RegisterListPref(prefs::kPasswordManagerPromoCardsList); #endif // BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) registry->RegisterBooleanPref(prefs::kPasswordSharingEnabled, true); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterIntegerPref(prefs::kRelaunchChromeBubbleDismissedCounter, 0); #endif diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__pref__names.h b/www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__pref__names.h index 0be941fb9af8..79e0d79ccc37 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__pref__names.h +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__pref__names.h @@ -1,11 +1,11 @@ ---- components/password_manager/core/common/password_manager_pref_names.h.orig 2024-03-22 14:16:19 UTC +--- components/password_manager/core/common/password_manager_pref_names.h.orig 2024-04-23 07:42:17 UTC +++ components/password_manager/core/common/password_manager_pref_names.h -@@ -328,7 +328,7 @@ inline constexpr char kPasswordManagerPromoCardsList[] +@@ -332,7 +332,7 @@ inline constexpr char kPasswordManagerPromoCardsList[] inline constexpr char kPasswordSharingEnabled[] = "password_manager.password_sharing_enabled"; -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Integer pref indicating how many times relaunch Chrome bubble was dismissed. inline constexpr char kRelaunchChromeBubbleDismissedCounter[] = "password_manager.relaunch_chrome_bubble_dismissed_counter"; diff --git a/www/ungoogled-chromium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc b/www/ungoogled-chromium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc index 71b4156345c2..bfaa56a170a3 100644 --- a/www/ungoogled-chromium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc +++ b/www/ungoogled-chromium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc @@ -1,11 +1,11 @@ ---- components/policy/core/browser/policy_pref_mapping_test.cc.orig 2024-03-22 14:16:19 UTC +--- components/policy/core/browser/policy_pref_mapping_test.cc.orig 2024-04-23 07:42:17 UTC +++ components/policy/core/browser/policy_pref_mapping_test.cc -@@ -322,7 +322,7 @@ class PolicyTestCase { +@@ -413,7 +413,7 @@ class PolicyTestCase { const std::string os("chromeos_lacros"); #elif BUILDFLAG(IS_IOS) const std::string os("ios"); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const std::string os("linux"); #elif BUILDFLAG(IS_MAC) const std::string os("mac"); diff --git a/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc b/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc index 86780ca5f232..7396ce2d1029 100644 --- a/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc +++ b/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc @@ -1,11 +1,11 @@ ---- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2024-03-22 14:16:19 UTC +--- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2024-04-23 07:42:17 UTC +++ components/policy/core/common/cloud/cloud_policy_client.cc -@@ -578,7 +578,7 @@ void CloudPolicyClient::FetchPolicy(PolicyFetchReason +@@ -594,7 +594,7 @@ void CloudPolicyClient::FetchPolicy(PolicyFetchReason fetch_request->set_invalidation_payload(invalidation_payload_); } } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Only set browser device identifier for CBCM Chrome cloud policy on // desktop. if (type_to_fetch.first == diff --git a/www/ungoogled-chromium/files/patch-components_policy_tools_generate__policy__source.py b/www/ungoogled-chromium/files/patch-components_policy_tools_generate__policy__source.py index f7ec7013e9eb..5cfa22b12cef 100644 --- a/www/ungoogled-chromium/files/patch-components_policy_tools_generate__policy__source.py +++ b/www/ungoogled-chromium/files/patch-components_policy_tools_generate__policy__source.py @@ -1,14 +1,14 @@ ---- components/policy/tools/generate_policy_source.py.orig 2023-09-17 07:59:53 UTC +--- components/policy/tools/generate_policy_source.py.orig 2024-04-23 07:42:17 UTC +++ components/policy/tools/generate_policy_source.py -@@ -37,9 +37,9 @@ PLATFORM_STRINGS = { +@@ -38,9 +38,9 @@ PLATFORM_STRINGS = { 'ios': ['ios'], 'fuchsia': ['fuchsia'], 'chrome.win': ['win'], - 'chrome.linux': ['linux'], + 'chrome.linux': ['linux', 'openbsd', 'freebsd'], 'chrome.mac': ['mac'], - 'chrome.*': ['win', 'mac', 'linux'], + 'chrome.*': ['win', 'mac', 'linux', 'openbsd', 'freebsd'], 'chrome.win7': ['win'], } diff --git a/www/ungoogled-chromium/files/patch-components_safe__browsing_core_common_features.cc b/www/ungoogled-chromium/files/patch-components_safe__browsing_core_common_features.cc deleted file mode 100644 index b0d69c3d5fc4..000000000000 --- a/www/ungoogled-chromium/files/patch-components_safe__browsing_core_common_features.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- components/safe_browsing/core/common/features.cc.orig 2024-03-22 14:16:19 UTC -+++ components/safe_browsing/core/common/features.cc -@@ -240,7 +240,7 @@ BASE_FEATURE(kSafeBrowsingSkipSubresources, - BASE_FEATURE(kSafeBrowsingSkipSubresources2, - "SafeBrowsingSkipSubResources2", - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_ANDROID) -+ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT - #else - base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/ungoogled-chromium/files/patch-components_search__engines_search__engine__choice_search__engine__choice__service.cc b/www/ungoogled-chromium/files/patch-components_search__engines_search__engine__choice_search__engine__choice__service.cc index 74dd41854811..c48c313c388d 100644 --- a/www/ungoogled-chromium/files/patch-components_search__engines_search__engine__choice_search__engine__choice__service.cc +++ b/www/ungoogled-chromium/files/patch-components_search__engines_search__engine__choice_search__engine__choice__service.cc @@ -1,11 +1,11 @@ ---- components/search_engines/search_engine_choice/search_engine_choice_service.cc.orig 2024-03-22 14:16:19 UTC +--- components/search_engines/search_engine_choice/search_engine_choice_service.cc.orig 2024-04-23 07:42:17 UTC +++ components/search_engines/search_engine_choice/search_engine_choice_service.cc -@@ -428,7 +428,7 @@ void SearchEngineChoiceService::PreprocessPrefsForRepr +@@ -437,7 +437,7 @@ void SearchEngineChoiceService::PreprocessPrefsForRepr int SearchEngineChoiceService::GetCountryIdInternal() { // `country_codes::kCountryIDAtInstall` may not be set yet. -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Android, ChromeOS and Linux, `country_codes::kCountryIDAtInstall` is // computed asynchronously using platform-specific signals, and may not be // available yet. diff --git a/www/ungoogled-chromium/files/patch-components_search__engines_template__url__service.cc b/www/ungoogled-chromium/files/patch-components_search__engines_template__url__service.cc index e68e22282df5..d67edc64a7b8 100644 --- a/www/ungoogled-chromium/files/patch-components_search__engines_template__url__service.cc +++ b/www/ungoogled-chromium/files/patch-components_search__engines_template__url__service.cc @@ -1,11 +1,11 @@ ---- components/search_engines/template_url_service.cc.orig 2024-03-22 14:16:19 UTC +--- components/search_engines/template_url_service.cc.orig 2024-04-23 07:42:17 UTC +++ components/search_engines/template_url_service.cc -@@ -2940,7 +2940,7 @@ bool TemplateURLService::MatchesDefaultSearchProvider( +@@ -2945,7 +2945,7 @@ bool TemplateURLService::MatchesDefaultSearchProvider( std::unique_ptr TemplateURLService::GetEnterpriseSiteSearchManager(PrefService* prefs) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled(omnibox::kSiteSearchSettingsPolicy) ? std::make_unique( prefs, base::BindRepeating( diff --git a/www/ungoogled-chromium/files/patch-components_services_screen__ai_public_cpp_utilities.cc b/www/ungoogled-chromium/files/patch-components_services_screen__ai_public_cpp_utilities.cc deleted file mode 100644 index b49b8d8e4c6c..000000000000 --- a/www/ungoogled-chromium/files/patch-components_services_screen__ai_public_cpp_utilities.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- components/services/screen_ai/public/cpp/utilities.cc.orig 2024-03-22 14:16:19 UTC -+++ components/services/screen_ai/public/cpp/utilities.cc -@@ -34,7 +34,7 @@ constexpr char kScreenAIDlcRootPath[] = - #endif - - #if BUILDFLAG(ENABLE_SCREEN_AI_BROWSERTESTS) --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - constexpr base::FilePath::CharType kScreenAIResourcePathForTests[] = - FILE_PATH_LITERAL("third_party/screen-ai/linux/resources"); - #elif BUILDFLAG(IS_MAC) diff --git a/www/ungoogled-chromium/files/patch-components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc b/www/ungoogled-chromium/files/patch-components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc deleted file mode 100644 index 9c50afad25ad..000000000000 --- a/www/ungoogled-chromium/files/patch-components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc +++ /dev/null @@ -1,18 +0,0 @@ ---- components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.cc.orig 2024-02-03 15:42:55 UTC -+++ components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.cc -@@ -53,6 +53,7 @@ bool ScreenAIPreSandboxHook(sandbox::policy::SandboxLi - } - } - -+#if !BUILDFLAG(IS_BSD) - auto* instance = sandbox::policy::SandboxLinux::GetInstance(); - - std::vector permissions{ -@@ -75,6 +76,7 @@ bool ScreenAIPreSandboxHook(sandbox::policy::SandboxLi - sandbox::syscall_broker::COMMAND_OPEN}), - permissions, sandbox::policy::SandboxLinux::PreSandboxHook(), options); - instance->EngageNamespaceSandboxIfPossible(); -+#endif - - return true; - } diff --git a/www/ungoogled-chromium/files/patch-components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h b/www/ungoogled-chromium/files/patch-components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h deleted file mode 100644 index f06a30eb3986..000000000000 --- a/www/ungoogled-chromium/files/patch-components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h +++ /dev/null @@ -1,16 +0,0 @@ ---- components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h.orig 2023-05-05 12:12:41 UTC -+++ components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h -@@ -5,7 +5,13 @@ - #ifndef COMPONENTS_SERVICES_SCREEN_AI_SANDBOX_SCREEN_AI_SANDBOX_HOOK_LINUX_H_ - #define COMPONENTS_SERVICES_SCREEN_AI_SANDBOX_SCREEN_AI_SANDBOX_HOOK_LINUX_H_ - -+#include "build/build_config.h" -+ -+#if BUILDFLAG(IS_BSD) -+#include "sandbox/policy/sandbox.h" -+#else - #include "sandbox/policy/linux/sandbox_linux.h" -+#endif - - namespace screen_ai { - diff --git a/www/ungoogled-chromium/files/patch-components_signin_public_base_signin__switches.cc b/www/ungoogled-chromium/files/patch-components_signin_public_base_signin__switches.cc index afcae939077c..269067073062 100644 --- a/www/ungoogled-chromium/files/patch-components_signin_public_base_signin__switches.cc +++ b/www/ungoogled-chromium/files/patch-components_signin_public_base_signin__switches.cc @@ -1,20 +1,20 @@ ---- components/signin/public/base/signin_switches.cc.orig 2024-03-22 14:16:19 UTC +--- components/signin/public/base/signin_switches.cc.orig 2024-04-23 07:42:17 UTC +++ components/signin/public/base/signin_switches.cc -@@ -121,7 +121,7 @@ bool IsExplicitBrowserSigninUIOnDesktopEnabled( +@@ -126,7 +126,7 @@ bool IsExplicitBrowserSigninUIOnDesktopEnabled( } #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kMinorModeRestrictionsForHistorySyncOptIn, "MinorModeRestrictionsForHistorySyncOptIn", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -130,7 +130,7 @@ constexpr int kMinorModeRestrictionsFetchDeadlineDefau +@@ -135,7 +135,7 @@ constexpr int kMinorModeRestrictionsFetchDeadlineDefau #if BUILDFLAG(IS_ANDROID) // Based on Signin.AccountCapabilities.UserVisibleLatency 400; -#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Based on Signin.SyncOptIn.PreSyncConfirmationLatency 900; #elif BUILDFLAG(IS_IOS) diff --git a/www/ungoogled-chromium/files/patch-components_signin_public_base_signin__switches.h b/www/ungoogled-chromium/files/patch-components_signin_public_base_signin__switches.h index 0ef6e29bb05c..35eddfece45e 100644 --- a/www/ungoogled-chromium/files/patch-components_signin_public_base_signin__switches.h +++ b/www/ungoogled-chromium/files/patch-components_signin_public_base_signin__switches.h @@ -1,11 +1,11 @@ ---- components/signin/public/base/signin_switches.h.orig 2024-03-22 14:16:19 UTC +--- components/signin/public/base/signin_switches.h.orig 2024-04-23 07:42:17 UTC +++ components/signin/public/base/signin_switches.h -@@ -119,7 +119,7 @@ bool IsExplicitBrowserSigninUIOnDesktopEnabled( +@@ -123,7 +123,7 @@ bool IsExplicitBrowserSigninUIOnDesktopEnabled( // Controls the view mode for (history) sync screen. #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(SIGNIN_SWITCHES) BASE_DECLARE_FEATURE(kMinorModeRestrictionsForHistorySyncOptIn); diff --git a/www/ungoogled-chromium/files/patch-components_supervised__user_core_browser_supervised__user__service.cc b/www/ungoogled-chromium/files/patch-components_supervised__user_core_browser_supervised__user__service.cc index d3a2cf51273c..db718badd013 100644 --- a/www/ungoogled-chromium/files/patch-components_supervised__user_core_browser_supervised__user__service.cc +++ b/www/ungoogled-chromium/files/patch-components_supervised__user_core_browser_supervised__user__service.cc @@ -1,11 +1,11 @@ ---- components/supervised_user/core/browser/supervised_user_service.cc.orig 2024-03-22 14:16:19 UTC +--- components/supervised_user/core/browser/supervised_user_service.cc.orig 2024-04-23 07:42:17 UTC +++ components/supervised_user/core/browser/supervised_user_service.cc @@ -170,7 +170,7 @@ FirstTimeInterstitialBannerState SupervisedUserService const FirstTimeInterstitialBannerState original_state) { FirstTimeInterstitialBannerState target_state = original_state; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_IOS) + BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) - if (supervised_user::CanDisplayFirstTimeInterstitialBanner()) { - if (original_state != FirstTimeInterstitialBannerState::kSetupComplete && - can_show_first_time_interstitial_banner_) { + if (original_state != FirstTimeInterstitialBannerState::kSetupComplete && + can_show_first_time_interstitial_banner_) { + target_state = FirstTimeInterstitialBannerState::kNeedToShow; diff --git a/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_features.cc b/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_features.cc index edb6bcc6ae0c..ca44cedea3b8 100644 --- a/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_features.cc +++ b/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_features.cc @@ -1,47 +1,20 @@ ---- components/supervised_user/core/common/features.cc.orig 2024-03-22 14:16:19 UTC +--- components/supervised_user/core/common/features.cc.orig 2024-04-23 07:42:17 UTC +++ components/supervised_user/core/common/features.cc -@@ -66,7 +66,7 @@ bool IsLocalWebApprovalsEnabled() { - BASE_FEATURE(kFilterWebsitesForSupervisedUsersOnDesktopAndIOS, - "FilterWebsitesForSupervisedUsersOnDesktopAndIOS", - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ -- BUILDFLAG(IS_IOS) -+ BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT); - #else - base::FEATURE_DISABLED_BY_DEFAULT); -@@ -74,7 +74,7 @@ BASE_FEATURE(kFilterWebsitesForSupervisedUsersOnDeskto - - BASE_FEATURE(kSupervisedPrefsControlledBySupervisedStore, - "SupervisedPrefsControlledBySupervisedStore", --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT); - #else - base::FEATURE_DISABLED_BY_DEFAULT); -@@ -84,7 +84,7 @@ BASE_FEATURE(kSupervisedPrefsControlledBySupervisedSto - // users in various UI surfaces. - BASE_FEATURE(kEnableManagedByParentUi, - "EnableManagedByParentUi", --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT); - #else - base::FEATURE_DISABLED_BY_DEFAULT); -@@ -94,7 +94,7 @@ BASE_FEATURE(kEnableSupervisedUserSkipParentApprovalTo +@@ -63,7 +63,7 @@ BASE_FEATURE(kEnableSupervisedUserSkipParentApprovalTo "EnableSupervisedUserSkipParentApprovalToInstallExtensions", base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_FEATURE(kEnableExtensionsPermissionsForSupervisedUsersOnDesktop, "EnableExtensionsPermissionsForSupervisedUsersOnDesktop", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -143,7 +143,7 @@ bool IsChildAccountSupervisionEnabled() { +@@ -74,7 +74,7 @@ bool IsSupervisedUserSkipParentApprovalToInstallExtens + #if BUILDFLAG(IS_CHROMEOS) return base::FeatureList::IsEnabled( - supervised_user:: - kFilterWebsitesForSupervisedUsersOnDesktopAndIOS) || --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - base::FeatureList::IsEnabled( - supervised_user:: - kEnableExtensionsPermissionsForSupervisedUsersOnDesktop) || + kEnableSupervisedUserSkipParentApprovalToInstallExtensions); +-#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + bool skipParentApprovalEnabled = base::FeatureList::IsEnabled( + kEnableSupervisedUserSkipParentApprovalToInstallExtensions); + bool permissionExtensionsForSupervisedUsersEnabled = diff --git a/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_features.h b/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_features.h index 58575ab83ecb..79b595a9b2e6 100644 --- a/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_features.h +++ b/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_features.h @@ -1,11 +1,11 @@ ---- components/supervised_user/core/common/features.h.orig 2024-03-22 14:16:19 UTC +--- components/supervised_user/core/common/features.h.orig 2024-04-23 07:42:17 UTC +++ components/supervised_user/core/common/features.h -@@ -28,7 +28,7 @@ extern const base::FeatureParam kManagedB +@@ -23,7 +23,7 @@ BASE_DECLARE_FEATURE(kLocalWebApprovals); BASE_DECLARE_FEATURE( kEnableSupervisedUserSkipParentApprovalToInstallExtensions); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kEnableExtensionsPermissionsForSupervisedUsersOnDesktop); #endif diff --git a/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_pref__names.h b/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_pref__names.h new file mode 100644 index 000000000000..0d4da92f542f --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_pref__names.h @@ -0,0 +1,11 @@ +--- components/supervised_user/core/common/pref_names.h.orig 2024-04-23 07:42:17 UTC ++++ components/supervised_user/core/common/pref_names.h +@@ -131,7 +131,7 @@ inline constexpr char kFirstTimeInterstitialBannerStat + "profile.managed.banner_state"; + + #if BUILDFLAG(ENABLE_EXTENSIONS) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // An integer pref that stores the current state of the local extension + // parent approval migration when the feature + // `kEnableSupervisedUserSkipParentApprovalToInstallExtensions` becomes enabled. diff --git a/www/ungoogled-chromium/files/patch-components_sync_base_features.cc b/www/ungoogled-chromium/files/patch-components_sync_base_features.cc index 32254c1b21b6..529dd9a24636 100644 --- a/www/ungoogled-chromium/files/patch-components_sync_base_features.cc +++ b/www/ungoogled-chromium/files/patch-components_sync_base_features.cc @@ -1,11 +1,11 @@ ---- components/sync/base/features.cc.orig 2024-03-22 14:16:19 UTC +--- components/sync/base/features.cc.orig 2024-04-23 07:42:17 UTC +++ components/sync/base/features.cc -@@ -122,7 +122,7 @@ BASE_FEATURE(kEnablePreferencesAccountStorage, +@@ -126,7 +126,7 @@ BASE_FEATURE(kEnablePreferencesAccountStorage, BASE_FEATURE(kSyncPollImmediatelyOnEveryStartup, "SyncPollImmediatelyOnEveryStartup2", #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc index f591ffbbf781..d21ebccf08a5 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc +++ b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc @@ -1,11 +1,11 @@ ---- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2024-03-22 14:16:19 UTC +--- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2024-04-23 07:42:17 UTC +++ components/viz/service/display_embedder/skia_output_surface_impl.cc -@@ -1519,7 +1519,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor +@@ -1526,7 +1526,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor ->GetDeviceQueue() ->GetVulkanPhysicalDevice(), VK_IMAGE_TILING_OPTIMAL, vk_format, yuv_color_space, ycbcr_info); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Textures that were allocated _on linux_ with ycbcr info came from // VaapiVideoDecoder, which exports using DRM format modifiers. return GrBackendFormats::MakeVk(gr_ycbcr_info, diff --git a/www/ungoogled-chromium/files/patch-components_viz_service_display_skia__renderer.cc b/www/ungoogled-chromium/files/patch-components_viz_service_display_skia__renderer.cc index 543456bf5803..270456b4ef67 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_display_skia__renderer.cc +++ b/www/ungoogled-chromium/files/patch-components_viz_service_display_skia__renderer.cc @@ -1,11 +1,11 @@ ---- components/viz/service/display/skia_renderer.cc.orig 2024-03-22 14:16:19 UTC +--- components/viz/service/display/skia_renderer.cc.orig 2024-04-23 07:42:17 UTC +++ components/viz/service/display/skia_renderer.cc -@@ -1466,7 +1466,7 @@ void SkiaRenderer::ClearFramebuffer() { +@@ -1448,7 +1448,7 @@ void SkiaRenderer::ClearFramebuffer() { if (current_frame()->current_render_pass->has_transparent_background) { ClearCanvas(SkColors::kTransparent); } else { -#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) +#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // On DEBUG builds, opaque render passes are cleared to blue // to easily see regions that were not drawn on the screen. // ClearCavas() call causes slight pixel difference, so linux-ref and diff --git a/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc b/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc index d4c5d067d0d2..c39bcd0099e4 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc +++ b/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc @@ -1,20 +1,20 @@ ---- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2024-03-22 14:16:19 UTC +--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2024-04-23 07:42:17 UTC +++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc -@@ -112,7 +112,7 @@ RootCompositorFrameSinkImpl::Create( +@@ -111,7 +111,7 @@ RootCompositorFrameSinkImpl::Create( output_surface->SetNeedsSwapSizeNotifications( params->send_swap_size_notifications); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) // For X11, we need notify client about swap completion after resizing, so the // client can use it for synchronize with X11 WM. output_surface->SetNeedsSwapSizeNotifications(true); -@@ -712,7 +712,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw - #if BUILDFLAG(IS_ANDROID) - if (display_client_ && enable_swap_competion_callback_) +@@ -649,7 +649,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw + if (display_client_ && enable_swap_completion_callback_) { display_client_->DidCompleteSwapWithSize(pixel_size); + } -#elif BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) if (display_client_ && pixel_size != last_swap_pixel_size_) { last_swap_pixel_size_ = pixel_size; display_client_->DidCompleteSwapWithNewSize(last_swap_pixel_size_); diff --git a/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h b/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h index f5ae7066bc75..6805e78bfa84 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h +++ b/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h @@ -1,11 +1,11 @@ ---- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h.orig 2024-02-03 15:42:55 UTC +--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h.orig 2024-04-23 07:42:17 UTC +++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h -@@ -210,7 +210,7 @@ class VIZ_SERVICE_EXPORT RootCompositorFrameSinkImpl - // to actually unref. - LocalSurfaceId to_evict_on_next_draw_and_swap_ = LocalSurfaceId(); +@@ -209,7 +209,7 @@ class VIZ_SERVICE_EXPORT RootCompositorFrameSinkImpl + // See comments on `EvictionHandler`. + EvictionHandler eviction_handler_; -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) gfx::Size last_swap_pixel_size_; #endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) diff --git a/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn b/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn index a0cc99792354..a5e887fab3d4 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn @@ -1,16 +1,16 @@ ---- content/browser/BUILD.gn.orig 2024-03-22 14:16:19 UTC +--- content/browser/BUILD.gn.orig 2024-04-23 07:42:17 UTC +++ content/browser/BUILD.gn -@@ -2476,6 +2476,13 @@ source_set("browser") { +@@ -2406,6 +2406,13 @@ source_set("browser") { deps += [ "//media/mojo/mojom/stable:stable_video_decoder" ] } + if (is_bsd) { + sources -= [ + "sandbox_ipc_linux.cc", + "sandbox_ipc_linux.h", + ] + } + if (is_chromeos) { sources += [ "handwriting/handwriting_recognition_service_impl_cros.cc", diff --git a/www/ungoogled-chromium/files/patch-content_browser_browser__child__process__host__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_browser__child__process__host__impl.cc index 6fb98eba7cab..8ad6967fbc39 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_browser__child__process__host__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_browser__child__process__host__impl.cc @@ -1,19 +1,19 @@ ---- content/browser/browser_child_process_host_impl.cc.orig 2024-03-22 14:16:19 UTC +--- content/browser/browser_child_process_host_impl.cc.orig 2024-04-23 07:42:17 UTC +++ content/browser/browser_child_process_host_impl.cc -@@ -326,6 +326,7 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo - switches::kDisableBestEffortTasks, - switches::kDisableLogging, - switches::kEnableLogging, +@@ -329,6 +329,7 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo + switches::kMojoCoreLibraryPath, + switches::kPerfettoDisableInterning, + switches::kTraceToConsole, + switches::kDisableUnveil, - switches::kIPCConnectionTimeout, - switches::kLogBestEffortTasks, - switches::kLogFile, -@@ -650,7 +651,7 @@ void BrowserChildProcessHostImpl::OnProcessLaunched() + }; + cmd_line->CopySwitchesFrom(browser_command_line, kForwardSwitches); + +@@ -644,7 +645,7 @@ void BrowserChildProcessHostImpl::OnProcessLaunched() ->child_process()); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) child_thread_type_switcher_.SetPid(process.Pid()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-content_browser_browser__child__process__host__impl.h b/www/ungoogled-chromium/files/patch-content_browser_browser__child__process__host__impl.h index 6e0cb8b8a3c5..da44b4e68971 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_browser__child__process__host__impl.h +++ b/www/ungoogled-chromium/files/patch-content_browser_browser__child__process__host__impl.h @@ -1,20 +1,20 @@ ---- content/browser/browser_child_process_host_impl.h.orig 2024-02-25 20:22:18 UTC +--- content/browser/browser_child_process_host_impl.h.orig 2024-04-23 07:42:17 UTC +++ content/browser/browser_child_process_host_impl.h @@ -34,7 +34,7 @@ #include "base/win/object_watcher.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/browser/child_thread_type_switcher_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -264,7 +264,7 @@ class BrowserChildProcessHostImpl +@@ -266,7 +266,7 @@ class BrowserChildProcessHostImpl std::unique_ptr system_tracing_service_; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ChildThreadTypeSwitcher child_thread_type_switcher_; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-content_browser_browser__main__loop.cc b/www/ungoogled-chromium/files/patch-content_browser_browser__main__loop.cc index 168ee9b5b1c6..55a9fcf3ee7e 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_browser__main__loop.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_browser__main__loop.cc @@ -1,37 +1,37 @@ ---- content/browser/browser_main_loop.cc.orig 2024-03-22 14:16:19 UTC +--- content/browser/browser_main_loop.cc.orig 2024-04-23 07:42:17 UTC +++ content/browser/browser_main_loop.cc -@@ -250,6 +250,12 @@ +@@ -251,6 +251,12 @@ #include "mojo/public/cpp/bindings/lib/test_random_mojo_delays.h" #endif +#if BUILDFLAG(IS_BSD) +#include "content/browser/sandbox_host_linux.h" +#include "content/public/common/zygote/sandbox_support_linux.h" +#include "sandbox/policy/sandbox.h" +#endif + // One of the linux specific headers defines this as a macro. #ifdef DestroyAll #undef DestroyAll -@@ -555,6 +561,12 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -556,6 +562,12 @@ int BrowserMainLoop::EarlyInitialization() { // by now since a thread to start the ServiceManager has been created // before the browser main loop starts. DCHECK(SandboxHostLinux::GetInstance()->IsInitialized()); +#elif BUILDFLAG(IS_BSD) + base::FileHandleMappingVector additional_remapped_fds; + base::LaunchOptions options; + SandboxHostLinux::GetInstance()->Init(); + const int sfd = SandboxHostLinux::GetInstance()->GetChildSocket(); + options.fds_to_remap.push_back(std::make_pair(sfd, GetSandboxFD())); #endif // GLib's spawning of new processes is buggy, so it's important that at this -@@ -592,7 +604,7 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -593,7 +605,7 @@ int BrowserMainLoop::EarlyInitialization() { base::PlatformThread::SetCurrentThreadType(base::ThreadType::kCompositing); #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // We use quite a few file descriptors for our IPC as well as disk the disk // cache, and the default limit on Apple is low (256), so bump it up. diff --git a/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper.h b/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper.h index 5b120138e6a5..420b0d56b14b 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper.h +++ b/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper.h @@ -1,11 +1,11 @@ ---- content/browser/child_process_launcher_helper.h.orig 2024-03-22 14:16:19 UTC +--- content/browser/child_process_launcher_helper.h.orig 2024-04-23 07:42:17 UTC +++ content/browser/child_process_launcher_helper.h -@@ -271,7 +271,7 @@ class ChildProcessLauncherHelper +@@ -293,7 +293,7 @@ class ChildProcessLauncherHelper std::unique_ptr delegate_; base::WeakPtr child_process_launcher_; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The priority of the process. The state is stored to avoid changing the // setting repeatedly. std::optional priority_; diff --git a/www/ungoogled-chromium/files/patch-content_browser_compositor_viz__process__transport__factory.cc b/www/ungoogled-chromium/files/patch-content_browser_compositor_viz__process__transport__factory.cc index 0553009913e1..7f5b155e864d 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_compositor_viz__process__transport__factory.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_compositor_viz__process__transport__factory.cc @@ -1,11 +1,11 @@ ---- content/browser/compositor/viz_process_transport_factory.cc.orig 2024-02-03 15:42:55 UTC +--- content/browser/compositor/viz_process_transport_factory.cc.orig 2024-04-23 07:42:17 UTC +++ content/browser/compositor/viz_process_transport_factory.cc -@@ -118,7 +118,7 @@ class HostDisplayClient : public viz::HostDisplayClien +@@ -105,7 +105,7 @@ class HostDisplayClient : public viz::HostDisplayClien HostDisplayClient& operator=(const HostDisplayClient&) = delete; // viz::HostDisplayClient: -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) void DidCompleteSwapWithNewSize(const gfx::Size& size) override { compositor_->OnCompleteSwapWithNewSize(size); } diff --git a/www/ungoogled-chromium/files/patch-content_browser_devtools_protocol_system__info__handler.cc b/www/ungoogled-chromium/files/patch-content_browser_devtools_protocol_system__info__handler.cc index c3cbbf124f51..15a57cd92ad3 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_devtools_protocol_system__info__handler.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_devtools_protocol_system__info__handler.cc @@ -1,11 +1,11 @@ ---- content/browser/devtools/protocol/system_info_handler.cc.orig 2023-09-17 07:59:53 UTC +--- content/browser/devtools/protocol/system_info_handler.cc.orig 2024-04-23 07:42:17 UTC +++ content/browser/devtools/protocol/system_info_handler.cc -@@ -49,7 +49,7 @@ std::unique_ptr GfxSizeToSystemInfoS +@@ -50,7 +50,7 @@ std::unique_ptr GfxSizeToSystemInfoS // 1046598, and 1153667. // Windows builds need more time -- see Issue 873112 and 1004472. // Mac builds need more time - see Issue angleproject:6182. -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !defined(NDEBUG)) || \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && !defined(NDEBUG)) || \ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_OZONE) static constexpr int kGPUInfoWatchdogTimeoutMultiplierOS = 3; #else diff --git a/www/ungoogled-chromium/files/patch-content_browser_gpu_compositor__util.cc b/www/ungoogled-chromium/files/patch-content_browser_gpu_compositor__util.cc index 8672a4a1766f..de3465c63620 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_gpu_compositor__util.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_gpu_compositor__util.cc @@ -1,20 +1,20 @@ ---- content/browser/gpu/compositor_util.cc.orig 2024-02-03 15:42:55 UTC +--- content/browser/gpu/compositor_util.cc.orig 2024-04-23 07:42:17 UTC +++ content/browser/gpu/compositor_util.cc -@@ -149,7 +149,7 @@ const GpuFeatureData GetGpuFeatureData( - {"video_decode", - SafeGetFeatureStatus(gpu_feature_info, - gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE), +@@ -149,7 +149,7 @@ std::vector GetGpuFeatureData( + "video_decode", + SafeGetFeatureStatus( + gpu_feature_info, gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - !base::FeatureList::IsEnabled(media::kVaapiVideoDecodeLinux) || + !base::FeatureList::IsEnabled(media::kVaapiVideoDecodeLinux) || #endif // BUILDFLAG(IS_LINUX) - command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode), -@@ -160,7 +160,7 @@ const GpuFeatureData GetGpuFeatureData( - {"video_encode", - SafeGetFeatureStatus(gpu_feature_info, - gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE), + command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode)), +@@ -161,7 +161,7 @@ std::vector GetGpuFeatureData( + "video_encode", + SafeGetFeatureStatus( + gpu_feature_info, gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - !base::FeatureList::IsEnabled(media::kVaapiVideoEncodeLinux), + !base::FeatureList::IsEnabled(media::kVaapiVideoEncodeLinux)), #else - command_line.HasSwitch(switches::kDisableAcceleratedVideoEncode), + command_line.HasSwitch(switches::kDisableAcceleratedVideoEncode)), diff --git a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl.cc index b2bec303cd20..8106794460c1 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl.cc @@ -1,11 +1,11 @@ ---- content/browser/gpu/gpu_data_manager_impl.cc.orig 2023-05-05 12:12:41 UTC +--- content/browser/gpu/gpu_data_manager_impl.cc.orig 2024-04-23 07:42:17 UTC +++ content/browser/gpu/gpu_data_manager_impl.cc -@@ -405,7 +405,7 @@ void GpuDataManagerImpl::OnDisplayMetricsChanged( +@@ -394,7 +394,7 @@ void GpuDataManagerImpl::OnDisplayMetricsChanged( private_->OnDisplayMetricsChanged(display, changed_metrics); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool GpuDataManagerImpl::IsGpuMemoryBufferNV12Supported() { base::AutoLock auto_lock(lock_); return private_->IsGpuMemoryBufferNV12Supported(); diff --git a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl.h b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl.h index cd96ff8634a3..a8531c24dbb3 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl.h +++ b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl.h @@ -1,11 +1,11 @@ ---- content/browser/gpu/gpu_data_manager_impl.h.orig 2023-05-05 12:12:41 UTC +--- content/browser/gpu/gpu_data_manager_impl.h.orig 2024-04-23 07:42:17 UTC +++ content/browser/gpu/gpu_data_manager_impl.h -@@ -221,7 +221,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDa +@@ -217,7 +217,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDa void OnDisplayMetricsChanged(const display::Display& display, uint32_t changed_metrics) override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool IsGpuMemoryBufferNV12Supported(); void SetGpuMemoryBufferNV12Supported(bool supported); #endif // BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc index 7020ba0f50e4..aad32b7ea410 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc @@ -1,11 +1,11 @@ ---- content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2024-03-22 14:16:19 UTC +--- content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2024-04-23 07:42:17 UTC +++ content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1807,7 +1807,7 @@ void GpuDataManagerImplPrivate::RecordCompositingMode( +@@ -1673,7 +1673,7 @@ void GpuDataManagerImplPrivate::RecordCompositingMode( UMA_HISTOGRAM_ENUMERATION("GPU.CompositingMode", compositing_mode); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool GpuDataManagerImplPrivate::IsGpuMemoryBufferNV12Supported() { return is_gpu_memory_buffer_NV12_supported_; } diff --git a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.h b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.h index 22cf9fec1df6..0e11afc86c42 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.h +++ b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.h @@ -1,20 +1,20 @@ ---- content/browser/gpu/gpu_data_manager_impl_private.h.orig 2023-09-17 07:59:53 UTC +--- content/browser/gpu/gpu_data_manager_impl_private.h.orig 2024-04-23 07:42:17 UTC +++ content/browser/gpu/gpu_data_manager_impl_private.h -@@ -151,7 +151,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { +@@ -149,7 +149,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { void OnDisplayMetricsChanged(const display::Display& display, uint32_t changed_metrics); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool IsGpuMemoryBufferNV12Supported(); void SetGpuMemoryBufferNV12Supported(bool supported); #endif // BUILDFLAG(IS_LINUX) -@@ -306,7 +306,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { +@@ -301,7 +301,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { bool application_is_visible_ = true; bool disable_gpu_compositing_ = false; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool is_gpu_memory_buffer_NV12_supported_ = false; #endif // BUILDFLAG(IS_LINUX) }; diff --git a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__process__host.cc b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__process__host.cc index c067869e8afc..938aa90f9eeb 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__process__host.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__process__host.cc @@ -1,19 +1,19 @@ ---- content/browser/gpu/gpu_process_host.cc.orig 2024-03-22 14:16:19 UTC +--- content/browser/gpu/gpu_process_host.cc.orig 2024-04-23 07:42:17 UTC +++ content/browser/gpu/gpu_process_host.cc -@@ -261,6 +261,7 @@ static const char* const kSwitchNames[] = { - switches::kEnableGpuRasterization, - switches::kEnableSkiaGraphite, - switches::kEnableLogging, +@@ -264,6 +264,7 @@ static const char* const kSwitchNames[] = { + switches::kEnableLowEndDeviceMode, + switches::kDisableSkiaGraphite, + switches::kDisableLowEndDeviceMode, + switches::kDisableUnveil, - switches::kDoubleBufferCompositing, - switches::kHeadless, - switches::kLoggingLevel, -@@ -295,7 +296,7 @@ static const char* const kSwitchNames[] = { + switches::kProfilingAtStart, + switches::kProfilingFile, + switches::kProfilingFlush, +@@ -290,7 +291,7 @@ static const char* const kSwitchNames[] = { switches::kDisableExplicitDmaFences, switches::kOzoneDumpFile, #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) switches::kX11Display, switches::kNoXshm, #endif diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc index f79cba150f04..70154c2919a9 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc @@ -1,64 +1,64 @@ ---- content/browser/renderer_host/render_process_host_impl.cc.orig 2024-03-22 14:16:19 UTC +--- content/browser/renderer_host/render_process_host_impl.cc.orig 2024-04-23 07:42:17 UTC +++ content/browser/renderer_host/render_process_host_impl.cc -@@ -225,7 +225,7 @@ +@@ -226,7 +226,7 @@ #include "third_party/blink/public/mojom/android_font_lookup/android_font_lookup.mojom.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include "components/services/font/public/mojom/font_service.mojom.h" // nogncheck -@@ -967,7 +967,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = +@@ -968,7 +968,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = // to indicate failure and std::numeric_limits::max() to indicate // unlimited. size_t GetPlatformProcessLimit() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) struct rlimit limit; if (getrlimit(RLIMIT_NPROC, &limit) != 0) return kUnknownPlatformProcessLimit; -@@ -1149,7 +1149,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1150,7 +1150,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public IOThreadHostImpl& operator=(const IOThreadHostImpl& other) = delete; void SetPid(base::ProcessId child_pid) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) child_thread_type_switcher_.SetPid(child_pid); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) } -@@ -1166,7 +1166,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1167,7 +1167,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (auto font_receiver = receiver.As()) { ConnectToFontService(std::move(font_receiver)); return; -@@ -1260,7 +1260,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1261,7 +1261,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public std::unique_ptr binders_; mojo::Receiver receiver_{this}; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::Remote video_encode_accelerator_factory_remote_; ChildThreadTypeSwitcher child_thread_type_switcher_; -@@ -3353,7 +3353,7 @@ void RenderProcessHostImpl::AppendRendererCommandLine( +@@ -3354,7 +3354,7 @@ void RenderProcessHostImpl::AppendRendererCommandLine( base::TimeTicks::UnixEpoch().since_origin().InMicroseconds())); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Append `kDisableVideoCaptureUseGpuMemoryBuffer` flag if there is no support // for NV12 GPU memory buffer. if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled() && @@ -3413,6 +3413,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin switches::kDisableSpeechAPI, switches::kDisableThreadedCompositing, switches::kDisableTouchDragDrop, + switches::kDisableUnveil, switches::kDisableV8IdleTasks, switches::kDisableVideoCaptureUseGpuMemoryBuffer, switches::kDisableWebGLImageChromium, diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__view__host__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__view__host__impl.cc index 8e0f1aabfd89..140ff6c7237e 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__view__host__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__view__host__impl.cc @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/render_view_host_impl.cc.orig 2024-02-25 20:22:18 UTC +--- content/browser/renderer_host/render_view_host_impl.cc.orig 2024-04-23 07:42:17 UTC +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -270,7 +270,7 @@ void RenderViewHostImpl::GetPlatformSpecificPrefs( +@@ -272,7 +272,7 @@ void RenderViewHostImpl::GetPlatformSpecificPrefs( display::win::ScreenWin::GetSystemMetricsInDIP(SM_CYVSCROLL); prefs->arrow_bitmap_width_horizontal_scroll_bar_in_dips = display::win::ScreenWin::GetSystemMetricsInDIP(SM_CXHSCROLL); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); if (command_line->HasSwitch(switches::kSystemFontFamily)) { prefs->system_font_family_name = diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc index d1ac7c972574..77857e5975fc 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc @@ -1,47 +1,47 @@ ---- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2024-03-22 14:16:19 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2024-04-23 07:42:17 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -118,7 +118,7 @@ +@@ -119,7 +119,7 @@ #include "ui/gfx/gdi_util.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "content/browser/accessibility/browser_accessibility_auralinux.h" #include "ui/base/ime/linux/text_edit_command_auralinux.h" #include "ui/base/ime/text_input_flags.h" -@@ -451,7 +451,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge +@@ -452,7 +452,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge return ToBrowserAccessibilityWin(manager->GetBrowserAccessibilityRoot()) ->GetCOM(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BrowserAccessibilityManager* manager = host()->GetOrCreateRootBrowserAccessibilityManager(); if (manager && manager->GetBrowserAccessibilityRoot()) -@@ -1694,7 +1694,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { - return GetTextInputManager() && GetTextInputManager()->should_do_learning(); +@@ -1705,7 +1705,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { + return host_->delegate() && host_->delegate()->ShouldDoLearning(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool RenderWidgetHostViewAura::SetCompositionFromExistingText( const gfx::Range& range, const std::vector& ui_ime_text_spans) { -@@ -2526,7 +2526,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { +@@ -2538,7 +2538,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { } bool RenderWidgetHostViewAura::NeedsMouseCapture() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) return NeedsInputGrab(); #else return false; -@@ -2710,7 +2710,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit +@@ -2722,7 +2722,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit if (!target_host) return; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* linux_ui = ui::LinuxUi::instance(); std::vector commands; if (!event.skip_if_unhandled && linux_ui && event.os_event && diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h index 3c9af046eb39..acf3e9677725 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/render_widget_host_view_aura.h.orig 2024-03-22 14:16:19 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.h.orig 2024-04-23 07:42:17 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.h -@@ -258,7 +258,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura +@@ -259,7 +259,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura ukm::SourceId GetClientSourceForMetrics() const override; bool ShouldDoLearning() override; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool SetCompositionFromExistingText( const gfx::Range& range, const std::vector& ui_ime_text_spans) override; diff --git a/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.cc b/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.cc index 1ce2709ddbcb..a353191680e8 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.cc @@ -1,63 +1,72 @@ ---- content/browser/utility_process_host.cc.orig 2024-03-22 14:16:19 UTC +--- content/browser/utility_process_host.cc.orig 2024-04-23 07:42:17 UTC +++ content/browser/utility_process_host.cc @@ -61,7 +61,7 @@ #include "content/browser/v8_snapshot_files.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/files/file_util.h" #include "base/files/scoped_file.h" #include "base/pickle.h" @@ -75,7 +75,7 @@ #include "services/network/public/mojom/network_service.mojom.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "base/task/sequenced_task_runner.h" #include "components/viz/host/gpu_client.h" #include "media/capture/capture_switches.h" @@ -86,7 +86,7 @@ namespace content { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::ScopedFD PassNetworkContextParentDirs( std::vector network_context_parent_dirs) { base::Pickle pickle; @@ -150,7 +150,7 @@ UtilityProcessHost::UtilityProcessHost(std::unique_ptr started_(false), name_(u"utility process"), file_data_(std::make_unique()), -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + allowed_gpu_(false), gpu_client_(nullptr, base::OnTaskRunnerDeleter(nullptr)), #endif - client_(std::move(client)) { -@@ -431,7 +431,7 @@ bool UtilityProcessHost::StartProcess() { +@@ -234,7 +234,7 @@ void UtilityProcessHost::SetPinUser32() { + #endif // BUILDFLAG(IS_WIN) + + void UtilityProcessHost::SetAllowGpuClient() { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + allowed_gpu_ = true; + #endif + } +@@ -434,7 +434,7 @@ bool UtilityProcessHost::StartProcess() { file_data_->files_to_preload.merge(GetV8SnapshotFilesToPreload()); #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The network service should have access to the parent directories // necessary for its usage. if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork) { -@@ -442,13 +442,13 @@ bool UtilityProcessHost::StartProcess() { +@@ -445,13 +445,13 @@ bool UtilityProcessHost::StartProcess() { } #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) // Pass `kVideoCaptureUseGpuMemoryBuffer` flag to video capture service only // when the video capture use GPU memory buffer enabled. if (metrics_name_ == video_capture::mojom::VideoCaptureService::Name_) { bool pass_gpu_buffer_flag = switches::IsVideoCaptureUseGpuMemoryBufferEnabled(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Check if NV12 GPU memory buffer supported at the same time. pass_gpu_buffer_flag = pass_gpu_buffer_flag && diff --git a/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.h b/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.h index 002bde46c74f..19ddef6dd68b 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.h +++ b/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.h @@ -1,20 +1,20 @@ ---- content/browser/utility_process_host.h.orig 2024-02-25 20:22:18 UTC +--- content/browser/utility_process_host.h.orig 2024-04-23 07:42:17 UTC +++ content/browser/utility_process_host.h @@ -39,7 +39,7 @@ namespace base { class Thread; } // namespace base -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) namespace viz { class GpuClient; } // namespace viz -@@ -225,7 +225,7 @@ class CONTENT_EXPORT UtilityProcessHost +@@ -228,7 +228,7 @@ class CONTENT_EXPORT UtilityProcessHost std::vector pending_run_service_callbacks_; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + bool allowed_gpu_; std::unique_ptr gpu_client_; #endif - diff --git a/www/ungoogled-chromium/files/patch-content_browser_utility__process__host__receiver__bindings.cc b/www/ungoogled-chromium/files/patch-content_browser_utility__process__host__receiver__bindings.cc index 5fb8deedec3c..fb3d0f49a9e7 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_utility__process__host__receiver__bindings.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_utility__process__host__receiver__bindings.cc @@ -1,33 +1,33 @@ ---- content/browser/utility_process_host_receiver_bindings.cc.orig 2024-02-25 20:22:18 UTC +--- content/browser/utility_process_host_receiver_bindings.cc.orig 2024-04-23 07:42:17 UTC +++ content/browser/utility_process_host_receiver_bindings.cc @@ -10,12 +10,12 @@ #include "content/public/browser/content_browser_client.h" #include "content/public/common/content_client.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/services/font/public/mojom/font_service.mojom.h" // nogncheck #include "content/browser/font_service.h" // nogncheck #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "components/viz/host/gpu_client.h" #include "content/public/browser/gpu_client.h" #endif @@ -24,13 +24,13 @@ namespace content { void UtilityProcessHost::BindHostReceiver( mojo::GenericPendingReceiver receiver) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (auto font_receiver = receiver.As()) { ConnectToFontService(std::move(font_receiver)); return; } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) - if (auto gpu_receiver = receiver.As()) { - gpu_client_ = - content::CreateGpuClient(std::move(gpu_receiver), base::DoNothing()); + if (allowed_gpu_) { + // TODO(crbug.com/328099369) Remove once all clients get this directly. + if (auto gpu_receiver = receiver.As()) { diff --git a/www/ungoogled-chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc b/www/ungoogled-chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc index 9e5385e75655..b78f00441e37 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc @@ -1,29 +1,29 @@ ---- content/browser/web_contents/web_contents_view_aura.cc.orig 2024-03-22 14:16:19 UTC +--- content/browser/web_contents/web_contents_view_aura.cc.orig 2024-04-23 07:42:17 UTC +++ content/browser/web_contents/web_contents_view_aura.cc @@ -174,7 +174,7 @@ class WebDragSourceAura : public content::WebContentsO raw_ptr window_; }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Fill out the OSExchangeData with a file contents, synthesizing a name if // necessary. void PrepareDragForFileContents(const DropData& drop_data, @@ -258,7 +258,7 @@ void PrepareDragData(const DropData& drop_data, if (!drop_data.download_metadata.empty()) PrepareDragForDownload(drop_data, provider, web_contents); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // We set the file contents before the URL because the URL also sets file // contents (to a .URL shortcut). We want to prefer file content data over // a shortcut so we add it first. -@@ -1322,7 +1322,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* +@@ -1330,7 +1330,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* // Linux window managers like to handle raise-on-click themselves. If we // raise-on-click manually, this may override user settings that prevent // focus-stealing. -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // It is possible for the web-contents to be destroyed while it is being // activated. Use a weak-ptr to track whether that happened or not. // More in https://crbug.com/1040725 diff --git a/www/ungoogled-chromium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.cc b/www/ungoogled-chromium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.cc index 888867630fc8..b31521f84334 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.cc @@ -1,81 +1,81 @@ ---- content/browser/zygote_host/zygote_host_impl_linux.cc.orig 2024-02-03 15:42:55 UTC +--- content/browser/zygote_host/zygote_host_impl_linux.cc.orig 2024-04-23 07:42:17 UTC +++ content/browser/zygote_host/zygote_host_impl_linux.cc -@@ -19,8 +19,10 @@ +@@ -18,8 +18,10 @@ #include "build/chromeos_buildflags.h" #include "content/common/zygote/zygote_commands_linux.h" #include "content/common/zygote/zygote_communication_linux.h" +#if !BUILDFLAG(IS_BSD) #include "content/common/zygote/zygote_handle_impl_linux.h" #include "content/public/common/zygote/zygote_handle.h" +#endif #include "sandbox/linux/services/credentials.h" #include "sandbox/linux/services/namespace_sandbox.h" #include "sandbox/linux/suid/client/setuid_sandbox_host.h" -@@ -38,6 +40,7 @@ namespace content { +@@ -37,6 +39,7 @@ namespace content { namespace { +#if !BUILDFLAG(IS_BSD) // Receive a fixed message on fd and return the sender's PID. // Returns true if the message received matches the expected message. bool ReceiveFixedMessage(int fd, -@@ -59,6 +62,7 @@ bool ReceiveFixedMessage(int fd, +@@ -58,6 +61,7 @@ bool ReceiveFixedMessage(int fd, return false; return true; } +#endif } // namespace -@@ -68,9 +72,13 @@ ZygoteHost* ZygoteHost::GetInstance() { +@@ -67,9 +71,13 @@ ZygoteHost* ZygoteHost::GetInstance() { } ZygoteHostImpl::ZygoteHostImpl() +#if !BUILDFLAG(IS_BSD) : use_namespace_sandbox_(false), use_suid_sandbox_(false), use_suid_sandbox_for_adj_oom_score_(false), +#else + : +#endif sandbox_binary_(), zygote_pids_lock_(), zygote_pids_() {} -@@ -83,6 +91,7 @@ ZygoteHostImpl* ZygoteHostImpl::GetInstance() { +@@ -82,6 +90,7 @@ ZygoteHostImpl* ZygoteHostImpl::GetInstance() { } void ZygoteHostImpl::Init(const base::CommandLine& command_line) { +#if !BUILDFLAG(IS_BSD) if (command_line.HasSwitch(sandbox::policy::switches::kNoSandbox)) { return; } -@@ -133,6 +142,7 @@ void ZygoteHostImpl::Init(const base::CommandLine& com +@@ -132,6 +141,7 @@ void ZygoteHostImpl::Init(const base::CommandLine& com "you can try using --" << sandbox::policy::switches::kNoSandbox << "."; } +#endif } void ZygoteHostImpl::AddZygotePid(pid_t pid) { -@@ -157,6 +167,7 @@ pid_t ZygoteHostImpl::LaunchZygote( +@@ -156,6 +166,7 @@ pid_t ZygoteHostImpl::LaunchZygote( base::CommandLine* cmd_line, base::ScopedFD* control_fd, base::FileHandleMappingVector additional_remapped_fds) { +#if !BUILDFLAG(IS_BSD) int fds[2]; CHECK_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC, 0, fds)); CHECK(base::UnixDomainSocket::EnableReceiveProcessId(fds[0])); -@@ -225,9 +236,12 @@ pid_t ZygoteHostImpl::LaunchZygote( +@@ -224,9 +235,12 @@ pid_t ZygoteHostImpl::LaunchZygote( AddZygotePid(pid); return pid; +#else + return 0; +#endif } -#if !BUILDFLAG(IS_OPENBSD) +#if !BUILDFLAG(IS_BSD) void ZygoteHostImpl::AdjustRendererOOMScore(base::ProcessHandle pid, int score) { // 1) You can't change the oom_score_adj of a non-dumpable process diff --git a/www/ungoogled-chromium/files/patch-content_common_BUILD.gn b/www/ungoogled-chromium/files/patch-content_common_BUILD.gn index b0b16c36eec9..4bd565e7a6fd 100644 --- a/www/ungoogled-chromium/files/patch-content_common_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-content_common_BUILD.gn @@ -1,47 +1,36 @@ ---- content/common/BUILD.gn.orig 2024-02-25 20:22:18 UTC +--- content/common/BUILD.gn.orig 2024-04-23 07:42:17 UTC +++ content/common/BUILD.gn -@@ -442,20 +442,29 @@ source_set("common") { +@@ -444,19 +444,28 @@ source_set("common") { } if (is_linux || is_chromeos) { - sources += [ - "gpu_pre_sandbox_hook_linux.cc", - "gpu_pre_sandbox_hook_linux.h", - ] + if (is_bsd) { + sources += [ + "gpu_pre_sandbox_hook_bsd.cc", + "gpu_pre_sandbox_hook_bsd.h", + ] + } else { + sources += [ + "gpu_pre_sandbox_hook_linux.cc", + "gpu_pre_sandbox_hook_linux.h", + ] + } public_deps += [ "//sandbox/policy" ] deps += [ ":sandbox_support_linux", - ":set_process_title_linux", "//media/gpu:buildflags", "//sandbox/linux:sandbox_services", - "//sandbox/linux:seccomp_bpf", "//sandbox/policy:chromecast_sandbox_allowlist_buildflags", "//third_party/fontconfig", ] + if (use_seccomp_bpf) { + deps += [ "//sandbox/linux:seccomp_bpf" ] + } if (use_v4l2_codec) { deps += [ "//media/gpu/v4l2" ] } -@@ -525,6 +534,9 @@ if (is_linux || is_chromeos) { - public = [ "set_process_title_linux.h" ] - sources = [ "set_process_title_linux.cc" ] - deps = [ "//base" ] -+ if (is_bsd) { -+ sources -= [ "set_process_title_linux.cc" ] -+ } - } - } - diff --git a/www/ungoogled-chromium/files/patch-content_common_features.cc b/www/ungoogled-chromium/files/patch-content_common_features.cc index e0a9490ea28a..85d164b84d8b 100644 --- a/www/ungoogled-chromium/files/patch-content_common_features.cc +++ b/www/ungoogled-chromium/files/patch-content_common_features.cc @@ -1,20 +1,20 @@ ---- content/common/features.cc.orig 2024-03-22 14:16:19 UTC +--- content/common/features.cc.orig 2024-04-23 07:42:17 UTC +++ content/common/features.cc -@@ -166,7 +166,7 @@ BASE_FEATURE(kEnableBackForwardCacheForOngoingSubframe +@@ -169,7 +169,7 @@ BASE_FEATURE(kEnableBackForwardCacheForOngoingSubframe base::FEATURE_DISABLED_BY_DEFAULT); // Enables error reporting for JS errors inside DevTools frontend host -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kEnableDevToolsJsErrorReporting, "EnableDevToolsJsErrorReporting", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -262,7 +262,7 @@ BASE_FEATURE(kGroupNIKByJoiningOrigin, +@@ -272,7 +272,7 @@ BASE_FEATURE(kGroupNIKByJoiningOrigin, // process and having browser process handle adjusting thread properties (nice // value, c-group, latency sensitivity...) for children which have sandbox // restrictions. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kHandleChildThreadTypeChangesInBrowser, "HandleChildThreadTypeChangesInBrowser", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-content_common_features.h b/www/ungoogled-chromium/files/patch-content_common_features.h index 72eacaac3a2a..ed4a115874ef 100644 --- a/www/ungoogled-chromium/files/patch-content_common_features.h +++ b/www/ungoogled-chromium/files/patch-content_common_features.h @@ -1,20 +1,20 @@ ---- content/common/features.h.orig 2024-03-22 14:16:19 UTC +--- content/common/features.h.orig 2024-04-23 07:42:17 UTC +++ content/common/features.h -@@ -37,7 +37,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kDocumentPolicyNeg +@@ -38,7 +38,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kDocumentPolicyNeg CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnableBackForwardCacheForScreenReader); CONTENT_EXPORT BASE_DECLARE_FEATURE( kEnableBackForwardCacheForOngoingSubframeNavigation); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnableDevToolsJsErrorReporting); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnsureAllowBindingsIsAlwaysForWebUI); -@@ -61,7 +61,7 @@ CONTENT_EXPORT extern const base::FeatureParam +@@ -63,7 +63,7 @@ CONTENT_EXPORT extern const base::FeatureParam CONTENT_EXPORT BASE_DECLARE_FEATURE(kGpuInfoCollectionSeparatePrefetch); #endif CONTENT_EXPORT BASE_DECLARE_FEATURE(kGroupNIKByJoiningOrigin); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT BASE_DECLARE_FEATURE(kHandleChildThreadTypeChangesInBrowser); #endif CONTENT_EXPORT BASE_DECLARE_FEATURE(kHighPriorityBeforeUnload); diff --git a/www/ungoogled-chromium/files/patch-content_common_gpu__pre__sandbox__hook__bsd.cc b/www/ungoogled-chromium/files/patch-content_common_gpu__pre__sandbox__hook__bsd.cc index 1524c25783b1..a00e00a051fd 100644 --- a/www/ungoogled-chromium/files/patch-content_common_gpu__pre__sandbox__hook__bsd.cc +++ b/www/ungoogled-chromium/files/patch-content_common_gpu__pre__sandbox__hook__bsd.cc @@ -1,72 +1,71 @@ ---- content/common/gpu_pre_sandbox_hook_bsd.cc.orig 2024-02-03 15:42:55 UTC +--- content/common/gpu_pre_sandbox_hook_bsd.cc.orig 2024-04-23 07:42:17 UTC +++ content/common/gpu_pre_sandbox_hook_bsd.cc -@@ -0,0 +1,69 @@ +@@ -0,0 +1,68 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "content/common/gpu_pre_sandbox_hook_bsd.h" + +#include +#include +#include + +#include +#include +#include +#include + +#include "base/base_paths.h" +#include "base/files/file_enumerator.h" +#include "base/files/file_path.h" +#include "base/files/scoped_file.h" +#include "base/functional/bind.h" +#include "base/logging.h" +#include "base/path_service.h" +#include "base/strings/stringprintf.h" +#include "build/build_config.h" +#include "build/buildflag.h" +#include "build/chromeos_buildflags.h" -+#include "content/common/set_process_title.h" +#include "content/public/common/content_switches.h" +#include "media/gpu/buildflags.h" + +namespace content { +namespace { + +constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE; + +void LoadVulkanLibraries() { + // Try to preload Vulkan libraries. Failure is not an error as not all may be + // present. + const char* kLibraries[] = { + "libvulkan.so", + "libvulkan_intel.so", + "libvulkan_intel_hasvk.so", + "libvulkan_radeon.so", + }; + for (const auto* library : kLibraries) { + dlopen(library, dlopen_flag); + } +} + +bool LoadLibrariesForGpu( + const sandbox::policy::SandboxSeccompBPF::Options& options) { + LoadVulkanLibraries(); + + return true; +} + +} // namespace + +bool GpuPreSandboxHook(sandbox::policy::SandboxLinux::Options options) { + if (!LoadLibrariesForGpu(options)) + return false; + + // TODO(tsepez): enable namspace sandbox here once crashes are understood. + + errno = 0; + return true; +} + +} // namespace content diff --git a/www/ungoogled-chromium/files/patch-content_common_gpu__pre__sandbox__hook__linux.h b/www/ungoogled-chromium/files/patch-content_common_gpu__pre__sandbox__hook__linux.h new file mode 100644 index 000000000000..a72daae8156e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-content_common_gpu__pre__sandbox__hook__linux.h @@ -0,0 +1,16 @@ +--- content/common/gpu_pre_sandbox_hook_linux.h.orig 2024-04-23 07:42:17 UTC ++++ content/common/gpu_pre_sandbox_hook_linux.h +@@ -5,8 +5,13 @@ + #ifndef CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_LINUX_H_ + #define CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_LINUX_H_ + ++#include "build/build_config.h" + #include "base/component_export.h" ++#if BUILDFLAG(IS_BSD) ++#include "sandbox/policy/sandbox.h" ++#else + #include "sandbox/policy/linux/sandbox_linux.h" ++#endif + + namespace content { + diff --git a/www/ungoogled-chromium/files/patch-content_gpu_gpu__child__thread.cc b/www/ungoogled-chromium/files/patch-content_gpu_gpu__child__thread.cc index f7c8e6a75f03..6a8236a6d65c 100644 --- a/www/ungoogled-chromium/files/patch-content_gpu_gpu__child__thread.cc +++ b/www/ungoogled-chromium/files/patch-content_gpu_gpu__child__thread.cc @@ -1,21 +1,21 @@ ---- content/gpu/gpu_child_thread.cc.orig 2023-12-23 12:33:28 UTC +--- content/gpu/gpu_child_thread.cc.orig 2024-04-23 07:42:17 UTC +++ content/gpu/gpu_child_thread.cc -@@ -59,7 +59,7 @@ +@@ -58,7 +58,7 @@ #include "third_party/skia/include/ports/SkFontConfigInterface.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/child/sandboxed_process_thread_type_handler.h" #endif -@@ -143,7 +143,8 @@ void GpuChildThread::Init(const base::TimeTicks& proce +@@ -142,7 +142,8 @@ void GpuChildThread::Init(const base::TimeTicks& proce viz_main_.gpu_service()->set_start_time(process_start_time); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +// XXX BSD +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) SandboxedProcessThreadTypeHandler::NotifyMainChildThreadCreated(); #endif diff --git a/www/ungoogled-chromium/files/patch-content_gpu_gpu__main.cc b/www/ungoogled-chromium/files/patch-content_gpu_gpu__main.cc index efd384f6ac09..37d107e05902 100644 --- a/www/ungoogled-chromium/files/patch-content_gpu_gpu__main.cc +++ b/www/ungoogled-chromium/files/patch-content_gpu_gpu__main.cc @@ -1,66 +1,73 @@ ---- content/gpu/gpu_main.cc.orig 2024-03-22 14:16:19 UTC +--- content/gpu/gpu_main.cc.orig 2024-04-23 07:42:17 UTC +++ content/gpu/gpu_main.cc -@@ -91,7 +91,7 @@ +@@ -91,10 +91,14 @@ #include "sandbox/win/src/sandbox.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/child/sandboxed_process_thread_type_handler.h" #include "content/common/gpu_pre_sandbox_hook_linux.h" ++#if BUILDFLAG(IS_BSD) ++#include "sandbox/policy/sandbox.h" ++#else #include "sandbox/policy/linux/sandbox_linux.h" -@@ -114,7 +114,7 @@ namespace content { ++#endif + #include "sandbox/policy/sandbox_type.h" + #endif + +@@ -114,7 +118,7 @@ namespace content { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool StartSandboxLinux(gpu::GpuWatchdogThread*, const gpu::GPUInfo*, const gpu::GpuPreferences&); -@@ -179,7 +179,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel +@@ -179,7 +183,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel bool EnsureSandboxInitialized(gpu::GpuWatchdogThread* watchdog_thread, const gpu::GPUInfo* gpu_info, const gpu::GpuPreferences& gpu_prefs) override { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return StartSandboxLinux(watchdog_thread, gpu_info, gpu_prefs); #elif BUILDFLAG(IS_WIN) return StartSandboxWindows(sandbox_info_); -@@ -291,7 +291,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -291,7 +295,7 @@ int GpuMain(MainFunctionParams parameters) { std::make_unique( gpu_preferences.message_pump_type); } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #error "Unsupported Linux platform." #elif BUILDFLAG(IS_MAC) // Cross-process CoreAnimation requires a CFRunLoop to function at all, and -@@ -328,7 +328,8 @@ int GpuMain(MainFunctionParams parameters) { +@@ -328,7 +332,8 @@ int GpuMain(MainFunctionParams parameters) { // before it. InitializeSkia(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +// XXX BSD +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) // Thread type delegate of the process should be registered before // first thread type change in ChildProcess constructor. // It also needs to be registered before the process has multiple threads, -@@ -436,7 +437,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -436,7 +441,7 @@ int GpuMain(MainFunctionParams parameters) { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread, const gpu::GPUInfo* gpu_info, const gpu::GpuPreferences& gpu_prefs) { -@@ -476,7 +477,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo +@@ -476,7 +481,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo sandbox_options.accelerated_video_encode_enabled = !gpu_prefs.disable_accelerated_video_encode; -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Video decoding of many video streams can use thousands of FDs as well as // Exo clients like Lacros. // See https://crbug.com/1417237 diff --git a/www/ungoogled-chromium/files/patch-content_public_browser_content__browser__client.cc b/www/ungoogled-chromium/files/patch-content_public_browser_content__browser__client.cc index 25297977fe7a..f79deb130404 100644 --- a/www/ungoogled-chromium/files/patch-content_public_browser_content__browser__client.cc +++ b/www/ungoogled-chromium/files/patch-content_public_browser_content__browser__client.cc @@ -1,11 +1,11 @@ ---- content/public/browser/content_browser_client.cc.orig 2024-03-22 14:16:19 UTC +--- content/public/browser/content_browser_client.cc.orig 2024-04-23 07:42:17 UTC +++ content/public/browser/content_browser_client.cc -@@ -1277,7 +1277,7 @@ bool ContentBrowserClient::ShouldRunOutOfProcessSystem +@@ -1283,7 +1283,7 @@ bool ContentBrowserClient::ShouldRunOutOfProcessSystem // that can be adequately sandboxed. // Currently Android's network service will not run out of process or sandboxed, // so OutOfProcessSystemDnsResolution is not currently enabled on Android. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/ungoogled-chromium/files/patch-content_public_browser_service__process__host.cc b/www/ungoogled-chromium/files/patch-content_public_browser_service__process__host.cc new file mode 100644 index 000000000000..3c1c972c95d8 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-content_public_browser_service__process__host.cc @@ -0,0 +1,11 @@ +--- content/public/browser/service_process_host.cc.orig 2024-04-23 07:42:17 UTC ++++ content/public/browser/service_process_host.cc +@@ -76,7 +76,7 @@ ServiceProcessHost::Options& ServiceProcessHost::Optio + + ServiceProcessHost::Options& ServiceProcessHost::Options::WithGpuClient( + base::PassKey passkey) { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + allow_gpu_client = true; + #endif + return *this; diff --git a/www/ungoogled-chromium/files/patch-content_public_common_content__features.cc b/www/ungoogled-chromium/files/patch-content_public_common_content__features.cc index c38ae584af4b..f7938b68a9c1 100644 --- a/www/ungoogled-chromium/files/patch-content_public_common_content__features.cc +++ b/www/ungoogled-chromium/files/patch-content_public_common_content__features.cc @@ -1,41 +1,41 @@ ---- content/public/common/content_features.cc.orig 2024-03-22 14:16:19 UTC +--- content/public/common/content_features.cc.orig 2024-04-23 07:42:17 UTC +++ content/public/common/content_features.cc -@@ -32,7 +32,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, +@@ -27,7 +27,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, "AudioServiceOutOfProcess", // 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)) base::FEATURE_ENABLED_BY_DEFAULT #else -@@ -44,7 +44,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, +@@ -39,7 +39,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, // kAudioServiceOutOfProcess feature is enabled. BASE_FEATURE(kAudioServiceSandbox, "AudioServiceSandbox", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -1179,7 +1179,7 @@ BASE_FEATURE(kWebAssemblyTiering, +@@ -1199,7 +1199,7 @@ BASE_FEATURE(kWebAssemblyTiering, BASE_FEATURE(kWebAssemblyTrapHandler, "WebAssemblyTrapHandler", #if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC)) && \ + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) && \ defined(ARCH_CPU_X86_64)) || \ (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) base::FEATURE_ENABLED_BY_DEFAULT -@@ -1221,7 +1221,11 @@ BASE_FEATURE(kWebUICodeCache, +@@ -1241,7 +1241,11 @@ BASE_FEATURE(kWebUICodeCache, // Controls whether the WebUSB API is enabled: // https://wicg.github.io/webusb +#if BUILDFLAG(IS_BSD) +BASE_FEATURE(kWebUsb, "WebUSB", base::FEATURE_DISABLED_BY_DEFAULT); +#else BASE_FEATURE(kWebUsb, "WebUSB", base::FEATURE_ENABLED_BY_DEFAULT); +#endif // Controls whether the WebXR Device API is enabled. BASE_FEATURE(kWebXr, "WebXR", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-content_public_common_content__switches.cc b/www/ungoogled-chromium/files/patch-content_public_common_content__switches.cc index cc5c8c7d7f14..84749a2c073f 100644 --- a/www/ungoogled-chromium/files/patch-content_public_common_content__switches.cc +++ b/www/ungoogled-chromium/files/patch-content_public_common_content__switches.cc @@ -1,20 +1,20 @@ ---- content/public/common/content_switches.cc.orig 2024-02-25 20:22:18 UTC +--- content/public/common/content_switches.cc.orig 2024-04-23 07:42:17 UTC +++ content/public/common/content_switches.cc @@ -366,6 +366,8 @@ const char kEnableIsolatedWebAppsInRenderer[] = // builds. const char kEnableLogging[] = "enable-logging"; +const char kDisableUnveil[] = "disable-unveil"; + // Enables the type, downlinkMax attributes of the NetInfo API. Also, enables // triggering of change attribute of the NetInfo API when there is a change in // the connection type. -@@ -1009,7 +1011,7 @@ const char kPreventResizingContentsForTesting[] = +@@ -1007,7 +1009,7 @@ const char kPreventResizingContentsForTesting[] = // 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) // Allows sending text-to-speech requests to speech-dispatcher, a common // Linux speech service. Because it's buggy, the user must explicitly // enable it so that visiting a random webpage can't cause instability. diff --git a/www/ungoogled-chromium/files/patch-content_public_common_content__switches.h b/www/ungoogled-chromium/files/patch-content_public_common_content__switches.h index 94cf18dd9a31..8a4a940c6759 100644 --- a/www/ungoogled-chromium/files/patch-content_public_common_content__switches.h +++ b/www/ungoogled-chromium/files/patch-content_public_common_content__switches.h @@ -1,19 +1,19 @@ ---- content/public/common/content_switches.h.orig 2024-02-03 15:42:55 UTC +--- content/public/common/content_switches.h.orig 2024-04-23 07:42:17 UTC +++ content/public/common/content_switches.h -@@ -115,6 +115,7 @@ CONTENT_EXPORT extern const char kEnableGpuMemoryBuffe +@@ -113,6 +113,7 @@ CONTENT_EXPORT extern const char kEnableGpuMemoryBuffe CONTENT_EXPORT extern const char kEnableIsolatedWebAppsInRenderer[]; CONTENT_EXPORT extern const char kEnableLCDText[]; CONTENT_EXPORT extern const char kEnableLogging[]; +CONTENT_EXPORT extern const char kDisableUnveil[]; CONTENT_EXPORT extern const char kEnableNetworkInformationDownlinkMax[]; CONTENT_EXPORT extern const char kEnableCanvas2DLayers[]; CONTENT_EXPORT extern const char kEnablePluginPlaceholderTesting[]; -@@ -269,7 +270,7 @@ CONTENT_EXPORT extern const char kPreventResizingConte +@@ -268,7 +269,7 @@ CONTENT_EXPORT extern const char kPreventResizingConte // 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) CONTENT_EXPORT extern const char kEnableSpeechDispatcher[]; CONTENT_EXPORT extern const char kLLVMProfileFile[]; #endif diff --git a/www/ungoogled-chromium/files/patch-content_renderer_render__thread__impl.cc b/www/ungoogled-chromium/files/patch-content_renderer_render__thread__impl.cc index 39c6df8e3c10..1c0a0fbfd68b 100644 --- a/www/ungoogled-chromium/files/patch-content_renderer_render__thread__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_renderer_render__thread__impl.cc @@ -1,38 +1,38 @@ ---- content/renderer/render_thread_impl.cc.orig 2024-03-22 14:16:19 UTC +--- content/renderer/render_thread_impl.cc.orig 2024-04-23 07:42:17 UTC +++ content/renderer/render_thread_impl.cc @@ -203,6 +203,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_BSD) +#include #else #include #endif @@ -996,7 +998,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: kGpuStreamIdMedia, kGpuStreamPriorityMedia); const bool enable_video_decode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled(media::kVaapiVideoDecodeLinux) && #endif // BUILDFLAG(IS_LINUX) !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) && @@ -1005,7 +1007,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: gpu::kGpuFeatureStatusEnabled); const bool enable_video_encode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled(media::kVaapiVideoEncodeLinux) && #else !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoEncode) && -@@ -1753,7 +1755,7 @@ std::unique_ptr RenderThreadImpl::Create +@@ -1769,7 +1771,7 @@ std::unique_ptr RenderThreadImpl::Create bool enable_video_encode_accelerator) { mojo::PendingRemote vea_provider; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(media::kUseOutOfProcessVideoEncoding)) { BindHostReceiver(vea_provider.InitWithNewPipeAndPassReceiver()); } else { diff --git a/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.h b/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.h index cbbebaa0bcbe..15d36a4c0d70 100644 --- a/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.h +++ b/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.h @@ -1,20 +1,11 @@ ---- content/renderer/renderer_blink_platform_impl.h.orig 2024-04-12 16:47:26 UTC +--- content/renderer/renderer_blink_platform_impl.h.orig 2024-04-23 07:42:17 UTC +++ content/renderer/renderer_blink_platform_impl.h -@@ -237,7 +237,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi - #endif // BUILDFLAG(IS_ANDROID) - - // Tells this platform that the renderer is locked to a site (i.e., a scheme -- // plus eTLD+1, such as https://9oo91e.qjz9zk), or to a more specific origin. -+ // plus eTLD+1, such as https://google.com), or to a more specific origin. - void SetIsLockedToSite(); - - private: @@ -246,7 +246,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi void Collect3DContextInformation(blink::Platform::GraphicsInfo* gl_info, const gpu::GPUInfo& gpu_info) const; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) std::unique_ptr sandbox_support_; #endif diff --git a/www/ungoogled-chromium/files/patch-content_shell_BUILD.gn b/www/ungoogled-chromium/files/patch-content_shell_BUILD.gn index ffbefde08d94..271e776f9ab3 100644 --- a/www/ungoogled-chromium/files/patch-content_shell_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-content_shell_BUILD.gn @@ -1,11 +1,11 @@ ---- content/shell/BUILD.gn.orig 2024-03-22 14:16:19 UTC +--- content/shell/BUILD.gn.orig 2024-04-23 07:42:17 UTC +++ content/shell/BUILD.gn -@@ -1024,7 +1024,7 @@ group("content_shell_crash_test") { +@@ -1061,7 +1061,7 @@ group("content_shell_crash_test") { if (is_win) { data_deps += [ "//build/win:copy_cdb_to_output" ] } - if (is_posix) { + if (is_posix && !is_bsd) { data_deps += [ "//third_party/breakpad:dump_syms", "//third_party/breakpad:minidump_stackwalk", diff --git a/www/ungoogled-chromium/files/patch-content_shell_app_shell__main__delegate.cc b/www/ungoogled-chromium/files/patch-content_shell_app_shell__main__delegate.cc index 68f07cee5f37..8e6aeb7466b1 100644 --- a/www/ungoogled-chromium/files/patch-content_shell_app_shell__main__delegate.cc +++ b/www/ungoogled-chromium/files/patch-content_shell_app_shell__main__delegate.cc @@ -1,11 +1,11 @@ ---- content/shell/app/shell_main_delegate.cc.orig 2024-03-22 14:16:19 UTC +--- content/shell/app/shell_main_delegate.cc.orig 2024-04-23 07:42:17 UTC +++ content/shell/app/shell_main_delegate.cc -@@ -223,7 +223,7 @@ void ShellMainDelegate::PreSandboxStartup() { +@@ -283,7 +283,7 @@ void ShellMainDelegate::PreSandboxStartup() { // Reporting for sub-processes will be initialized in ZygoteForked. if (process_type != switches::kZygoteProcess) { crash_reporter::InitializeCrashpad(process_type.empty(), process_type); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) crash_reporter::SetFirstChanceExceptionHandler( v8::TryHandleWebAssemblyTrapPosix); #endif diff --git a/www/ungoogled-chromium/files/patch-content_test_BUILD.gn b/www/ungoogled-chromium/files/patch-content_test_BUILD.gn deleted file mode 100644 index a355261dd7db..000000000000 --- a/www/ungoogled-chromium/files/patch-content_test_BUILD.gn +++ /dev/null @@ -1,20 +0,0 @@ ---- content/test/BUILD.gn.orig 2024-03-22 14:16:19 UTC -+++ content/test/BUILD.gn -@@ -2278,7 +2278,7 @@ static_library("run_all_unittests") { - ":test_support", - "//base/test:test_support", - ] -- if (is_linux || is_chromeos) { -+ if ((is_linux || is_chromeos) && !is_bsd) { - deps += [ "//content/common:set_process_title_linux" ] - } - } -@@ -3388,7 +3388,7 @@ test("content_unittests") { - deps += [ "//third_party/boringssl" ] - } - -- if (is_linux || is_chromeos) { -+ if ((is_linux || is_chromeos) && !is_bsd) { - sources += [ "../common/set_process_title_linux_unittest.cc" ] - deps += [ "//content/common:set_process_title_linux" ] - } diff --git a/www/ungoogled-chromium/files/patch-content_utility_services.cc b/www/ungoogled-chromium/files/patch-content_utility_services.cc index 338c69bb228d..d239c642fe19 100644 --- a/www/ungoogled-chromium/files/patch-content_utility_services.cc +++ b/www/ungoogled-chromium/files/patch-content_utility_services.cc @@ -1,92 +1,99 @@ ---- content/utility/services.cc.orig 2024-03-22 14:16:19 UTC +--- content/utility/services.cc.orig 2024-04-23 07:42:17 UTC +++ content/utility/services.cc -@@ -67,7 +67,7 @@ +@@ -74,7 +74,7 @@ extern sandbox::TargetServices* g_utility_target_services; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "media/mojo/services/mojo_video_encode_accelerator_provider_factory.h" #include "sandbox/linux/services/libc_interceptor.h" #include "sandbox/policy/mojom/sandbox.mojom.h" -@@ -90,7 +90,7 @@ extern sandbox::TargetServices* g_utility_target_servi +@@ -97,7 +97,7 @@ extern sandbox::TargetServices* g_utility_target_servi #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) #include "content/common/features.h" #include "media/mojo/services/stable_video_decoder_factory_process_service.h" // nogncheck -@@ -107,7 +107,7 @@ extern sandbox::TargetServices* g_utility_target_servi - #include "ui/accessibility/accessibility_features.h" +@@ -115,13 +115,13 @@ extern sandbox::TargetServices* g_utility_target_servi #endif // BUILDFLAG(ENABLE_ACCESSIBILITY_SERVICE) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ +- BUILDFLAG(ENABLE_VIDEO_EFFECTS) ++ BUILDFLAG(ENABLE_VIDEO_EFFECTS) || BUILDFLAG(IS_BSD) + #include "services/viz/public/cpp/gpu/gpu.h" + #include "services/viz/public/mojom/gpu.mojom.h" + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || + // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(ENABLE_VIDEO_EFFECTS) + -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "media/capture/capture_switches.h" - #include "services/viz/public/cpp/gpu/gpu.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || -@@ -226,7 +226,7 @@ auto RunAudio(mojo::PendingReceiver( std::move(receiver), base::SingleThreadTaskRunner::GetCurrentDefault()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #if BUILDFLAG(IS_CHROMEOS_ASH) { #else -@@ -356,7 +356,7 @@ auto RunOOPArcVideoAcceleratorFactoryService( +@@ -407,7 +407,7 @@ auto RunOOPArcVideoAcceleratorFactoryService( #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) auto RunStableVideoDecoderFactoryProcessService( mojo::PendingReceiver< -@@ -367,7 +367,7 @@ auto RunStableVideoDecoderFactoryProcessService( +@@ -418,7 +418,7 @@ auto RunStableVideoDecoderFactoryProcessService( #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && // (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) auto RunVideoEncodeAcceleratorProviderFactory( mojo::PendingReceiver receiver) { -@@ -390,7 +390,7 @@ void RegisterIOThreadServices(mojo::ServiceFactory& se +@@ -441,7 +441,7 @@ void RegisterIOThreadServices(mojo::ServiceFactory& se // loop of type IO that can get notified when pipes have data. services.Add(RunNetworkService); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) if (base::FeatureList::IsEnabled( features::kRunStableVideoDecoderFactoryProcessServiceOnIOThread)) { -@@ -438,7 +438,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -493,7 +493,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) if (!base::FeatureList::IsEnabled( features::kRunStableVideoDecoderFactoryProcessServiceOnIOThread)) { -@@ -447,7 +447,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -502,7 +502,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && // (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) services.Add(RunVideoEncodeAcceleratorProviderFactory); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc b/www/ungoogled-chromium/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc index 3417039f5b67..7a54fc50b1df 100644 --- a/www/ungoogled-chromium/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc +++ b/www/ungoogled-chromium/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc @@ -1,37 +1,37 @@ ---- content/utility/speech/speech_recognition_sandbox_hook_linux.cc.orig 2023-01-13 08:56:02 UTC +--- content/utility/speech/speech_recognition_sandbox_hook_linux.cc.orig 2024-04-23 07:42:17 UTC +++ content/utility/speech/speech_recognition_sandbox_hook_linux.cc @@ -12,11 +12,14 @@ #include "sandbox/linux/syscall_broker/broker_command.h" #include "sandbox/linux/syscall_broker/broker_file_permission.h" +#if !BUILDFLAG(IS_BSD) using sandbox::syscall_broker::BrokerFilePermission; using sandbox::syscall_broker::MakeBrokerCommandSet; +#endif namespace speech { +#if !BUILDFLAG(IS_BSD) namespace { // Gets the file permissions required by the Speech On-Device API (SODA). @@ -50,9 +53,11 @@ std::vector GetSodaFilePermissio } } // namespace +#endif bool SpeechRecognitionPreSandboxHook( sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) #if BUILDFLAG(ENABLE_SODA_INTEGRATION_TESTS) base::FilePath test_binary_path = GetSodaTestBinaryPath(); DVLOG(0) << "SODA test binary path: " << test_binary_path.value().c_str(); -@@ -77,6 +82,7 @@ bool SpeechRecognitionPreSandboxHook( - sandbox::policy::SandboxLinux::PreSandboxHook(), - options); +@@ -75,6 +80,7 @@ bool SpeechRecognitionPreSandboxHook( + }), + GetSodaFilePermissions(), options); instance->EngageNamespaceSandboxIfPossible(); +#endif return true; } diff --git a/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc b/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc index 6ba1ad76a479..4cf4c0e16f7e 100644 --- a/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc +++ b/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc @@ -1,117 +1,128 @@ ---- content/utility/utility_main.cc.orig 2024-02-25 20:22:18 UTC +--- content/utility/utility_main.cc.orig 2024-04-23 07:42:17 UTC +++ content/utility/utility_main.cc @@ -37,17 +37,21 @@ #include "third_party/icu/source/common/unicode/unistr.h" #include "third_party/icu/source/i18n/unicode/timezone.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/file_descriptor_store.h" #include "base/files/file_util.h" #include "base/pickle.h" #include "content/child/sandboxed_process_thread_type_handler.h" -+#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "content/common/gpu_pre_sandbox_hook_linux.h" +#endif #include "content/public/common/content_descriptor_keys.h" #include "content/utility/speech/speech_recognition_sandbox_hook_linux.h" #include "gpu/config/gpu_info_collector.h" #include "media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h" +#if !BUILDFLAG(IS_BSD) #include "sandbox/policy/linux/sandbox_linux.h" +#endif #include "services/audio/audio_sandbox_hook_linux.h" #include "services/network/network_sandbox_hook_linux.h" // gn check is not smart enough to realize that this include only applies to @@ -59,10 +63,15 @@ #endif #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#include "content/common/gpu_pre_sandbox_hook_bsd.h" +#endif + #if BUILDFLAG(IS_CHROMEOS_ASH) #include "chromeos/ash/components/assistant/buildflags.h" #include "chromeos/ash/services/ime/ime_sandbox_hook.h" @@ -74,7 +83,7 @@ #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if (BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))) - #include "components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h" // nogncheck + #include "services/screen_ai/public/cpp/utilities.h" // nogncheck + #include "services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h" // nogncheck #endif - -@@ -100,7 +109,7 @@ namespace content { +@@ -101,7 +110,7 @@ namespace content { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::vector GetNetworkContextsParentDirectories() { base::MemoryMappedFile::Region region; base::ScopedFD read_pipe_fd = base::FileDescriptorStore::GetInstance().TakeFD( -@@ -128,7 +137,7 @@ std::vector GetNetworkContextsParentDirec +@@ -127,9 +136,10 @@ std::vector GetNetworkContextsParentDirec + return dirs; + } ++#if !BUILDFLAG(IS_BSD) bool ShouldUseAmdGpuPolicy(sandbox::mojom::Sandbox sandbox_type) { const bool obtain_gpu_info = -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoDecoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoEncoding; -@@ -251,7 +260,8 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -144,6 +154,7 @@ bool ShouldUseAmdGpuPolicy(sandbox::mojom::Sandbox san + + return false; + } ++#endif + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + + #if BUILDFLAG(IS_WIN) +@@ -252,7 +263,8 @@ int UtilityMain(MainFunctionParams parameters) { } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +// XXX BSD +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) // Thread type delegate of the process should be registered before // first thread type change in ChildProcess constructor. // It also needs to be registered before the process has multiple threads, -@@ -262,7 +272,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -263,7 +275,7 @@ int UtilityMain(MainFunctionParams parameters) { } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Initializes the sandbox before any threads are created. // TODO(jorgelo): move this after GTK initialization when we enable a strict // Seccomp-BPF policy. -@@ -297,7 +307,7 @@ int UtilityMain(MainFunctionParams parameters) { - pre_sandbox_hook = base::BindOnce(&screen_ai::ScreenAIPreSandboxHook); +@@ -301,7 +313,7 @@ int UtilityMain(MainFunctionParams parameters) { + screen_ai::GetBinaryPathSwitch())); break; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) case sandbox::mojom::Sandbox::kHardwareVideoDecoding: pre_sandbox_hook = base::BindOnce(&media::HardwareVideoDecodingPreSandboxHook); -@@ -324,6 +334,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -328,6 +340,7 @@ int UtilityMain(MainFunctionParams parameters) { default: break; } +#if !BUILDFLAG(IS_BSD) if (!sandbox::policy::IsUnsandboxedSandboxType(sandbox_type) && (parameters.zygote_child || !pre_sandbox_hook.is_null())) { sandbox_options.use_amd_specific_policies = -@@ -331,6 +342,11 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -335,6 +348,11 @@ int UtilityMain(MainFunctionParams parameters) { sandbox::policy::Sandbox::Initialize( sandbox_type, std::move(pre_sandbox_hook), sandbox_options); } +#else + sandbox::policy::Sandbox::Initialize( + sandbox_type, std::move(pre_sandbox_hook), + sandbox::policy::SandboxLinux::Options()); +#endif // Start the HangWatcher now that the sandbox is engaged, if it hasn't // already been started. diff --git a/www/ungoogled-chromium/files/patch-extensions_shell_app_shell__main__delegate.cc b/www/ungoogled-chromium/files/patch-extensions_shell_app_shell__main__delegate.cc index e6742c2362ed..4e648cfc55f0 100644 --- a/www/ungoogled-chromium/files/patch-extensions_shell_app_shell__main__delegate.cc +++ b/www/ungoogled-chromium/files/patch-extensions_shell_app_shell__main__delegate.cc @@ -1,20 +1,20 @@ ---- extensions/shell/app/shell_main_delegate.cc.orig 2023-11-04 07:08:51 UTC +--- extensions/shell/app/shell_main_delegate.cc.orig 2024-04-23 07:42:17 UTC +++ extensions/shell/app/shell_main_delegate.cc @@ -43,7 +43,7 @@ #if BUILDFLAG(IS_WIN) #include "base/base_paths_win.h" #include "base/process/process_info.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/nix/xdg_util.h" #elif BUILDFLAG(IS_MAC) #include "base/base_paths_mac.h" -@@ -62,7 +62,7 @@ base::FilePath GetDataPath() { - return cmd_line->GetSwitchValuePath(switches::kContentShellDataPath); +@@ -63,7 +63,7 @@ base::FilePath GetDataPath() { + } base::FilePath data_dir; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::unique_ptr env(base::Environment::Create()); data_dir = base::nix::GetXDGDirectory( env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir); diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_common_gpu__memory__buffer__support.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_common_gpu__memory__buffer__support.cc index 2dda3b035e79..54f0f96a2533 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_common_gpu__memory__buffer__support.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_common_gpu__memory__buffer__support.cc @@ -1,20 +1,20 @@ ---- gpu/command_buffer/common/gpu_memory_buffer_support.cc.orig 2023-09-17 07:59:53 UTC +--- gpu/command_buffer/common/gpu_memory_buffer_support.cc.orig 2024-04-23 07:42:17 UTC +++ gpu/command_buffer/common/gpu_memory_buffer_support.cc @@ -182,7 +182,7 @@ uint32_t GetPlatformSpecificTextureTarget() { #if BUILDFLAG(IS_MAC) return macos_specific_texture_target; #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return GL_TEXTURE_EXTERNAL_OES; #elif BUILDFLAG(IS_IOS) return GL_TEXTURE_2D; -@@ -217,7 +217,7 @@ GPU_EXPORT bool NativeBufferNeedsPlatformSpecificTextu +@@ -209,7 +209,7 @@ GPU_EXPORT bool NativeBufferNeedsPlatformSpecificTextu gfx::BufferFormat format, gfx::BufferPlane plane) { #if BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Always use GL_TEXTURE_2D as the target for RGB textures. // https://crbug.com/916728 if (format == gfx::BufferFormat::R_8 || format == gfx::BufferFormat::RG_88 || diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc index 0ac84acbd562..12ef8dac0ad6 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/dawn_context_provider.cc.orig 2024-02-03 15:42:55 UTC +--- gpu/command_buffer/service/dawn_context_provider.cc.orig 2024-04-23 07:42:17 UTC +++ gpu/command_buffer/service/dawn_context_provider.cc -@@ -186,7 +186,7 @@ wgpu::BackendType DawnContextProvider::GetDefaultBacke +@@ -203,7 +203,7 @@ wgpu::BackendType DawnContextProvider::GetDefaultBacke return base::FeatureList::IsEnabled(features::kSkiaGraphiteDawnUseD3D12) ? wgpu::BackendType::D3D12 : wgpu::BackendType::D3D11; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) return wgpu::BackendType::Vulkan; #elif BUILDFLAG(IS_APPLE) return wgpu::BackendType::Metal; diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc index c1a76ee36b22..882f1b627785 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/gles2_cmd_decoder.cc.orig 2024-03-22 14:16:19 UTC +--- gpu/command_buffer/service/gles2_cmd_decoder.cc.orig 2024-04-23 07:42:17 UTC +++ gpu/command_buffer/service/gles2_cmd_decoder.cc -@@ -2984,7 +2984,7 @@ GLES2Decoder* GLES2Decoder::Create( +@@ -2987,7 +2987,7 @@ GLES2Decoder* GLES2Decoder::Create( } // Allow linux to run fuzzers. -#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return new GLES2DecoderImpl(client, command_buffer_service, outputter, group); #else LOG(FATAL) << "Validating command decoder is not supported."; diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc index f8e51497a7c4..e4f407aff4f2 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/shared_image_manager.cc.orig 2024-03-22 14:16:19 UTC +--- gpu/command_buffer/service/shared_image/shared_image_manager.cc.orig 2024-04-23 07:42:17 UTC +++ gpu/command_buffer/service/shared_image/shared_image_manager.cc -@@ -568,7 +568,7 @@ bool SharedImageManager::SupportsScanoutImages() { +@@ -569,7 +569,7 @@ bool SharedImageManager::SupportsScanoutImages() { return true; #elif BUILDFLAG(IS_ANDROID) return base::AndroidHardwareBufferCompat::IsSupportAvailable(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) return ui::OzonePlatform::GetInstance() ->GetPlatformRuntimeProperties() .supports_native_pixmaps; diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc index 24ecb6bd16c7..62ea65f7bc4b 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc @@ -1,20 +1,20 @@ ---- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2024-03-22 14:16:19 UTC +--- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2024-04-23 07:42:17 UTC +++ gpu/command_buffer/service/webgpu_decoder_impl.cc -@@ -1239,7 +1239,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( +@@ -1255,7 +1255,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( force_fallback_adapter = true; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!shared_context_state_->GrContextIsVulkan() && !shared_context_state_->IsGraphiteDawnVulkan() && use_webgpu_adapter_ != WebGPUAdapterName::kOpenGLES) { -@@ -1891,7 +1891,7 @@ WebGPUDecoderImpl::AssociateMailboxDawn( +@@ -1922,7 +1922,7 @@ WebGPUDecoderImpl::AssociateMailboxDawn( } #if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_APPLE) && \ - !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX) + !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) if (usage & wgpu::TextureUsage::StorageBinding) { LOG(ERROR) << "AssociateMailbox: wgpu::TextureUsage::StorageBinding is NOT " "supported yet on this platform."; diff --git a/www/ungoogled-chromium/files/patch-gpu_config_gpu__finch__features.cc b/www/ungoogled-chromium/files/patch-gpu_config_gpu__finch__features.cc index 3fe6634356c6..34762b532a5f 100644 --- a/www/ungoogled-chromium/files/patch-gpu_config_gpu__finch__features.cc +++ b/www/ungoogled-chromium/files/patch-gpu_config_gpu__finch__features.cc @@ -1,20 +1,20 @@ ---- gpu/config/gpu_finch_features.cc.orig 2024-03-22 14:16:19 UTC +--- gpu/config/gpu_finch_features.cc.orig 2024-04-23 07:42:17 UTC +++ gpu/config/gpu_finch_features.cc -@@ -131,7 +131,7 @@ const base::FeatureParam +@@ -145,7 +145,7 @@ const base::FeatureParam BASE_FEATURE(kDefaultEnableGpuRasterization, "DefaultEnableGpuRasterization", #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -144,7 +144,7 @@ BASE_FEATURE(kCanvasOopRasterization, +@@ -158,7 +158,7 @@ BASE_FEATURE(kCanvasOopRasterization, "CanvasOopRasterization", #if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__init.cc b/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__init.cc index 8a250241463c..eaf99f9e3eda 100644 --- a/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__init.cc +++ b/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__init.cc @@ -1,74 +1,74 @@ ---- gpu/ipc/service/gpu_init.cc.orig 2024-03-22 14:16:19 UTC +--- gpu/ipc/service/gpu_init.cc.orig 2024-04-23 07:42:17 UTC +++ gpu/ipc/service/gpu_init.cc -@@ -354,7 +354,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -391,7 +391,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL enable_watchdog = false; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool gpu_sandbox_start_early = gpu_preferences_.gpu_sandbox_start_early; #else // !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) // For some reasons MacOSX's VideoToolbox might crash when called after -@@ -391,7 +391,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -428,7 +428,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } bool attempted_startsandbox = false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Chrome OS ARM Mali, GPU driver userspace creates threads when // initializing a GL context, so start the sandbox early. // TODO(zmo): Need to collect OS version before this. -@@ -492,7 +492,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -529,7 +529,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL gpu_preferences_.gr_context_type = GrContextType::kGL; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The ContentSandboxHelper is currently the only one implementation of // GpuSandboxHelper and it has no dependency. Except on Linux where // VaapiWrapper checks the GL implementation to determine which display -@@ -574,7 +574,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -611,7 +611,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL command_line, gpu_feature_info_, gpu_preferences_.disable_software_rasterizer, false); if (gl_use_swiftshader_) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) VLOG(1) << "Quit GPU process launch to fallback to SwiftShader cleanly " << "on Linux"; return false; -@@ -721,7 +721,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -767,7 +767,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL InitializePlatformOverlaySettings(&gpu_info_, gpu_feature_info_); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Driver may create a compatibility profile context when collect graphics // information on Linux platform. Try to collect graphics information // based on core profile context after disabling platform extensions. -@@ -776,7 +776,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -822,7 +822,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } } } -#if BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE)) if (!gl_disabled && !gl_use_swiftshader_ && std::getenv("RUNNING_UNDER_RR")) { // https://rr-project.org/ is a Linux-only record-and-replay debugger that -@@ -930,7 +930,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -989,7 +989,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c } bool gl_disabled = gl::GetGLImplementation() == gl::kGLImplementationDisabled; -#if BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE)) if (!gl_disabled && !gl_use_swiftshader_ && std::getenv("RUNNING_UNDER_RR")) { // https://rr-project.org/ is a Linux-only record-and-replay debugger that -@@ -990,7 +990,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -1049,7 +1049,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Driver may create a compatibility profile context when collect graphics // information on Linux platform. Try to collect graphics information // based on core profile context after disabling platform extensions. diff --git a/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__util.cc b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__util.cc index 3bbb8764b500..54f0239c28c1 100644 --- a/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__util.cc +++ b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__util.cc @@ -1,11 +1,11 @@ ---- gpu/vulkan/vulkan_util.cc.orig 2024-02-25 20:22:18 UTC +--- gpu/vulkan/vulkan_util.cc.orig 2024-04-23 07:42:17 UTC +++ gpu/vulkan/vulkan_util.cc -@@ -443,7 +443,7 @@ bool CheckVulkanCompatibilities(const VulkanInfo& vulk +@@ -467,7 +467,7 @@ bool CheckVulkanCompatibilities( } } -#if BUILDFLAG(IS_LINUX) && !defined(OZONE_PLATFORM_IS_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !defined(OZONE_PLATFORM_IS_X11) // Vulkan is only supported with X11 on Linux for now. return false; #else diff --git a/www/ungoogled-chromium/files/patch-media_audio_audio__input__device.cc b/www/ungoogled-chromium/files/patch-media_audio_audio__input__device.cc index ac0ac28742e0..17e2f2db3da8 100644 --- a/www/ungoogled-chromium/files/patch-media_audio_audio__input__device.cc +++ b/www/ungoogled-chromium/files/patch-media_audio_audio__input__device.cc @@ -1,11 +1,11 @@ ---- media/audio/audio_input_device.cc.orig 2023-05-05 12:12:41 UTC +--- media/audio/audio_input_device.cc.orig 2024-04-23 07:42:17 UTC +++ media/audio/audio_input_device.cc -@@ -262,7 +262,7 @@ void AudioInputDevice::OnStreamCreated( +@@ -264,7 +264,7 @@ void AudioInputDevice::OnStreamCreated( // here. See comments in AliveChecker and PowerObserverHelper for details and // todos. if (detect_dead_stream_ == DeadStreamDetection::kEnabled) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const bool stop_at_first_alive_notification = true; const bool pause_check_during_suspend = false; #else diff --git a/www/ungoogled-chromium/files/patch-media_base_media__switches.cc b/www/ungoogled-chromium/files/patch-media_base_media__switches.cc index b4f13b0bfce6..3ac5967ad08e 100644 --- a/www/ungoogled-chromium/files/patch-media_base_media__switches.cc +++ b/www/ungoogled-chromium/files/patch-media_base_media__switches.cc @@ -1,94 +1,103 @@ ---- media/base/media_switches.cc.orig 2024-04-04 19:16:34 UTC +--- media/base/media_switches.cc.orig 2024-04-23 07:42:17 UTC +++ media/base/media_switches.cc @@ -21,7 +21,7 @@ #include "ui/gl/gl_features.h" #include "ui/gl/gl_utils.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/cpu.h" #endif -@@ -368,8 +368,8 @@ BASE_FEATURE(kMacLoopbackAudioForScreenShare, +@@ -363,8 +363,8 @@ BASE_FEATURE(kMacLoopbackAudioForScreenShare, "MacLoopbackAudioForScreenShare", base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_MAC) - -#if BUILDFLAG(IS_LINUX) + +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables system audio mirroring using pulseaudio. BASE_FEATURE(kPulseaudioLoopbackForCast, "PulseaudioLoopbackForCast", -@@ -602,7 +602,7 @@ BASE_FEATURE(kUseWritePixelsYUV, +@@ -597,7 +597,7 @@ BASE_FEATURE(kUseWritePixelsYUV, BASE_FEATURE(kUseMultiPlaneFormatForHardwareVideo, "UseMultiPlaneFormatForHardwareVideo", #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -715,7 +715,7 @@ BASE_FEATURE(kFallbackAfterDecodeError, +@@ -713,7 +713,7 @@ BASE_FEATURE(kFallbackAfterDecodeError, // Show toolbar button that opens dialog for controlling media sessions. BASE_FEATURE(kGlobalMediaControls, "GlobalMediaControls", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -743,7 +743,7 @@ BASE_FEATURE(kGlobalMediaControlsUpdatedUI, +@@ -741,7 +741,7 @@ BASE_FEATURE(kGlobalMediaControlsUpdatedUI, // If enabled, users can request Media Remoting without fullscreen-in-tab. BASE_FEATURE(kMediaRemotingWithoutFullscreen, "MediaRemotingWithoutFullscreen", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -755,7 +755,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen, +@@ -753,7 +753,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen, BASE_FEATURE(kGlobalMediaControlsPictureInPicture, "GlobalMediaControlsPictureInPicture", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -784,7 +784,7 @@ BASE_FEATURE(kUnifiedAutoplay, +@@ -782,7 +782,7 @@ BASE_FEATURE(kUnifiedAutoplay, "UnifiedAutoplay", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enable vaapi video decoding on linux. This is already enabled by default on // chromeos, but needs an experiment on linux. BASE_FEATURE(kVaapiVideoDecodeLinux, -@@ -875,7 +875,7 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding, +@@ -873,7 +873,7 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding, "VaapiVp9SModeHWEncoding", base::FEATURE_DISABLED_BY_DEFAULT); #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Enables the new V4L2StatefulVideoDecoder instead of V4L2VideoDecoder. - BASE_FEATURE(kV4L2FlatStatelessVideoDecoder, - "V4L2FlatStatelessVideoDecoder", -@@ -994,7 +994,7 @@ BASE_FEATURE(kLiveCaptionUseWaitK, + // Enables the new V4L2 flat video decoder clients instead of V4L2VideoDecoder. + // Owners: frkoenig@ch40m1um.qjz9zk, mcasas@ch40m1um.qjz9zk + // Expiry: When flat decoders are supported on all platforms and the legacy +@@ -998,7 +998,7 @@ BASE_FEATURE(kLiveCaptionUseWaitK, // Live Caption can be used in multiple languages, as opposed to just English. BASE_FEATURE(kLiveCaptionMultiLanguage, "LiveCaptionMultiLanguage", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -1466,7 +1466,7 @@ BASE_FEATURE(kUseOutOfProcessVideoDecoding, - ); +@@ -1033,7 +1033,7 @@ BASE_FEATURE(kLiveCaptionSystemWideOnChromeOS, + // Live Translate translates captions generated by Live Caption. + BASE_FEATURE(kLiveTranslate, + "LiveTranslate", +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT + #else + base::FEATURE_DISABLED_BY_DEFAULT +@@ -1500,7 +1500,7 @@ BASE_FEATURE(kUseGTFOOutOfProcessVideoDecoding, + base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Spawn utility processes to perform hardware encode acceleration instead of // using the GPU process. BASE_FEATURE(kUseOutOfProcessVideoEncoding, diff --git a/www/ungoogled-chromium/files/patch-media_base_media__switches.h b/www/ungoogled-chromium/files/patch-media_base_media__switches.h index 309eae2ef892..30204b0dcd77 100644 --- a/www/ungoogled-chromium/files/patch-media_base_media__switches.h +++ b/www/ungoogled-chromium/files/patch-media_base_media__switches.h @@ -1,38 +1,38 @@ ---- media/base/media_switches.h.orig 2024-03-22 14:16:19 UTC +--- media/base/media_switches.h.orig 2024-04-23 07:42:17 UTC +++ media/base/media_switches.h -@@ -313,7 +313,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlatformHEVCEncoder +@@ -315,7 +315,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlatformHEVCEncoder MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlaybackSpeedButton); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMediaEngagementData); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMetadataSuspend); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForCast); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForScreenShare); #endif // BUILDFLAG(IS_LINUX) -@@ -331,7 +331,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUnifiedAutoplay); +@@ -333,7 +333,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUnifiedAutoplay); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseAndroidOverlayForSecureOnly); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseDecoderStreamForWebRTC); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseFakeDeviceForMediaStream); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinux); MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinuxGL); MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoEncodeLinux); -@@ -350,7 +350,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiH264TemporalLa +@@ -352,7 +352,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiH264TemporalLa MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLayerHWEncoding); MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9SModeHWEncoding); #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatelessVideoDecoder); + MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatVideoDecoder); MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatefulVideoDecoder); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -484,7 +484,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kExposeOutOfProcessV - MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoDecoding); +@@ -491,7 +491,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVide + MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseGTFOOutOfProcessVideoDecoding); #endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoEncoding); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-media_base_video__frame.cc b/www/ungoogled-chromium/files/patch-media_base_video__frame.cc index 83481e676fdb..879a17aa8862 100644 --- a/www/ungoogled-chromium/files/patch-media_base_video__frame.cc +++ b/www/ungoogled-chromium/files/patch-media_base_video__frame.cc @@ -1,74 +1,74 @@ ---- media/base/video_frame.cc.orig 2024-03-22 14:16:19 UTC +--- media/base/video_frame.cc.orig 2024-04-23 07:42:17 UTC +++ media/base/video_frame.cc @@ -80,7 +80,7 @@ std::string VideoFrame::StorageTypeToString( return "OWNED_MEMORY"; case VideoFrame::STORAGE_SHMEM: return "SHMEM"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case VideoFrame::STORAGE_DMABUFS: return "DMABUFS"; #endif @@ -95,7 +95,7 @@ std::string VideoFrame::StorageTypeToString( // static bool VideoFrame::IsStorageTypeMappable(VideoFrame::StorageType storage_type) { return -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // This is not strictly needed but makes explicit that, at VideoFrame // level, DmaBufs are not mappable from userspace. storage_type != VideoFrame::STORAGE_DMABUFS && @@ -306,7 +306,7 @@ static std::optional GetDefaultLayou return VideoFrameLayout::CreateWithPlanes(format, coded_size, planes); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // This class allows us to embed a vector into a scoped_refptr, and // thus to have several VideoFrames share the same set of DMABUF FDs. class VideoFrame::DmabufHolder @@ -636,7 +636,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM for (size_t i = 0; i < num_planes; ++i) planes[i].stride = gpu_memory_buffer->stride(i); uint64_t modifier = gfx::NativePixmapHandle::kNoModifier; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (gpu_memory_buffer->GetType() == gfx::NATIVE_PIXMAP) { const auto gmb_handle = gpu_memory_buffer->CloneHandle(); if (gmb_handle.is_null() || @@ -682,7 +682,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM return frame; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // static scoped_refptr VideoFrame::WrapExternalDmabufs( const VideoFrameLayout& layout, @@ -901,7 +901,7 @@ scoped_refptr VideoFrame::WrapVideoFrame( } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) DCHECK(frame->dmabuf_fds_); // If there are any |dmabuf_fds_| plugged in, we should refer them too. wrapping_frame->dmabuf_fds_ = frame->dmabuf_fds_; -@@ -1312,7 +1312,7 @@ const gpu::MailboxHolder& VideoFrame::mailbox_holder( +@@ -1345,7 +1345,7 @@ const gpu::MailboxHolder& VideoFrame::mailbox_holder( : mailbox_holders_[texture_index]; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) size_t VideoFrame::NumDmabufFds() const { return dmabuf_fds_->size(); } -@@ -1429,7 +1429,7 @@ VideoFrame::VideoFrame(const VideoFrameLayout& layout, +@@ -1462,7 +1462,7 @@ VideoFrame::VideoFrame(const VideoFrameLayout& layout, storage_type_(storage_type), visible_rect_(Intersection(visible_rect, gfx::Rect(layout.coded_size()))), natural_size_(natural_size), -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) dmabuf_fds_(base::MakeRefCounted()), #endif timestamp_(timestamp), diff --git a/www/ungoogled-chromium/files/patch-media_base_video__frame.h b/www/ungoogled-chromium/files/patch-media_base_video__frame.h index 7a08055ff3b7..2ff429c047a6 100644 --- a/www/ungoogled-chromium/files/patch-media_base_video__frame.h +++ b/www/ungoogled-chromium/files/patch-media_base_video__frame.h @@ -1,47 +1,47 @@ ---- media/base/video_frame.h.orig 2024-02-25 20:22:18 UTC +--- media/base/video_frame.h.orig 2024-04-23 07:42:17 UTC +++ media/base/video_frame.h @@ -44,7 +44,7 @@ #include "base/apple/scoped_cftyperef.h" #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/files/scoped_file.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -110,7 +110,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte STORAGE_UNOWNED_MEMORY = 2, // External, non owned data pointers. STORAGE_OWNED_MEMORY = 3, // VideoFrame has allocated its own data buffer. STORAGE_SHMEM = 4, // Backed by read-only shared memory. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // TODO(mcasas): Consider turning this type into STORAGE_NATIVE // based on the idea of using this same enum value for both DMA // buffers on Linux and CVPixelBuffers on Mac (which currently use @@ -313,7 +313,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte ReleaseMailboxAndGpuMemoryBufferCB mailbox_holder_and_gmb_release_cb, base::TimeDelta timestamp); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Wraps provided dmabufs // (https://www.kernel.org/doc/html/latest/driver-api/dma-buf.html) with a // VideoFrame. The frame will take ownership of |dmabuf_fds|, and will -@@ -593,7 +593,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -598,7 +598,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // mailbox, the caller must wait for the included sync point. const gpu::MailboxHolder& mailbox_holder(size_t texture_index) const; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The number of DmaBufs will be equal or less than the number of planes of // the frame. If there are less, this means that the last FD contains the // remaining planes. Should be > 0 for STORAGE_DMABUFS. -@@ -811,7 +811,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -816,7 +816,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // GPU memory buffer, if this frame is STORAGE_GPU_MEMORY_BUFFER. std::unique_ptr gpu_memory_buffer_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) class DmabufHolder; // Dmabufs for the frame, used when storage is STORAGE_DMABUFS. Size is either diff --git a/www/ungoogled-chromium/files/patch-media_capture_video_linux_fake__v4l2__impl.cc b/www/ungoogled-chromium/files/patch-media_capture_video_linux_fake__v4l2__impl.cc index dd15662efdd1..fc83a830cea3 100644 --- a/www/ungoogled-chromium/files/patch-media_capture_video_linux_fake__v4l2__impl.cc +++ b/www/ungoogled-chromium/files/patch-media_capture_video_linux_fake__v4l2__impl.cc @@ -1,11 +1,11 @@ ---- media/capture/video/linux/fake_v4l2_impl.cc.orig 2024-02-25 20:22:18 UTC +--- media/capture/video/linux/fake_v4l2_impl.cc.orig 2024-04-23 07:42:17 UTC +++ media/capture/video/linux/fake_v4l2_impl.cc -@@ -561,7 +561,7 @@ int FakeV4L2Impl::close(int fd) { +@@ -562,7 +562,7 @@ int FakeV4L2Impl::close(int fd) { return kSuccessReturnValue; } -int FakeV4L2Impl::ioctl(int fd, int request, void* argp) { +int FakeV4L2Impl::ioctl(int fd, unsigned long request, void* argp) { base::AutoLock lock(lock_); auto device_iter = opened_devices_.find(fd); if (device_iter == opened_devices_.end()) diff --git a/www/ungoogled-chromium/files/patch-media_capture_video_linux_video__capture__device__factory__v4l2.cc b/www/ungoogled-chromium/files/patch-media_capture_video_linux_video__capture__device__factory__v4l2.cc index 144a43e09215..27be03008384 100644 --- a/www/ungoogled-chromium/files/patch-media_capture_video_linux_video__capture__device__factory__v4l2.cc +++ b/www/ungoogled-chromium/files/patch-media_capture_video_linux_video__capture__device__factory__v4l2.cc @@ -1,45 +1,71 @@ ---- media/capture/video/linux/video_capture_device_factory_v4l2.cc.orig 2023-05-05 12:12:41 UTC +--- media/capture/video/linux/video_capture_device_factory_v4l2.cc.orig 2024-04-23 07:42:17 UTC +++ media/capture/video/linux/video_capture_device_factory_v4l2.cc -@@ -75,6 +75,9 @@ class DevVideoFilePathsDeviceProvider +@@ -38,6 +38,7 @@ bool CompareCaptureDevices(const VideoCaptureDeviceInf + return a.descriptor < b.descriptor; + } + ++#if !BUILDFLAG(IS_OPENBSD) + // USB VID and PID are both 4 bytes long. + const size_t kVidPidSize = 4; + const size_t kMaxInterfaceNameSize = 256; +@@ -70,11 +71,15 @@ std::string ExtractFileNameFromDeviceId(const std::str + DCHECK(base::StartsWith(device_id, kDevDir, base::CompareCase::SENSITIVE)); + return device_id.substr(strlen(kDevDir), device_id.length()); + } ++#endif + + class DevVideoFilePathsDeviceProvider : public VideoCaptureDeviceFactoryV4L2::DeviceProvider { public: void GetDeviceIds(std::vector* target_container) override { +#if BUILDFLAG(IS_OPENBSD) + target_container->emplace_back("/dev/video"); +#else const base::FilePath path("/dev/"); base::FileEnumerator enumerator(path, false, base::FileEnumerator::FILES, "video*"); -@@ -82,9 +85,13 @@ class DevVideoFilePathsDeviceProvider +@@ -82,9 +87,13 @@ class DevVideoFilePathsDeviceProvider const base::FileEnumerator::FileInfo info = enumerator.GetInfo(); target_container->emplace_back(path.value() + info.GetName().value()); } +#endif } std::string GetDeviceModelId(const std::string& device_id) override { +#if BUILDFLAG(IS_OPENBSD) + return std::string(); -+#endif ++#else const std::string file_name = ExtractFileNameFromDeviceId(device_id); std::string usb_id; const std::string vid_path = -@@ -104,6 +111,9 @@ class DevVideoFilePathsDeviceProvider +@@ -101,9 +110,13 @@ class DevVideoFilePathsDeviceProvider + } + + return usb_id; ++#endif } std::string GetDeviceDisplayName(const std::string& device_id) override { +#if BUILDFLAG(IS_OPENBSD) + return std::string(); -+#endif ++#else const std::string file_name = ExtractFileNameFromDeviceId(device_id); const std::string interface_path = base::StringPrintf(kInterfacePathTemplate, file_name.c_str()); -@@ -219,7 +229,7 @@ void VideoCaptureDeviceFactoryV4L2::GetDevicesInfo( +@@ -114,6 +127,7 @@ class DevVideoFilePathsDeviceProvider + return std::string(); + } + return display_name; ++#endif + } + }; + +@@ -219,7 +233,7 @@ void VideoCaptureDeviceFactoryV4L2::GetDevicesInfo( std::move(callback).Run(std::move(devices_info)); } -int VideoCaptureDeviceFactoryV4L2::DoIoctl(int fd, int request, void* argp) { +int VideoCaptureDeviceFactoryV4L2::DoIoctl(int fd, unsigned int request, void* argp) { return HANDLE_EINTR(v4l2_->ioctl(fd, request, argp)); } diff --git a/www/ungoogled-chromium/files/patch-media_capture_video_video__capture__device__client.cc b/www/ungoogled-chromium/files/patch-media_capture_video_video__capture__device__client.cc index bc180a2015c1..9313bfa30d39 100644 --- a/www/ungoogled-chromium/files/patch-media_capture_video_video__capture__device__client.cc +++ b/www/ungoogled-chromium/files/patch-media_capture_video_video__capture__device__client.cc @@ -1,11 +1,11 @@ ---- media/capture/video/video_capture_device_client.cc.orig 2023-12-23 12:33:28 UTC +--- media/capture/video/video_capture_device_client.cc.orig 2024-04-23 07:42:17 UTC +++ media/capture/video/video_capture_device_client.cc -@@ -150,7 +150,7 @@ FourccAndFlip GetFourccAndFlipFromPixelFormat( +@@ -151,7 +151,7 @@ FourccAndFlip GetFourccAndFlipFromPixelFormat( CHECK(!is_width_odd && !is_height_odd); return {libyuv::FOURCC_UYVY}; case media::PIXEL_FORMAT_RGB24: - if constexpr (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) { + if constexpr (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) { // Linux RGB24 defines red at lowest byte address, // see http://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html. return {libyuv::FOURCC_RAW}; diff --git a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc index b89093ec1b2a..da431ed1c374 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc @@ -1,29 +1,29 @@ ---- media/gpu/chromeos/libyuv_image_processor_backend.cc.orig 2024-03-22 14:16:19 UTC +--- media/gpu/chromeos/libyuv_image_processor_backend.cc.orig 2024-04-23 07:42:17 UTC +++ media/gpu/chromeos/libyuv_image_processor_backend.cc @@ -48,7 +48,7 @@ static constexpr struct { #define CONV(in, out, trans, result) \ {Fourcc::in, Fourcc::out, Transform::trans, SupportResult::result} // Conversion. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) CONV(NV12, AR24, kConversion, Supported), #endif CONV(NV12, NV12, kConversion, Supported), -@@ -434,7 +434,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Fr +@@ -436,7 +436,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Fr fr->GetWritableVisibleData(VideoFrame::kUVPlane)), \ fr->stride(VideoFrame::kUVPlane) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define ARGB_DATA(fr) \ fr->GetWritableVisibleData(VideoFrame::kARGBPlane), \ fr->stride(VideoFrame::kARGBPlane) -@@ -595,7 +595,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Fr +@@ -597,7 +597,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Fr } } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (output->format() == PIXEL_FORMAT_ARGB) { if (input_config_.fourcc == Fourcc(Fourcc::NV12)) { return LIBYUV_FUNC(NV12ToARGB, Y_UV_DATA(input), diff --git a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc index 3b197ce7db58..dbdf48a08bba 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc @@ -1,11 +1,11 @@ ---- media/gpu/chromeos/mailbox_video_frame_converter.cc.orig 2024-03-22 14:16:19 UTC +--- media/gpu/chromeos/mailbox_video_frame_converter.cc.orig 2024-04-23 07:42:17 UTC +++ media/gpu/chromeos/mailbox_video_frame_converter.cc -@@ -62,7 +62,7 @@ viz::SharedImageFormat GetSharedImageFormat(gfx::Buffe +@@ -63,7 +63,7 @@ viz::SharedImageFormat GetSharedImageFormat(gfx::Buffe << static_cast(buffer_format); NOTREACHED_NORETURN(); } -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If format is true multiplanar format, we prefer external sampler on // ChromeOS and Linux. if (format.is_multi_plane()) { diff --git a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_native__pixmap__frame__resource.cc b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_native__pixmap__frame__resource.cc new file mode 100644 index 000000000000..c9fd5052b00b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_native__pixmap__frame__resource.cc @@ -0,0 +1,11 @@ +--- media/gpu/chromeos/native_pixmap_frame_resource.cc.orig 2024-04-23 07:42:17 UTC ++++ media/gpu/chromeos/native_pixmap_frame_resource.cc +@@ -166,7 +166,7 @@ scoped_refptr NativePixmapF + const bool is_intel_media_compression_enabled = + #if BUILDFLAG(IS_CHROMEOS) + base::FeatureList::IsEnabled(features::kEnableIntelMediaCompression); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + false; + #endif + CHECK(!is_intel_media_compressed_buffer || diff --git a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc index d96754e741df..d17aebfe1c3f 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc @@ -1,29 +1,29 @@ ---- media/gpu/chromeos/platform_video_frame_utils.cc.orig 2024-03-22 14:16:19 UTC +--- media/gpu/chromeos/platform_video_frame_utils.cc.orig 2024-04-23 07:42:17 UTC +++ media/gpu/chromeos/platform_video_frame_utils.cc @@ -68,7 +68,7 @@ static std::unique_ptr CreateGbmDevice( const base::FilePath dev_path(FILE_PATH_LITERAL( base::StrCat({drm_node_file_prefix, base::NumberToString(i)}))); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_V4L2_CODEC) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_V4L2_CODEC) const bool is_render_node = base::Contains(drm_node_file_prefix, "render"); // TODO(b/313513760): don't guard base::File::FLAG_WRITE behind @@ -196,7 +196,7 @@ class GbmDeviceWrapper { const bool is_intel_media_compression_enabled = #if BUILDFLAG(IS_CHROMEOS) base::FeatureList::IsEnabled(features::kEnableIntelMediaCompression); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) false; #endif if (is_intel_media_compression_enabled) { -@@ -334,7 +334,7 @@ scoped_refptr CreateGpuMemoryBufferVideoFr +@@ -347,7 +347,7 @@ scoped_refptr CreateVideoFrameFromGpuMemor const bool is_intel_media_compression_enabled = #if BUILDFLAG(IS_CHROMEOS) base::FeatureList::IsEnabled(features::kEnableIntelMediaCompression); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) false; #endif diff --git a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc index 6a81beb94a27..7a322913a12f 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc @@ -1,29 +1,29 @@ ---- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2024-03-22 14:16:19 UTC +--- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2024-04-23 07:42:17 UTC +++ media/gpu/chromeos/video_decoder_pipeline.cc -@@ -1017,7 +1017,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1038,7 +1038,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( } #endif -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_VAAPI) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_VAAPI) // Linux should always use a custom allocator (to allocate buffers using // libva) and a PlatformVideoFramePool. CHECK(allocator.has_value()); -@@ -1027,7 +1027,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1048,7 +1048,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( // to create NativePixmap-backed frames. main_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator( *allocator, VideoFrame::STORAGE_GPU_MEMORY_BUFFER); -#elif BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_V4L2_CODEC) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_V4L2_CODEC) // Linux w/ V4L2 should not use a custom allocator // Only tested with video_decode_accelerator_tests // TODO(wenst@) Test with full Chromium Browser -@@ -1185,7 +1185,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1206,7 +1206,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( << " VideoFrames"; auxiliary_frame_pool_->set_parent_task_runner(decoder_task_runner_); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(nhebert): Change the storage type argument when |allocator| switches // to create NativePixmap-backed frames. auxiliary_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator( diff --git a/www/ungoogled-chromium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc b/www/ungoogled-chromium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc index 827893a4e6d3..54fcc04f209c 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc @@ -1,11 +1,11 @@ ---- media/gpu/gpu_video_encode_accelerator_factory.cc.orig 2023-09-17 07:59:53 UTC +--- media/gpu/gpu_video_encode_accelerator_factory.cc.orig 2024-04-23 07:42:17 UTC +++ media/gpu/gpu_video_encode_accelerator_factory.cc -@@ -119,7 +119,7 @@ std::vector GetVEAFactoryFunctions +@@ -118,7 +118,7 @@ std::vector GetVEAFactoryFunctions return vea_factory_functions; #if BUILDFLAG(USE_VAAPI) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(kVaapiVideoEncodeLinux)) vea_factory_functions.push_back(base::BindRepeating(&CreateVaapiVEA)); #else diff --git a/www/ungoogled-chromium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc b/www/ungoogled-chromium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc index c6b300fbe5eb..52fc9ff4b46e 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc @@ -1,44 +1,44 @@ ---- media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc.orig 2024-03-22 14:16:19 UTC +--- media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc.orig 2024-04-23 07:42:17 UTC +++ media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc @@ -16,7 +16,9 @@ #include "media/gpu/vaapi/vaapi_wrapper.h" #endif +#if !BUILDFLAG(IS_BSD) using sandbox::syscall_broker::BrokerFilePermission; +#endif // TODO(b/195769334): the hardware video decoding sandbox is really only useful // when building with VA-API or V4L2 (otherwise, we're not really doing hardware @@ -32,6 +34,7 @@ using sandbox::syscall_broker::BrokerFilePermission; namespace media { namespace { +#if !BUILDFLAG(IS_BSD) void AllowAccessToRenderNodes(std::vector& permissions, bool include_sys_dev_char, bool read_write) { -@@ -166,6 +169,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( +@@ -182,6 +185,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( NOTREACHED_NORETURN(); #endif // BUILDFLAG(USE_V4L2_CODEC) } +#endif } // namespace -@@ -181,6 +185,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( +@@ -197,6 +201,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( // (at least). bool HardwareVideoDecodingPreSandboxHook( sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) using HardwareVideoDecodingProcessPolicy = sandbox::policy::HardwareVideoDecodingProcessPolicy; using PolicyType = -@@ -227,6 +232,7 @@ bool HardwareVideoDecodingPreSandboxHook( +@@ -242,6 +247,7 @@ bool HardwareVideoDecodingPreSandboxHook( + // |permissions| is empty? sandbox::policy::SandboxLinux::GetInstance()->StartBrokerProcess( - command_set, permissions, sandbox::policy::SandboxLinux::PreSandboxHook(), - options); + command_set, permissions, options); +#endif return true; } diff --git a/www/ungoogled-chromium/files/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc b/www/ungoogled-chromium/files/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc index 29e01591b0ca..a1c3d54ece8a 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc @@ -1,26 +1,26 @@ ---- media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.cc.orig 2023-09-17 07:59:53 UTC +--- media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.cc.orig 2024-04-23 07:42:17 UTC +++ media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.cc @@ -18,12 +18,15 @@ #include "media/gpu/v4l2/v4l2_device.h" #endif +#if !BUILDFLAG(IS_BSD) using sandbox::syscall_broker::BrokerFilePermission; +#endif namespace media { bool HardwareVideoEncodingPreSandboxHook( sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) sandbox::syscall_broker::BrokerCommandSet command_set; std::vector permissions; -@@ -121,6 +124,7 @@ bool HardwareVideoEncodingPreSandboxHook( +@@ -120,6 +123,7 @@ bool HardwareVideoEncodingPreSandboxHook( return false; } } +#endif #endif return true; } diff --git a/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc b/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc index faf82007d7ff..b658f56f95ab 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc @@ -1,11 +1,11 @@ ---- media/gpu/vaapi/vaapi_video_decoder.cc.orig 2024-03-22 14:16:19 UTC +--- media/gpu/vaapi/vaapi_video_decoder.cc.orig 2024-04-23 07:42:17 UTC +++ media/gpu/vaapi/vaapi_video_decoder.cc -@@ -779,7 +779,7 @@ void VaapiVideoDecoder::ApplyResolutionChangeWithScree +@@ -780,7 +780,7 @@ void VaapiVideoDecoder::ApplyResolutionChangeWithScree const gfx::Size decoder_natural_size = aspect_ratio_.GetNaturalSize(decoder_visible_rect); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::optional allocator = base::BindRepeating(&AllocateCustomFrameProxy, weak_this_); std::vector candidates = { diff --git a/www/ungoogled-chromium/files/patch-media_video_fake__gpu__memory__buffer.cc b/www/ungoogled-chromium/files/patch-media_video_fake__gpu__memory__buffer.cc index a4d54931c97b..4980629f6ac8 100644 --- a/www/ungoogled-chromium/files/patch-media_video_fake__gpu__memory__buffer.cc +++ b/www/ungoogled-chromium/files/patch-media_video_fake__gpu__memory__buffer.cc @@ -1,38 +1,38 @@ ---- media/video/fake_gpu_memory_buffer.cc.orig 2024-02-25 20:22:18 UTC +--- media/video/fake_gpu_memory_buffer.cc.orig 2024-04-23 07:42:17 UTC +++ media/video/fake_gpu_memory_buffer.cc @@ -9,7 +9,7 @@ #include "media/base/format_utils.h" #include "media/base/video_frame.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include #include -@@ -47,7 +47,7 @@ class FakeGpuMemoryBufferImpl : public gpu::GpuMemoryB +@@ -52,7 +52,7 @@ class FakeGpuMemoryBufferImpl : public gpu::GpuMemoryB } // namespace -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::ScopedFD GetDummyFD() { base::ScopedFD fd(open("/dev/zero", O_RDWR)); DCHECK(fd.is_valid()); -@@ -77,7 +77,7 @@ FakeGpuMemoryBuffer::FakeGpuMemoryBuffer(const gfx::Si +@@ -82,7 +82,7 @@ FakeGpuMemoryBuffer::FakeGpuMemoryBuffer(const gfx::Si static base::AtomicSequenceNumber buffer_id_generator; handle_.id = gfx::GpuMemoryBufferId(buffer_id_generator.GetNext()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) for (size_t i = 0; i < VideoFrame::NumPlanes(video_pixel_format_); i++) { const gfx::Size plane_size_in_bytes = VideoFrame::PlaneSize(video_pixel_format_, i, size_); -@@ -132,7 +132,7 @@ gfx::GpuMemoryBufferHandle FakeGpuMemoryBuffer::CloneH +@@ -144,7 +144,7 @@ gfx::GpuMemoryBufferHandle FakeGpuMemoryBuffer::CloneH gfx::GpuMemoryBufferHandle handle; handle.type = gfx::NATIVE_PIXMAP; handle.id = handle_.id; --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) handle.native_pixmap_handle = gfx::CloneHandleForIPC(handle_.native_pixmap_handle); #endif diff --git a/www/ungoogled-chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc b/www/ungoogled-chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc index e5a1c6ecb3e7..ee9275a0ac0e 100644 --- a/www/ungoogled-chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc +++ b/www/ungoogled-chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc @@ -1,29 +1,29 @@ ---- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2024-03-22 14:16:19 UTC +--- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2024-04-23 07:42:17 UTC +++ media/video/gpu_memory_buffer_video_frame_pool.cc @@ -803,7 +803,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa } bool is_software_backed_video_frame = !video_frame->HasTextures(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) is_software_backed_video_frame &= !video_frame->HasDmaBufs(); #endif @@ -1285,7 +1285,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) is_webgpu_compatible = (gpu_memory_buffer != nullptr); if (is_webgpu_compatible) { is_webgpu_compatible &= -@@ -1307,7 +1307,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo +@@ -1306,7 +1306,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo gpu::SHARED_IMAGE_USAGE_DISPLAY_READ | gpu::SHARED_IMAGE_USAGE_SCANOUT; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1241537): Always add the flag once the // OzoneImageBacking is by default turned on. if (base::CommandLine::ForCurrentProcess()->HasSwitch( diff --git a/www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter.cc b/www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter.cc index 5f50f42b72eb..8f55abd292e6 100644 --- a/www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter.cc +++ b/www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter.cc @@ -1,20 +1,20 @@ ---- media/video/video_encode_accelerator_adapter.cc.orig 2024-03-22 14:16:19 UTC +--- media/video/video_encode_accelerator_adapter.cc.orig 2024-04-23 07:42:17 UTC +++ media/video/video_encode_accelerator_adapter.cc -@@ -160,7 +160,7 @@ VideoEncodeAccelerator::Config SetUpVeaConfig( +@@ -157,7 +157,7 @@ VideoEncodeAccelerator::Config SetUpVeaConfig( if (is_rgb) config.input_format = PIXEL_FORMAT_I420; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (format != PIXEL_FORMAT_I420 || !VideoFrame::IsStorageTypeMappable(storage_type)) { // ChromeOS/Linux hardware video encoders supports I420 on-memory -@@ -485,7 +485,7 @@ void VideoEncodeAcceleratorAdapter::InitializeInternal +@@ -482,7 +482,7 @@ void VideoEncodeAcceleratorAdapter::InitializeInternal SetUpVeaConfig(profile_, options_, format, first_frame->storage_type(), supported_rc_modes_, required_encoder_type_); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Linux/ChromeOS require a special configuration to use dmabuf storage. // We need to keep sending frames the same way the first frame was sent. // Other platforms will happily mix GpuMemoryBuffer storage with regular diff --git a/www/ungoogled-chromium/files/patch-media_webrtc_helpers.cc b/www/ungoogled-chromium/files/patch-media_webrtc_helpers.cc index 13bdd28d7dd7..581d31d44a8d 100644 --- a/www/ungoogled-chromium/files/patch-media_webrtc_helpers.cc +++ b/www/ungoogled-chromium/files/patch-media_webrtc_helpers.cc @@ -1,28 +1,19 @@ ---- media/webrtc/helpers.cc.orig 2024-03-22 14:16:19 UTC +--- media/webrtc/helpers.cc.orig 2024-04-23 07:42:17 UTC +++ media/webrtc/helpers.cc @@ -41,14 +41,14 @@ void ConfigAutomaticGainControl(const AudioProcessingS return; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const bool kInputVolumeAdjustmentOverrideAllowed = true; #elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) const bool kInputVolumeAdjustmentOverrideAllowed = false; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Use AGC2 digital and input volume controller. // TODO(crbug.com/1375239): Remove `kWebRtcAllowInputVolumeAdjustment` safely. if (kInputVolumeAdjustmentOverrideAllowed && -@@ -161,7 +161,7 @@ rtc::scoped_refptr CreateWebR - #endif - #if !(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || \ -- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)) -+ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)) || BUILDFLAG(IS_BSD) - apm_config.transient_suppression.enabled = - settings.transient_noise_suppression; - #endif diff --git a/www/ungoogled-chromium/files/patch-media_webrtc_helpers__unittests.cc b/www/ungoogled-chromium/files/patch-media_webrtc_helpers__unittests.cc index eaa24aaf7d56..8c6458f3d80b 100644 --- a/www/ungoogled-chromium/files/patch-media_webrtc_helpers__unittests.cc +++ b/www/ungoogled-chromium/files/patch-media_webrtc_helpers__unittests.cc @@ -1,56 +1,38 @@ ---- media/webrtc/helpers_unittests.cc.orig 2024-03-22 14:16:19 UTC +--- media/webrtc/helpers_unittests.cc.orig 2024-04-23 07:42:17 UTC +++ media/webrtc/helpers_unittests.cc @@ -40,7 +40,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, CheckDefau EXPECT_TRUE(config.echo_canceller.enabled); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) EXPECT_FALSE(config.gain_controller1.enabled); EXPECT_TRUE(config.gain_controller2.enabled); #elif BUILDFLAG(IS_CASTOS) || BUILDFLAG(IS_CAST_ANDROID) -@@ -58,7 +58,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, CheckDefau - webrtc::AudioProcessing::Config::NoiseSuppression::kHigh); - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - EXPECT_FALSE(config.transient_suppression.enabled); - #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) - // Android and iOS use echo cancellation optimized for mobiles, and does not -@@ -79,7 +79,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, +@@ -73,7 +73,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) TEST(CreateWebRtcAudioProcessingModuleTest, InputVolumeAdjustmentEnabledWithAgc2) { ::base::test::ScopedFeatureList feature_list; -@@ -95,7 +95,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, +@@ -89,7 +89,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) TEST(CreateWebRtcAudioProcessingModuleTest, CanDisableInputVolumeAdjustmentWithAgc2) { ::base::test::ScopedFeatureList feature_list; -@@ -112,7 +112,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, +@@ -106,7 +106,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) TEST(CreateWebRtcAudioProcessingModuleTest, OnlyOneInputVolumeControllerEnabledOnDesktopPlatforms) { auto config = CreateApmGetConfig( -@@ -197,7 +197,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, ToggleTran - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || \ -- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) -+ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) - // Transient suppression is not supported (nor useful) on mobile platforms. - EXPECT_FALSE(config.transient_suppression.enabled); - #else diff --git a/www/ungoogled-chromium/files/patch-mojo_public_tools_bindings_mojom.gni b/www/ungoogled-chromium/files/patch-mojo_public_tools_bindings_mojom.gni index 8ee8e1732c16..58038ad0783d 100644 --- a/www/ungoogled-chromium/files/patch-mojo_public_tools_bindings_mojom.gni +++ b/www/ungoogled-chromium/files/patch-mojo_public_tools_bindings_mojom.gni @@ -1,19 +1,19 @@ ---- mojo/public/tools/bindings/mojom.gni.orig 2024-02-25 20:22:18 UTC +--- mojo/public/tools/bindings/mojom.gni.orig 2024-04-23 07:42:17 UTC +++ mojo/public/tools/bindings/mojom.gni @@ -748,6 +748,16 @@ template("mojom") { enabled_features += [ "is_apple" ] } + if (is_openbsd) { + enabled_features += [ "is_openbsd" ] + enabled_features += [ "is_bsd" ] + } + + if (is_freebsd) { + enabled_features += [ "is_freebsd" ] + enabled_features += [ "is_bsd" ] + } + action(parser_target_name) { allow_remote = true - custom_processor = "mojom_parser" + diff --git a/www/ungoogled-chromium/files/patch-net_BUILD.gn b/www/ungoogled-chromium/files/patch-net_BUILD.gn index c746f9315ae8..892683200692 100644 --- a/www/ungoogled-chromium/files/patch-net_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-net_BUILD.gn @@ -1,78 +1,78 @@ ---- net/BUILD.gn.orig 2024-03-22 14:16:19 UTC +--- net/BUILD.gn.orig 2024-04-23 07:42:17 UTC +++ net/BUILD.gn -@@ -122,7 +122,7 @@ net_configs = [ +@@ -123,7 +123,7 @@ net_configs = [ "//build/config/compiler:wexit_time_destructors", ] -if (is_linux || is_chromeos) { +if ((is_linux || is_chromeos) && !is_bsd) { net_configs += [ "//build/config/linux:libresolv" ] } -@@ -1176,6 +1176,19 @@ component("net") { +@@ -1190,6 +1190,19 @@ component("net") { ] } + if (is_bsd) { + sources -= [ + "base/address_map_cache_linux.cc", + "base/address_map_cache_linux.h", + "base/address_map_linux.cc", + "base/address_map_linux.h", + "base/address_tracker_linux.cc", + "base/address_tracker_linux.h", + "base/network_change_notifier_linux.cc", + "base/network_interfaces_linux.cc", + ] + } + if (is_mac) { sources += [ "base/network_notification_thread_mac.cc", -@@ -1332,7 +1345,7 @@ component("net") { +@@ -1346,7 +1359,7 @@ component("net") { } # Use getifaddrs() on POSIX platforms, except Linux. - if (is_posix && !is_linux && !is_chromeos) { + if ((is_posix && !is_linux && !is_chromeos) || is_bsd) { sources += [ "base/network_interfaces_getifaddrs.cc", "base/network_interfaces_getifaddrs.h", -@@ -2798,7 +2811,7 @@ test("net_unittests") { +@@ -2823,7 +2836,7 @@ test("net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "base/address_tracker_linux_unittest.cc", "base/network_interfaces_linux_unittest.cc", -@@ -2886,6 +2899,10 @@ test("net_unittests") { +@@ -2911,6 +2924,10 @@ test("net_unittests") { ] } + if (is_bsd) { + deps += [ "//sandbox/policy" ] + } + if (enable_websockets) { deps += [ "//net/server:tests" ] } -@@ -2946,7 +2963,7 @@ test("net_unittests") { +@@ -2971,7 +2988,7 @@ test("net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "tools/quic/quic_simple_server_test.cc" ] } -@@ -3078,7 +3095,7 @@ test("net_unittests") { +@@ -3107,7 +3124,7 @@ test("net_unittests") { } # Use getifaddrs() on POSIX platforms, except Linux. - if (is_posix && !is_linux && !is_chromeos) { + if (is_posix && !is_linux && !is_chromeos && !is_bsd) { sources += [ "base/network_interfaces_getifaddrs_unittest.cc" ] } diff --git a/www/ungoogled-chromium/files/patch-net_base_features.cc b/www/ungoogled-chromium/files/patch-net_base_features.cc index 1f773e705933..7ce3c59f32fd 100644 --- a/www/ungoogled-chromium/files/patch-net_base_features.cc +++ b/www/ungoogled-chromium/files/patch-net_base_features.cc @@ -1,24 +1,24 @@ ---- net/base/features.cc.orig 2024-03-22 14:16:19 UTC +--- net/base/features.cc.orig 2024-04-23 07:42:17 UTC +++ net/base/features.cc @@ -28,7 +28,7 @@ BASE_FEATURE(kCapReferrerToOriginOnCrossOrigin, BASE_FEATURE(kAsyncDns, "AsyncDns", #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -512,7 +512,12 @@ BASE_FEATURE(kSpdyHeadersToHttpResponseUseBuilder, +@@ -506,7 +506,12 @@ BASE_FEATURE(kSpdyHeadersToHttpResponseUseBuilder, "SpdyHeadersToHttpResponseUseBuilder", base::FEATURE_DISABLED_BY_DEFAULT); +#if BUILDFLAG(IS_OPENBSD) +// No IP_RECVTOS support BASE_FEATURE(kReceiveEcn, "ReceiveEcn", base::FEATURE_DISABLED_BY_DEFAULT); +#else +BASE_FEATURE(kReceiveEcn, "ReceiveEcn", base::FEATURE_DISABLED_BY_DEFAULT); +#endif // TODO(crbug.com/634470): Remove this feature flag in January 2024 if the new // limit sticks. diff --git a/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc.h b/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc.h index d71e5491164b..480089322f3b 100644 --- a/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc.h +++ b/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc.h @@ -1,11 +1,11 @@ ---- net/cert/cert_verify_proc.h.orig 2024-02-25 20:22:18 UTC +--- net/cert/cert_verify_proc.h.orig 2024-04-23 07:42:17 UTC +++ net/cert/cert_verify_proc.h -@@ -145,7 +145,7 @@ class NET_EXPORT CertVerifyProc +@@ -174,7 +174,7 @@ class NET_EXPORT CertVerifyProc kMaxValue = kChainLengthOne }; -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY)) // Creates and returns a CertVerifyProc that uses the system verifier. // |cert_net_fetcher| may not be used, depending on the implementation. diff --git a/www/ungoogled-chromium/files/patch-net_dns_BUILD.gn b/www/ungoogled-chromium/files/patch-net_dns_BUILD.gn index 16681ef9a14b..00a74cb5750b 100644 --- a/www/ungoogled-chromium/files/patch-net_dns_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-net_dns_BUILD.gn @@ -1,31 +1,31 @@ ---- net/dns/BUILD.gn.orig 2024-02-25 20:22:18 UTC +--- net/dns/BUILD.gn.orig 2024-04-23 07:42:17 UTC +++ net/dns/BUILD.gn -@@ -134,7 +134,7 @@ source_set("dns") { +@@ -136,7 +136,7 @@ source_set("dns") { "dns_config_service_android.cc", "dns_config_service_android.h", ] - } else if (is_linux) { + } else if (is_linux && !is_bsd) { sources += [ "dns_config_service_linux.cc", "dns_config_service_linux.h", -@@ -175,6 +175,7 @@ source_set("dns") { +@@ -177,6 +177,7 @@ source_set("dns") { ":host_resolver_manager", ":mdns_client", "//net:net_public_deps", + "//printing/buildflags", ] allow_circular_includes_from = [ -@@ -440,9 +441,9 @@ source_set("tests") { +@@ -444,9 +445,9 @@ source_set("tests") { if (is_android) { sources += [ "dns_config_service_android_unittest.cc" ] - } else if (is_linux) { + } else if (is_linux && !is_bsd) { sources += [ "dns_config_service_linux_unittest.cc" ] - } else if (is_posix) { + } else if (is_posix && !is_bsd) { sources += [ "dns_config_service_posix_unittest.cc" ] } diff --git a/www/ungoogled-chromium/files/patch-net_dns_address__sorter__posix.cc b/www/ungoogled-chromium/files/patch-net_dns_address__sorter__posix.cc index 11d0b1ad62c4..c0e9a1fc8314 100644 --- a/www/ungoogled-chromium/files/patch-net_dns_address__sorter__posix.cc +++ b/www/ungoogled-chromium/files/patch-net_dns_address__sorter__posix.cc @@ -1,10 +1,10 @@ ---- net/dns/address_sorter_posix.cc.orig 2023-05-05 12:12:41 UTC +--- net/dns/address_sorter_posix.cc.orig 2024-04-23 07:42:17 UTC +++ net/dns/address_sorter_posix.cc @@ -27,6 +27,7 @@ #include "net/dns/netinet_in_var_ios.h" #else #include +#include #endif // BUILDFLAG(IS_IOS) #endif - + #include diff --git a/www/ungoogled-chromium/files/patch-net_socket_udp__socket__unittest.cc b/www/ungoogled-chromium/files/patch-net_socket_udp__socket__unittest.cc index bae5247ea4f7..45662e4a67c8 100644 --- a/www/ungoogled-chromium/files/patch-net_socket_udp__socket__unittest.cc +++ b/www/ungoogled-chromium/files/patch-net_socket_udp__socket__unittest.cc @@ -1,47 +1,47 @@ ---- net/socket/udp_socket_unittest.cc.orig 2024-03-22 14:16:19 UTC +--- net/socket/udp_socket_unittest.cc.orig 2024-04-23 07:42:17 UTC +++ net/socket/udp_socket_unittest.cc -@@ -352,7 +352,7 @@ TEST_F(UDPSocketTest, PartialRecv) { +@@ -358,7 +358,7 @@ TEST_F(UDPSocketTest, PartialRecv) { EXPECT_EQ(second_packet, received); } -#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // - MacOS: requires root permissions on OSX 10.7+. // - Android: devices attached to testbots don't have default network, so // broadcasting to 255.255.255.255 returns error -109 (Address not reachable). -@@ -663,7 +663,7 @@ TEST_F(UDPSocketTest, ClientSetDoNotFragment) { +@@ -669,7 +669,7 @@ TEST_F(UDPSocketTest, ClientSetDoNotFragment) { EXPECT_THAT(rv, IsOk()); rv = client.SetDoNotFragment(); -#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // TODO(crbug.com/945590): IP_MTU_DISCOVER is not implemented on Fuchsia. EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED)); #elif BUILDFLAG(IS_MAC) -@@ -691,7 +691,7 @@ TEST_F(UDPSocketTest, ServerSetDoNotFragment) { +@@ -697,7 +697,7 @@ TEST_F(UDPSocketTest, ServerSetDoNotFragment) { EXPECT_THAT(rv, IsOk()); rv = server.SetDoNotFragment(); -#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // TODO(crbug.com/945590): IP_MTU_DISCOVER is not implemented on Fuchsia. EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED)); #elif BUILDFLAG(IS_MAC) -@@ -756,7 +756,7 @@ TEST_F(UDPSocketTest, JoinMulticastGroup) { +@@ -762,7 +762,7 @@ TEST_F(UDPSocketTest, JoinMulticastGroup) { // TODO(https://crbug.com/947115): failing on device on iOS 12.2. // TODO(https://crbug.com/1227554): flaky on Mac 11. -#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #define MAYBE_SharedMulticastAddress DISABLED_SharedMulticastAddress #else #define MAYBE_SharedMulticastAddress SharedMulticastAddress -@@ -810,7 +810,7 @@ TEST_F(UDPSocketTest, MAYBE_SharedMulticastAddress) { +@@ -816,7 +816,7 @@ TEST_F(UDPSocketTest, MAYBE_SharedMulticastAddress) { NetLogSource()); ASSERT_THAT(client_socket.Connect(send_address), IsOk()); -#if !BUILDFLAG(IS_CHROMEOS_ASH) +#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_BSD) // Send a message via the multicast group. That message is expected be be // received by both receving sockets. // diff --git a/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc b/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc index b9f9ea8c88fe..9820a89f1f57 100644 --- a/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc +++ b/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc @@ -1,29 +1,29 @@ ---- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2024-02-25 20:22:18 UTC +--- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2024-04-23 07:42:17 UTC +++ net/tools/cert_verify_tool/cert_verify_tool.cc @@ -33,7 +33,7 @@ #include "third_party/boringssl/src/pki/trust_store.h" #include "third_party/boringssl/src/pki/trust_store_collection.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "net/proxy_resolution/proxy_config.h" #include "net/proxy_resolution/proxy_config_service_fixed.h" #endif @@ -65,7 +65,7 @@ void SetUpOnNetworkThread( base::WaitableEvent* initialization_complete_event) { net::URLRequestContextBuilder url_request_context_builder; url_request_context_builder.set_user_agent(GetUserAgent()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux, use a fixed ProxyConfigService, since the default one // depends on glib. // -@@ -566,7 +566,7 @@ int main(int argc, char** argv) { +@@ -571,7 +571,7 @@ int main(int argc, char** argv) { std::string impls_str = command_line.GetSwitchValueASCII("impls"); if (impls_str.empty()) { // Default value. -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY)) impls_str = "platform,"; #endif diff --git a/www/ungoogled-chromium/files/patch-printing_print__settings__conversion.cc b/www/ungoogled-chromium/files/patch-printing_print__settings__conversion.cc index b3e1b9428f0b..763cb34ac7a3 100644 --- a/www/ungoogled-chromium/files/patch-printing_print__settings__conversion.cc +++ b/www/ungoogled-chromium/files/patch-printing_print__settings__conversion.cc @@ -1,11 +1,11 @@ ---- printing/print_settings_conversion.cc.orig 2023-10-13 13:20:35 UTC +--- printing/print_settings_conversion.cc.orig 2024-04-23 07:42:17 UTC +++ printing/print_settings_conversion.cc -@@ -287,7 +287,7 @@ std::unique_ptr PrintSettingsFromJobSet +@@ -285,7 +285,7 @@ std::unique_ptr PrintSettingsFromJobSet settings->set_is_modifiable(is_modifiable.value()); } -#if BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS)) +#if BUILDFLAG(IS_CHROMEOS) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_CUPS)) const base::Value::Dict* advanced_settings = job_settings.FindDict(kSettingAdvancedSettings); if (advanced_settings) { diff --git a/www/ungoogled-chromium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.cc b/www/ungoogled-chromium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.cc index 9b907cd7a180..69d260393728 100644 --- a/www/ungoogled-chromium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.cc +++ b/www/ungoogled-chromium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.cc @@ -1,50 +1,50 @@ ---- printing/sandbox/print_backend_sandbox_hook_linux.cc.orig 2023-05-05 12:12:41 UTC +--- printing/sandbox/print_backend_sandbox_hook_linux.cc.orig 2024-04-23 07:42:17 UTC +++ printing/sandbox/print_backend_sandbox_hook_linux.cc @@ -10,20 +10,27 @@ #include "base/path_service.h" #include "build/build_config.h" #include "printing/buildflags/buildflags.h" +#if !BUILDFLAG(IS_BSD) #include "sandbox/linux/syscall_broker/broker_command.h" #include "sandbox/linux/syscall_broker/broker_file_permission.h" #include "sandbox/policy/export.h" #include "sandbox/policy/linux/sandbox_linux.h" +#else +#include "sandbox/policy/sandbox.h" +#endif #if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_CUPS) #include "printing/backend/cups_connection_pool.h" #endif +#if !BUILDFLAG(IS_BSD) using sandbox::syscall_broker::BrokerFilePermission; using sandbox::syscall_broker::MakeBrokerCommandSet; +#endif namespace printing { +#if !BUILDFLAG(IS_BSD) namespace { sandbox::syscall_broker::BrokerCommandSet GetPrintBackendBrokerCommandSet() { @@ -76,9 +83,11 @@ std::vector GetPrintBackendFileP } } // namespace +#endif bool PrintBackendPreSandboxHook( sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) #if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_CUPS) // Create the socket connections to the CUPS server before engaging the // sandbox, since new connections cannot be made after that. -@@ -92,6 +101,7 @@ bool PrintBackendPreSandboxHook( - sandbox::policy::SandboxLinux::PreSandboxHook(), options); +@@ -91,6 +100,7 @@ bool PrintBackendPreSandboxHook( + GetPrintBackendFilePermissions(), options); instance->EngageNamespaceSandboxIfPossible(); +#endif return true; } diff --git a/www/ungoogled-chromium/files/patch-remoting_host_basic__desktop__environment.cc b/www/ungoogled-chromium/files/patch-remoting_host_basic__desktop__environment.cc index 93b54fba7baa..be73bc083269 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_basic__desktop__environment.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_basic__desktop__environment.cc @@ -1,11 +1,11 @@ ---- remoting/host/basic_desktop_environment.cc.orig 2023-08-18 10:26:52 UTC +--- remoting/host/basic_desktop_environment.cc.orig 2024-04-23 07:42:17 UTC +++ remoting/host/basic_desktop_environment.cc -@@ -195,7 +195,7 @@ BasicDesktopEnvironment::CreateVideoCapturer() { +@@ -195,7 +195,7 @@ std::unique_ptr BasicDesktopEnvironme scoped_refptr capture_task_runner; #if BUILDFLAG(IS_CHROMEOS_ASH) capture_task_runner = ui_task_runner_; -#elif BUILDFLAG(IS_LINUX) && defined(REMOTING_USE_WAYLAND) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_WAYLAND) // Each capturer instance should get its own thread so the capturers don't // compete with each other in multistream mode. capture_task_runner = base::ThreadPool::CreateSingleThreadTaskRunner( diff --git a/www/ungoogled-chromium/files/patch-remoting_host_client__session.cc b/www/ungoogled-chromium/files/patch-remoting_host_client__session.cc index 40bfe138e1d9..30e41e1b0d69 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_client__session.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_client__session.cc @@ -1,11 +1,11 @@ ---- remoting/host/client_session.cc.orig 2024-02-25 20:22:18 UTC +--- remoting/host/client_session.cc.orig 2024-04-23 07:42:17 UTC +++ remoting/host/client_session.cc -@@ -160,7 +160,7 @@ void ClientSession::NotifyClientResolution( +@@ -161,7 +161,7 @@ void ClientSession::NotifyClientResolution( if (desktop_environment_options_.enable_curtaining()) { dpi_vector.set(resolution.x_dpi(), resolution.y_dpi()); } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) dpi_vector.set(resolution.x_dpi(), resolution.y_dpi()); #endif diff --git a/www/ungoogled-chromium/files/patch-remoting_host_desktop__capturer__proxy.cc b/www/ungoogled-chromium/files/patch-remoting_host_desktop__capturer__proxy.cc index 981d12e2bf9e..4d0af9ce43da 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_desktop__capturer__proxy.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_desktop__capturer__proxy.cc @@ -1,29 +1,29 @@ ---- remoting/host/desktop_capturer_proxy.cc.orig 2023-08-18 10:26:52 UTC +--- remoting/host/desktop_capturer_proxy.cc.orig 2024-04-23 07:42:17 UTC +++ remoting/host/desktop_capturer_proxy.cc @@ -26,7 +26,7 @@ #include "remoting/host/chromeos/frame_sink_desktop_capturer.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/environment.h" #include "base/nix/xdg_util.h" #include "remoting/host/linux/wayland_desktop_capturer.h" -@@ -89,7 +89,7 @@ void DesktopCapturerProxy::Core::CreateCapturer( +@@ -91,7 +91,7 @@ void DesktopCapturerProxy::Core::CreateCapturer( #if BUILDFLAG(IS_CHROMEOS_ASH) capturer_ = std::make_unique(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) static base::nix::SessionType session_type = base::nix::SessionType::kUnset; if (session_type == base::nix::SessionType::kUnset) { std::unique_ptr env = base::Environment::Create(); -@@ -293,7 +293,7 @@ void DesktopCapturerProxy::OnMetadata(webrtc::DesktopC +@@ -298,7 +298,7 @@ void DesktopCapturerProxy::OnMetadata(webrtc::DesktopC bool DesktopCapturerProxy::SupportsFrameCallbacks() { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return IsRunningWayland(); #else return false; diff --git a/www/ungoogled-chromium/files/patch-remoting_host_desktop__capturer__wrapper.cc b/www/ungoogled-chromium/files/patch-remoting_host_desktop__capturer__wrapper.cc index 9715247c22b3..ee9fc9523952 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_desktop__capturer__wrapper.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_desktop__capturer__wrapper.cc @@ -1,29 +1,29 @@ ---- remoting/host/desktop_capturer_wrapper.cc.orig 2023-06-05 19:39:05 UTC +--- remoting/host/desktop_capturer_wrapper.cc.orig 2024-04-23 07:42:17 UTC +++ remoting/host/desktop_capturer_wrapper.cc @@ -13,7 +13,7 @@ #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/linux/wayland_desktop_capturer.h" #include "remoting/host/linux/wayland_utils.h" #endif -@@ -32,7 +32,7 @@ void DesktopCapturerWrapper::CreateCapturer( - const webrtc::DesktopCaptureOptions& options) { +@@ -33,7 +33,7 @@ void DesktopCapturerWrapper::CreateCapturer( + SourceId id) { DCHECK(!capturer_); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsRunningWayland()) { capturer_ = std::make_unique(options); } else { -@@ -109,7 +109,7 @@ void DesktopCapturerWrapper::OnCaptureResult( +@@ -112,7 +112,7 @@ void DesktopCapturerWrapper::OnCaptureResult( bool DesktopCapturerWrapper::SupportsFrameCallbacks() { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return capturer_ && IsRunningWayland(); #else return false; diff --git a/www/ungoogled-chromium/files/patch-remoting_host_remoting__me2me__host.cc b/www/ungoogled-chromium/files/patch-remoting_host_remoting__me2me__host.cc index 76c2c8264ec9..aa80cd99e7f2 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_remoting__me2me__host.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_remoting__me2me__host.cc @@ -1,169 +1,169 @@ ---- remoting/host/remoting_me2me_host.cc.orig 2024-03-22 14:16:19 UTC +--- remoting/host/remoting_me2me_host.cc.orig 2024-04-23 07:42:17 UTC +++ remoting/host/remoting_me2me_host.cc -@@ -131,7 +131,7 @@ +@@ -132,7 +132,7 @@ #include "remoting/host/mac/permission_utils.h" #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if defined(REMOTING_USE_X11) #include #endif // defined(REMOTING_USE_X11) -@@ -142,13 +142,13 @@ +@@ -143,13 +143,13 @@ #endif // defined(REMOTING_USE_X11) #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/linux_util.h" #include "remoting/host/audio_capturer_linux.h" #include "remoting/host/linux/certificate_watcher.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/host_utmp_logger.h" #endif -@@ -161,7 +161,7 @@ +@@ -162,7 +162,7 @@ #include "remoting/host/win/session_desktop_environment.h" #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/linux/wayland_manager.h" #include "remoting/host/linux/wayland_utils.h" #endif // BUILDFLAG(IS_LINUX) -@@ -191,7 +191,7 @@ const char kApplicationName[] = "chromoting"; +@@ -192,7 +192,7 @@ const char kApplicationName[] = "chromoting"; const char kStdinConfigPath[] = "-"; #endif // !defined(REMOTING_MULTI_PROCESS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The command line switch used to pass name of the pipe to capture audio on // linux. const char kAudioPipeSwitchName[] = "audio-pipe-name"; -@@ -400,7 +400,7 @@ class HostProcess : public ConfigWatcher::Delegate, +@@ -401,7 +401,7 @@ class HostProcess : public ConfigWatcher::Delegate, std::unique_ptr context_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Watch for certificate changes and kill the host when changes occur std::unique_ptr cert_watcher_; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -470,7 +470,7 @@ class HostProcess : public ConfigWatcher::Delegate, +@@ -471,7 +471,7 @@ class HostProcess : public ConfigWatcher::Delegate, std::unique_ptr host_status_logger_; std::unique_ptr host_event_logger_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr host_utmp_logger_; #endif std::unique_ptr power_save_blocker_; -@@ -779,7 +779,7 @@ void HostProcess::StartOnNetworkThread() { +@@ -783,7 +783,7 @@ void HostProcess::StartOnNetworkThread() { void HostProcess::ShutdownOnNetworkThread() { DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); config_watcher_.reset(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) cert_watcher_.reset(); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) } -@@ -845,7 +845,7 @@ void HostProcess::CreateAuthenticatorFactory() { +@@ -849,7 +849,7 @@ void HostProcess::CreateAuthenticatorFactory() { DCHECK(third_party_auth_config_.token_url.is_valid()); DCHECK(third_party_auth_config_.token_validation_url.is_valid()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!cert_watcher_) { cert_watcher_ = std::make_unique( base::BindRepeating(&HostProcess::ShutdownHost, -@@ -970,13 +970,13 @@ void HostProcess::StartOnUiThread() { +@@ -974,13 +974,13 @@ void HostProcess::StartOnUiThread() { base::BindRepeating(&HostProcess::OnPolicyUpdate, base::Unretained(this)), base::BindRepeating(&HostProcess::OnPolicyError, base::Unretained(this))); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsRunningWayland()) { WaylandManager::Get()->Init(context_->ui_task_runner()); } #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If an audio pipe is specific on the command-line then initialize // AudioCapturerLinux to capture from it. base::FilePath audio_pipe_name = -@@ -1048,7 +1048,7 @@ void HostProcess::ShutdownOnUiThread() { +@@ -1052,7 +1052,7 @@ void HostProcess::ShutdownOnUiThread() { // It is now safe for the HostProcess to be deleted. self_ = nullptr; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Cause the global AudioPipeReader to be freed, otherwise the audio // thread will remain in-use and prevent the process from exiting. // TODO(wez): DesktopEnvironmentFactory should own the pipe reader. -@@ -1056,7 +1056,7 @@ void HostProcess::ShutdownOnUiThread() { +@@ -1060,7 +1060,7 @@ void HostProcess::ShutdownOnUiThread() { AudioCapturerLinux::InitializePipeReader(nullptr, base::FilePath()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) context_->input_task_runner()->PostTask( FROM_HERE, base::BindOnce([]() { delete ui::X11EventSource::GetInstance(); })); -@@ -1414,7 +1414,7 @@ bool HostProcess::OnUsernamePolicyUpdate(const base::V +@@ -1418,7 +1418,7 @@ bool HostProcess::OnUsernamePolicyUpdate(const base::V // Returns false: never restart the host after this policy update. DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) std::optional host_username_match_required = policies.FindBool(policy::key::kRemoteAccessHostMatchUsername); if (!host_username_match_required.has_value()) { -@@ -1874,7 +1874,7 @@ void HostProcess::StartHost() { - enable_user_interface_); +@@ -1882,7 +1882,7 @@ void HostProcess::StartHost() { + corp_host_status_logger_->StartObserving(*session_manager); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) desktop_environment_options_.set_enable_remote_webauthn(is_googler_); #endif -@@ -1907,7 +1907,7 @@ void HostProcess::StartHost() { +@@ -1915,7 +1915,7 @@ void HostProcess::StartHost() { host_status_logger_ = std::make_unique( host_->status_monitor(), log_to_server_.get()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); if (cmd_line->HasSwitch(kEnableUtempter)) { host_utmp_logger_ = -@@ -1939,7 +1939,7 @@ void HostProcess::StartHost() { +@@ -1947,7 +1947,7 @@ void HostProcess::StartHost() { host_->Start(host_owner_); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // For Windows, ChromotingHostServices connections are handled by the daemon // process, then the message pipe is forwarded to the network process. host_->StartChromotingHostServices(); -@@ -2072,7 +2072,7 @@ int HostProcessMain() { +@@ -2081,7 +2081,7 @@ int HostProcessMain() { HOST_LOG << "Starting host process: version " << STRINGIZE(VERSION); const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if defined(REMOTING_USE_X11) // Initialize Xlib for multi-threaded use, allowing non-Chromium code to // use X11 safely (such as the WebRTC capturer, GTK ...) -@@ -2121,7 +2121,7 @@ int HostProcessMain() { +@@ -2130,7 +2130,7 @@ int HostProcessMain() { std::unique_ptr network_change_notifier( net::NetworkChangeNotifier::CreateIfNeeded()); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) // Create an X11EventSource on all UI threads, so the global X11 connection // (x11::Connection::Get()) can dispatch X events. auto event_source = diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_features.cc b/www/ungoogled-chromium/files/patch-sandbox_policy_features.cc index bc31a310627c..bb2ed2a0512f 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_features.cc +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_features.cc @@ -1,23 +1,23 @@ ---- sandbox/policy/features.cc.orig 2024-03-22 14:16:19 UTC +--- sandbox/policy/features.cc.orig 2024-04-23 07:42:17 UTC +++ sandbox/policy/features.cc @@ -20,7 +20,11 @@ namespace sandbox::policy::features { // (Only causes an effect when feature kNetworkServiceInProcess is disabled.) BASE_FEATURE(kNetworkServiceSandbox, "NetworkServiceSandbox", +#if BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT); +#else base::FEATURE_DISABLED_BY_DEFAULT); +#endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) // Enables a fine-grained seccomp-BPF syscall filter for the network service. -@@ -117,7 +121,7 @@ BASE_FEATURE(kForceSpectreVariant2Mitigation, +@@ -126,7 +130,7 @@ BASE_FEATURE(kForceSpectreVariant2Mitigation, base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Enabling the kNetworkServiceSandbox feature automatically enables Spectre // variant 2 mitigations in the network service. This can lead to performance // regressions, so enabling this feature will turn off the Spectre Variant 2 diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_features.h b/www/ungoogled-chromium/files/patch-sandbox_policy_features.h index 7b6a2a1905be..d97d25d83241 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_features.h +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_features.h @@ -1,11 +1,11 @@ ---- sandbox/policy/features.h.orig 2024-03-22 14:16:19 UTC +--- sandbox/policy/features.h.orig 2024-04-23 07:42:17 UTC +++ sandbox/policy/features.h -@@ -42,7 +42,7 @@ SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE(kSpectreVar +@@ -43,7 +43,7 @@ SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE(kSpectreVar SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE(kForceSpectreVariant2Mitigation); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE( kForceDisableSpectreVariant2MitigationInNetworkService); diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_sandbox.cc b/www/ungoogled-chromium/files/patch-sandbox_policy_sandbox.cc index e51cebd140d8..2d87f14514f4 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_sandbox.cc +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_sandbox.cc @@ -1,22 +1,22 @@ ---- sandbox/policy/sandbox.cc.orig 2024-02-25 20:22:18 UTC +--- sandbox/policy/sandbox.cc.orig 2024-04-23 07:42:17 UTC +++ sandbox/policy/sandbox.cc @@ -18,6 +18,10 @@ #include "sandbox/policy/linux/sandbox_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif // BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_MAC) #include "sandbox/mac/seatbelt.h" #endif // BUILDFLAG(IS_MAC) -@@ -33,7 +37,7 @@ +@@ -32,7 +36,7 @@ namespace sandbox { namespace policy { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool Sandbox::Initialize(sandbox::mojom::Sandbox sandbox_type, SandboxLinux::PreSandboxHook hook, const SandboxLinux::Options& options) { diff --git a/www/ungoogled-chromium/files/patch-services_audio_audio__sandbox__hook__linux.cc b/www/ungoogled-chromium/files/patch-services_audio_audio__sandbox__hook__linux.cc index 6fc93cf06fde..4f3a05900584 100644 --- a/www/ungoogled-chromium/files/patch-services_audio_audio__sandbox__hook__linux.cc +++ b/www/ungoogled-chromium/files/patch-services_audio_audio__sandbox__hook__linux.cc @@ -1,31 +1,31 @@ ---- services/audio/audio_sandbox_hook_linux.cc.orig 2024-02-03 15:42:55 UTC +--- services/audio/audio_sandbox_hook_linux.cc.orig 2024-04-23 07:42:17 UTC +++ services/audio/audio_sandbox_hook_linux.cc @@ -144,6 +144,7 @@ void AddPulseAudioFilePermissions( } #endif +#if !BUILDFLAG(IS_BSD) std::vector GetAudioFilePermissions() { std::vector permissions{ BrokerFilePermission::ReadOnly("/dev/urandom"), @@ -172,10 +173,12 @@ void LoadAudioLibraries() { } } } +#endif } // namespace bool AudioPreSandboxHook(sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) LoadAudioLibraries(); auto* instance = sandbox::policy::SandboxLinux::GetInstance(); instance->StartBrokerProcess(MakeBrokerCommandSet({ -@@ -195,6 +198,7 @@ bool AudioPreSandboxHook(sandbox::policy::SandboxLinux +@@ -193,6 +196,7 @@ bool AudioPreSandboxHook(sandbox::policy::SandboxLinux // TODO(https://crbug.com/850878) enable namespace sandbox. Currently, if // enabled, connect() on pulse native socket fails with ENOENT (called from // pa_context_connect). +#endif return true; } diff --git a/www/ungoogled-chromium/files/patch-services_device_geolocation_location__arbitrator.cc b/www/ungoogled-chromium/files/patch-services_device_geolocation_location__arbitrator.cc index 8d01281b633f..06be31076c96 100644 --- a/www/ungoogled-chromium/files/patch-services_device_geolocation_location__arbitrator.cc +++ b/www/ungoogled-chromium/files/patch-services_device_geolocation_location__arbitrator.cc @@ -1,11 +1,11 @@ ---- services/device/geolocation/location_arbitrator.cc.orig 2024-02-03 15:42:55 UTC +--- services/device/geolocation/location_arbitrator.cc.orig 2024-04-23 07:42:17 UTC +++ services/device/geolocation/location_arbitrator.cc -@@ -194,7 +194,7 @@ LocationArbitrator::NewNetworkLocationProvider( +@@ -196,7 +196,7 @@ LocationArbitrator::NewNetworkLocationProvider( std::unique_ptr LocationArbitrator::NewSystemLocationProvider() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) return nullptr; #else - return device::NewSystemLocationProvider(main_task_runner_, + return device::NewSystemLocationProvider( diff --git a/www/ungoogled-chromium/files/patch-services_network_BUILD.gn b/www/ungoogled-chromium/files/patch-services_network_BUILD.gn index fac86c59112b..be3a215e3c75 100644 --- a/www/ungoogled-chromium/files/patch-services_network_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-services_network_BUILD.gn @@ -1,10 +1,10 @@ ---- services/network/BUILD.gn.orig 2024-03-22 14:16:19 UTC +--- services/network/BUILD.gn.orig 2024-04-23 07:42:17 UTC +++ services/network/BUILD.gn -@@ -402,7 +402,6 @@ if (is_linux || is_chromeos) { +@@ -410,7 +410,6 @@ if (is_linux || is_chromeos) { ] deps = [ "//base:base", - "//sandbox/linux:sandbox_services", "//sandbox/policy:policy", ] configs += [ "//build/config/compiler:wexit_time_destructors" ] diff --git a/www/ungoogled-chromium/files/patch-services_network_network__context.cc b/www/ungoogled-chromium/files/patch-services_network_network__context.cc index faae92f2aedc..1d1612b5f961 100644 --- a/www/ungoogled-chromium/files/patch-services_network_network__context.cc +++ b/www/ungoogled-chromium/files/patch-services_network_network__context.cc @@ -1,20 +1,20 @@ ---- services/network/network_context.cc.orig 2024-03-22 14:16:19 UTC +--- services/network/network_context.cc.orig 2024-04-23 07:42:17 UTC +++ services/network/network_context.cc -@@ -522,7 +522,7 @@ NetworkContext::NetworkContextHttpAuthPreferences:: +@@ -523,7 +523,7 @@ NetworkContext::NetworkContextHttpAuthPreferences:: NetworkContext::NetworkContextHttpAuthPreferences:: ~NetworkContextHttpAuthPreferences() = default; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool NetworkContext::NetworkContextHttpAuthPreferences::AllowGssapiLibraryLoad() const { if (network_service_) { -@@ -2276,7 +2276,7 @@ void NetworkContext::OnHttpAuthDynamicParamsChanged( +@@ -2277,7 +2277,7 @@ void NetworkContext::OnHttpAuthDynamicParamsChanged( http_auth_dynamic_network_service_params->android_negotiate_account_type); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) http_auth_merged_preferences_.set_allow_gssapi_library_load( http_auth_dynamic_network_service_params->allow_gssapi_library_load); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-services_network_network__context.h b/www/ungoogled-chromium/files/patch-services_network_network__context.h index 9ddde86842d3..ecf1092338d9 100644 --- a/www/ungoogled-chromium/files/patch-services_network_network__context.h +++ b/www/ungoogled-chromium/files/patch-services_network_network__context.h @@ -1,11 +1,11 @@ ---- services/network/network_context.h.orig 2024-02-25 20:22:18 UTC +--- services/network/network_context.h.orig 2024-04-23 07:42:17 UTC +++ services/network/network_context.h -@@ -663,7 +663,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -670,7 +670,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext public: explicit NetworkContextHttpAuthPreferences(NetworkService* network_service); ~NetworkContextHttpAuthPreferences() override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool AllowGssapiLibraryLoad() const override; #endif // BUILDFLAG(IS_LINUX) private: diff --git a/www/ungoogled-chromium/files/patch-services_network_network__sandbox__hook__linux.cc b/www/ungoogled-chromium/files/patch-services_network_network__sandbox__hook__linux.cc index fb95e950c84a..aee6280b5d27 100644 --- a/www/ungoogled-chromium/files/patch-services_network_network__sandbox__hook__linux.cc +++ b/www/ungoogled-chromium/files/patch-services_network_network__sandbox__hook__linux.cc @@ -1,37 +1,37 @@ ---- services/network/network_sandbox_hook_linux.cc.orig 2024-03-22 14:16:19 UTC +--- services/network/network_sandbox_hook_linux.cc.orig 2024-04-23 07:42:17 UTC +++ services/network/network_sandbox_hook_linux.cc @@ -15,11 +15,14 @@ #include "sandbox/linux/syscall_broker/broker_file_permission.h" #include "sandbox/policy/features.h" +#if !BUILDFLAG(IS_BSD) using sandbox::syscall_broker::BrokerFilePermission; using sandbox::syscall_broker::MakeBrokerCommandSet; +#endif namespace network { +#if !BUILDFLAG(IS_BSD) sandbox::syscall_broker::BrokerCommandSet GetNetworkBrokerCommandSet() { return MakeBrokerCommandSet({ sandbox::syscall_broker::COMMAND_ACCESS, @@ -103,9 +106,11 @@ void LoadNetworkLibraries() { } } #endif // BUILDFLAG(IS_CHROMEOS) +#endif bool NetworkPreSandboxHook(std::vector network_context_parent_dirs, sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) #if BUILDFLAG(IS_CHROMEOS) LoadNetworkLibraries(); #endif @@ -118,6 +123,7 @@ bool NetworkPreSandboxHook(std::vector ne GetNetworkBrokerCommandSet(), GetNetworkFilePermissions(std::move(network_context_parent_dirs)), - sandbox::policy::SandboxLinux::PreSandboxHook(), options); + options); +#endif return true; } diff --git a/www/ungoogled-chromium/files/patch-services_network_network__service.cc b/www/ungoogled-chromium/files/patch-services_network_network__service.cc index f0bcece71f56..eb4b4d7d717c 100644 --- a/www/ungoogled-chromium/files/patch-services_network_network__service.cc +++ b/www/ungoogled-chromium/files/patch-services_network_network__service.cc @@ -1,29 +1,29 @@ ---- services/network/network_service.cc.orig 2024-03-22 14:16:19 UTC +--- services/network/network_service.cc.orig 2024-04-23 07:42:17 UTC +++ services/network/network_service.cc @@ -97,7 +97,7 @@ #include "third_party/boringssl/src/include/openssl/cpu.h" #endif -#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || \ +#if ((BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD)) || \ BUILDFLAG(IS_CHROMEOS_LACROS) #include "components/os_crypt/sync/key_storage_config_linux.h" -@@ -979,7 +979,7 @@ void NetworkService::SetExplicitlyAllowedPorts( +@@ -978,7 +978,7 @@ void NetworkService::SetExplicitlyAllowedPorts( net::SetExplicitlyAllowedPorts(ports); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void NetworkService::SetGssapiLibraryLoadObserver( mojo::PendingRemote gssapi_library_load_observer) { -@@ -1061,7 +1061,7 @@ NetworkService::CreateHttpAuthHandlerFactory(NetworkCo +@@ -1060,7 +1060,7 @@ NetworkService::CreateHttpAuthHandlerFactory(NetworkCo ); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void NetworkService::OnBeforeGssapiLibraryLoad() { if (gssapi_library_load_observer_.is_bound()) { gssapi_library_load_observer_->OnBeforeGssapiLibraryLoad(); diff --git a/www/ungoogled-chromium/files/patch-services_network_network__service.h b/www/ungoogled-chromium/files/patch-services_network_network__service.h index 792362a1028c..0259fa4bff97 100644 --- a/www/ungoogled-chromium/files/patch-services_network_network__service.h +++ b/www/ungoogled-chromium/files/patch-services_network_network__service.h @@ -1,29 +1,29 @@ ---- services/network/network_service.h.orig 2024-03-22 14:16:19 UTC +--- services/network/network_service.h.orig 2024-04-23 07:42:17 UTC +++ services/network/network_service.h -@@ -230,7 +230,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService +@@ -229,7 +229,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService mojo::PendingReceiver receiver) override; void SetFirstPartySets(net::GlobalFirstPartySets sets) override; void SetExplicitlyAllowedPorts(const std::vector& ports) override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void SetGssapiLibraryLoadObserver( mojo::PendingRemote gssapi_library_load_observer) override; -@@ -256,7 +256,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService +@@ -255,7 +255,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService std::unique_ptr CreateHttpAuthHandlerFactory( NetworkContext* network_context); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // This is called just before a GSSAPI library may be loaded. void OnBeforeGssapiLibraryLoad(); #endif // BUILDFLAG(IS_LINUX) -@@ -489,7 +489,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService +@@ -481,7 +481,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService // leaking stale listeners between tests. std::unique_ptr mock_network_change_notifier_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) mojo::Remote gssapi_library_load_observer_; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-services_network_public_cpp_BUILD.gn b/www/ungoogled-chromium/files/patch-services_network_public_cpp_BUILD.gn index 9dc50d8e21fd..bbc21bf17721 100644 --- a/www/ungoogled-chromium/files/patch-services_network_public_cpp_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-services_network_public_cpp_BUILD.gn @@ -1,11 +1,11 @@ ---- services/network/public/cpp/BUILD.gn.orig 2024-03-22 14:16:19 UTC +--- services/network/public/cpp/BUILD.gn.orig 2024-04-23 07:42:17 UTC +++ services/network/public/cpp/BUILD.gn -@@ -491,7 +491,7 @@ component("cpp_base") { +@@ -486,7 +486,7 @@ component("cpp_base") { sources += [ "transferable_directory_fuchsia.cc" ] } - if (is_linux) { + if (is_linux && !is_bsd) { sources += [ "network_interface_change_listener_mojom_traits.cc", "network_interface_change_listener_mojom_traits.h", diff --git a/www/ungoogled-chromium/files/patch-services_network_public_mojom_BUILD.gn b/www/ungoogled-chromium/files/patch-services_network_public_mojom_BUILD.gn index ce57514c7398..6fe61997cb4e 100644 --- a/www/ungoogled-chromium/files/patch-services_network_public_mojom_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-services_network_public_mojom_BUILD.gn @@ -1,25 +1,25 @@ ---- services/network/public/mojom/BUILD.gn.orig 2024-03-22 14:16:19 UTC +--- services/network/public/mojom/BUILD.gn.orig 2024-04-23 07:42:17 UTC +++ services/network/public/mojom/BUILD.gn @@ -522,11 +522,11 @@ mojom("url_loader_base") { } enabled_features = [] - if (is_android || is_chromeos || is_linux) { + if (!is_bsd && (is_android || is_chromeos || is_linux)) { enabled_features += [ "network_change_notifier_in_browser" ] } - if (is_linux) { + if (is_linux && !is_bsd) { # TODO(crbug.com/1431866): Remove this once is_linux in the mojom IDL does # not include lacros. enabled_features += [ "use_network_interface_change_listener" ] -@@ -1447,7 +1447,7 @@ mojom("mojom") { +@@ -1457,7 +1457,7 @@ mojom("mojom") { } } - if (is_linux) { + if (is_linux && !is_bsd) { # TODO(crbug.com/1431866): Remove this once is_linux in the mojom IDL does # not include lacros. enabled_features += [ "use_network_interface_change_listener" ] diff --git a/www/ungoogled-chromium/files/patch-services_screen__ai_public_cpp_utilities.cc b/www/ungoogled-chromium/files/patch-services_screen__ai_public_cpp_utilities.cc new file mode 100644 index 000000000000..aacc8523e4fb --- /dev/null +++ b/www/ungoogled-chromium/files/patch-services_screen__ai_public_cpp_utilities.cc @@ -0,0 +1,29 @@ +--- services/screen_ai/public/cpp/utilities.cc.orig 2024-04-23 07:42:17 UTC ++++ services/screen_ai/public/cpp/utilities.cc +@@ -19,7 +19,7 @@ namespace screen_ai { + + namespace { + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + constexpr char kBinaryPathSwitch[] = "screen-ai-binary"; + #endif + +@@ -40,7 +40,7 @@ constexpr char kScreenAIDlcRootPath[] = + #endif + + #if BUILDFLAG(ENABLE_SCREEN_AI_BROWSERTESTS) +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + constexpr base::FilePath::CharType kScreenAIResourcePathForTests[] = + FILE_PATH_LITERAL("third_party/screen-ai/linux/resources"); + #elif BUILDFLAG(IS_MAC) +@@ -127,7 +127,7 @@ base::FilePath GetComponentBinaryPathForTests() { + + const char* GetBinaryPathSwitch() { + // This is only used on Linux and ChromeOS. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + return kBinaryPathSwitch; + #else + return nullptr; diff --git a/www/ungoogled-chromium/files/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc b/www/ungoogled-chromium/files/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc new file mode 100644 index 000000000000..12882f52cb8a --- /dev/null +++ b/www/ungoogled-chromium/files/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc @@ -0,0 +1,18 @@ +--- services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.cc.orig 2024-04-23 07:42:17 UTC ++++ services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.cc +@@ -53,6 +53,7 @@ bool ScreenAIPreSandboxHook(base::FilePath binary_path + } + } + ++#if !BUILDFLAG(IS_BSD) + auto* instance = sandbox::policy::SandboxLinux::GetInstance(); + + std::vector permissions{ +@@ -75,6 +76,7 @@ bool ScreenAIPreSandboxHook(base::FilePath binary_path + sandbox::syscall_broker::COMMAND_OPEN}), + permissions, options); + instance->EngageNamespaceSandboxIfPossible(); ++#endif + + return true; + } diff --git a/www/ungoogled-chromium/files/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h b/www/ungoogled-chromium/files/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h new file mode 100644 index 000000000000..40142dbc0668 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h @@ -0,0 +1,16 @@ +--- services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h.orig 2024-04-23 07:42:17 UTC ++++ services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h +@@ -6,7 +6,13 @@ + #define SERVICES_SCREEN_AI_SANDBOX_SCREEN_AI_SANDBOX_HOOK_LINUX_H_ + + #include "base/files/file_path.h" ++#include "build/build_config.h" ++ ++#if BUILDFLAG(IS_BSD) ++#include "sandbox/policy/sandbox.h" ++#else + #include "sandbox/policy/linux/sandbox_linux.h" ++#endif + + namespace screen_ai { + diff --git a/www/ungoogled-chromium/files/patch-skia_ext_SkMemory__new__handler.cpp b/www/ungoogled-chromium/files/patch-skia_ext_SkMemory__new__handler.cpp index 61f6c9aceade..bdab574643e5 100644 --- a/www/ungoogled-chromium/files/patch-skia_ext_SkMemory__new__handler.cpp +++ b/www/ungoogled-chromium/files/patch-skia_ext_SkMemory__new__handler.cpp @@ -1,11 +1,20 @@ ---- skia/ext/SkMemory_new_handler.cpp.orig 2023-05-05 12:12:41 UTC +--- skia/ext/SkMemory_new_handler.cpp.orig 2024-04-23 07:42:17 UTC +++ skia/ext/SkMemory_new_handler.cpp -@@ -86,7 +86,7 @@ static void* malloc_nothrow(size_t size) { +@@ -19,7 +19,7 @@ + #include + #elif BUILDFLAG(IS_APPLE) + #include +-#else ++#elif !BUILDFLAG(IS_BSD) + #include + #endif + +@@ -92,7 +92,7 @@ static void* malloc_nothrow(size_t size) { // TODO(b.kelemen): we should always use UncheckedMalloc but currently it // doesn't work as intended everywhere. void* result; -#if BUILDFLAG(IS_IOS) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) result = malloc(size); #else // It's the responsibility of the caller to check the return value. diff --git a/www/ungoogled-chromium/files/patch-third__party_angle_BUILD.gn b/www/ungoogled-chromium/files/patch-third__party_angle_BUILD.gn index d62b35a20eb4..c984e3883cbc 100644 --- a/www/ungoogled-chromium/files/patch-third__party_angle_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-third__party_angle_BUILD.gn @@ -1,29 +1,29 @@ ---- third_party/angle/BUILD.gn.orig 2024-03-22 14:16:19 UTC +--- third_party/angle/BUILD.gn.orig 2024-04-23 07:42:17 UTC +++ third_party/angle/BUILD.gn -@@ -331,7 +331,6 @@ config("extra_warnings") { +@@ -335,7 +335,6 @@ config("extra_warnings") { "-Wtautological-type-limit-compare", "-Wundefined-reinterpret-cast", "-Wunneeded-internal-declaration", - "-Wunused-but-set-variable", "-Wsuggest-destructor-override", "-Wsuggest-override", -@@ -502,7 +501,7 @@ template("angle_common_lib") { +@@ -506,7 +505,7 @@ template("angle_common_lib") { all_dependent_configs = [ ":angle_disable_pool_alloc" ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { libs = [ "dl" ] } -@@ -657,6 +656,9 @@ angle_static_library("angle_gpu_info_util") { +@@ -661,6 +660,9 @@ angle_static_library("angle_gpu_info_util") { "Xi", "Xext", ] + if (is_bsd) { + libs += [ "GL" ] + } } if (angle_use_wayland && angle_has_build) { diff --git a/www/ungoogled-chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp b/www/ungoogled-chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp index bbd3a6e19d3a..8b81b39d3131 100644 --- a/www/ungoogled-chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp +++ b/www/ungoogled-chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp @@ -1,47 +1,47 @@ ---- third_party/angle/src/libANGLE/Display.cpp.orig 2024-03-22 14:16:19 UTC +--- third_party/angle/src/libANGLE/Display.cpp.orig 2024-04-23 07:42:17 UTC +++ third_party/angle/src/libANGLE/Display.cpp @@ -60,7 +60,7 @@ # include "libANGLE/renderer/gl/cgl/DisplayCGL.h" # elif ANGLE_ENABLE_EAGL # include "libANGLE/renderer/gl/eagl/DisplayEAGL.h" -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # include "libANGLE/renderer/gl/egl/DisplayEGL.h" # if defined(ANGLE_USE_X11) # include "libANGLE/renderer/gl/glx/DisplayGLX_api.h" @@ -419,7 +419,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di impl = new rx::DisplayEAGL(state); break; -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_GBM) if (platformType == 0) { @@ -465,7 +465,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di #if defined(ANGLE_ENABLE_OPENGL) # if defined(ANGLE_PLATFORM_WINDOWS) impl = new rx::DisplayWGL(state); -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_GBM) if (platformType == 0) { @@ -516,7 +516,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di impl = rx::CreateVulkanWin32Display(state); } break; -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_GBM) if (platformType == EGL_PLATFORM_GBM_KHR && rx::IsVulkanGbmDisplayAvailable()) { -@@ -2152,7 +2152,7 @@ static ClientExtensions GenerateClientExtensions() +@@ -2158,7 +2158,7 @@ static ClientExtensions GenerateClientExtensions() extensions.x11Visual = true; #endif -#if defined(ANGLE_PLATFORM_LINUX) +#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) extensions.platformANGLEDeviceTypeEGLANGLE = true; #endif diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc b/www/ungoogled-chromium/files/patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc index 6607453b7ff2..4a23bfed0a25 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc @@ -1,11 +1,11 @@ ---- third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc.orig 2024-02-03 15:42:55 UTC +--- third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc.orig 2024-04-23 07:42:17 UTC +++ third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc -@@ -63,7 +63,7 @@ bool StructTraitssend_subresource_notification = data.send_subresource_notification(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!data.ReadSystemFontFamilyName(&out->system_font_family_name)) return false; #endif diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h b/www/ungoogled-chromium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h index 9361ac2f2f6f..670c055ce907 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h +++ b/www/ungoogled-chromium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h @@ -1,11 +1,11 @@ ---- third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h.orig 2024-03-22 14:16:19 UTC +--- third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h.orig 2024-04-23 07:42:17 UTC +++ third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h -@@ -165,7 +165,7 @@ struct BLINK_COMMON_EXPORT +@@ -166,7 +166,7 @@ struct BLINK_COMMON_EXPORT return data.send_subresource_notification; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) static const std::string& system_font_family_name( const ::blink::RendererPreferences& data) { return data.system_font_family_name; diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_public_platform_platform.h b/www/ungoogled-chromium/files/patch-third__party_blink_public_platform_platform.h index 707720a1858c..b93c58c7faa2 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_public_platform_platform.h +++ b/www/ungoogled-chromium/files/patch-third__party_blink_public_platform_platform.h @@ -1,20 +1,11 @@ ---- third_party/blink/public/platform/platform.h.orig 2024-04-12 16:47:26 UTC +--- third_party/blink/public/platform/platform.h.orig 2024-04-23 07:42:17 UTC +++ third_party/blink/public/platform/platform.h -@@ -252,7 +252,7 @@ class BLINK_PLATFORM_EXPORT Platform { - virtual viz::FrameSinkId GenerateFrameSinkId() { return viz::FrameSinkId(); } - - // Returns whether this process is locked to a single site (i.e. a scheme -- // plus eTLD+1, such as https://9oo91e.qjz9zk), or to a more specific origin. -+ // plus eTLD+1, such as https://google.com), or to a more specific origin. - // This means the process will not be used to load documents or workers from - // URLs outside that site. - virtual bool IsLockedToSite() const { return false; } @@ -347,7 +347,7 @@ class BLINK_PLATFORM_EXPORT Platform { return nullptr; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // This is called after the thread is created, so the embedder // can initiate an IPC to change its thread type (on Linux we can't // increase the nice value, so we need to ask the browser process). This diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc index d4d089c49834..18ba9561e4de 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc @@ -1,35 +1,35 @@ ---- third_party/blink/renderer/controller/blink_initializer.cc.orig 2024-02-25 20:22:18 UTC +--- third_party/blink/renderer/controller/blink_initializer.cc.orig 2024-04-23 07:42:17 UTC +++ third_party/blink/renderer/controller/blink_initializer.cc -@@ -75,12 +75,12 @@ +@@ -80,12 +80,12 @@ #include "third_party/blink/renderer/controller/private_memory_footprint_provider.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/controller/memory_usage_monitor_posix.h" #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/controller/highest_pmf_reporter.h" #include "third_party/blink/renderer/controller/user_level_memory_pressure_signal_generator.h" #endif -@@ -247,7 +247,7 @@ void BlinkInitializer::RegisterInterfaces(mojo::Binder +@@ -255,7 +255,7 @@ void BlinkInitializer::RegisterInterfaces(mojo::Binder main_thread_task_runner); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) binders.Add( ConvertToBaseRepeatingCallback( CrossThreadBindRepeating(&MemoryUsageMonitorPosix::Bind)), -@@ -286,7 +286,7 @@ void BlinkInitializer::RegisterMemoryWatchers(Platform +@@ -294,7 +294,7 @@ void BlinkInitializer::RegisterMemoryWatchers(Platform #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Start reporting the highest private memory footprint after the first // navigation. HighestPmfReporter::Initialize(main_thread_task_runner); diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc index df03284296cb..1fc488e946a4 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2024-03-22 14:16:19 UTC +--- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2024-04-23 07:42:17 UTC +++ third_party/blink/renderer/core/exported/web_view_impl.cc @@ -425,7 +425,7 @@ SkFontHinting RendererPreferencesToSkiaHinting( const blink::RendererPreferences& prefs) { // 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) if (!prefs.should_antialias_text) { // When anti-aliasing is off, GTK maps all non-zero hinting settings to // 'Normal' hinting so we do the same. Otherwise, folks who have 'Slight' -@@ -3376,7 +3376,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs +@@ -3385,7 +3385,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs renderer_preferences_.use_subpixel_positioning); // 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)) && \ !BUILDFLAG(IS_ANDROID) if (!renderer_preferences_.system_font_family_name.empty()) { WebFontRenderStyle::SetSystemFontFamily(blink::WebString::FromUTF8( diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc index 493077d90a50..c3b51148e9ab 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/layout/layout_view.cc.orig 2024-03-22 14:16:19 UTC +--- third_party/blink/renderer/core/layout/layout_view.cc.orig 2024-04-23 07:42:17 UTC +++ third_party/blink/renderer/core/layout/layout_view.cc -@@ -71,7 +71,7 @@ +@@ -73,7 +73,7 @@ #include "ui/gfx/geometry/quad_f.h" #include "ui/gfx/geometry/size_conversions.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/platform/fonts/font_cache.h" #endif -@@ -811,7 +811,7 @@ void LayoutView::UpdateLayout() { +@@ -832,7 +832,7 @@ void LayoutView::UpdateLayout() { intrinsic_logical_widths_ = LogicalWidth(); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The font code in FontPlatformData does not have a direct connection to the // document, the frame or anything from which we could retrieve the device // scale factor. After using zoom for DSF, the GraphicsContext does only ever diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_paint_object__paint__properties__sparse.h b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_paint_object__paint__properties__sparse.h deleted file mode 100644 index 03b4479854c3..000000000000 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_paint_object__paint__properties__sparse.h +++ /dev/null @@ -1,13 +0,0 @@ ---- third_party/blink/renderer/core/paint/object_paint_properties_sparse.h.orig 2023-10-13 13:20:35 UTC -+++ third_party/blink/renderer/core/paint/object_paint_properties_sparse.h -@@ -272,8 +272,8 @@ class CORE_EXPORT ObjectPaintPropertiesSparse : public - NodeList& nodes, - NodeId node_id, - const ParentType& parent, -- NodeType::State&& state, -- const NodeType::AnimationState& animation_state = -+ typename NodeType::State&& state, -+ const typename NodeType::AnimationState& animation_state = - NodeType::AnimationState()) { - // First, check if we need to add a new node. - if (!nodes.HasField(node_id)) { diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc index 10000722e80c..7d27e2d388b4 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/core/paint/paint_layer.cc.orig 2023-11-04 07:08:51 UTC +--- third_party/blink/renderer/core/paint/paint_layer.cc.orig 2024-04-23 07:42:17 UTC +++ third_party/blink/renderer/core/paint/paint_layer.cc -@@ -120,7 +120,7 @@ namespace blink { +@@ -122,7 +122,7 @@ namespace blink { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) struct SameSizeAsPaintLayer : GarbageCollected, DisplayItemClient { // The bit fields may fit into the machine word of DisplayItemClient which // has only 8-bit data. diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc index 21c14aa092cc..be1ea7a282ad 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc.orig 2024-03-22 14:16:19 UTC +--- third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc.orig 2024-04-23 07:42:17 UTC +++ third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc -@@ -726,7 +726,7 @@ TEST_F(AudioRendererMixerManagerTest, MixerParamsLaten +@@ -813,7 +813,7 @@ TEST_F(AudioRendererMixerManagerTest, MixerParamsLaten mixer->get_output_params_for_testing().sample_rate()); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Use 10 ms buffer (441 frames per buffer). EXPECT_EQ(output_sample_rate / 100, mixer->get_output_params_for_testing().frames_per_buffer()); diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_features.gni b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_features.gni index aac4ab7dd831..ba9513bff4a0 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_features.gni +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_features.gni @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/ml/webnn/features.gni.orig 2024-02-03 15:42:55 UTC +--- third_party/blink/renderer/modules/ml/webnn/features.gni.orig 2024-04-23 07:42:17 UTC +++ third_party/blink/renderer/modules/ml/webnn/features.gni @@ -6,7 +6,7 @@ import("//build/config/chrome_build.gni") declare_args() { # This enables building WebNN with XNNPACK. Currently only available for # Windows, macOS and Linux on x64, x86 and arm64. - build_webnn_with_xnnpack = (is_linux || is_win || is_mac) && + build_webnn_with_xnnpack = !is_bsd && (is_linux || is_win || is_mac) && (current_cpu == "x64" || current_cpu == "x86" || (current_cpu == "arm64" && !is_win)) - + } diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc index 599af94ae0b9..2a911fca1053 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc.orig 2024-02-25 20:22:18 UTC +--- third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc.orig 2024-04-23 07:42:17 UTC +++ third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc -@@ -202,7 +202,7 @@ class SharedXnnpackContext : public ThreadSafeRefCount +@@ -204,7 +204,7 @@ class SharedXnnpackContext : public ThreadSafeRefCount ~SharedXnnpackContext() { base::AutoLock auto_lock(SharedXnnpackContextLock()); -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // For Linux and ChromeOS, cpuinfo needs to parse /proc/cpuinfo to // initialize in pre sandbox stage. Calling xnn_deinitialize() here will // deinitialize cpuinfo within sandbox and cannot access /proc/cpuinfo diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc index c3f4986478f8..39c80d18d720 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc.orig 2023-01-13 08:56:02 UTC +--- third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc.orig 2024-04-23 07:42:17 UTC +++ third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc -@@ -380,7 +380,7 @@ class AudioWorkletThreadPriorityTest +@@ -463,7 +463,7 @@ class AudioWorkletThreadPriorityTest // TODO(crbug.com/1022888): The worklet thread priority is always NORMAL // on OS_LINUX and OS_CHROMEOS regardless of the thread priority setting. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (expected_priority == base::ThreadPriorityForTest::kRealtimeAudio || expected_priority == base::ThreadPriorityForTest::kDisplay) { EXPECT_EQ(actual_priority, base::ThreadPriorityForTest::kNormal); diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc index fe65ead3e327..addfa440c930 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2024-03-22 14:16:19 UTC +--- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2024-04-23 07:42:17 UTC +++ third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -6361,7 +6361,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid +@@ -6356,7 +6356,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid constexpr bool kAllowZeroCopyImages = true; #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1175907): Only TexImage2D seems to work with the GPU path on // Android M -- appears to work fine on R, but to avoid regressions in