diff --git a/www/ungoogled-chromium/Makefile b/www/ungoogled-chromium/Makefile index f31d9b89b70a..e71b90602b0a 100644 --- a/www/ungoogled-chromium/Makefile +++ b/www/ungoogled-chromium/Makefile @@ -1,405 +1,407 @@ PORTNAME= ungoogled-chromium -PORTVERSION= 120.0.6099.224 +PORTVERSION= 121.0.6167.139 UGVERSION= ${DISTVERSION}-1 CATEGORIES= www wayland MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ https://nerd.hu/distfiles/:external DISTFILES= chromium-${DISTVERSION}${EXTRACT_SUFX} \ ungoogled-chromium-${UGVERSION}.tar.gz:external MAINTAINER= chromium@FreeBSD.org COMMENT= Google web browser based on WebKit sans integration with Google WWW= https://github.com/ungoogled-software/ungoogled-chromium LICENSE= BSD3CLAUSE LGPL21 MPL11 LICENSE_COMB= multi ONLY_FOR_ARCHS= aarch64 amd64 i386 PATCH_DEPENDS= gpatch:devel/patch \ ${PYTHON_VERSION}:lang/python${PYTHON_SUFFIX} BUILD_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \ gperf:devel/gperf \ flock:sysutils/flock \ node:www/node \ xcb-proto>0:x11/xcb-proto \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ ${LOCALBASE}/share/usbids/usb.ids:misc/usbids \ ${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib@${PY_FLAVOR} \ ${LOCALBASE}/include/va/va.h:multimedia/libva \ ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri \ ${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 \ - libsnappy.so:archivers/snappy \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ 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=false \ + 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_rust=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} < 160 -LLVM_DEFAULT= 16 +.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} 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 snappy || ${FALSE} + 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 abeeb60bfdf9..67fae4ef012a 100644 --- a/www/ungoogled-chromium/distinfo +++ b/www/ungoogled-chromium/distinfo @@ -1,9 +1,9 @@ -TIMESTAMP = 1705683725 -SHA256 (chromium-120.0.6099.224.tar.xz) = 850a85c8d8a01041a07dfaaea8289fa5f8294b4e375e6b77997b61434e0a2f1a -SIZE (chromium-120.0.6099.224.tar.xz) = 3299542904 -SHA256 (ungoogled-chromium-120.0.6099.224-1.tar.gz) = b96fd3d5d64ffd5efa3bc52966adfd7fd1dd3e85ebf3517924054b577ac03750 -SIZE (ungoogled-chromium-120.0.6099.224-1.tar.gz) = 665887 -SHA256 (chromium-120.0.6099.224-testdata.tar.xz) = db8ef8f50dd759f548fd269202f9d084e3d1bb92b587bd5e0023707ac29518ea -SIZE (chromium-120.0.6099.224-testdata.tar.xz) = 268575524 +TIMESTAMP = 1706973655 +SHA256 (chromium-121.0.6167.139.tar.xz) = e12cc967bef7a79630828792f02d95297a06eb905c98e4c6e065fd5e74d6f9ff +SIZE (chromium-121.0.6167.139.tar.xz) = 3340424948 +SHA256 (ungoogled-chromium-121.0.6167.139-1.tar.gz) = a4f389f9159effbbe47a07ade0b8b9b86ebb64a56230ea7a4b43664cd499f829 +SIZE (ungoogled-chromium-121.0.6167.139-1.tar.gz) = 666180 +SHA256 (chromium-121.0.6167.139-testdata.tar.xz) = ea1431ca694fd314ec542642f1ef5112df737792106dd991edf46eb012732a15 +SIZE (chromium-121.0.6167.139-testdata.tar.xz) = 272290844 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 cb8b72117f53..a0b35734ba84 100644 --- a/www/ungoogled-chromium/files/patch-BUILD.gn +++ b/www/ungoogled-chromium/files/patch-BUILD.gn @@ -1,89 +1,89 @@ ---- BUILD.gn.orig 2023-12-23 12:33:28 UTC +--- BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ BUILD.gn -@@ -61,7 +61,7 @@ declare_args() { +@@ -62,7 +62,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) -@@ -95,7 +95,6 @@ group("gn_all") { +@@ -94,7 +94,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", -@@ -415,7 +414,7 @@ group("gn_all") { +@@ -417,7 +416,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", -@@ -607,6 +606,15 @@ group("gn_all") { +@@ -609,6 +608,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", -@@ -656,7 +664,7 @@ group("gn_all") { +@@ -655,7 +663,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)" ] } -@@ -1077,7 +1085,7 @@ if (use_blink && !is_cronet_build) { +@@ -1076,7 +1084,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 = [ -@@ -1150,7 +1158,7 @@ if (use_blink && !is_cronet_build) { +@@ -1166,7 +1174,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)" ] } -@@ -1159,7 +1167,7 @@ if (use_blink && !is_cronet_build) { +@@ -1175,7 +1183,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)" ] } -@@ -1624,7 +1632,7 @@ group("chromium_builder_perf") { +@@ -1616,7 +1624,7 @@ group("chromium_builder_perf") { data_deps += [ "//chrome/test:performance_browser_tests" ] } - if (!is_win) { + if (!is_win && !is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } diff --git a/www/ungoogled-chromium/files/patch-apps_ui_views_app__window__frame__view.cc b/www/ungoogled-chromium/files/patch-apps_ui_views_app__window__frame__view.cc index 91ad45d16a5a..9060c0d436ee 100644 --- a/www/ungoogled-chromium/files/patch-apps_ui_views_app__window__frame__view.cc +++ b/www/ungoogled-chromium/files/patch-apps_ui_views_app__window__frame__view.cc @@ -1,11 +1,11 @@ ---- apps/ui/views/app_window_frame_view.cc.orig 2023-12-23 12:33:28 UTC +--- apps/ui/views/app_window_frame_view.cc.orig 2024-02-03 15:42:55 UTC +++ apps/ui/views/app_window_frame_view.cc -@@ -149,7 +149,7 @@ gfx::Rect AppWindowFrameView::GetWindowBoundsForClient +@@ -148,7 +148,7 @@ gfx::Rect AppWindowFrameView::GetWindowBoundsForClient gfx::Rect window_bounds = client_bounds; // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Get the difference between the widget's client area bounds and window // bounds, and grow |window_bounds| by that amount. gfx::Insets native_frame_insets = diff --git a/www/ungoogled-chromium/files/patch-base_BUILD.gn b/www/ungoogled-chromium/files/patch-base_BUILD.gn index a9c528e7a0b8..16ea2291458f 100644 --- a/www/ungoogled-chromium/files/patch-base_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-base_BUILD.gn @@ -1,143 +1,143 @@ ---- base/BUILD.gn.orig 2023-12-23 12:33:28 UTC +--- base/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ base/BUILD.gn @@ -186,7 +186,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" -@@ -1105,11 +1105,23 @@ component("base") { +@@ -1098,11 +1098,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" ] -@@ -1129,7 +1141,7 @@ component("base") { +@@ -1122,7 +1134,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" ] } -@@ -2088,6 +2100,22 @@ component("base") { +@@ -2077,6 +2089,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 += [ -@@ -2220,6 +2248,29 @@ component("base") { +@@ -2207,6 +2235,29 @@ component("base") { } } + if (is_bsd) { + sources -= [ + "files/file_path_watcher_inotify.cc", + "files/scoped_file_linux.cc", + "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", + ] + 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", -@@ -2230,7 +2281,7 @@ component("base") { +@@ -2217,7 +2268,7 @@ component("base") { } if (dep_libevent) { - deps += [ "//third_party/libevent" ] + public_deps += [ "//third_party/libevent" ] } if (use_libevent) { -@@ -3619,7 +3670,7 @@ test("base_unittests") { +@@ -3615,7 +3666,7 @@ test("base_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "debug/proc_maps_linux_unittest.cc", "files/scoped_file_linux_unittest.cc", -@@ -3640,7 +3691,7 @@ test("base_unittests") { +@@ -3637,7 +3688,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", -@@ -3651,7 +3702,7 @@ test("base_unittests") { +@@ -3648,7 +3699,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" ] } -@@ -3913,7 +3964,7 @@ test("base_unittests") { +@@ -3909,7 +3960,7 @@ test("base_unittests") { } } - if (is_fuchsia || is_linux || is_chromeos) { + if ((is_fuchsia || is_linux || is_chromeos) && !is_bsd) { sources += [ "debug/elf_reader_unittest.cc", "debug/test_elf_image_builder.cc", diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni index 042ffbd2d64c..dcc48c6c3a9b 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,11 +1,11 @@ ---- base/allocator/partition_allocator/partition_alloc.gni.orig 2023-11-04 07:08:51 UTC +--- base/allocator/partition_allocator/partition_alloc.gni.orig 2024-02-03 15:42:55 UTC +++ base/allocator/partition_allocator/partition_alloc.gni -@@ -319,7 +319,7 @@ declare_args() { +@@ -333,7 +333,7 @@ declare_args() { # pkeys support is explicitly disabled in all Cronet builds, as some test # 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 && target_cpu == "x64" && !is_cronet_build + enable_pkeys = (is_linux && !is_bsd) && target_cpu == "x64" && !is_cronet_build } assert(!enable_pkeys || (is_linux && target_cpu == "x64"), "Pkeys are only supported on x64 linux") 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 1ea41bbd5f5f..05b7ea1ba80d 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 2023-12-23 12:33:28 UTC +--- base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ base/allocator/partition_allocator/src/partition_alloc/BUILD.gn -@@ -582,7 +582,7 @@ source_set("allocator_shim") { - ] - configs += [ ":mac_no_default_new_delete_symbols" ] +@@ -855,7 +855,7 @@ if (is_clang_or_gcc) { + configs -= [ "//build/config/compiler:enable_arc" ] + } } - if (is_chromeos || is_linux) { + if ((is_chromeos || is_linux) && !is_bsd) { - sources += [ + 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_partition__alloc__base_debug_stack__trace__posix.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc index 7a76584417bf..1691ac5222bf 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc @@ -1,34 +1,34 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc.orig 2023-12-23 12:33:28 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc.orig 2024-02-03 15:42:55 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc @@ -12,11 +12,11 @@ #include #include -#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) #include // For ElfW() macro. #endif -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) - #define HAVE_DLADDR #include #endif -@@ -25,7 +25,7 @@ namespace partition_alloc::internal::base::debug { + +@@ -24,7 +24,7 @@ namespace partition_alloc::internal::base::debug { namespace { -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) constexpr size_t kBufferSize = 4096u; -@@ -359,7 +359,7 @@ void PrintStackTraceInternal(const void** trace, size_ +@@ -358,7 +358,7 @@ void PrintStackTraceInternal(const void** trace, size_ } #endif // !BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) // Since /proc/self/maps is not available, use dladdr() to obtain module // names and offsets inside the modules from the given addresses. void PrintStackTraceInternal(const void* const* trace, size_t size) { diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc index 4dc47dee29c3..04d72ef5dc44 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc.orig 2023-12-23 12:33:28 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc.orig 2024-02-03 15:42:55 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc @@ -17,7 +17,7 @@ - #include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h" - #include "build/build_config.h" + #include "partition_alloc/partition_alloc_base/logging.h" + #include "partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include #endif diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_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 85a99bacad9e..2c7dcf90d524 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,29 +1,20 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig 2023-12-23 12:33:28 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig 2024-02-03 15:42:55 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h -@@ -94,7 +94,7 @@ static_assert(sizeof(void*) != 8, ""); - // POSIX is not only UNIX, e.g. macOS and other OSes. We do use Linux-specific - // features such as futex(2). - #define PA_CONFIG_HAS_LINUX_KERNEL() \ -- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)) -+ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)) - - // On some platforms, we implement locking by spinning in userspace, then going - // into the kernel only if there is contention. This requires platform support, -@@ -241,7 +241,7 @@ constexpr bool kUseLazyCommit = false; +@@ -255,7 +255,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. -@@ -288,7 +288,7 @@ constexpr bool kUseLazyCommit = false; +@@ -301,7 +301,7 @@ constexpr bool kUseLazyCommit = false; + // // Also enabled on ARM64 macOS, as the 16kiB pages on this platform lead to // larger slot spans. - #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() \ -- (BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64))) -+ (BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_BSD)) - - // Enable shadow metadata. - // +-#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) ++#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_BSD) + #define PA_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 b2aeb5832373..69d14e15a403 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,21 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h.orig 2023-12-23 12:33:28 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h.orig 2024-02-03 15:42:55 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h -@@ -107,7 +107,7 @@ PartitionPageShift() { +@@ -111,7 +111,7 @@ PartitionPageShift() { return 18; // 256 KiB } #elif (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ - (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t PartitionPageShift() { return PageAllocationGranularityShift() + 2; -@@ -309,7 +309,8 @@ constexpr size_t kNumPools = kMaxPoolHandle - 1; +@@ -313,7 +313,8 @@ 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) constexpr size_t kPoolMaxSize = 8 * kGiB; #else constexpr size_t kPoolMaxSize = 16 * kGiB; diff --git a/www/ungoogled-chromium/files/patch-base_compiler__specific.h b/www/ungoogled-chromium/files/patch-base_compiler__specific.h index 97e912d487ba..993dd32e52f5 100644 --- a/www/ungoogled-chromium/files/patch-base_compiler__specific.h +++ b/www/ungoogled-chromium/files/patch-base_compiler__specific.h @@ -1,35 +1,35 @@ ---- base/compiler_specific.h.orig 2023-05-05 12:12:41 UTC +--- base/compiler_specific.h.orig 2024-02-03 15:42:55 UTC +++ base/compiler_specific.h @@ -41,9 +41,9 @@ // Annotate a function indicating it should not be inlined. // Use like: // NOINLINE void DoStuff() { ... } -#if defined(__clang__) && HAS_ATTRIBUTE(noinline) +#if defined(__clang__) && (__clang_major__ >= 15) && HAS_ATTRIBUTE(noinline) #define NOINLINE [[clang::noinline]] -#elif defined(COMPILER_GCC) && HAS_ATTRIBUTE(noinline) +#elif (defined(COMPILER_GCC) || defined(__clang__)) && HAS_ATTRIBUTE(noinline) #define NOINLINE __attribute__((noinline)) #elif defined(COMPILER_MSVC) #define NOINLINE __declspec(noinline) -@@ -51,9 +51,9 @@ - #define NOINLINE +@@ -60,9 +60,9 @@ + #define NOOPT #endif -#if defined(__clang__) && defined(NDEBUG) && HAS_ATTRIBUTE(always_inline) +#if defined(__clang__) && (__clang_major__ >= 15) && defined(NDEBUG) && HAS_ATTRIBUTE(always_inline) #define ALWAYS_INLINE [[clang::always_inline]] inline -#elif defined(COMPILER_GCC) && defined(NDEBUG) && HAS_ATTRIBUTE(always_inline) +#elif (defined(COMPILER_GCC) || defined(__clang__)) && defined(NDEBUG) && HAS_ATTRIBUTE(always_inline) #define ALWAYS_INLINE inline __attribute__((__always_inline__)) #elif defined(COMPILER_MSVC) && defined(NDEBUG) #define ALWAYS_INLINE __forceinline -@@ -69,7 +69,7 @@ +@@ -78,7 +78,7 @@ // prevent code folding, see NO_CODE_FOLDING() in base/debug/alias.h. // Use like: // NOT_TAIL_CALLED void FooBar(); -#if defined(__clang__) && HAS_ATTRIBUTE(not_tail_called) +#if defined(__clang__) && (__clang_major__ >= 15) && HAS_ATTRIBUTE(not_tail_called) #define NOT_TAIL_CALLED [[clang::not_tail_called]] #else #define NOT_TAIL_CALLED diff --git a/www/ungoogled-chromium/files/patch-base_files_file__path__watcher.h b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher.h index 39142906151a..b280ba971e02 100644 --- a/www/ungoogled-chromium/files/patch-base_files_file__path__watcher.h +++ b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher.h @@ -1,11 +1,11 @@ ---- base/files/file_path_watcher.h.orig 2023-02-11 09:11:04 UTC +--- base/files/file_path_watcher.h.orig 2024-02-03 15:42:55 UTC +++ base/files/file_path_watcher.h -@@ -59,7 +59,7 @@ class BASE_EXPORT FilePathWatcher { +@@ -105,7 +105,7 @@ class BASE_EXPORT FilePathWatcher { Type type = Type::kNonRecursive; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // The callback will return the full path to a changed file instead of // the watched path supplied as |path| when Watch is called. // So the full path can be different from the watched path when a folder is diff --git a/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc index ae01847cfb6b..b597267cc7f9 100644 --- a/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc @@ -1,29 +1,29 @@ ---- base/files/file_path_watcher_unittest.cc.orig 2023-12-23 12:33:28 UTC +--- base/files/file_path_watcher_unittest.cc.orig 2024-02-03 15:42:55 UTC +++ base/files/file_path_watcher_unittest.cc -@@ -703,7 +703,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) { +@@ -836,7 +836,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) { } delegate.RunUntilEventsMatch(event_expecter); -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && BUILDFLAG(IS_BSD) ASSERT_TRUE(WriteFile(file1, "content v2")); // Mac implementation does not detect files modified in a directory. // TODO(https://crbug.com/1432064): Expect that no events are fired on Mac. -@@ -1639,7 +1639,7 @@ namespace { +@@ -1772,7 +1772,7 @@ namespace { enum Permission { Read, Write, Execute }; -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) bool ChangeFilePermissions(const FilePath& path, Permission perm, bool allow) { struct stat stat_buf; -@@ -1673,7 +1673,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi +@@ -1806,7 +1806,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi } // namespace -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) && BUILDFLAG(IS_BSD) // Linux implementation of FilePathWatcher doesn't catch attribute changes. // http://crbug.com/78043 // Windows implementation of FilePathWatcher catches attribute changes that diff --git a/www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc b/www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc index 66d45ef47f19..55558c3efc75 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 2023-11-04 07:08:51 UTC +--- base/files/file_util_posix.cc.orig 2024-02-03 15:42:55 UTC +++ base/files/file_util_posix.cc -@@ -756,33 +756,34 @@ bool CreateDirectoryAndGetError(const FilePath& full_p +@@ -772,33 +772,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_logging__unittest.cc b/www/ungoogled-chromium/files/patch-base_logging__unittest.cc index 5264a5d646fe..ca8f3e9ab943 100644 --- a/www/ungoogled-chromium/files/patch-base_logging__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_logging__unittest.cc @@ -1,31 +1,31 @@ ---- base/logging_unittest.cc.orig 2023-02-11 09:11:04 UTC +--- base/logging_unittest.cc.orig 2024-02-03 15:42:55 UTC +++ base/logging_unittest.cc @@ -32,7 +32,7 @@ #include "base/posix/eintr_wrapper.h" #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) #include #endif -@@ -575,14 +575,18 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo +@@ -570,14 +570,18 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo // need the arch-specific boilerplate below, which is inspired by breakpad. // At the same time, on OSX, ucontext.h is deprecated but si_addr works fine. uintptr_t crash_addr = 0; -#if BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FREEBSD) crash_addr = reinterpret_cast(info->si_addr); #else // OS_* ucontext_t* context = reinterpret_cast(context_ptr); #if defined(ARCH_CPU_X86) crash_addr = static_cast(context->uc_mcontext.gregs[REG_EIP]); #elif defined(ARCH_CPU_X86_64) +#if BUILDFLAG(IS_OPENBSD) + crash_addr = static_cast(context->sc_rip); +#else crash_addr = static_cast(context->uc_mcontext.gregs[REG_RIP]); +#endif #elif defined(ARCH_CPU_ARMEL) crash_addr = static_cast(context->uc_mcontext.arm_pc); #elif defined(ARCH_CPU_ARM64) diff --git a/www/ungoogled-chromium/files/patch-base_native__library__unittest.cc b/www/ungoogled-chromium/files/patch-base_native__library__unittest.cc index 366ca9740016..8d6f7841fee7 100644 --- a/www/ungoogled-chromium/files/patch-base_native__library__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_native__library__unittest.cc @@ -1,11 +1,11 @@ ---- base/native_library_unittest.cc.orig 2022-10-29 17:50:56 UTC +--- base/native_library_unittest.cc.orig 2024-02-03 15:42:55 UTC +++ base/native_library_unittest.cc -@@ -134,7 +134,7 @@ TEST(NativeLibraryTest, LoadLibrary) { +@@ -135,7 +135,7 @@ TEST(NativeLibraryTest, LoadLibrary) { // versions with respect to symbol resolution scope. // TSan and MSan error out on RTLD_DEEPBIND, https://crbug.com/705255 #if !BUILDFLAG(IS_ANDROID) && !defined(THREAD_SANITIZER) && \ - !defined(MEMORY_SANITIZER) + !defined(MEMORY_SANITIZER) && !BUILDFLAG(IS_BSD) // Verifies that the |prefer_own_symbols| option satisfies its guarantee that // a loaded library will always prefer local symbol resolution before diff --git a/www/ungoogled-chromium/files/patch-base_process_memory__linux.cc b/www/ungoogled-chromium/files/patch-base_process_memory__linux.cc index 2df2a75c31ae..e2285cb45b47 100644 --- a/www/ungoogled-chromium/files/patch-base_process_memory__linux.cc +++ b/www/ungoogled-chromium/files/patch-base_process_memory__linux.cc @@ -1,44 +1,44 @@ ---- base/process/memory_linux.cc.orig 2023-02-11 09:11:04 UTC +--- base/process/memory_linux.cc.orig 2024-02-03 15:42:55 UTC +++ base/process/memory_linux.cc -@@ -20,6 +20,7 @@ +@@ -28,6 +28,7 @@ void __libc_free(void*); namespace base { +#if !BUILDFLAG(IS_BSD) namespace { void ReleaseReservationOrTerminate() { -@@ -29,12 +30,14 @@ void ReleaseReservationOrTerminate() { +@@ -37,12 +38,14 @@ void ReleaseReservationOrTerminate() { } } // namespace +#endif void EnableTerminationOnHeapCorruption() { // On Linux, there nothing to do AFAIK. } void EnableTerminationOnOutOfMemory() { +#if !BUILDFLAG(IS_BSD) // Set the new-out of memory handler. std::set_new_handler(&ReleaseReservationOrTerminate); // If we're using glibc's allocator, the above functions will override -@@ -43,8 +46,10 @@ void EnableTerminationOnOutOfMemory() { +@@ -51,8 +54,10 @@ void EnableTerminationOnOutOfMemory() { #if BUILDFLAG(USE_ALLOCATOR_SHIM) allocator_shim::SetCallNewHandlerOnMallocFailure(true); #endif +#endif } +#if !BUILDFLAG(IS_BSD) // ScopedAllowBlocking() has private constructor and it can only be used in // friend classes/functions. Declaring a class is easier in this situation to // avoid adding more dependency to thread_restrictions.h because of the -@@ -104,6 +109,7 @@ bool AdjustOOMScoreHelper::AdjustOOMScore(ProcessId pr +@@ -112,6 +117,7 @@ bool AdjustOOMScoreHelper::AdjustOOMScore(ProcessId pr bool AdjustOOMScore(ProcessId process, int score) { return AdjustOOMScoreHelper::AdjustOOMScore(process, score); } +#endif bool UncheckedMalloc(size_t size, void** result) { #if BUILDFLAG(USE_ALLOCATOR_SHIM) diff --git a/www/ungoogled-chromium/files/patch-base_process_process__handle.h b/www/ungoogled-chromium/files/patch-base_process_process__handle.h index 9015f4dbd03d..af8d6ebc83c0 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__handle.h +++ b/www/ungoogled-chromium/files/patch-base_process_process__handle.h @@ -1,11 +1,11 @@ ---- base/process/process_handle.h.orig 2022-10-01 07:40:07 UTC +--- base/process/process_handle.h.orig 2024-02-03 15:42:55 UTC +++ base/process/process_handle.h -@@ -106,7 +106,7 @@ BASE_EXPORT ProcessId GetCurrentProcId(); +@@ -86,7 +86,7 @@ BASE_EXPORT ProcessId GetCurrentProcId(); // processes may be reused. BASE_EXPORT UniqueProcId GetUniqueIdForProcess(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // When a process is started in a different PID namespace from the browser // process, this function must be called with the process's PID in the browser's // PID namespace in order to initialize its unique ID. Not thread safe. diff --git a/www/ungoogled-chromium/files/patch-base_rand__util.h b/www/ungoogled-chromium/files/patch-base_rand__util.h index 8588ca910ef5..114f20ea622e 100644 --- a/www/ungoogled-chromium/files/patch-base_rand__util.h +++ b/www/ungoogled-chromium/files/patch-base_rand__util.h @@ -1,11 +1,11 @@ ---- base/rand_util.h.orig 2023-12-23 12:33:28 UTC +--- base/rand_util.h.orig 2024-02-03 15:42:55 UTC +++ base/rand_util.h -@@ -136,7 +136,7 @@ void RandomShuffle(Itr first, Itr last) { +@@ -146,7 +146,7 @@ void RandomShuffle(Itr first, Itr last) { std::shuffle(first, last, RandomBitGenerator()); } -#if BUILDFLAG(IS_POSIX) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_BSD) BASE_EXPORT int GetUrandomFD(); #endif diff --git a/www/ungoogled-chromium/files/patch-base_system_sys__info.h b/www/ungoogled-chromium/files/patch-base_system_sys__info.h index e25e3466169b..4ba8bcc9e887 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 2023-12-23 12:33:28 UTC +--- base/system/sys_info.h.orig 2024-02-03 15:42:55 UTC +++ base/system/sys_info.h -@@ -321,6 +321,8 @@ class BASE_EXPORT SysInfo { +@@ -318,6 +318,8 @@ class BASE_EXPORT SysInfo { static void ResetCpuSecurityMitigationsEnabledForTesting(); #endif + static uint64_t MaxSharedMemorySize(); + private: friend class test::ScopedAmountOfPhysicalMemoryOverride; FRIEND_TEST_ALL_PREFIXES(SysInfoTest, AmountOfAvailablePhysicalMemory); -@@ -333,7 +335,7 @@ class BASE_EXPORT SysInfo { +@@ -330,7 +332,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_test_launcher_test__launcher.cc b/www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc index 4b5d43684baf..68696a0e50d2 100644 --- a/www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc +++ b/www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc @@ -1,10 +1,10 @@ ---- base/test/launcher/test_launcher.cc.orig 2023-11-04 07:08:51 UTC +--- base/test/launcher/test_launcher.cc.orig 2024-02-03 15:42:55 UTC +++ base/test/launcher/test_launcher.cc -@@ -70,6 +70,7 @@ +@@ -69,6 +69,7 @@ #include "testing/gtest/include/gtest/gtest.h" #if BUILDFLAG(IS_POSIX) +#include #include #include "base/files/file_descriptor_watcher_posix.h" 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 e34084854863..37c34ba3af4b 100644 --- a/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn @@ -1,140 +1,140 @@ ---- build/config/compiler/BUILD.gn.orig 2023-12-23 12:33:28 UTC +--- build/config/compiler/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ build/config/compiler/BUILD.gn @@ -202,7 +202,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() { @@ -266,13 +266,16 @@ config("default_include_dirs") { # Compiler instrumentation can introduce dependencies in DSOs to symbols in # the executable they are loaded into, so they are unresolved at link-time. config("no_unresolved_symbols") { - if (!using_sanitizer && + if (!using_sanitizer && !is_bsd && (is_linux || is_chromeos || is_android || is_fuchsia)) { ldflags = [ "-Wl,-z,defs", "-Wl,--as-needed", ] } + if (current_cpu == "x86" && is_openbsd) { + ldflags = [ "-Wl,-z,notext" ] + } } # compiler --------------------------------------------------------------------- @@ -518,6 +521,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ if (use_gold) { @@ -593,7 +600,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 += [ @@ -800,7 +807,7 @@ config("compiler") { if (is_apple) { ldflags += [ "-Wcrl,object_path_lto" ] } - if (!is_chromeos) { + if (!is_chromeos && !is_bsd) { # TODO(https://crbug.com/972449): turn on for ChromeOS when that # toolchain has this flag. # We only use one version of LLVM within a build so there's no need to -@@ -1173,7 +1180,7 @@ config("compiler_cpu_abi") { +@@ -1175,7 +1182,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" ] -@@ -1188,7 +1195,7 @@ config("compiler_cpu_abi") { +@@ -1190,7 +1197,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" ] -@@ -1523,7 +1530,7 @@ config("compiler_deterministic") { +@@ -1525,7 +1532,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", -@@ -1575,7 +1582,7 @@ config("compiler_deterministic") { +@@ -1577,7 +1584,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", -@@ -1860,7 +1867,7 @@ config("default_warnings") { +@@ -1862,7 +1869,7 @@ config("default_warnings") { "-Wno-ignored-pragma-optimize", ] - if (!is_nacl) { + if (!is_nacl && !is_bsd) { cflags += [ # TODO(crbug.com/1343975) Evaluate and possibly enable. "-Wno-deprecated-builtins", -@@ -2066,7 +2073,7 @@ config("no_chromium_code") { +@@ -2065,7 +2072,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", -@@ -2595,7 +2602,7 @@ config("afdo_optimize_size") { +@@ -2594,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. -@@ -2622,7 +2629,7 @@ config("afdo") { +@@ -2621,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 ] } -@@ -2786,7 +2793,8 @@ config("symbols") { +@@ -2785,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_linux_atspi2_BUILD.gn b/www/ungoogled-chromium/files/patch-build_config_linux_atspi2_BUILD.gn deleted file mode 100644 index 7db5ce0b19d7..000000000000 --- a/www/ungoogled-chromium/files/patch-build_config_linux_atspi2_BUILD.gn +++ /dev/null @@ -1,25 +0,0 @@ ---- build/config/linux/atspi2/BUILD.gn.orig 2023-11-04 07:08:51 UTC -+++ build/config/linux/atspi2/BUILD.gn -@@ -21,10 +21,21 @@ if (use_atk) { - minor = atspi_version[1] - micro = atspi_version[2] - -+ # These aren't necessarily used if atspi is not old enough to require them. -+ # Also, gn considers variables unused if the only use of them is -+ # short-circuited away, so for example if major == 2 and minor == 48, micro -+ # would be unused. -+ not_needed([ -+ "major", -+ "minor", -+ "micro", -+ ]) -+ - # ATSPI 2.49.90 now defines these for us and it's an error for us to - # redefine them on the compiler command line. - # See ATSPI 927344a34cd5bf81fc64da4968241735ecb4f03b -- if (minor < 49 || (minor == 49 && micro < 90)) { -+ if (major < 2 || (major == 2 && minor < 49) || -+ (major == 2 && minor == 49 && micro < 90)) { - defines = [ - "ATSPI_MAJOR_VERSION=$major", - "ATSPI_MINOR_VERSION=$minor", diff --git a/www/ungoogled-chromium/files/patch-cc_BUILD.gn b/www/ungoogled-chromium/files/patch-cc_BUILD.gn index a000d3ec36d6..fd0d5ae41680 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 2023-12-23 12:33:28 UTC +--- cc/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ cc/BUILD.gn @@ -676,7 +676,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) { -@@ -931,7 +931,6 @@ cc_test("cc_unittests") { +@@ -935,7 +935,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-cc_base_features.cc b/www/ungoogled-chromium/files/patch-cc_base_features.cc index d0a1240cdb76..4f02e6d54c5c 100644 --- a/www/ungoogled-chromium/files/patch-cc_base_features.cc +++ b/www/ungoogled-chromium/files/patch-cc_base_features.cc @@ -1,11 +1,11 @@ ---- cc/base/features.cc.orig 2023-11-04 07:08:51 UTC +--- cc/base/features.cc.orig 2024-02-03 15:42:55 UTC +++ cc/base/features.cc -@@ -84,7 +84,7 @@ BASE_FEATURE(kNormalPriorityImageDecoding, +@@ -88,7 +88,7 @@ BASE_FEATURE(kNormalPriorityImageDecoding, // be using a separate flag to control the launch on GL. BASE_FEATURE(kUseDMSAAForTiles, "UseDMSAAForTiles", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/ungoogled-chromium/files/patch-chrome_app_app__management__strings.grdp b/www/ungoogled-chromium/files/patch-chrome_app_app__management__strings.grdp index 414d9b737109..e03479dc5c5b 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_app__management__strings.grdp +++ b/www/ungoogled-chromium/files/patch-chrome_app_app__management__strings.grdp @@ -1,11 +1,11 @@ ---- chrome/app/app_management_strings.grdp.orig 2023-12-23 12:33:28 UTC +--- chrome/app/app_management_strings.grdp.orig 2024-02-03 15:42:55 UTC +++ chrome/app/app_management_strings.grdp -@@ -194,7 +194,7 @@ +@@ -197,7 +197,7 @@ You can open and edit supported files with this app from Finder or other apps. To control which files open this app by default, <a href="#">learn how to set default apps on your device</a>. - + You can open and edit supported files with this app from your file browser or other apps. To control which files open this app by default, <a href="#">learn how to set default apps on your device</a>. diff --git a/www/ungoogled-chromium/files/patch-chrome_app_chrome__main.cc b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main.cc index 67152198dec3..e3a135d7cf5f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_chrome__main.cc +++ b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main.cc @@ -1,34 +1,43 @@ ---- chrome/app/chrome_main.cc.orig 2023-11-04 07:08:51 UTC +--- chrome/app/chrome_main.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/app/chrome_main.cc @@ -29,11 +29,11 @@ #include "chrome/app/notification_metrics.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/base_switches.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/app/chrome_main_linux.h" #endif -@@ -138,7 +138,7 @@ int ChromeMain(int argc, const char** argv) { +@@ -81,7 +81,7 @@ int ChromeMain(int argc, const char** argv) { + #error Unknown platform. + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + PossiblyDetermineFallbackChromeChannel(argv[0]); + #endif + +@@ -142,7 +142,7 @@ int ChromeMain(int argc, const char** argv) { SetUpBundleOverrides(); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) AppendExtraArgumentsToCommandLine(command_line); #endif -@@ -167,7 +167,7 @@ int ChromeMain(int argc, const char** argv) { +@@ -171,7 +171,7 @@ int ChromeMain(int argc, const char** argv) { headless_mode_handle = headless::InitHeadlessMode(); } else { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (headless::IsOldHeadlessMode()) { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) command_line->AppendSwitch(::headless::switches::kEnableCrashReporter); diff --git a/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc index 10fa79af0ded..1c4bd9a9c12e 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,112 +1,112 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/app/chrome_main_delegate.cc -@@ -145,7 +145,7 @@ +@@ -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 -@@ -189,16 +189,16 @@ +@@ -190,16 +190,16 @@ #include "v8/include/v8.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/environment.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "base/message_loop/message_pump_libevent.h" #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/policy_path_parser.h" #include "components/crash/core/app/crashpad.h" #endif -@@ -337,7 +337,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -338,7 +338,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 +@@ -423,7 +423,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) || -@@ -600,7 +600,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -601,7 +601,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. -@@ -690,7 +690,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat +@@ -691,7 +691,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( -@@ -1044,7 +1044,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv +@@ -1048,7 +1048,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv base::InitializeCpuReductionExperiment(); base::sequence_manager::internal::SequenceManagerImpl::InitializeFeatures(); base::sequence_manager::internal::ThreadController::InitializeFeatures(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) base::MessagePumpLibevent::InitializeFeatures(); #elif BUILDFLAG(IS_MAC) base::PlatformThread::InitFeaturesPostFieldTrial(); -@@ -1196,7 +1196,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1200,7 +1200,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo // TODO(crbug.com/1052397): Revisit the macro expression once build flag // switch of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // This will directly exit if the user asked for help. HandleHelpSwitches(command_line); #endif -@@ -1226,7 +1226,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1230,7 +1230,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo #if BUILDFLAG(IS_CHROMEOS) chromeos::dbus_paths::RegisterPathProvider(); #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) nacl::RegisterPathProvider(); #endif -@@ -1637,7 +1637,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1641,7 +1641,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)) { -@@ -1746,7 +1746,7 @@ absl::variant Chrome +@@ -1750,7 +1750,7 @@ absl::variant Chrome // This entry is not needed on Linux, where the NaCl loader // process is launched via nacl_helper instead. -#if BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) {switches::kNaClLoaderProcess, NaClMain}, #else {"", nullptr}, // To avoid constant array of size 0 diff --git a/www/ungoogled-chromium/files/patch-chrome_app_chromium__strings.grd b/www/ungoogled-chromium/files/patch-chrome_app_chromium__strings.grd index 15677f01c8b2..c75fad5e0529 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_chromium__strings.grd +++ b/www/ungoogled-chromium/files/patch-chrome_app_chromium__strings.grd @@ -1,38 +1,38 @@ ---- chrome/app/chromium_strings.grd.orig 2023-12-23 12:33:28 UTC +--- chrome/app/chromium_strings.grd.orig 2024-02-03 15:42:55 UTC +++ chrome/app/chromium_strings.grd @@ -315,7 +315,7 @@ If you update this file, be sure also to update google Welcome to Chromium; new browser window opened - + Welcome to Chromium -@@ -465,7 +465,7 @@ If you update this file, be sure also to update google +@@ -483,7 +483,7 @@ If you update this file, be sure also to update google To get future Chromium updates, you'll need Windows 10 or later. This computer is using Windows 8.1. - + Chromium may not function correctly because it is no longer supported on this Linux distribution -@@ -892,7 +892,7 @@ Permissions you've already given to websites and apps +@@ -920,7 +920,7 @@ Permissions you've already given to websites and apps - + Not used in Chromium. Placeholder to keep resource maps in sync. -@@ -1277,7 +1277,7 @@ Permissions you've already given to websites and apps +@@ -1299,7 +1299,7 @@ Permissions you've already given to websites and apps - + Not used in Chromium. Placeholder to keep resource maps in sync. diff --git a/www/ungoogled-chromium/files/patch-chrome_app_generated__resources.grd b/www/ungoogled-chromium/files/patch-chrome_app_generated__resources.grd index dd28a6a845f5..5e1c92e4ad19 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_generated__resources.grd +++ b/www/ungoogled-chromium/files/patch-chrome_app_generated__resources.grd @@ -1,92 +1,92 @@ ---- chrome/app/generated_resources.grd.orig 2023-12-23 12:33:28 UTC +--- chrome/app/generated_resources.grd.orig 2024-02-03 15:42:55 UTC +++ chrome/app/generated_resources.grd @@ -2,7 +2,7 @@ -@@ -3609,7 +3609,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -3665,7 +3665,7 @@ are declared in tools/grit/grit_rule.gni. - + Device Credentials -@@ -5494,7 +5494,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -5553,7 +5553,7 @@ are declared in tools/grit/grit_rule.gni. Read information about your browser, OS, device, installed software, registry values and files - + Read information about your browser, OS, device, installed software and files -@@ -6207,7 +6207,7 @@ Keep your key file in a safe place. You will need it t +@@ -6284,7 +6284,7 @@ Keep your key file in a safe place. You will need it t Old versions of Chrome Apps won't open on Windows devices after December 2022. Contact your administrator to update to a new version or remove this app. - + Old versions of Chrome Apps won't open on Linux devices after December 2022. Contact your administrator to update to a new version or remove this app. -@@ -6253,7 +6253,7 @@ Keep your key file in a safe place. You will need it t +@@ -6330,7 +6330,7 @@ Keep your key file in a safe place. You will need it t Old versions of Chrome apps won't open on Windows devices after December 2022. You can check if there's a new version available. - + Old versions of Chrome apps won't open on Linux devices after December 2022. You can check if there's a new version available. -@@ -10611,7 +10611,7 @@ Check your passwords anytime in Update - + Finish update -@@ -10958,7 +10958,7 @@ Check your passwords anytime in - + Use system title bar and borders -@@ -11956,7 +11956,7 @@ Check your passwords anytime in - + Share information about your device? -@@ -12364,7 +12364,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -12709,7 +12709,7 @@ Please help our engineers fix this problem. Tell us wh Set as default - + Minimize -@@ -14571,7 +14571,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -14940,7 +14940,7 @@ Please help our engineers fix this problem. Tell us wh Open Anyway - + System Signals Utilities diff --git a/www/ungoogled-chromium/files/patch-chrome_app_google__chrome__strings.grd b/www/ungoogled-chromium/files/patch-chrome_app_google__chrome__strings.grd index ebcc1f209c09..7010821a6d3e 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_google__chrome__strings.grd +++ b/www/ungoogled-chromium/files/patch-chrome_app_google__chrome__strings.grd @@ -1,38 +1,38 @@ ---- chrome/app/google_chrome_strings.grd.orig 2023-12-23 12:33:28 UTC +--- chrome/app/google_chrome_strings.grd.orig 2024-02-03 15:42:55 UTC +++ chrome/app/google_chrome_strings.grd @@ -301,7 +301,7 @@ chromium_strings.grd. --> Welcome to Chrome; new browser window opened - + Welcome to Google Chrome @@ -453,7 +453,7 @@ chromium_strings.grd. --> To get future Google Chrome updates, you'll need Windows 10 or later. This computer is using Windows 8.1. - + Google Chrome may not function correctly because it is no longer supported on this Linux distribution -@@ -877,7 +877,7 @@ Permissions you've already given to websites and apps +@@ -887,7 +887,7 @@ Permissions you've already given to websites and apps - + Relaunch to Update - Your tabs will reopen -@@ -1302,7 +1302,7 @@ Permissions you've already given to websites and apps +@@ -1306,7 +1306,7 @@ Permissions you've already given to websites and apps - + Relaunch to finish Chrome update diff --git a/www/ungoogled-chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd b/www/ungoogled-chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd index 196d15c1de10..92a05007281d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd +++ b/www/ungoogled-chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd @@ -1,29 +1,20 @@ ---- chrome/app/theme/chrome_unscaled_resources.grd.orig 2023-12-23 12:33:28 UTC +--- chrome/app/theme/chrome_unscaled_resources.grd.orig 2024-02-03 15:42:55 UTC +++ chrome/app/theme/chrome_unscaled_resources.grd -@@ -16,7 +16,7 @@ +@@ -14,7 +14,7 @@ + + - +- ++ + + +@@ -40,7 +40,7 @@ + + + - + - - - -@@ -63,7 +63,7 @@ - - - -- -+ - - - -@@ -77,7 +77,7 @@ - - - -- -+ - - - + + + diff --git a/www/ungoogled-chromium/files/patch-chrome_app_theme_theme__resources.grd b/www/ungoogled-chromium/files/patch-chrome_app_theme_theme__resources.grd index 9cbc7cac2c56..70f3a27eab57 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_theme_theme__resources.grd +++ b/www/ungoogled-chromium/files/patch-chrome_app_theme_theme__resources.grd @@ -1,59 +1,46 @@ ---- chrome/app/theme/theme_resources.grd.orig 2023-10-13 13:20:35 UTC +--- chrome/app/theme/theme_resources.grd.orig 2024-02-03 15:42:55 UTC +++ chrome/app/theme/theme_resources.grd -@@ -146,14 +146,14 @@ +@@ -153,14 +153,14 @@ - + - - - - + + + + - + - - -@@ -161,7 +161,7 @@ - - + + +@@ -168,7 +168,7 @@ + + - + - + - -@@ -173,7 +173,7 @@ + +@@ -178,7 +178,7 @@ + + - +- ++ -- -+ - - - -@@ -182,10 +182,10 @@ - - - -- -+ - - -- -+ - - - -@@ -194,7 +194,7 @@ - - - -- -+ + + +@@ -187,7 +187,7 @@ + + - - +- ++ + + + diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_BUILD.gn b/www/ungoogled-chromium/files/patch-chrome_browser_BUILD.gn index 4fef52ab5e8c..b471a7a1320d 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-01-17 09:38:09 UTC +--- chrome/browser/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/BUILD.gn -@@ -6526,6 +6526,13 @@ static_library("browser") { +@@ -6515,6 +6515,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 d0fd06a31585..6875e193fa0f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc @@ -1,180 +1,189 @@ ---- chrome/browser/about_flags.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/about_flags.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/about_flags.cc @@ -232,7 +232,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 -@@ -331,7 +331,7 @@ +@@ -330,7 +330,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/buildflags.h" #include "ui/ozone/public/ozone_switches.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -@@ -345,7 +345,7 @@ +@@ -344,7 +344,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" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -@@ -475,7 +475,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap +@@ -482,7 +482,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, -@@ -1464,7 +1464,7 @@ const FeatureEntry::FeatureVariation kChromeRefresh202 +@@ -1452,7 +1452,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 kShortcutBoostSearchAndUrl1414[] = { - {"ShortcutBoostSearchScore", "1414"}, - {"ShortcutBoostUrlScore", "1414"}}; -@@ -5304,13 +5304,13 @@ const FeatureEntry kFeatureEntries[] = { + const FeatureEntry::FeatureParam kShortcutBoostSingleUrl[] = { + {"ShortcutBoostSearchScore", "0"}, + {"ShortcutBoostNonTopHitThreshold", "0"}, +@@ -3935,7 +3935,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 +@@ -4684,7 +4684,7 @@ const FeatureEntry kFeatureEntries[] = { + "DXGIWaitableSwapChain"), + }, + #endif // BUILDFLAG(IS_WIN) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + { + "fluent-overlay-scrollbars", + flag_descriptions::kFluentOverlayScrollbarsName, +@@ -5228,13 +5228,13 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kWebShare)}, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"ozone-platform-hint", flag_descriptions::kOzonePlatformHintName, flag_descriptions::kOzonePlatformHintDescription, kOsLinux, MULTI_VALUE_TYPE(kOzonePlatformHintRuntimeChoices)}, #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, -@@ -5621,7 +5621,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(feed::kFeedSportsCard)}, +@@ -5548,7 +5548,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)}, -@@ -6260,7 +6260,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6201,7 +6201,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, -@@ -7096,7 +7096,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7056,7 +7056,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(features::kAsyncDns)}, -@@ -8131,7 +8131,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8075,7 +8075,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(supervised_user::kEnableProtoApiForClassifyUrl)}, #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) -#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, -@@ -8156,7 +8156,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8100,7 +8100,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE( 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) {"enable-family-link-extensions-permissions", flag_descriptions:: kEnableExtensionsPermissionsForSupervisedUsersOnDesktopName, -@@ -8826,7 +8826,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8750,7 +8750,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"quick-commands", flag_descriptions::kQuickCommandsName, flag_descriptions::kQuickCommandsDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kQuickCommands)}, -@@ -9097,7 +9097,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9024,7 +9024,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, -@@ -9139,7 +9139,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9066,7 +9066,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, -@@ -9697,7 +9697,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9657,7 +9657,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"document-picture-in-picture-api", flag_descriptions::kDocumentPictureInPictureApiName, flag_descriptions::kDocumentPictureInPictureApiDescription, -@@ -10804,7 +10804,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10781,7 +10781,7 @@ const FeatureEntry kFeatureEntries[] = { + kOsDesktop | kOsAndroid, FEATURE_VALUE_TYPE(features::kProcessPerSiteUpToMainFrameThreshold)}, - #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#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 | kOsFuchsia), -@@ -10986,7 +10986,7 @@ const FeatureEntry kFeatureEntries[] = { + static_cast(kOsMac | kOsWin | kOsLinux), +@@ -10947,7 +10947,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, -@@ -11300,7 +11300,7 @@ const FeatureEntry kFeatureEntries[] = { - kOsDesktop, FEATURE_VALUE_TYPE(blink::features::kPasswordStrongLabel)}, - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - {"attach-logs-to-autofill-rater-extentsion-report", - flag_descriptions::kAttachLogsToAutofillRaterExtensionReportName, - flag_descriptions::kAttachLogsToAutofillRaterExtensionReportDescription, -@@ -11309,7 +11309,7 @@ const FeatureEntry kFeatureEntries[] = { - kAttachLogsToAutofillRaterExtensionReport)}, - #endif +@@ -11338,7 +11338,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kAutofillEnableCardBenefitsDescription, kOsAll, + FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardBenefits)}, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - {"fill-multi-line", flag_descriptions::kFillMultiLineName, - flag_descriptions::kFillMultiLineDescription, kOsWin | kOsLinux | kOsMac, - FEATURE_VALUE_TYPE(compose::features::kFillMultiLine)}, + {flag_descriptions::kAutofillContentEditablesId, + flag_descriptions::kAutofillContentEditablesName, + flag_descriptions::kAutofillContentEditablesDescription, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_accessibility_pdf__ocr__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_accessibility_pdf__ocr__controller.cc new file mode 100644 index 000000000000..37545e2bd4e5 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_accessibility_pdf__ocr__controller.cc @@ -0,0 +1,11 @@ +--- chrome/browser/accessibility/pdf_ocr_controller.cc.orig 2024-02-03 15:42:55 UTC ++++ chrome/browser/accessibility/pdf_ocr_controller.cc +@@ -86,7 +86,7 @@ void AnnounceToScreenReader(const int message_id) { + // TODO(crbug.com/1442928): Sending announcements results in a failure in + // `AuraLinuxAccessibilityInProcessBrowserTest::IndexInParentWithModal` and + // flaky fail when running Chrome. +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + const Browser* browser = BrowserList::GetInstance()->GetLastActive(); + if (!browser) { + VLOG(2) << "Browser is not ready to announce"; 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 bf6ce9ac8fd4..404a68d59f09 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 2023-06-05 19:39:05 UTC +--- 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 -@@ -25,7 +25,7 @@ ExtensionApps::~ExtensionApps() = default; +@@ -24,7 +24,7 @@ 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 (extensions::IsExtensionUnsupportedDeprecatedApp(profile(), extension->id())) { return false; 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 96dce6508dba..5d63c1e5cd26 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 2023-12-23 12:33:28 UTC +--- chrome/browser/browser_features.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/browser_features.cc @@ -28,7 +28,7 @@ BASE_FEATURE(kClosedTabCache, 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); -@@ -292,7 +292,7 @@ BASE_FEATURE(kOmniboxTriggerForNoStatePrefetch, - "OmniboxTriggerForNoStatePrefetch", - base::FEATURE_DISABLED_BY_DEFAULT); - --#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(kPayloadTestComponent, - "PayloadTestComponent", +@@ -286,7 +286,7 @@ BASE_FEATURE(kNewTabPageTriggerForPrerender2, + 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_browser__features.h b/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.h deleted file mode 100644 index 5fa408811eee..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/browser_features.h.orig 2023-12-23 12:33:28 UTC -+++ chrome/browser/browser_features.h -@@ -121,7 +121,7 @@ BASE_DECLARE_FEATURE(kAutocompleteActionPredictorConfi - - BASE_DECLARE_FEATURE(kOmniboxTriggerForNoStatePrefetch); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - BASE_DECLARE_FEATURE(kPayloadTestComponent); - #endif - diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc index 1ead4591c186..cd2a55388044 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc @@ -1,29 +1,29 @@ ---- chrome/browser/browser_process_impl.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/browser_process_impl.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/browser_process_impl.cc @@ -218,7 +218,7 @@ #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/error_reporting/chrome_js_error_report_processor.h" // nogncheck #endif -@@ -1217,7 +1217,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { +@@ -1224,7 +1224,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { ApplyMetricsReportingPolicy(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ChromeJsErrorReportProcessor::Create(); #endif -@@ -1462,7 +1462,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1470,7 +1470,7 @@ void BrowserProcessImpl::Unpin() { // Mac is currently not supported. // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) bool BrowserProcessImpl::IsRunningInBackground() const { // Check if browser is in the background. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.h b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.h index e348b2a30c7e..0eb8f45a5164 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.h @@ -1,11 +1,11 @@ ---- chrome/browser/browser_process_impl.h.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/browser_process_impl.h.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/browser_process_impl.h -@@ -384,7 +384,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -386,7 +386,7 @@ class BrowserProcessImpl : public BrowserProcess, // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) base::RepeatingTimer autoupdate_timer_; // Gets called by autoupdate timer to see if browser needs restart and can be diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc index bb2823ce451a..d26ece805458 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 2023-12-23 12:33:28 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -130,13 +130,13 @@ +@@ -126,13 +126,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 -@@ -224,7 +224,7 @@ +@@ -218,7 +218,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_search/visual_search_suggestions_service_factory.h" + #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" -@@ -863,7 +863,7 @@ void BindScreen2xMainContentExtractor( +@@ -862,7 +862,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< -@@ -1009,7 +1009,7 @@ void PopulateChromeFrameBinders( +@@ -1004,7 +1004,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)); -@@ -1017,7 +1017,7 @@ void PopulateChromeFrameBinders( +@@ -1012,7 +1012,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 -@@ -1097,7 +1097,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1094,7 +1094,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); -@@ -1118,7 +1118,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1115,7 +1115,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 -@@ -1651,7 +1651,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1653,7 +1653,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 1079adeec055..72552d59f9fc 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,78 +1,104 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2024-01-17 09:38:09 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -246,11 +246,11 @@ +@@ -247,11 +247,11 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/first_run/upgrade_util_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/crash/core/app/crashpad.h" #endif -@@ -284,14 +284,14 @@ +@@ -285,14 +285,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" -@@ -1039,7 +1039,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -354,14 +354,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"); + +@@ -1068,7 +1068,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 . -@@ -1095,7 +1095,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1124,7 +1124,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( -@@ -1331,7 +1331,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1323,7 +1323,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( +@@ -1372,7 +1372,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(); } -@@ -1437,7 +1437,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl( +@@ -1478,7 +1478,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(); } -@@ -1969,7 +1969,7 @@ bool ChromeBrowserMainParts::ProcessSingletonNotificat +@@ -2008,7 +2008,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__content__browser__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc index 250a74c43658..56ceeeb1ed88 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,160 +1,160 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -446,7 +446,7 @@ +@@ -458,7 +458,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) -@@ -547,12 +547,12 @@ +@@ -561,12 +561,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 -@@ -563,14 +563,14 @@ +@@ -577,14 +577,14 @@ #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/profile_management_navigation_throttle.h" #include "chrome/browser/ui/webui/app_settings/web_app_settings_navigation_throttle.h" #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/navigation_throttle.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -586,7 +586,7 @@ +@@ -600,7 +600,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" -@@ -1566,7 +1566,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre +@@ -1535,7 +1535,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre registry->RegisterBooleanPref(prefs::kNativeClientForceAllowed, false); registry->RegisterBooleanPref( policy::policy_prefs::kPPAPISharedImagesForVideoDecoderAllowed, true); -#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) -@@ -1690,7 +1690,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1659,7 +1659,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) -@@ -1727,7 +1727,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1696,7 +1696,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 -@@ -1748,7 +1748,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1717,7 +1717,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()); -@@ -1767,7 +1767,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1736,7 +1736,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>()); -@@ -2601,6 +2601,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2574,6 +2574,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin #if(0) #if BUILDFLAG(IS_ANDROID) bool enable_crash_reporter = true; +#elif BUILDFLAG(IS_BSD) + bool enable_crash_reporter = false; #elif BUILDFLAG(IS_CHROMEOS) bool enable_crash_reporter = false; if (crash_reporter::IsCrashpadEnabled()) { -@@ -2966,7 +2968,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2915,7 +2917,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)) { -@@ -4637,7 +4639,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -4597,7 +4599,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, -@@ -5192,7 +5194,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5160,7 +5162,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); -@@ -5202,7 +5204,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5170,7 +5172,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); -@@ -5233,7 +5235,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5201,7 +5203,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); -@@ -7101,7 +7103,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS +@@ -7105,7 +7107,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 75b592168657..7b5d60dbee23 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 2023-12-23 12:33:28 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -484,7 +484,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -495,7 +495,7 @@ class ChromeContentBrowserClient : public content::Con void OverridePageVisibilityState( content::RenderFrameHost* render_frame_host, content::PageVisibilityState* visibility_state) override; -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) void GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_component__updater_registration.cc b/www/ungoogled-chromium/files/patch-chrome_browser_component__updater_registration.cc deleted file mode 100644 index fdcdb8513898..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_component__updater_registration.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/component_updater/registration.cc.orig 2023-12-23 12:33:28 UTC -+++ chrome/browser/component_updater/registration.cc -@@ -223,7 +223,7 @@ void RegisterComponentsForUpdate() { - - RegisterTpcdMetadataComponent(cus); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - // TODO(crbug.com/1490685): Remove this test component once the - // experiment has concluded. - if (base::FeatureList::IsEnabled(features::kPayloadTestComponent)) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_compose_chrome__compose__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_compose_chrome__compose__client.cc new file mode 100644 index 000000000000..7dd1017f2706 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_compose_chrome__compose__client.cc @@ -0,0 +1,19 @@ +--- chrome/browser/compose/chrome_compose_client.cc.orig 2024-02-03 15:42:55 UTC ++++ chrome/browser/compose/chrome_compose_client.cc +@@ -170,14 +170,14 @@ void ChromeComposeClient::CloseUI(compose::mojom::Clos + void ChromeComposeClient::ApproveConsent() { + pref_service_->SetBoolean( + unified_consent::prefs::kPageContentCollectionEnabled, true); +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + pref_service_->SetBoolean(prefs::kPrefHasAcceptedComposeConsent, true); + #endif + UpdateAllSessionsWithConsentApproved(); + } + + void ChromeComposeClient::AcknowledgeConsentDisclaimer() { +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + pref_service_->SetBoolean(prefs::kPrefHasAcceptedComposeConsent, true); + #endif + UpdateAllSessionsWithConsentApproved(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_content__settings_one__time__permission__provider.cc b/www/ungoogled-chromium/files/patch-chrome_browser_content__settings_one__time__permission__provider.cc index b399a104be8f..2face7964fe6 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_content__settings_one__time__permission__provider.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_content__settings_one__time__permission__provider.cc @@ -1,30 +1,30 @@ ---- chrome/browser/content_settings/one_time_permission_provider.cc.orig 2023-11-04 07:08:51 UTC +--- chrome/browser/content_settings/one_time_permission_provider.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/content_settings/one_time_permission_provider.cc -@@ -226,8 +226,13 @@ void OneTimePermissionProvider::OnSuspend() { +@@ -231,8 +231,13 @@ void OneTimePermissionProvider::OnSuspend() { while (rule_iterator && rule_iterator->HasNext()) { auto rule = rule_iterator->Next(); +#if defined(__clang__) && (__clang_major__ >= 16) patterns_to_delete.emplace_back(setting_type, rule->primary_pattern, rule->secondary_pattern); +#else + patterns_to_delete.emplace_back(ContentSettingEntry{setting_type, rule->primary_pattern, + rule->secondary_pattern}); +#endif permissions::PermissionUmaUtil::RecordOneTimePermissionEvent( setting_type, permissions::OneTimePermissionEvent::EXPIRED_ON_SUSPEND); -@@ -329,8 +334,13 @@ void OneTimePermissionProvider::DeleteEntriesMatchingG +@@ -334,8 +339,13 @@ void OneTimePermissionProvider::DeleteEntriesMatchingG auto rule = rule_iterator->Next(); if (rule->primary_pattern.Matches(origin_gurl) && rule->secondary_pattern.Matches(origin_gurl)) { +#if defined(__clang__) && (__clang_major__ >= 16) patterns_to_delete.emplace_back( content_setting_type, rule->primary_pattern, rule->secondary_pattern); +#else + patterns_to_delete.emplace_back( + ContentSettingEntry{content_setting_type, rule->primary_pattern, rule->secondary_pattern}); +#endif permissions::PermissionUmaUtil::RecordOneTimePermissionEvent( content_setting_type, trigger_event); } 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 18c7c76ed788..0b94540c52d3 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 2023-12-23 12:33:28 UTC +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1594,7 +1594,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1604,7 +1604,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferreredForFile( const base::FilePath& path) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) { return !download_prefs_->ShouldOpenPdfInSystemReader(); } -@@ -1660,7 +1660,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow +@@ -1670,7 +1670,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 896bea41fc9d..e5e821de0a9a 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 2023-12-23 12:33:28 UTC +--- chrome/browser/download/download_item_model.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/download/download_item_model.cc -@@ -752,7 +752,7 @@ bool DownloadItemModel::IsCommandChecked( +@@ -753,7 +753,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(); -@@ -798,7 +798,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand +@@ -799,7 +799,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); -@@ -1078,7 +1078,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe +@@ -1079,7 +1079,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 3b01f73d9a1f..5be8ba6ace66 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 2023-12-23 12:33:28 UTC +--- chrome/browser/download/download_prefs.cc.orig 2024-02-03 15:42:55 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 @@ #include "chrome/browser/download/bubble/download_bubble_prefs.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 { // Consider downloads 'dangerous' if they go to the home directory on Linux and // to the desktop on any platform. bool DownloadPathIsDangerous(const base::FilePath& download_path) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath home_dir = base::GetHomeDir(); if (download_path == home_dir) { return true; -@@ -181,7 +186,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi +@@ -179,7 +184,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 -@@ -303,7 +308,7 @@ void DownloadPrefs::RegisterProfilePrefs( +@@ -301,7 +306,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) -@@ -463,7 +468,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens +@@ -461,7 +466,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; -@@ -495,7 +500,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons +@@ -493,7 +498,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(); -@@ -526,7 +531,7 @@ void DownloadPrefs::SaveAutoOpenState() { +@@ -524,7 +529,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; -@@ -650,7 +655,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa +@@ -648,7 +653,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_connectors_analysis_analysis__service__settings.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc index ef116a33cc9d..aeb244aa14f2 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc @@ -1,11 +1,11 @@ ---- chrome/browser/enterprise/connectors/analysis/analysis_service_settings.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/enterprise/connectors/analysis/analysis_service_settings.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/enterprise/connectors/analysis/analysis_service_settings.cc -@@ -143,7 +143,7 @@ AnalysisServiceSettings::AnalysisServiceSettings( +@@ -150,7 +150,7 @@ AnalysisServiceSettings::AnalysisServiceSettings( const char* verification_key = kKeyWindowsVerification; #elif BUILDFLAG(IS_MAC) const char* verification_key = kKeyMacVerification; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char* verification_key = kKeyLinuxVerification; #endif 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 013de666cc0d..51d963b0a2fd 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 2023-12-23 12:33:28 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1366,6 +1366,10 @@ static_library("extensions") { +@@ -1371,6 +1371,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 58ff5224bd5c..9750db8e83d7 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 2023-12-23 12:33:28 UTC +--- 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 -@@ -43,7 +43,7 @@ - #include "extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.h" +@@ -44,7 +44,7 @@ #include "extensions/browser/api/networking_private/networking_private_delegate_factory.h" + #include "printing/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 -@@ -118,7 +118,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt +@@ -126,7 +126,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_enterprise__reporting__private_chrome__desktop__report__request__helper.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc index a1298a5a5312..21a210163251 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc @@ -1,29 +1,29 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc @@ -24,7 +24,7 @@ #include "base/win/registry.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/environment.h" #include "base/nix/xdg_util.h" #endif -@@ -256,7 +256,7 @@ base::FilePath GetEndpointVerificationDir() { +@@ -255,7 +255,7 @@ base::FilePath GetEndpointVerificationDir() { bool got_path = false; #if BUILDFLAG(IS_WIN) got_path = base::PathService::Get(base::DIR_LOCAL_APP_DATA, &path); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::unique_ptr env(base::Environment::Create()); path = base::nix::GetXDGDirectory(env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir); -@@ -267,7 +267,7 @@ base::FilePath GetEndpointVerificationDir() { +@@ -266,7 +266,7 @@ base::FilePath GetEndpointVerificationDir() { if (!got_path) return path; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) path = path.AppendASCII("google"); #else path = path.AppendASCII("Google"); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc index e3f255d946ae..9eb96eabdc78 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc @@ -1,38 +1,38 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc @@ -32,7 +32,7 @@ #include "components/reporting/util/statusor.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/strings/string_util.h" #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h" #include "chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h" @@ -105,7 +105,7 @@ api::enterprise_reporting_private::ContextInfo ToConte return info; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) device_signals::SignalsAggregationRequest CreateAggregationRequest( device_signals::SignalName signal_name) { @@ -166,7 +166,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: // getPersistentSecret -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) EnterpriseReportingPrivateGetPersistentSecretFunction:: EnterpriseReportingPrivateGetPersistentSecretFunction() = default; -@@ -593,7 +593,7 @@ void EnterpriseReportingPrivateEnqueueRecordFunction:: +@@ -592,7 +592,7 @@ void EnterpriseReportingPrivateEnqueueRecordFunction:: } #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // getFileSystemInfo diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_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 650059c88b6b..70260fc8c6bf 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 2023-12-23 12:33:28 UTC +--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc -@@ -601,7 +601,7 @@ void PasswordsPrivateDelegateImpl::OnFetchingFamilyMem +@@ -597,7 +597,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_settings__private_prefs__util.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc index 0500e77eb932..fe834aef36d1 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 2023-11-04 07:08:51 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -193,7 +193,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -194,7 +194,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist (*s_allowlist)[::prefs::kSidePanelHorizontalAlignment] = - settings_api::PrefType::PREF_TYPE_BOOLEAN; + settings_api::PrefType::kBoolean; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kUseCustomChromeFrame] = - settings_api::PrefType::PREF_TYPE_BOOLEAN; + settings_api::PrefType::kBoolean; #endif -@@ -205,7 +205,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist - settings_api::PrefType::PREF_TYPE_STRING; - (*s_allowlist)[::prefs::kPolicyThemeColor] = - settings_api::PrefType::PREF_TYPE_NUMBER; +@@ -203,7 +203,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::PREF_TYPE_NUMBER; + (*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_webrtc__logging__private_webrtc__logging__private__api.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc index 562190140f2e..e932e7b72d73 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc @@ -1,29 +1,29 @@ ---- chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc @@ -29,7 +29,7 @@ #include "extensions/browser/process_manager.h" #include "extensions/common/error_utils.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "extensions/common/permissions/permissions_data.h" #endif @@ -38,7 +38,7 @@ namespace { bool CanEnableAudioDebugRecordingsFromExtension( const extensions::Extension* extension) { bool enabled_by_permissions = false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (extension) { enabled_by_permissions = extension->permissions_data()->active_permissions().HasAPIPermission( -@@ -580,7 +580,7 @@ void WebrtcLoggingPrivateStartEventLoggingFunction::Fi +@@ -576,7 +576,7 @@ void WebrtcLoggingPrivateStartEventLoggingFunction::Fi ExtensionFunction::ResponseAction WebrtcLoggingPrivateGetLogsDirectoryFunction::Run() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Unlike other WebrtcLoggingPrivate functions that take a RequestInfo object, // this function shouldn't be called by a component extension on behalf of // some web code. It returns a DirectoryEntry for use directly in the calling diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc index 76a832c4d16e..fc107f3eb034 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 2023-11-04 07:08:51 UTC +--- 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 -@@ -907,7 +907,7 @@ void WebstorePrivateBeginInstallWithManifest3Function: +@@ -892,7 +892,7 @@ void WebstorePrivateBeginInstallWithManifest3Function: 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 a38aaf39990d..ef67ef69c571 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 2023-12-23 12:33:28 UTC +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -321,7 +321,7 @@ const struct { +@@ -323,7 +323,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 355357c4f623..8f2209bd649d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc @@ -1,83 +1,83 @@ ---- chrome/browser/flag_descriptions.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/flag_descriptions.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/flag_descriptions.cc -@@ -7255,7 +7255,7 @@ const char kLacrosMergeIcuDataFileDescription[] = +@@ -7424,7 +7424,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 " -@@ -7494,7 +7494,7 @@ const char kSearchWebInSidePanelDescription[] = +@@ -7664,7 +7664,7 @@ const char kSearchWebInSidePanelDescription[] = // Random platform combinations ----------------------------------------------- #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kQuickCommandsName[] = "Quick Commands"; const char kQuickCommandsDescription[] = "Enable a text interface to browser features. Invoke with Ctrl-Space."; -@@ -7503,7 +7503,7 @@ const char kQuickCommandsDescription[] = +@@ -7673,7 +7673,7 @@ const char kQuickCommandsDescription[] = // BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kFollowingFeedSidepanelName[] = "Following feed in the sidepanel"; const char kFollowingFeedSidepanelDescription[] = "Enables the following feed in the sidepanel."; -@@ -7518,7 +7518,7 @@ const char kEnableProtoApiForClassifyUrlDescription[] +@@ -7688,7 +7688,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[] = -@@ -7542,7 +7542,7 @@ const char kWebShareDescription[] = +@@ -7712,7 +7712,7 @@ const char kWebShareDescription[] = "platforms."; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) const char kOzonePlatformHintChoiceDefault[] = "Default"; const char kOzonePlatformHintChoiceAuto[] = "Auto"; const char kOzonePlatformHintChoiceX11[] = "X11"; -@@ -7562,7 +7562,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti +@@ -7732,7 +7732,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."; -@@ -7576,7 +7576,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail +@@ -7746,7 +7746,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail "storage and requests initial sync."; #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) -@@ -7675,7 +7675,7 @@ const char kElasticOverscrollDescription[] = +@@ -7852,7 +7852,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."; -@@ -7721,7 +7721,7 @@ const char kEnableAudioFocusEnforcementDescription[] = - "any one time. Requires #enable-media-session-service to be enabled too."; - #endif // BUILDFLAG(IS_CHROMEOS_ASH) +@@ -7904,7 +7904,7 @@ const char kComposeName[] = "CCO Edits"; + const char kComposeDescription[] = "Enables CCO editing feature"; + #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 096de91b0cff..e3fe84bb172a 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h @@ -1,89 +1,89 @@ ---- chrome/browser/flag_descriptions.h.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/flag_descriptions.h.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/flag_descriptions.h -@@ -4172,7 +4172,7 @@ extern const char kLacrosMergeIcuDataFileName[]; +@@ -4260,7 +4260,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) -@@ -4312,14 +4312,14 @@ extern const char kSearchWebInSidePanelDescription[]; +@@ -4400,14 +4400,14 @@ extern const char kSearchWebInSidePanelDescription[]; // Random platform combinations ----------------------------------------------- #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kQuickCommandsName[]; extern const char kQuickCommandsDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // defined (OS_FUCHSIA) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kWebShareName[]; extern const char kWebShareDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -@@ -4329,7 +4329,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa +@@ -4417,7 +4417,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa extern const char kWebBluetoothConfirmPairingSupportDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kOzonePlatformHintChoiceDefault[]; extern const char kOzonePlatformHintChoiceAuto[]; extern const char kOzonePlatformHintChoiceX11[]; -@@ -4339,7 +4339,7 @@ extern const char kOzonePlatformHintName[]; +@@ -4427,7 +4427,7 @@ extern const char kOzonePlatformHintName[]; extern const char kOzonePlatformHintDescription[]; #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kSkipUndecryptablePasswordsName[]; extern const char kSkipUndecryptablePasswordsDescription[]; -@@ -4347,13 +4347,13 @@ extern const char kForcePasswordInitialSyncWhenDecrypt +@@ -4435,13 +4435,13 @@ extern const char kForcePasswordInitialSyncWhenDecrypt extern const char kForcePasswordInitialSyncWhenDecryptionFailsDescription[]; #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) || -@@ -4364,7 +4364,7 @@ extern const char kEnableProtoApiForClassifyUrlName[]; +@@ -4452,7 +4452,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[]; -@@ -4441,7 +4441,7 @@ extern const char kElasticOverscrollDescription[]; +@@ -4534,7 +4534,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[]; -@@ -4471,7 +4471,7 @@ extern const char kEnableAudioFocusEnforcementName[]; - extern const char kEnableAudioFocusEnforcementDescription[]; - #endif // BUILDFLAG(IS_CHROMEOS_ASH) +@@ -4570,7 +4570,7 @@ extern const char kComposeName[]; + extern const char kComposeDescription[]; + #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_media__galleries_media__file__system__registry.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc index 2ad587fe56a5..7b34614eaebf 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc @@ -1,16 +1,16 @@ ---- chrome/browser/media_galleries/media_file_system_registry.cc.orig 2023-08-18 10:26:52 UTC +--- chrome/browser/media_galleries/media_file_system_registry.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/media_galleries/media_file_system_registry.cc -@@ -586,7 +586,12 @@ class MediaFileSystemRegistry::MediaFileSystemContextI +@@ -584,7 +584,12 @@ class MediaFileSystemRegistry::MediaFileSystemContextI // Constructor in 'private' section because depends on private class definition. MediaFileSystemRegistry::MediaFileSystemRegistry() : file_system_context_(new MediaFileSystemContextImpl) { - StorageMonitor::GetInstance()->AddObserver(this); + /* + * This conditional is needed for shutdown. Destructors + * try to get the media file system registry. + */ + if (StorageMonitor::GetInstance()) + StorageMonitor::GetInstance()->AddObserver(this); } MediaFileSystemRegistry::~MediaFileSystemRegistry() { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc deleted file mode 100644 index 2d734b26fc96..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/media/webrtc/webrtc_event_log_uploader.cc.orig 2023-07-21 09:49:17 UTC -+++ chrome/browser/media/webrtc/webrtc_event_log_uploader.cc -@@ -42,7 +42,7 @@ const char kProduct[] = "Chrome"; - const char kProduct[] = "Chrome_Mac"; - #elif BUILDFLAG(IS_CHROMEOS_ASH) - const char kProduct[] = "Chrome_ChromeOS"; --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - const char kProduct[] = "Chrome_Linux"; - #elif BUILDFLAG(IS_ANDROID) - const char kProduct[] = "Chrome_Android"; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc index 90eb8474fc66..5fb1f8f16b15 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc @@ -1,13 +1,11 @@ ---- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2023-08-18 10:26:52 UTC +--- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/media/webrtc/webrtc_log_uploader.cc -@@ -291,6 +291,10 @@ void WebRtcLogUploader::SetupMultipart( - const char product[] = "Chrome_ChromeOS"; - #elif BUILDFLAG(IS_FUCHSIA) - const char product[] = "Chrome_Fuchsia"; -+#elif defined(OS_OPENBSD) -+ const char product[] = "Chrome_OpenBSD"; -+#elif defined(OS_FREEBSD) -+ const char product[] = "Chrome_FreeBSD"; +@@ -100,7 +100,7 @@ std::string GetLogUploadProduct() { + const char product[] = "Chrome_Mac"; + // 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) + #if !defined(ADDRESS_SANITIZER) + const char product[] = "Chrome_Linux"; #else - #error Platform not supported. - #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc index 81e65df077ef..e954a3a19498 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc @@ -1,33 +1,33 @@ ---- chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/media/webrtc/webrtc_logging_controller.cc @@ -25,10 +25,10 @@ #include "components/webrtc_logging/browser/text_log_list.h" #include "content/public/browser/render_process_host.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/public/browser/child_process_security_policy.h" #include "storage/browser/file_system/isolated_context.h" -#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) using webrtc_event_logging::WebRtcEventLogManager; -@@ -284,7 +284,7 @@ void WebRtcLoggingController::StartEventLogging( +@@ -288,7 +288,7 @@ void WebRtcLoggingController::StartEventLogging( web_app_id, callback); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void WebRtcLoggingController::GetLogsDirectory( LogsDirectoryCallback callback, LogsDirectoryErrorCallback error_callback) { -@@ -329,7 +329,7 @@ void WebRtcLoggingController::GrantLogsDirectoryAccess +@@ -334,7 +334,7 @@ void WebRtcLoggingController::GrantLogsDirectoryAccess FROM_HERE, base::BindOnce(std::move(callback), file_system.id(), registered_name)); } -#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void WebRtcLoggingController::OnRtpPacket( std::unique_ptr packet_header, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h index c7248c4978bf..01d95274459d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h @@ -1,20 +1,20 @@ ---- chrome/browser/media/webrtc/webrtc_logging_controller.h.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/media/webrtc/webrtc_logging_controller.h.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/media/webrtc/webrtc_logging_controller.h -@@ -134,7 +134,7 @@ class WebRtcLoggingController +@@ -133,7 +133,7 @@ class WebRtcLoggingController size_t web_app_id, const StartEventLoggingCallback& callback); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Ensures that the WebRTC Logs directory exists and then grants render // process access to the 'WebRTC Logs' directory, and invokes |callback| with // the ids necessary to create a DirectoryEntry object. -@@ -199,7 +199,7 @@ class WebRtcLoggingController +@@ -197,7 +197,7 @@ class WebRtcLoggingController content::BrowserContext* GetBrowserContext() const; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Grants the render process access to the 'WebRTC Logs' directory, and // invokes |callback| with the ids necessary to create a DirectoryEntry // object. If the |logs_path| couldn't be created or found, |error_callback| diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_memory__details.cc b/www/ungoogled-chromium/files/patch-chrome_browser_memory__details.cc index fbdd427c4108..4e1da4080755 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_memory__details.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_memory__details.cc @@ -1,20 +1,20 @@ ---- chrome/browser/memory_details.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/memory_details.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/memory_details.cc @@ -38,7 +38,7 @@ #include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h" #include "ui/base/l10n/l10n_util.h" -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) #include "content/public/browser/zygote_host/zygote_host_linux.h" #endif @@ -335,7 +335,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() { - std::ref(process))); + }); } -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) if (content::ZygoteHost::GetInstance()->IsZygotePid(process.pid)) { process.process_type = content::PROCESS_TYPE_ZYGOTE; } diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_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 1bb40b2461e5..0f0589ee302e 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 2023-11-04 07:08:51 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc @@ -78,8 +78,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" -@@ -108,7 +110,7 @@ +@@ -104,7 +106,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) -@@ -117,7 +119,7 @@ +@@ -113,7 +115,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 -@@ -917,7 +919,7 @@ void RecordStartupMetrics() { +@@ -837,7 +839,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, -@@ -1239,11 +1241,11 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt +@@ -1145,11 +1147,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__browser__main__extra__parts__metrics.h b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h index 618333dd53d0..884b8ffe80c2 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h @@ -1,20 +1,20 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h.orig 2023-09-01 04:52:40 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h @@ -33,7 +33,7 @@ class PowerMetricsReporter; class ProcessMonitor; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class PressureMetricsReporter; #endif // BUILDFLAG(IS_LINUX) -@@ -139,7 +139,7 @@ class ChromeBrowserMainExtraPartsMetrics : public Chro +@@ -131,7 +131,7 @@ class ChromeBrowserMainExtraPartsMetrics : public Chro std::unique_ptr battery_discharge_reporter_; #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Reports pressure metrics. std::unique_ptr pressure_metrics_reporter_; #endif // BUILDFLAG(IS_LINUX) 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 765b133fbd40..8ace2339f351 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,56 +1,56 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -184,7 +184,7 @@ +@@ -185,7 +185,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 @@ +@@ -202,7 +202,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) - #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) - #include "chrome/browser/metrics/family_link_user_metrics_provider.h" - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || - // BUILDFLAG(IS_CHROMEOS_LACROS))||BUILDFLAG(IS_ANDROID)) -@@ -810,7 +810,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -806,7 +806,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 -@@ -894,7 +894,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic - +@@ -891,7 +891,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + #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()); -@@ -1013,7 +1013,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || +@@ -1004,7 +1004,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) -@@ -1212,7 +1212,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve - #endif +@@ -1204,7 +1204,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) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + #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( 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 40e8b406f606..579260e4a05e 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 2023-12-23 12:33:28 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/net/system_network_context_manager.cc @@ -92,7 +92,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" @@ -136,7 +136,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; @@ -144,7 +144,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) @@ -190,7 +190,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) @@ -205,7 +205,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) @@ -215,7 +215,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 @@ -257,11 +257,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 || @@ -277,7 +277,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) @@ -472,7 +472,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) {} @@ -530,7 +530,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) @@ -544,7 +544,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) -@@ -577,7 +577,7 @@ SystemNetworkContextManager::SystemNetworkContextManag - #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) +@@ -570,7 +570,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:: -@@ -632,7 +632,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -625,7 +625,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) -@@ -661,7 +661,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe - registry->RegisterBooleanPref(prefs::kChromeRootStoreEnabled, false); - #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) +@@ -649,7 +649,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, -@@ -670,11 +670,11 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -658,11 +658,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) -@@ -727,7 +727,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea +@@ -715,7 +715,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) -@@ -938,7 +938,7 @@ bool SystemNetworkContextManager::IsNetworkSandboxEnab +@@ -929,7 +929,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; } -@@ -1052,7 +1052,7 @@ void SystemNetworkContextManager::UpdateChromeRootStor - #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) +@@ -1010,7 +1010,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 e6d3afbe29e6..9dfce83009dd 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 2023-12-23 12:33:28 UTC +--- chrome/browser/net/system_network_context_manager.h.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/net/system_network_context_manager.h @@ -185,7 +185,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: -@@ -229,7 +229,7 @@ class SystemNetworkContextManager { - #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) +@@ -221,7 +221,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(); -@@ -277,7 +277,7 @@ class SystemNetworkContextManager { +@@ -269,7 +269,7 @@ class SystemNetworkContextManager { static absl::optional certificate_transparency_enabled_for_testing_; -#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_password__reuse__manager__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc index 012af53dc653..1614b36758d1 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc @@ -1,11 +1,11 @@ ---- chrome/browser/password_manager/password_reuse_manager_factory.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/password_manager/password_reuse_manager_factory.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/password_manager/password_reuse_manager_factory.cc -@@ -115,7 +115,7 @@ PasswordReuseManagerFactory::BuildServiceInstanceForBr +@@ -133,7 +133,7 @@ PasswordReuseManagerFactory::BuildServiceInstanceForBr // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) std::unique_ptr notifier = std::make_unique( IdentityManagerFactory::GetForProfile(profile)); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc b/www/ungoogled-chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc index 22b95bef86c3..02bd1963c2da 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc @@ -1,38 +1,38 @@ ---- chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc -@@ -49,7 +49,7 @@ +@@ -50,7 +50,7 @@ #include "chrome/browser/policy/browser_dm_token_storage_mac.h" #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/browser_dm_token_storage_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -58,7 +58,7 @@ +@@ -59,7 +59,7 @@ #include "chrome/install_static/install_util.h" #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/device_trust_key_manager_impl.h" #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/key_rotation_launcher.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -@@ -90,7 +90,7 @@ void ChromeBrowserCloudManagementControllerDesktop:: +@@ -91,7 +91,7 @@ void ChromeBrowserCloudManagementControllerDesktop:: #if BUILDFLAG(IS_MAC) storage_delegate = std::make_unique(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) storage_delegate = std::make_unique(); #elif BUILDFLAG(IS_WIN) storage_delegate = std::make_unique(); -@@ -245,7 +245,7 @@ ChromeBrowserCloudManagementControllerDesktop::CreateC +@@ -261,7 +261,7 @@ ChromeBrowserCloudManagementControllerDesktop::CreateC std::unique_ptr ChromeBrowserCloudManagementControllerDesktop::CreateDeviceTrustKeyManager() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) auto* browser_dm_token_storage = BrowserDMTokenStorage::Get(); auto* device_management_service = GetDeviceManagementService(); auto shared_url_loader_factory = GetSharedURLLoaderFactory(); 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 7fe4326af89e..c16ee001da08 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,209 +1,227 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -216,19 +216,20 @@ +@@ -221,19 +221,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) || -@@ -798,14 +799,14 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -244,7 +245,7 @@ + #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/policy/battery_saver_policy_handler.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || + // BUILDFLAG(IS_CHROMEOS_ASH) +@@ -806,14 +807,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 }, -@@ -1537,7 +1538,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1545,7 +1546,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::LIST }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kGSSAPILibraryName, prefs::kGSSAPILibraryName, base::Value::Type::STRING }, -@@ -1582,7 +1583,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1590,7 +1591,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 }, -@@ -1608,18 +1609,18 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1616,18 +1617,18 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kTotalMemoryLimitMb, base::Value::Type::INTEGER }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kBackgroundModeEnabled, prefs::kBackgroundModeEnabled, base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kUnmanagedDeviceSignalsConsentFlowEnabled, device_signals::prefs::kUnmanagedDeviceSignalsConsentFlowEnabled, base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) \ - || BUILDFLAG(IS_FUCHSIA) + || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) { key::kDefaultBrowserSettingEnabled, prefs::kDefaultBrowserSettingEnabled, base::Value::Type::BOOLEAN }, -@@ -1632,7 +1633,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1640,7 +1641,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 }, -@@ -1730,7 +1731,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1738,7 +1739,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 }, -@@ -1823,7 +1824,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1831,7 +1832,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. -@@ -1832,7 +1833,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1840,7 +1841,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::LIST }, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -#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 }, -@@ -1863,7 +1864,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) +@@ -1865,7 +1866,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 }, -@@ -1939,7 +1940,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1941,7 +1942,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::kBatterySaverModeAvailability, - performance_manager::user_tuning::prefs::kBatterySaverModeState, - base::Value::Type::INTEGER }, -@@ -1970,7 +1971,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + { key::kTabDiscardingExceptions, + performance_manager::user_tuning::prefs::kManagedTabDiscardingExceptions, + base::Value::Type::LIST }, +@@ -1969,7 +1970,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 }, -@@ -2007,7 +2008,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2006,7 +2007,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}, -@@ -2102,7 +2103,7 @@ std::unique_ptr BuildH +@@ -2116,7 +2117,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()); - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -2278,7 +2279,7 @@ std::unique_ptr BuildH + // Note: This needs to be created after `DefaultSearchPolicyHandler`. +@@ -2295,7 +2296,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( -@@ -2336,7 +2337,7 @@ std::unique_ptr BuildH +@@ -2353,7 +2354,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( -@@ -2730,7 +2731,7 @@ std::unique_ptr BuildH +@@ -2747,7 +2748,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( -@@ -2738,7 +2739,7 @@ std::unique_ptr BuildH +@@ -2755,7 +2756,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)); -@@ -2755,7 +2756,7 @@ std::unique_ptr BuildH +@@ -2772,7 +2773,7 @@ std::unique_ptr BuildH /*new_policy_handler=*/std::make_unique< first_party_sets::FirstPartySetsOverridesPolicyHandler>( policy::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) || +@@ -2797,7 +2798,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_prefs_browser__prefs.cc b/www/ungoogled-chromium/files/patch-chrome_browser_prefs_browser__prefs.cc index 6b9205a044d7..5713b9a7e612 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,75 +1,75 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -482,18 +482,18 @@ +@@ -490,18 +490,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 -@@ -525,7 +525,7 @@ +@@ -533,7 +533,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 -@@ -649,7 +649,7 @@ const char kPluginsPluginsList[] = "plugins.plugins_li +@@ -657,7 +657,7 @@ const char kPluginsPluginsList[] = "plugins.plugins_li const char kPluginsShowDetails[] = "plugins.show_details"; // Deprecated 02/2023. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kWebAppsUrlHandlerInfo[] = "web_apps.url_handler_info"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -979,7 +979,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistryS +@@ -1017,7 +1017,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistryS #endif // BUILDFLAG(IS_CHROMEOS_ASH) // Deprecated 02/2023. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterDictionaryPref(kWebAppsUrlHandlerInfo); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -1952,12 +1952,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -2022,12 +2022,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 -@@ -2114,7 +2114,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local +@@ -2187,7 +2187,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local #endif // BUILDFLAG(IS_CHROMEOS_ASH) // Added 02/2023 -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) local_state->ClearPref(kWebAppsUrlHandlerInfo); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_printing_printer__query.cc b/www/ungoogled-chromium/files/patch-chrome_browser_printing_printer__query.cc index cced7ce1f221..6ee1b2033231 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_printing_printer__query.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_printing_printer__query.cc @@ -1,11 +1,11 @@ ---- chrome/browser/printing/printer_query.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/printing/printer_query.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/printing/printer_query.cc @@ -341,7 +341,7 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Di crash_key = std::make_unique( - print_backend->GetPrinterDriverInfo(printer_name)); + printer_name, print_backend->GetPrinterDriverInfo(printer_name)); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS) +#if (BUILDFLAG(IS_BSD) || BUILDFLAG(IS_LINUX)) && BUILDFLAG(USE_CUPS) PrinterBasicInfo basic_info; if (print_backend->GetPrinterBasicInfo(printer_name, &basic_info) == mojom::ResultCode::kSuccess) { diff --git a/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 75f5eee09229..466db643ca3c 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,92 +1,92 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -400,18 +400,18 @@ +@@ -401,18 +401,18 @@ #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/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" -@@ -620,7 +620,7 @@ void ChromeBrowserMainExtraPartsProfiles:: - if (breadcrumbs::IsEnabled()) { - BreadcrumbManagerKeyedServiceFactory::GetInstance(); - } +@@ -643,7 +643,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(); -@@ -726,26 +726,26 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -763,26 +763,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) -@@ -861,7 +861,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -900,7 +900,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 -@@ -958,7 +958,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -998,7 +998,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(); #endif policy::UserCloudPolicyInvalidatorFactory::GetInstance(); -@@ -1002,7 +1002,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1042,7 +1042,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if !BUILDFLAG(IS_ANDROID) ProfileThemeUpdateServiceFactory::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(); #endif #if !BUILDFLAG(IS_ANDROID) 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 e4cae54149d2..abefa3235fa4 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 2023-11-04 07:08:51 UTC +--- chrome/browser/renderer_preferences_util.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/renderer_preferences_util.cc @@ -38,7 +38,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" -@@ -152,7 +152,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc +@@ -150,7 +150,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()) { -@@ -175,7 +175,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc +@@ -173,7 +173,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) content::UpdateFontRendererPreferencesFromSystemSettings(prefs); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_route.ts b/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_route.ts index 576d1db37c95..c8253a535b32 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_route.ts +++ b/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_route.ts @@ -1,11 +1,11 @@ ---- chrome/browser/resources/settings/route.ts.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/resources/settings/route.ts.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/resources/settings/route.ts -@@ -242,7 +242,7 @@ function createBrowserSettingsRoutes(): SettingsRoutes +@@ -245,7 +245,7 @@ function createBrowserSettingsRoutes(): SettingsRoutes r.ACCESSIBILITY = r.ADVANCED.createSection( '/accessibility', 'a11y', loadTimeData.getString('a11yPageTitle')); - // + // r.CAPTIONS = r.ACCESSIBILITY.createChild('/captions'); // diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc index 6382cc88f723..9d9077489c9b 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc @@ -1,20 +1,20 @@ ---- chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc @@ -18,7 +18,7 @@ #include "net/base/url_util.h" #include "third_party/abseil-cpp/absl/types/variant.h" -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/analysis/local_binary_upload_service_factory.h" #endif -@@ -421,7 +421,7 @@ BinaryUploadService* BinaryUploadService::GetForProfil +@@ -417,7 +417,7 @@ BinaryUploadService* BinaryUploadService::GetForProfil Profile* profile, const enterprise_connectors::AnalysisSettings& settings) { // Local content analysis is supported only on desktop platforms. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (settings.cloud_or_local_settings.is_cloud_analysis()) { return CloudBinaryUploadServiceFactory::GetForProfile(profile); } else { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc b/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc index b01714448ca9..0e60d126047e 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc @@ -1,29 +1,29 @@ ---- chrome/browser/safe_browsing/download_protection/file_analyzer.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/safe_browsing/download_protection/file_analyzer.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/safe_browsing/download_protection/file_analyzer.cc @@ -21,7 +21,7 @@ #include "content/public/browser/browser_thread.h" #include "url/gurl.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/safe_browsing/download_protection/document_analysis_service.h" #endif @@ -85,7 +85,7 @@ void FileAnalyzer::Start(const base::FilePath& target_ } else if (inspection_type == DownloadFileType::DMG) { StartExtractDmgFeatures(); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) } else if (inspection_type == DownloadFileType::OFFICE_DOCUMENT) { StartExtractDocumentFeatures(); #endif -@@ -314,7 +314,7 @@ void FileAnalyzer::OnDmgAnalysisFinished( +@@ -318,7 +318,7 @@ void FileAnalyzer::OnDmgAnalysisFinished( } #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) void FileAnalyzer::StartExtractDocumentFeatures() { DCHECK_CURRENTLY_ON(BrowserThread::UI); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_search__engine__choice_search__engine__choice__client__side__trial.cc b/www/ungoogled-chromium/files/patch-chrome_browser_search__engine__choice_search__engine__choice__client__side__trial.cc new file mode 100644 index 000000000000..1b41343b7acc --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_search__engine__choice_search__engine__choice__client__side__trial.cc @@ -0,0 +1,11 @@ +--- chrome/browser/search_engine_choice/search_engine_choice_client_side_trial.cc.orig 2024-02-03 15:42:55 UTC ++++ chrome/browser/search_engine_choice/search_engine_choice_client_side_trial.cc +@@ -133,7 +133,7 @@ void RegisterLocalStatePrefs(PrefRegistrySimple* regis + void SetUpIfNeeded(const base::FieldTrial::EntropyProvider& entropy_provider, + base::FeatureList* feature_list, + PrefService* local_state) { +-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_MAC) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) + // Platform not in scope for this client-side trial. + return; + #else 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 de286bc517b7..b0b1ad95d2e9 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 2023-12-23 12:33:28 UTC +--- chrome/browser/ui/chrome_pages.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/ui/chrome_pages.cc -@@ -78,7 +78,7 @@ +@@ -79,7 +79,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 -@@ -671,7 +671,7 @@ void ShowShortcutCustomizationApp(Profile* profile, +@@ -701,7 +701,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 b455b16f2562..d2306a5edcbe 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 2023-12-23 12:33:28 UTC +--- chrome/browser/ui/chrome_pages.h.orig 2024-02-03 15:42:55 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 -@@ -255,7 +255,7 @@ void ShowShortcutCustomizationApp(Profile* profile, +@@ -258,7 +258,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_startup_startup__browser__creator.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc index 6ff8648c67a5..7fcaa43ce758 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 2023-11-04 07:08:51 UTC +--- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/ui/startup/startup_browser_creator.cc -@@ -133,7 +133,7 @@ +@@ -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" -@@ -925,7 +925,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -935,7 +935,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())) { -@@ -1029,7 +1029,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1040,7 +1040,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) && -@@ -1242,7 +1242,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1251,7 +1251,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 b427cf4831a4..182245ec2438 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 2023-12-23 12:33:28 UTC +--- chrome/browser/ui/tab_helpers.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/ui/tab_helpers.cc -@@ -225,7 +225,7 @@ +@@ -226,7 +226,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" -@@ -641,12 +641,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con +@@ -645,12 +645,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 49b1b836aadf..c9035beb5c7a 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 2023-12-23 12:33:28 UTC +--- chrome/browser/ui/ui_features.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/ui/ui_features.cc -@@ -315,7 +315,7 @@ BASE_FEATURE(kTopChromeWebUIUsesSpareRenderer, +@@ -345,7 +345,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 c9caefdd0d78..74bc3326ec94 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 2023-11-04 07:08:51 UTC +--- chrome/browser/ui/ui_features.h.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/ui/ui_features.h -@@ -195,7 +195,7 @@ BASE_DECLARE_FEATURE(kToolbarUseHardwareBitmapDraw); +@@ -219,7 +219,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_dark__mode__manager__linux.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_dark__mode__manager__linux.h deleted file mode 100644 index 95d6fd1c40bd..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_dark__mode__manager__linux.h +++ /dev/null @@ -1,10 +0,0 @@ ---- chrome/browser/ui/views/dark_mode_manager_linux.h.orig 2023-10-13 13:20:35 UTC -+++ chrome/browser/ui/views/dark_mode_manager_linux.h -@@ -6,6 +6,7 @@ - #define CHROME_BROWSER_UI_VIEWS_DARK_MODE_MANAGER_LINUX_H_ - - #include -+#include - - #include "base/gtest_prod_util.h" - #include "base/memory/scoped_refptr.h" 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 f2d8fe3a3cb8..3d09c4446d06 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-01-06 08:40:52 UTC +--- chrome/browser/ui/views/frame/browser_view.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -2172,7 +2172,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra +@@ -2154,7 +2154,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 1628cdf0e82b..d1b21a926df4 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 2023-12-23 12:33:28 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc -@@ -55,7 +55,7 @@ +@@ -57,7 +57,7 @@ #include "ui/aura/window.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #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 -@@ -83,7 +83,7 @@ constexpr int kContentSettingIconSize = 16; +@@ -85,7 +85,7 @@ constexpr int kContentSettingIconSize = 16; // The height of the controls bar at the top of the window. constexpr int kTopControlsHeight = 30; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Frame border when window shadow is not drawn. constexpr int kFrameBorderThickness = 4; #endif -@@ -178,7 +178,7 @@ class WindowEventObserver : public ui::EventObserver { +@@ -180,7 +180,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()) { -@@ -560,7 +560,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow +@@ -570,7 +570,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 -@@ -736,7 +736,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( +@@ -746,7 +746,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))); -@@ -811,7 +811,7 @@ void PictureInPictureBrowserFrameView::RemovedFromWidg +@@ -825,7 +825,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(); -@@ -1058,7 +1058,7 @@ void PictureInPictureBrowserFrameView::AnimationProgre +@@ -1079,7 +1079,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_) { -@@ -1182,7 +1182,7 @@ void PictureInPictureBrowserFrameView::UpdateTopBarVie +@@ -1203,7 +1203,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 auto tiled_edges = frame()->tiled_edges(); -@@ -1203,7 +1203,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor +@@ -1224,7 +1224,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(chromeos::kResizeInsideBoundsSize); -@@ -1224,7 +1224,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie +@@ -1245,7 +1245,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); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_dice__web__signin__interception__backdrop__layer.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_dice__web__signin__interception__backdrop__layer.cc deleted file mode 100644 index 8b8dcee0dd1b..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_dice__web__signin__interception__backdrop__layer.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/ui/views/profiles/dice_web_signin_interception_backdrop_layer.cc.orig 2023-11-04 07:08:51 UTC -+++ chrome/browser/ui/views/profiles/dice_web_signin_interception_backdrop_layer.cc -@@ -89,7 +89,7 @@ void DiceWebSigninInterceptionBackdropLayer::DrawDarkB - // The dark layer should be drawn on top of this region, but it's not easily - // accessible in code, and requires specific implementations. - // After the 2023 refresh, this drag area no longer exists. --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // On linux, the drag area is accessible through the - // `MirroredFrameBorderInsets()` function, which crashes on non-Linux - // platforms. 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 7bf20a0225aa..956917593de9 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 2023-12-23 12:33:28 UTC +--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc -@@ -660,7 +660,7 @@ void ProfileMenuViewBase::SetProfileIdentityInfo( +@@ -666,7 +666,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 8990ee8f867f..a8f45dea4c54 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 2023-12-23 12:33:28 UTC +--- chrome/browser/ui/views/tab_search_bubble_host.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/ui/views/tab_search_bubble_host.cc -@@ -222,7 +222,7 @@ bool TabSearchBubbleHost::ShouldTabSearchRenderBeforeT +@@ -249,7 +249,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.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab.cc index fa2848338a2b..cb765ded8f72 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/tabs/tab.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/ui/views/tabs/tab.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/ui/views/tabs/tab.cc -@@ -612,7 +612,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& +@@ -611,7 +611,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& if (mouse_hovered_ || !GetWidget()->IsMouseEventsEnabled()) return; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Move the hit test area for hovering up so that it is not overlapped by tab // hover cards when they are shown. // TODO(crbug.com/978134): Once Linux/CrOS widget transparency is solved, 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 new file mode 100644 index 000000000000..033ab8620bc7 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc @@ -0,0 +1,11 @@ +--- chrome/browser/ui/views/user_education/browser_user_education_service.cc.orig 2024-02-03 15:42:55 UTC ++++ chrome/browser/ui/views/user_education/browser_user_education_service.cc +@@ -716,7 +716,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_web__applications_web__app__dialogs.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__dialogs.h index f5c30e1db9b6..3e860acb2b02 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 2023-12-23 12:33:28 UTC +--- 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 -@@ -20,7 +20,7 @@ +@@ -21,7 +21,7 @@ #include "ui/gfx/native_widget_types.h" static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_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_webui_about__ui.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_about_about__ui.cc similarity index 70% rename from www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_about__ui.cc rename to www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_about_about__ui.cc index 9460753140a2..4d73fac74ede 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_about__ui.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_about_about__ui.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/about_ui.cc.orig 2023-07-21 09:49:17 UTC -+++ chrome/browser/ui/webui/about_ui.cc -@@ -635,7 +635,7 @@ std::string ChromeURLs() { +--- chrome/browser/ui/webui/about/about_ui.cc.orig 2024-02-03 15:42:55 UTC ++++ chrome/browser/ui/webui/about/about_ui.cc +@@ -592,7 +592,7 @@ std::string ChromeURLs(content::BrowserContext* browse return html; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::string AboutLinuxProxyConfig() { std::string data; AppendHeader(&data, -@@ -689,7 +689,7 @@ void AboutUIHTMLSource::StartDataRequest( +@@ -646,7 +646,7 @@ void AboutUIHTMLSource::StartDataRequest( response = ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(idr); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) } else if (source_name_ == chrome::kChromeUILinuxProxyConfigHost) { response = AboutLinuxProxyConfig(); #endif diff --git a/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 6ef87ebe30ac..33468735a7fc 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 2023-12-23 12:33:28 UTC +--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -211,7 +211,7 @@ +@@ -210,7 +210,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 -@@ -237,17 +237,17 @@ +@@ -236,17 +236,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 -@@ -404,7 +404,7 @@ bool IsAboutUI(const GURL& url) { +@@ -399,7 +399,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) -@@ -668,7 +668,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -653,7 +653,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 -@@ -731,7 +731,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -718,7 +718,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) -@@ -792,27 +792,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -779,27 +779,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_realbox_realbox__handler.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_realbox_realbox__handler.cc index 6c37e7f790e5..0d249bc944bf 100644 --- 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 @@ -1,20 +1,29 @@ ---- chrome/browser/ui/webui/realbox/realbox_handler.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/webui/realbox/realbox_handler.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/ui/webui/realbox/realbox_handler.cc -@@ -146,7 +146,7 @@ constexpr char kMacShareIconResourceName[] = +@@ -146,7 +146,7 @@ const char* kMacShareIconResourceName = #elif BUILDFLAG(IS_WIN) - constexpr char kWinShareIconResourceName[] = + const char* kWinShareIconResourceName = "//resources/cr_components/omnibox/icons/win_share.svg"; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - constexpr char kLinuxShareIconResourceName[] = + const char* kLinuxShareIconResourceName = "//resources/cr_components/omnibox/icons/share.svg"; #else -@@ -745,7 +745,7 @@ std::string RealboxHandler::PedalVectorIconToResourceN +@@ -203,7 +203,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 +@@ -818,7 +818,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_accessibility__main__handler.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_accessibility__main__handler.cc new file mode 100644 index 000000000000..34b34c062c6b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_accessibility__main__handler.cc @@ -0,0 +1,37 @@ +--- chrome/browser/ui/webui/settings/accessibility_main_handler.cc.orig 2024-02-03 15:42:55 UTC ++++ chrome/browser/ui/webui/settings/accessibility_main_handler.cc +@@ -19,7 +19,7 @@ + #include "content/public/browser/web_contents.h" + #include "content/public/browser/web_ui.h" + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + #include "ui/accessibility/accessibility_features.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) + +@@ -49,7 +49,7 @@ void AccessibilityMainHandler::OnJavascriptAllowed() { + base::Unretained(this))); + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + if (features::IsPdfOcrEnabled()) { + CHECK(!component_ready_observer_.IsObserving()); + component_ready_observer_.Observe( +@@ -63,14 +63,14 @@ void AccessibilityMainHandler::OnJavascriptDisallowed( + accessibility_subscription_ = {}; + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + if (features::IsPdfOcrEnabled()) { + component_ready_observer_.Reset(); + } + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) + } + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + void AccessibilityMainHandler::DownloadProgressChanged(double progress) { + CHECK_GE(progress, 0.0); + CHECK_LE(progress, 1.0); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_accessibility__main__handler.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_accessibility__main__handler.h new file mode 100644 index 000000000000..d8c33eb570a3 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_accessibility__main__handler.h @@ -0,0 +1,38 @@ +--- chrome/browser/ui/webui/settings/accessibility_main_handler.h.orig 2024-02-03 15:42:55 UTC ++++ chrome/browser/ui/webui/settings/accessibility_main_handler.h +@@ -13,7 +13,7 @@ + #include "chrome/browser/ash/accessibility/accessibility_manager.h" + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + #include "base/scoped_observation.h" + #include "chrome/browser/screen_ai/screen_ai_install_state.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +@@ -24,7 +24,7 @@ namespace settings { + // chrome://settings/accessibility. + class AccessibilityMainHandler + : public ::settings::SettingsPageUIHandler +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + , + public screen_ai::ScreenAIInstallState::Observer + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +@@ -40,7 +40,7 @@ class AccessibilityMainHandler + void OnJavascriptAllowed() override; + void OnJavascriptDisallowed() override; + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + // screen_ai::ScreenAIInstallState::Observer: + void DownloadProgressChanged(double progress) override; + void StateChanged(screen_ai::ScreenAIInstallState::State state) override; +@@ -59,7 +59,7 @@ class AccessibilityMainHandler + base::CallbackListSubscription accessibility_subscription_; + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + base::ScopedObservation + component_ready_observer_{this}; 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 55c5353432be..ec977f17a280 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 2023-11-04 07:08:51 UTC +--- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -136,7 +136,7 @@ +@@ -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_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) #include "ui/display/screen.h" #endif -@@ -155,7 +155,7 @@ +@@ -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 -@@ -263,7 +263,7 @@ void AddCommonStrings(content::WebUIDataSource* html_s +@@ -262,7 +262,7 @@ void AddCommonStrings(content::WebUIDataSource* html_s base::FeatureList::IsEnabled( supervised_user::kClearingCookiesKeepsSupervisedUsersSignedIn)); -#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; -@@ -294,7 +294,7 @@ void AddA11yStrings(content::WebUIDataSource* html_sou +@@ -291,7 +291,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", -@@ -433,7 +433,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -436,7 +436,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}, -@@ -443,7 +443,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -446,7 +446,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_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, #endif #if BUILDFLAG(IS_MAC) -@@ -468,7 +468,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -471,7 +471,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_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) bool show_custom_chrome_frame = ui::OzonePlatform::GetInstance() ->GetPlatformRuntimeProperties() .supports_server_side_window_decorations; 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 f69ac2c627df..6e417941e071 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 2023-12-23 12:33:28 UTC +--- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/browser/webauthn/chrome_authenticator_request_delegate.cc -@@ -677,7 +677,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureDisc +@@ -669,7 +669,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 e3a49b249012..8e999c0d7375 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc @@ -1,74 +1,74 @@ ---- chrome/common/chrome_features.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/common/chrome_features.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/common/chrome_features.cc @@ -76,7 +76,7 @@ BASE_FEATURE(kAppShimNotificationAttribution, 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 @@ -84,7 +84,7 @@ BASE_FEATURE(kAsyncDns, ); #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, @@ -102,7 +102,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. @@ -304,7 +304,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 -@@ -338,7 +338,7 @@ BASE_FEATURE(kDesktopPWAsWebBundles, +@@ -350,7 +350,7 @@ BASE_FEATURE(kDesktopPWAsWebBundles, 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. -@@ -377,7 +377,7 @@ const base::FeatureParam kDnsOverHttpsFallbackPa +@@ -389,7 +389,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 #else false -@@ -907,7 +907,7 @@ BASE_FEATURE(kLacrosSharedComponentsDir, +@@ -946,7 +946,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); -@@ -920,7 +920,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit +@@ -959,7 +959,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 73773b5bcd79..dee73b2b7303 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 2023-12-23 12:33:28 UTC +--- chrome/common/chrome_features.h.orig 2024-02-03 15:42:55 UTC +++ chrome/common/chrome_features.h -@@ -61,13 +61,13 @@ BASE_DECLARE_FEATURE(kAppShimNotificationAttribution); +@@ -62,13 +62,13 @@ BASE_DECLARE_FEATURE(kAppShimNotificationAttribution); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAsyncDns); #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) -@@ -204,7 +204,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings); +@@ -227,7 +227,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kDesktopPWAsWebBundles); #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(kKeepForceInstalledPreinstalledApps); -@@ -523,7 +523,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -562,7 +562,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; -@@ -531,7 +531,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -570,7 +570,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__paths.cc b/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths.cc index 24b0a5573cb2..e5acec16a29c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths.cc @@ -1,88 +1,88 @@ ---- chrome/common/chrome_paths.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/common/chrome_paths.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/common/chrome_paths.cc @@ -30,7 +30,7 @@ #include "base/apple/foundation_util.h" #endif -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) #include "components/policy/core/common/policy_paths.h" #endif @@ -52,14 +52,14 @@ namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The path to the external extension .json files. // /usr/share seems like a good choice, see: http://www.pathname.com/fhs/ const base::FilePath::CharType kFilepathSinglePrefExtensions[] = #if BUILDFLAG(GOOGLE_CHROME_BRANDING) - FILE_PATH_LITERAL("/usr/share/google-chrome/extensions"); + FILE_PATH_LITERAL("/usr/local/share/ungoogled-chromium/extensions"); #else - FILE_PATH_LITERAL("/usr/share/chromium/extensions"); + FILE_PATH_LITERAL("/usr/local/share/ungoogled-chromium/extensions"); #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -220,7 +220,7 @@ bool PathProvider(int key, base::FilePath* result) { } break; case chrome::DIR_DEFAULT_DOWNLOADS_SAFE: -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!GetUserDownloadsDirectorySafe(&cur)) { return false; } @@ -523,7 +523,7 @@ bool PathProvider(int key, base::FilePath* result) { return false; } break; -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) case chrome::DIR_POLICY_FILES: { cur = base::FilePath(policy::kPolicyPath); break; @@ -534,7 +534,7 @@ bool PathProvider(int key, base::FilePath* result) { #if BUILDFLAG(IS_CHROMEOS_ASH) || \ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ BUILDFLAG(CHROMIUM_BRANDING)) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) case chrome::DIR_USER_EXTERNAL_EXTENSIONS: { if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur)) { return false; @@ -543,7 +543,7 @@ bool PathProvider(int key, base::FilePath* result) { break; } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: { cur = base::FilePath(kFilepathSinglePrefExtensions); break; -@@ -590,7 +590,7 @@ bool PathProvider(int key, base::FilePath* result) { - break; +@@ -591,7 +591,7 @@ bool PathProvider(int key, base::FilePath* result) { #endif --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(ENABLE_EXTENSIONS) && \ +- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)) ++ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) case chrome::DIR_NATIVE_MESSAGING: #if BUILDFLAG(IS_MAC) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) -@@ -604,9 +604,12 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -605,9 +605,12 @@ bool PathProvider(int key, base::FilePath* result) { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) cur = base::FilePath( FILE_PATH_LITERAL("/etc/opt/chrome/native-messaging-hosts")); +#elif BUILDFLAG(IS_FREEBSD) + cur = base::FilePath(FILE_PATH_LITERAL( + "/usr/local/etc/ungoogled-chromium/native-messaging-hosts")); #else cur = base::FilePath( - FILE_PATH_LITERAL("/etc/chromium/native-messaging-hosts")); + FILE_PATH_LITERAL("/etc/ungoogled-chromium/native-messaging-hosts")); #endif #endif // !BUILDFLAG(IS_MAC) break; diff --git a/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths.h b/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths.h index e2a79acceb73..d8a27de8d80b 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths.h @@ -1,29 +1,29 @@ ---- chrome/common/chrome_paths.h.orig 2023-09-17 07:59:53 UTC +--- chrome/common/chrome_paths.h.orig 2024-02-03 15:42:55 UTC +++ chrome/common/chrome_paths.h -@@ -57,7 +57,7 @@ enum { +@@ -58,7 +58,7 @@ enum { #if BUILDFLAG(IS_CHROMEOS_ASH) || \ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ BUILDFLAG(CHROMIUM_BRANDING)) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) DIR_USER_EXTERNAL_EXTENSIONS, // Directory for per-user external extensions // on Chrome Mac and Chromium Linux. // On Chrome OS, this path is used for OEM -@@ -65,7 +65,7 @@ enum { +@@ -66,7 +66,7 @@ enum { // create it. #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) DIR_STANDALONE_EXTERNAL_EXTENSIONS, // Directory for 'per-extension' // definition manifest files that // describe extensions which are to be -@@ -123,7 +123,7 @@ enum { - // must be cleared on device reboot. +@@ -125,7 +125,7 @@ enum { #endif --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(ENABLE_EXTENSIONS) && \ +- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)) ++ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) DIR_NATIVE_MESSAGING, // System directory where native messaging host // manifest files are stored. DIR_USER_NATIVE_MESSAGING, // Directory with Native Messaging Hosts diff --git a/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.cc b/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.cc index a89942245543..b10af2d00142 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 2023-12-23 12:33:28 UTC +--- chrome/common/chrome_switches.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/common/chrome_switches.cc -@@ -857,14 +857,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- +@@ -858,14 +858,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_pref__names.h b/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h index 543263c9af41..691e3358409a 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h @@ -1,82 +1,82 @@ ---- chrome/common/pref_names.h.orig 2023-12-23 12:33:28 UTC +--- chrome/common/pref_names.h.orig 2024-02-03 15:42:55 UTC +++ chrome/common/pref_names.h -@@ -1315,7 +1315,7 @@ inline constexpr char kUseAshProxy[] = "lacros.proxy.u +@@ -1330,7 +1330,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 -@@ -1441,7 +1441,7 @@ inline constexpr char kShowUpdatePromotionInfoBar[] = +@@ -1456,7 +1456,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"; -@@ -1989,7 +1989,7 @@ inline constexpr char kDownloadDefaultDirectory[] = +@@ -2007,7 +2007,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 -@@ -2407,14 +2407,14 @@ inline constexpr char kMediaStorageIdSalt[] = "media.s +@@ -2439,14 +2439,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"; -@@ -2492,7 +2492,7 @@ inline constexpr char kAmbientAuthenticationInPrivateM +@@ -2524,7 +2524,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[] = -@@ -3533,7 +3533,7 @@ inline constexpr char kFileOrDirectoryPickerWithoutGes +@@ -3563,7 +3563,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[] = -@@ -3589,7 +3589,7 @@ inline constexpr char kCACertificateManagementAllowed[ - inline constexpr char kChromeRootStoreEnabled[] = "chrome_root_store_enabled"; +@@ -3612,7 +3612,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 -@@ -3903,7 +3903,7 @@ inline constexpr char kThrottleNonVisibleCrossOriginIf +@@ -3924,7 +3924,7 @@ inline constexpr char kThrottleNonVisibleCrossOriginIf 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 993a4c2de308..e0079d7ea876 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 2023-12-23 12:33:28 UTC +--- chrome/common/url_constants.h.orig 2024-02-03 15:42:55 UTC +++ chrome/common/url_constants.h -@@ -824,7 +824,7 @@ inline constexpr char kPhoneHubPermissionLearnMoreURL[ +@@ -821,7 +821,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 94aebdf4f32c..2d368eb9196d 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 2023-12-23 12:33:28 UTC +--- chrome/common/webui_url_constants.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/common/webui_url_constants.cc -@@ -512,18 +512,18 @@ const char kOsUIShortcutCustomizationAppURL[] = "os:// +@@ -508,18 +508,18 @@ const char kOsUIShortcutCustomizationAppURL[] = "os:// 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 +@@ -534,14 +534,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 kChromeUIEnterpriseProfileWelcomeHost[] = -@@ -564,7 +564,7 @@ const char kChromeUIProfilePickerUrl[] = "chrome://pro +@@ -560,7 +560,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"; -@@ -650,7 +650,7 @@ const char kCookiesSubPagePath[] = "/cookies"; +@@ -643,7 +643,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 -@@ -890,7 +890,7 @@ const char* const kChromeDebugURLs[] = { +@@ -877,7 +877,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 6da30d328a94..ed248625cd91 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,58 +1,58 @@ ---- chrome/common/webui_url_constants.h.orig 2023-12-23 12:33:28 UTC +--- chrome/common/webui_url_constants.h.orig 2024-02-03 15:42:55 UTC +++ chrome/common/webui_url_constants.h -@@ -426,24 +426,24 @@ extern const char kOsUIShortcutCustomizationAppURL[]; +@@ -424,24 +424,24 @@ extern const char kOsUIShortcutCustomizationAppURL[]; 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 -@@ -458,7 +458,7 @@ extern const char kChromeUILinuxProxyConfigHost[]; +@@ -456,7 +456,7 @@ 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 -@@ -470,7 +470,7 @@ extern const char kChromeUISearchEngineChoiceHost[]; +@@ -468,7 +468,7 @@ extern const char kChromeUISearchEngineChoiceHost[]; // 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 kChromeUIEnterpriseProfileWelcomeHost[]; -@@ -486,7 +486,7 @@ extern const char kChromeUIProfilePickerUrl[]; +@@ -484,7 +484,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 25b570c45369..3b5806157ebc 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 2023-09-17 07:59:53 UTC +--- chrome/renderer/chrome_render_frame_observer.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/renderer/chrome_render_frame_observer.cc -@@ -351,7 +351,7 @@ void ChromeRenderFrameObserver::OnDestruct() { +@@ -355,7 +355,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_printing_print__backend__service__impl.cc b/www/ungoogled-chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc index 1d31d0fb8ce0..7d01d1f1adef 100644 --- a/www/ungoogled-chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc @@ -1,47 +1,47 @@ ---- chrome/services/printing/print_backend_service_impl.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/services/printing/print_backend_service_impl.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/services/printing/print_backend_service_impl.cc @@ -46,7 +46,7 @@ #include "printing/backend/cups_connection_pool.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/no_destructor.h" #include "ui/linux/linux_ui.h" #include "ui/linux/linux_ui_delegate_stub.h" @@ -73,7 +73,7 @@ namespace printing { namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void InstantiateLinuxUiDelegate() { // TODO(crbug.com/809738) Until a real UI can be used in a utility process, // need to use the stub version. @@ -82,7 +82,7 @@ void InstantiateLinuxUiDelegate() { #endif scoped_refptr GetPrintingTaskRunner() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Use task runner associated with equivalent of UI thread. Needed for calls // made through `PrintDialogLinuxInterface` to properly execute. CHECK(base::SequencedTaskRunner::HasCurrentDefault()); @@ -460,7 +460,7 @@ void PrintBackendServiceImpl::Init( // `InitCommon()`. InitializeProcessForPrinting(); print_backend_ = PrintBackend::CreateInstance(locale); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Test framework already initializes the UI, so this should not go in // `InitCommon()`. Additionally, low-level Linux UI is not needed when tests // are using `TestPrintingContext`. @@ -681,7 +681,7 @@ void PrintBackendServiceImpl::UpdatePrintSettings( crash_keys_ = std::make_unique( - print_backend_->GetPrinterDriverInfo(*printer_name)); + *printer_name, print_backend_->GetPrinterDriverInfo(*printer_name)); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_CUPS) // Try to fill in advanced settings based upon basic info options. PrinterBasicInfo basic_info; if (print_backend_->GetPrinterBasicInfo(*printer_name, &basic_info) == diff --git a/www/ungoogled-chromium/files/patch-chrome_test_BUILD.gn b/www/ungoogled-chromium/files/patch-chrome_test_BUILD.gn index 17f16dee3f92..8bb63e912baf 100644 --- a/www/ungoogled-chromium/files/patch-chrome_test_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-chrome_test_BUILD.gn @@ -1,11 +1,11 @@ ---- chrome/test/BUILD.gn.orig 2023-12-23 12:33:28 UTC +--- chrome/test/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ chrome/test/BUILD.gn -@@ -11236,7 +11236,7 @@ test("chrome_app_unittests") { +@@ -11475,7 +11475,7 @@ test("chrome_app_unittests") { "//components/heap_profiling/in_process", "//components/safe_browsing:buildflags", ] - if (!is_fuchsia && !is_mac) { + if (!is_fuchsia && !is_mac && !is_bsd) { deps += [ "//third_party/breakpad:client" ] } if (is_android) { diff --git a/www/ungoogled-chromium/files/patch-chrome_updater_configurator.cc b/www/ungoogled-chromium/files/patch-chrome_updater_configurator.cc index af613b28fba0..9347ad66bf92 100644 --- a/www/ungoogled-chromium/files/patch-chrome_updater_configurator.cc +++ b/www/ungoogled-chromium/files/patch-chrome_updater_configurator.cc @@ -1,11 +1,11 @@ ---- chrome/updater/configurator.cc.orig 2023-07-21 09:49:17 UTC +--- chrome/updater/configurator.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/updater/configurator.cc @@ -63,7 +63,7 @@ Configurator::Configurator(scoped_refptr - return absl::nullopt; + return std::nullopt; #endif }()) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Linux creating the NetworkFetcherFactory requires performing blocking IO // to load an external library. This should be done when the configurator is // created. diff --git a/www/ungoogled-chromium/files/patch-chrome_updater_util_posix__util.cc b/www/ungoogled-chromium/files/patch-chrome_updater_util_posix__util.cc index c9cee8818b99..3f184cecebd6 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 2023-05-05 12:12:41 UTC +--- chrome/updater/util/posix_util.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/updater/util/posix_util.cc -@@ -16,7 +16,7 @@ +@@ -18,7 +18,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-chrome_utility_services.cc b/www/ungoogled-chromium/files/patch-chrome_utility_services.cc index e64548f55b1c..e51f76135ec9 100644 --- a/www/ungoogled-chromium/files/patch-chrome_utility_services.cc +++ b/www/ungoogled-chromium/files/patch-chrome_utility_services.cc @@ -1,56 +1,56 @@ ---- chrome/utility/services.cc.orig 2023-11-04 07:08:51 UTC +--- chrome/utility/services.cc.orig 2024-02-03 15:42:55 UTC +++ chrome/utility/services.cc -@@ -56,7 +56,7 @@ +@@ -57,7 +57,7 @@ #include "chrome/services/system_signals/mac/mac_system_signals_service.h" #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/services/system_signals/linux/linux_system_signals_service.h" #endif // BUILDFLAG(IS_LINUX) -@@ -82,7 +82,7 @@ +@@ -83,7 +83,7 @@ #include "chrome/services/file_util/file_util_service.h" // nogncheck #endif -#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) +#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) #include "chrome/services/file_util/document_analysis_service.h" // nogncheck #endif -@@ -218,7 +218,7 @@ auto RunMacNotificationService( +@@ -219,7 +219,7 @@ auto RunMacNotificationService( } #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto RunSystemSignalsService( mojo::PendingReceiver receiver) { -@@ -278,7 +278,7 @@ auto RunCupsIppParser( +@@ -279,7 +279,7 @@ auto RunCupsIppParser( } #endif -#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) +#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) auto RunDocumentAnalysis( mojo::PendingReceiver receiver) { return std::make_unique(std::move(receiver)); -@@ -466,7 +466,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -467,7 +467,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& services.Add(RunWindowsIconReader); #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) services.Add(RunSystemSignalsService); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -482,7 +482,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -483,7 +483,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& services.Add(RunFileUtil); #endif -#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) +#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) services.Add(RunDocumentAnalysis); #endif diff --git a/www/ungoogled-chromium/files/patch-chromecast_browser_cast__content__browser__client.cc b/www/ungoogled-chromium/files/patch-chromecast_browser_cast__content__browser__client.cc index 69fe61c1d1d6..5b840a6664f5 100644 --- a/www/ungoogled-chromium/files/patch-chromecast_browser_cast__content__browser__client.cc +++ b/www/ungoogled-chromium/files/patch-chromecast_browser_cast__content__browser__client.cc @@ -1,11 +1,11 @@ ---- chromecast/browser/cast_content_browser_client.cc.orig 2023-11-04 07:08:51 UTC +--- chromecast/browser/cast_content_browser_client.cc.orig 2024-02-03 15:42:55 UTC +++ chromecast/browser/cast_content_browser_client.cc -@@ -435,7 +435,7 @@ void CastContentBrowserClient::AppendExtraCommandLineS +@@ -432,7 +432,7 @@ void CastContentBrowserClient::AppendExtraCommandLineS switches::kAudioOutputChannels)); } } else if (process_type == switches::kGpuProcess) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Necessary for accelerated 2d canvas. By default on Linux, Chromium // assumes GLES2 contexts can be lost to a power-save mode, which breaks GPU // canvas apps. diff --git a/www/ungoogled-chromium/files/patch-components_autofill_core_browser_data__model_autofill__i18n__api.h b/www/ungoogled-chromium/files/patch-components_autofill_core_browser_data__model_autofill__i18n__api.h deleted file mode 100644 index 05ca4c2bc4c1..000000000000 --- a/www/ungoogled-chromium/files/patch-components_autofill_core_browser_data__model_autofill__i18n__api.h +++ /dev/null @@ -1,16 +0,0 @@ ---- components/autofill/core/browser/data_model/autofill_i18n_api.h.orig 2023-12-23 12:33:28 UTC -+++ components/autofill/core/browser/data_model/autofill_i18n_api.h -@@ -15,9 +15,13 @@ namespace autofill::i18n_model_definition { - // Country code that represents autofill's legacy address hierarchy model as - // stored `kAutofillModelRules`. As a workaround for GCC we declare the - // std::string constexpr first. -+// XXX -+#if 0 - constexpr inline std::string kLegacyHierarchyCountryCodeString{"XX"}; - constexpr AddressCountryCode kLegacyHierarchyCountryCode = - AddressCountryCode(kLegacyHierarchyCountryCodeString); -+#endif -+inline AddressCountryCode kLegacyHierarchyCountryCode = AddressCountryCode("XX"); - - // Creates an instance of the address hierarchy model corresponding to the - // provided country. All the nodes have empty values, except for the country diff --git a/www/ungoogled-chromium/files/patch-components_autofill_core_browser_payments_iban__save__manager.cc b/www/ungoogled-chromium/files/patch-components_autofill_core_browser_payments_iban__save__manager.cc deleted file mode 100644 index d47301736a88..000000000000 --- a/www/ungoogled-chromium/files/patch-components_autofill_core_browser_payments_iban__save__manager.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- components/autofill/core/browser/payments/iban_save_manager.cc.orig 2023-12-23 12:33:28 UTC -+++ components/autofill/core/browser/payments/iban_save_manager.cc -@@ -123,7 +123,11 @@ bool IbanSaveManager::ShouldOfferUploadSave( - - // Offer server save for this IBAN if it doesn't already match an existing - // server IBAN. -+#if (_LIBCPP_VERSION >= 160000) - return std::ranges::none_of( -+#else -+ return base::ranges::none_of( -+#endif - personal_data_manager_->GetServerIbans(), - [&iban_import_candidate](const auto& iban) { - return iban->MatchesPrefixSuffixAndLength(iban_import_candidate); 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 52b6b0d2a2db..9cfe94abc3ec 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 2023-12-23 12:33:28 UTC +--- components/autofill/core/browser/personal_data_manager.cc.orig 2024-02-03 15:42:55 UTC +++ components/autofill/core/browser/personal_data_manager.cc -@@ -2397,7 +2397,8 @@ bool PersonalDataManager::ShouldShowCardsFromAccountOp +@@ -2380,7 +2380,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/1462552): 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 fe704330166f..eff10a30d525 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 2023-12-23 12:33:28 UTC +--- components/autofill/core/common/autofill_payments_features.cc.orig 2024-02-03 15:42:55 UTC +++ components/autofill/core/common/autofill_payments_features.cc -@@ -261,7 +261,7 @@ BASE_FEATURE(kEnablePixPayments, +@@ -282,7 +282,7 @@ BASE_FEATURE(kEnablePixPayments, 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_autofill_core_common_autofill__util.cc b/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__util.cc index 867c199e0b4d..6931999518e5 100644 --- a/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__util.cc +++ b/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__util.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/common/autofill_util.cc.orig 2023-12-23 12:33:28 UTC +--- components/autofill/core/common/autofill_util.cc.orig 2024-02-03 15:42:55 UTC +++ components/autofill/core/common/autofill_util.cc -@@ -207,7 +207,7 @@ size_t LevenshteinDistance(std::u16string_view a, +@@ -143,7 +143,7 @@ bool SanitizedFieldIsEmpty(const std::u16string& value bool ShouldAutoselectFirstSuggestionOnArrowDown() { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/ungoogled-chromium/files/patch-components_commerce__strings.grdp b/www/ungoogled-chromium/files/patch-components_commerce__strings.grdp index a6759af5596b..8e532afd44d4 100644 --- a/www/ungoogled-chromium/files/patch-components_commerce__strings.grdp +++ b/www/ungoogled-chromium/files/patch-components_commerce__strings.grdp @@ -1,11 +1,11 @@ ---- components/commerce_strings.grdp.orig 2023-11-04 07:08:51 UTC +--- components/commerce_strings.grdp.orig 2024-02-03 15:42:55 UTC +++ components/commerce_strings.grdp -@@ -304,7 +304,7 @@ +@@ -309,7 +309,7 @@ Typical prices are based on stores across the web over the past 90 days. - + Browse mode, you can change to Forms mode to use the left/right arrow to review price changes on the graph diff --git a/www/ungoogled-chromium/files/patch-components_commerce_core_commerce__feature__list.cc b/www/ungoogled-chromium/files/patch-components_commerce_core_commerce__feature__list.cc index a2e7b9dec04b..f35dc3c191d9 100644 --- a/www/ungoogled-chromium/files/patch-components_commerce_core_commerce__feature__list.cc +++ b/www/ungoogled-chromium/files/patch-components_commerce_core_commerce__feature__list.cc @@ -1,11 +1,20 @@ ---- components/commerce/core/commerce_feature_list.cc.orig 2023-12-23 12:33:28 UTC +--- components/commerce/core/commerce_feature_list.cc.orig 2024-02-03 15:42:55 UTC +++ components/commerce/core/commerce_feature_list.cc -@@ -225,7 +225,7 @@ BASE_FEATURE(kShoppingCollection, +@@ -168,7 +168,7 @@ BASE_FEATURE(kPriceInsights, + "PriceInsights", + base::FEATURE_DISABLED_BY_DEFAULT); + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + BASE_FEATURE(kPriceInsightsRegionLaunched, + "PriceInsightsRegionLaunched", + base::FEATURE_ENABLED_BY_DEFAULT); +@@ -249,7 +249,7 @@ BASE_FEATURE(kShoppingCollection, BASE_FEATURE(kShoppingList, "ShoppingList", base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kShoppingListRegionLaunched, "ShoppingListRegionLaunched", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-components_components__chromium__strings.grd b/www/ungoogled-chromium/files/patch-components_components__chromium__strings.grd index 33a2403ebe42..a5f39f1d2607 100644 --- a/www/ungoogled-chromium/files/patch-components_components__chromium__strings.grd +++ b/www/ungoogled-chromium/files/patch-components_components__chromium__strings.grd @@ -1,11 +1,11 @@ ---- components/components_chromium_strings.grd.orig 2023-08-18 10:26:52 UTC +--- components/components_chromium_strings.grd.orig 2024-02-03 15:42:55 UTC +++ components/components_chromium_strings.grd -@@ -226,7 +226,7 @@ +@@ -220,7 +220,7 @@ - + Go to the Chromium menu > diff --git a/www/ungoogled-chromium/files/patch-components_components__google__chrome__strings.grd b/www/ungoogled-chromium/files/patch-components_components__google__chrome__strings.grd index c7921db24989..78b6b322c422 100644 --- a/www/ungoogled-chromium/files/patch-components_components__google__chrome__strings.grd +++ b/www/ungoogled-chromium/files/patch-components_components__google__chrome__strings.grd @@ -1,11 +1,11 @@ ---- components/components_google_chrome_strings.grd.orig 2023-08-18 10:26:52 UTC +--- components/components_google_chrome_strings.grd.orig 2024-02-03 15:42:55 UTC +++ components/components_google_chrome_strings.grd -@@ -226,7 +226,7 @@ +@@ -220,7 +220,7 @@ - + Go to the Chrome menu > diff --git a/www/ungoogled-chromium/files/patch-components_cookie__config_cookie__store__util.cc b/www/ungoogled-chromium/files/patch-components_cookie__config_cookie__store__util.cc index b8cfb001b843..7202960affdb 100644 --- a/www/ungoogled-chromium/files/patch-components_cookie__config_cookie__store__util.cc +++ b/www/ungoogled-chromium/files/patch-components_cookie__config_cookie__store__util.cc @@ -1,11 +1,11 @@ ---- components/cookie_config/cookie_store_util.cc.orig 2022-10-01 07:40:07 UTC +--- components/cookie_config/cookie_store_util.cc.orig 2024-02-03 15:42:55 UTC +++ components/cookie_config/cookie_store_util.cc -@@ -12,7 +12,7 @@ +@@ -13,7 +13,7 @@ namespace cookie_config { - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) namespace { // Use the operating system's mechanisms to encrypt cookies before writing diff --git a/www/ungoogled-chromium/files/patch-components_crash_core_app_crashpad__handler__main.cc b/www/ungoogled-chromium/files/patch-components_crash_core_app_crashpad__handler__main.cc new file mode 100644 index 000000000000..8906203801c1 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_crash_core_app_crashpad__handler__main.cc @@ -0,0 +1,20 @@ +--- components/crash/core/app/crashpad_handler_main.cc.orig 2024-02-03 15:42:55 UTC ++++ components/crash/core/app/crashpad_handler_main.cc +@@ -10,7 +10,7 @@ + #include "third_party/crashpad/crashpad/handler/handler_main.h" + #include "third_party/crashpad/crashpad/handler/user_stream_data_source.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + #include "components/stability_report/user_stream_data_source_posix.h" + #endif + +@@ -31,7 +31,7 @@ __attribute__((visibility("default"), used)) int Crash + char* argv[]) { + crashpad::UserStreamDataSources user_stream_data_sources; + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + user_stream_data_sources.push_back( + std::make_unique()); + #endif diff --git a/www/ungoogled-chromium/files/patch-components_embedder__support_user__agent__utils.cc b/www/ungoogled-chromium/files/patch-components_embedder__support_user__agent__utils.cc index f6829ded62ab..ccb070499af6 100644 --- a/www/ungoogled-chromium/files/patch-components_embedder__support_user__agent__utils.cc +++ b/www/ungoogled-chromium/files/patch-components_embedder__support_user__agent__utils.cc @@ -1,12 +1,12 @@ ---- components/embedder_support/user_agent_utils.cc.orig 2023-10-13 13:20:35 UTC +--- components/embedder_support/user_agent_utils.cc.orig 2024-02-03 15:42:55 UTC +++ components/embedder_support/user_agent_utils.cc -@@ -432,6 +432,9 @@ std::string GetPlatformForUAMetadata() { +@@ -445,6 +445,9 @@ std::string GetPlatformForUAMetadata() { # else return "Chromium OS"; # endif +#elif BUILDFLAG(IS_BSD) + // The internet is weird... + return "Linux"; #else return std::string(version_info::GetOSType()); #endif 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 356461cb3726..07da73e397bb 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,21 +1,30 @@ ---- components/feature_engagement/public/feature_configurations.cc.orig 2023-12-23 12:33:28 UTC +--- components/feature_engagement/public/feature_configurations.cc.orig 2024-02-03 15:42:55 UTC +++ components/feature_engagement/public/feature_configurations.cc -@@ -49,7 +49,7 @@ FeatureConfig CreateAlwaysTriggerConfig(const base::Fe +@@ -48,7 +48,7 @@ FeatureConfig CreateAlwaysTriggerConfig(const base::Fe + absl::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 +@@ -67,7 +67,7 @@ absl::optional GetClientSideFeatureConf + + #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) { absl::optional config = FeatureConfig(); config->valid = true; -@@ -1440,7 +1440,8 @@ absl::optional GetClientSideFeatureConf +@@ -1498,7 +1498,8 @@ absl::optional GetClientSideFeatureConf #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) { 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 24f3ebbfb923..ce76cdc97ade 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,20 +1,29 @@ ---- components/feature_engagement/public/feature_constants.cc.orig 2023-12-23 12:33:28 UTC +--- components/feature_engagement/public/feature_constants.cc.orig 2024-02-03 15:42:55 UTC +++ components/feature_engagement/public/feature_constants.cc @@ -21,7 +21,7 @@ BASE_FEATURE(kUseClientConfigIPH, 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); -@@ -560,7 +560,7 @@ constexpr base::FeatureParam kDefaultBrowserEligi +@@ -583,7 +583,7 @@ constexpr base::FeatureParam kDefaultBrowserEligi /*default_value=*/365}; #endif // BUILDFLAG(IS_IOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) BASE_FEATURE(kIPHAutofillExternalAccountProfileSuggestionFeature, "IPH_AutofillExternalAccountProfileSuggestion", +@@ -709,7 +709,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 c4632760c9e7..daabcd04d99a 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,20 +1,29 @@ ---- components/feature_engagement/public/feature_constants.h.orig 2023-12-23 12:33:28 UTC +--- components/feature_engagement/public/feature_constants.h.orig 2024-02-03 15:42:55 UTC +++ components/feature_engagement/public/feature_constants.h -@@ -24,7 +24,7 @@ BASE_DECLARE_FEATURE(kUseClientConfigIPH); +@@ -25,7 +25,7 @@ BASE_DECLARE_FEATURE(kUseClientConfigIPH); 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); -@@ -233,7 +233,7 @@ extern const base::FeatureParam +@@ -243,7 +243,7 @@ extern const base::FeatureParam kDefaultBrowserEligibilitySlidingWindowParam; #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); +@@ -291,7 +291,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 525645b64e51..68fe461750b7 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,20 +1,29 @@ ---- components/feature_engagement/public/feature_list.cc.orig 2023-12-23 12:33:28 UTC +--- components/feature_engagement/public/feature_list.cc.orig 2024-02-03 15:42:55 UTC +++ components/feature_engagement/public/feature_list.cc -@@ -146,7 +146,7 @@ const base::Feature* const kAllFeatures[] = { - &kIPHiOSParcelTrackingFeature, +@@ -150,7 +150,7 @@ const base::Feature* const kAllFeatures[] = { + &kIPHiOSBlueDotPromoEnhancedSafeBrowsingFeature, #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, -@@ -196,7 +196,7 @@ const base::Feature* const kAllFeatures[] = { +@@ -205,7 +205,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, +@@ -253,7 +253,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 6106a2312f83..0e7330b19d0f 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,38 +1,56 @@ ---- components/feature_engagement/public/feature_list.h.orig 2023-12-23 12:33:28 UTC +--- components/feature_engagement/public/feature_list.h.orig 2024-02-03 15:42:55 UTC +++ components/feature_engagement/public/feature_list.h -@@ -269,7 +269,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSParcelTrackingFeature, +@@ -278,7 +278,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSBlueDotPromoEnhancedSafe #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, -@@ -352,7 +352,7 @@ DEFINE_VARIATION_PARAM(kIPHBackNavigationMenuFeature, +@@ -369,7 +369,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"); -@@ -567,7 +567,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation - VARIATION_ENTRY(kIPHiOSChoiceScreenFeature), - VARIATION_ENTRY(kIPHiOSParcelTrackingFeature), +@@ -453,7 +453,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) +@@ -592,7 +592,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation + VARIATION_ENTRY(kIPHiOSPullToRefreshFeature), + VARIATION_ENTRY(kIPHiOSReplaceSyncPromosWithSignInPromos), #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), -@@ -617,7 +617,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -647,7 +647,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), +@@ -695,7 +695,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 7ec400f40446..8544e53758a0 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 2023-11-04 07:08:51 UTC +--- components/gwp_asan/client/gwp_asan.cc.orig 2024-02-03 15:42:55 UTC +++ components/gwp_asan/client/gwp_asan.cc -@@ -66,7 +66,7 @@ constexpr bool kCpuIs64Bit = +@@ -70,7 +70,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_client_gwp__asan__features.cc b/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan__features.cc index 86da65e7a2d1..4d6141f7f61b 100644 --- a/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan__features.cc +++ b/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan__features.cc @@ -1,11 +1,11 @@ ---- components/gwp_asan/client/gwp_asan_features.cc.orig 2023-11-04 07:08:51 UTC +--- components/gwp_asan/client/gwp_asan_features.cc.orig 2024-02-03 15:42:55 UTC +++ components/gwp_asan/client/gwp_asan_features.cc @@ -9,7 +9,7 @@ namespace gwp_asan::internal { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_CHROMEOS) || \ ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) || \ + (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS)) constexpr base::FeatureState kDefaultEnabled = base::FEATURE_ENABLED_BY_DEFAULT; #else - constexpr base::FeatureState kDefaultEnabled = diff --git a/www/ungoogled-chromium/files/patch-components_management__strings.grdp b/www/ungoogled-chromium/files/patch-components_management__strings.grdp index de63d9c13b01..e00e42c38e3f 100644 --- a/www/ungoogled-chromium/files/patch-components_management__strings.grdp +++ b/www/ungoogled-chromium/files/patch-components_management__strings.grdp @@ -1,11 +1,11 @@ ---- components/management_strings.grdp.orig 2023-10-13 13:20:35 UTC +--- components/management_strings.grdp.orig 2024-02-03 15:42:55 UTC +++ components/management_strings.grdp -@@ -346,7 +346,7 @@ +@@ -345,7 +345,7 @@ - + Information about your browser, OS, device, installed software, and files diff --git a/www/ungoogled-chromium/files/patch-components_metrics_metrics__log.cc b/www/ungoogled-chromium/files/patch-components_metrics_metrics__log.cc index 8d451716d7a6..2b99ebbca668 100644 --- a/www/ungoogled-chromium/files/patch-components_metrics_metrics__log.cc +++ b/www/ungoogled-chromium/files/patch-components_metrics_metrics__log.cc @@ -1,38 +1,38 @@ ---- components/metrics/metrics_log.cc.orig 2023-10-13 13:20:35 UTC +--- components/metrics/metrics_log.cc.orig 2024-02-03 15:42:55 UTC +++ components/metrics/metrics_log.cc @@ -53,7 +53,7 @@ #include "base/win/current_module.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/environment.h" #include "base/nix/xdg_util.h" #endif -@@ -139,7 +139,7 @@ void RecordCurrentTime( +@@ -142,7 +142,7 @@ void RecordCurrentTime( } } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) metrics::SystemProfileProto::OS::XdgSessionType ToProtoSessionType( base::nix::SessionType session_type) { switch (session_type) { -@@ -399,7 +399,7 @@ void MetricsLog::RecordCoreSystemProfile( +@@ -393,7 +393,7 @@ void MetricsLog::RecordCoreSystemProfile( // OperatingSystemVersion refers to the ChromeOS release version. #if BUILDFLAG(IS_CHROMEOS_ASH) os->set_kernel_version(base::SysInfo::KernelVersion()); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Linux operating system version is copied over into kernel version to be // consistent. os->set_kernel_version(base::SysInfo::OperatingSystemVersion()); -@@ -416,7 +416,7 @@ void MetricsLog::RecordCoreSystemProfile( +@@ -410,7 +410,7 @@ void MetricsLog::RecordCoreSystemProfile( os->set_build_number(base::SysInfo::GetIOSBuildNumber()); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr env = base::Environment::Create(); os->set_xdg_session_type(ToProtoSessionType(base::nix::GetSessionType(*env))); os->set_xdg_current_desktop( diff --git a/www/ungoogled-chromium/files/patch-components_neterror_resources_neterror.js b/www/ungoogled-chromium/files/patch-components_neterror_resources_neterror.js index a15572eb9d3f..88a5e7416cc4 100644 --- a/www/ungoogled-chromium/files/patch-components_neterror_resources_neterror.js +++ b/www/ungoogled-chromium/files/patch-components_neterror_resources_neterror.js @@ -1,11 +1,11 @@ ---- components/neterror/resources/neterror.js.orig 2023-12-23 12:33:28 UTC +--- components/neterror/resources/neterror.js.orig 2024-02-03 15:42:55 UTC +++ components/neterror/resources/neterror.js -@@ -141,7 +141,7 @@ function detailsButtonClick() { +@@ -142,7 +142,7 @@ function detailsButtonClick() { let primaryControlOnLeft = true; // clang-format off -// +// // clang-format on primaryControlOnLeft = false; // 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 5eff2e034085..3ea4c4224f9a 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 2023-11-04 07:08:51 UTC +--- components/network_session_configurator/browser/network_session_configurator.cc.orig 2024-02-03 15:42:55 UTC +++ components/network_session_configurator/browser/network_session_configurator.cc -@@ -801,7 +801,7 @@ net::URLRequestContextBuilder::HttpCacheParams::Type C +@@ -813,7 +813,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 750baf161d3f..ba5fcbc914f4 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 2023-09-17 07:59:53 UTC +--- components/network_session_configurator/browser/network_session_configurator_unittest.cc.orig 2024-02-03 15:42:55 UTC +++ components/network_session_configurator/browser/network_session_configurator_unittest.cc -@@ -775,7 +775,7 @@ TEST_F(NetworkSessionConfiguratorTest, HostRules) { +@@ -788,7 +788,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 index b583321cabf2..c09a09c17567 100644 --- 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 @@ -1,10 +1,10 @@ ---- components/omnibox/browser/omnibox_edit_model.cc.orig 2023-06-05 19:39:05 UTC +--- components/omnibox/browser/omnibox_edit_model.cc.orig 2024-02-03 15:42:55 UTC +++ components/omnibox/browser/omnibox_edit_model.cc -@@ -23,6 +23,7 @@ - #include "base/trace_event/trace_event.h" +@@ -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_optimization__guide_core_optimization__guide__util.cc b/www/ungoogled-chromium/files/patch-components_optimization__guide_core_optimization__guide__util.cc index 77d43e6cdc4e..06b3bd133710 100644 --- a/www/ungoogled-chromium/files/patch-components_optimization__guide_core_optimization__guide__util.cc +++ b/www/ungoogled-chromium/files/patch-components_optimization__guide_core_optimization__guide__util.cc @@ -1,11 +1,11 @@ ---- components/optimization_guide/core/optimization_guide_util.cc.orig 2023-12-23 12:33:28 UTC +--- components/optimization_guide/core/optimization_guide_util.cc.orig 2024-02-03 15:42:55 UTC +++ components/optimization_guide/core/optimization_guide_util.cc -@@ -34,7 +34,7 @@ optimization_guide::proto::Platform GetPlatform() { +@@ -39,7 +39,7 @@ optimization_guide::proto::Platform GetPlatform() { return optimization_guide::proto::PLATFORM_CHROMEOS; #elif BUILDFLAG(IS_ANDROID) return optimization_guide::proto::PLATFORM_ANDROID; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return optimization_guide::proto::PLATFORM_LINUX; #else return optimization_guide::proto::PLATFORM_UNDEFINED; diff --git a/www/ungoogled-chromium/files/patch-components_optimization__guide_core_tflite__model__executor.h b/www/ungoogled-chromium/files/patch-components_optimization__guide_core_tflite__model__executor.h index 6570359db5dd..d7e2a32077ad 100644 --- a/www/ungoogled-chromium/files/patch-components_optimization__guide_core_tflite__model__executor.h +++ b/www/ungoogled-chromium/files/patch-components_optimization__guide_core_tflite__model__executor.h @@ -1,62 +1,62 @@ ---- components/optimization_guide/core/tflite_model_executor.h.orig 2023-10-13 13:20:35 UTC +--- components/optimization_guide/core/tflite_model_executor.h.orig 2024-02-03 15:42:55 UTC +++ components/optimization_guide/core/tflite_model_executor.h -@@ -240,7 +240,11 @@ class TFLiteModelExecutor : public ModelExecutor= 15) ModelExecutor::ConstRefInputVector inputs) +#else + typename ModelExecutor::ConstRefInputVector inputs) +#endif override { DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); -@@ -262,7 +266,11 @@ class TFLiteModelExecutor : public ModelExecutor> SendForBatchExecutionSync( +#if defined(__clang__) && (__clang_major__ >= 15) ModelExecutor::ConstRefInputVector inputs) +#else + typename ModelExecutor::ConstRefInputVector inputs) +#endif override { DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); -@@ -417,7 +425,11 @@ class TFLiteModelExecutor : public ModelExecutor= 15) ModelExecutor::ConstRefInputVector inputs) { +#else + typename ModelExecutor::ConstRefInputVector inputs) { +#endif DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); -@@ -434,7 +446,11 @@ class TFLiteModelExecutor : public ModelExecutor= 15) ModelExecutor::ConstRefInputVector inputs, +#else + typename ModelExecutor::ConstRefInputVector inputs, +#endif std::vector>* outputs) { DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); -@@ -494,7 +510,11 @@ class TFLiteModelExecutor : public ModelExecutor= 15) ModelExecutor::ConstRefInputVector inputs, +#else + typename ModelExecutor::ConstRefInputVector inputs, +#endif ExecutionStatus execution_status) { DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); diff --git a/www/ungoogled-chromium/files/patch-components_paint__preview_browser_paint__preview__client.cc b/www/ungoogled-chromium/files/patch-components_paint__preview_browser_paint__preview__client.cc index 3f1ab3625f94..e6d1708b0d60 100644 --- a/www/ungoogled-chromium/files/patch-components_paint__preview_browser_paint__preview__client.cc +++ b/www/ungoogled-chromium/files/patch-components_paint__preview_browser_paint__preview__client.cc @@ -1,13 +1,13 @@ ---- components/paint_preview/browser/paint_preview_client.cc.orig 2023-03-10 11:01:21 UTC +--- components/paint_preview/browser/paint_preview_client.cc.orig 2024-02-03 15:42:55 UTC +++ components/paint_preview/browser/paint_preview_client.cc -@@ -310,8 +310,8 @@ void PaintPreviewClient::CapturePaintPreview( - metadata->set_url(url.spec()); +@@ -313,8 +313,8 @@ void PaintPreviewClient::CapturePaintPreview( metadata->set_version(kPaintPreviewVersion); auto* chromeVersion = metadata->mutable_chrome_version(); -- chromeVersion->set_major(CHROME_VERSION_MAJOR); -- chromeVersion->set_minor(CHROME_VERSION_MINOR); -+ chromeVersion->set_gmajor(CHROME_VERSION_MAJOR); -+ chromeVersion->set_gminor(CHROME_VERSION_MINOR); - chromeVersion->set_build(CHROME_VERSION_BUILD); - chromeVersion->set_patch(CHROME_VERSION_PATCH); + const auto& current_chrome_version = version_info::GetVersion(); +- chromeVersion->set_major(current_chrome_version.components()[0]); +- chromeVersion->set_minor(current_chrome_version.components()[1]); ++ chromeVersion->set_gmajor(current_chrome_version.components()[0]); ++ chromeVersion->set_gminor(current_chrome_version.components()[1]); + chromeVersion->set_build(current_chrome_version.components()[2]); + chromeVersion->set_patch(current_chrome_version.components()[3]); document_data.callback = std::move(callback); diff --git a/www/ungoogled-chromium/files/patch-components_paint__preview_browser_paint__preview__client__unittest.cc b/www/ungoogled-chromium/files/patch-components_paint__preview_browser_paint__preview__client__unittest.cc index 4a711056abdd..871e53829153 100644 --- a/www/ungoogled-chromium/files/patch-components_paint__preview_browser_paint__preview__client__unittest.cc +++ b/www/ungoogled-chromium/files/patch-components_paint__preview_browser_paint__preview__client__unittest.cc @@ -1,13 +1,13 @@ ---- components/paint_preview/browser/paint_preview_client_unittest.cc.orig 2022-10-01 07:40:07 UTC +--- components/paint_preview/browser/paint_preview_client_unittest.cc.orig 2024-02-03 15:42:55 UTC +++ components/paint_preview/browser/paint_preview_client_unittest.cc -@@ -171,8 +171,8 @@ TEST_P(PaintPreviewClientRenderViewHostTest, CaptureMa - metadata->set_url(expected_url.spec()); +@@ -174,8 +174,8 @@ TEST_P(PaintPreviewClientRenderViewHostTest, CaptureMa metadata->set_version(kPaintPreviewVersion); auto* chromeVersion = metadata->mutable_chrome_version(); -- chromeVersion->set_major(CHROME_VERSION_MAJOR); -- chromeVersion->set_minor(CHROME_VERSION_MINOR); -+ chromeVersion->set_gmajor(CHROME_VERSION_MAJOR); -+ chromeVersion->set_gminor(CHROME_VERSION_MINOR); - chromeVersion->set_build(CHROME_VERSION_BUILD); - chromeVersion->set_patch(CHROME_VERSION_PATCH); + const auto& current_chrome_version = version_info::GetVersion(); +- chromeVersion->set_major(current_chrome_version.components()[0]); +- chromeVersion->set_minor(current_chrome_version.components()[1]); ++ chromeVersion->set_gmajor(current_chrome_version.components()[0]); ++ chromeVersion->set_gminor(current_chrome_version.components()[1]); + chromeVersion->set_build(current_chrome_version.components()[2]); + chromeVersion->set_patch(current_chrome_version.components()[3]); PaintPreviewFrameProto* main_frame = expected_proto.mutable_root_frame(); diff --git a/www/ungoogled-chromium/files/patch-components_paint__preview_player_player__compositor__delegate.cc b/www/ungoogled-chromium/files/patch-components_paint__preview_player_player__compositor__delegate.cc index 6d6e7184185a..3d2e83f72365 100644 --- a/www/ungoogled-chromium/files/patch-components_paint__preview_player_player__compositor__delegate.cc +++ b/www/ungoogled-chromium/files/patch-components_paint__preview_player_player__compositor__delegate.cc @@ -1,13 +1,13 @@ ---- components/paint_preview/player/player_compositor_delegate.cc.orig 2023-03-10 11:01:21 UTC +--- components/paint_preview/player/player_compositor_delegate.cc.orig 2024-02-03 15:42:55 UTC +++ components/paint_preview/player/player_compositor_delegate.cc -@@ -452,8 +452,8 @@ void PlayerCompositorDelegate::ValidateProtoAndLoadAXT - // use the AXTreeUpdate. +@@ -455,8 +455,8 @@ void PlayerCompositorDelegate::ValidateProtoAndLoadAXT auto chrome_version = capture_result_->proto.metadata().chrome_version(); + const auto& current_chrome_version = version_info::GetVersion(); if (capture_result_->proto.metadata().has_chrome_version() && -- chrome_version.major() == CHROME_VERSION_MAJOR && -- chrome_version.minor() == CHROME_VERSION_MINOR && -+ chrome_version.gmajor() == CHROME_VERSION_MAJOR && -+ chrome_version.gminor() == CHROME_VERSION_MINOR && - chrome_version.build() == CHROME_VERSION_BUILD && - chrome_version.patch() == CHROME_VERSION_PATCH) { +- chrome_version.major() == current_chrome_version.components()[0] && +- chrome_version.minor() == current_chrome_version.components()[1] && ++ chrome_version.gmajor() == current_chrome_version.components()[0] && ++ chrome_version.gminor() == current_chrome_version.components()[1] && + chrome_version.build() == current_chrome_version.components()[2] && + chrome_version.patch() == current_chrome_version.components()[3]) { paint_preview_service_->GetFileMixin()->GetAXTreeUpdate( diff --git a/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 3ae8b65fbabd..1782f6251da1 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,11 @@ ---- components/password_manager/core/browser/features/password_features.cc.orig 2023-12-23 12:33:28 UTC +--- components/password_manager/core/browser/features/password_features.cc.orig 2024-02-03 15:42:55 UTC +++ components/password_manager/core/browser/features/password_features.cc -@@ -8,7 +8,7 @@ - - namespace password_manager::features { - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - // Enables attaching password manager and autofill internals logs to an Autofill - // Rater Extension Report. - BASE_FEATURE(kAttachLogsToAutofillRaterExtensionReport, -@@ -30,7 +30,7 @@ BASE_FEATURE(kBiometricTouchToFill, +@@ -22,7 +22,7 @@ BASE_FEATURE(kBiometricTouchToFill, // Delete undecryptable passwords from the store when Sync is active. 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 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 deleted file mode 100644 index 7ab44347a8cd..000000000000 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.h +++ /dev/null @@ -1,11 +0,0 @@ ---- components/password_manager/core/browser/features/password_features.h.orig 2023-12-23 12:33:28 UTC -+++ components/password_manager/core/browser/features/password_features.h -@@ -15,7 +15,7 @@ namespace password_manager::features { - // All features in alphabetical order. The features should be documented - // alongside the definition of their values in the .cc file. - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - BASE_DECLARE_FEATURE(kAttachLogsToAutofillRaterExtensionReport); - #endif - diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_login__database__unittest.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc similarity index 60% rename from www/ungoogled-chromium/files/patch-components_password__manager_core_browser_login__database__unittest.cc rename to www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc index 82b928d178d8..a0eadaaf32c6 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_login__database__unittest.cc +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/login_database_unittest.cc.orig 2023-12-23 12:33:28 UTC -+++ components/password_manager/core/browser/login_database_unittest.cc -@@ -2102,7 +2102,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCurrent, +--- components/password_manager/core/browser/password_store/login_database_unittest.cc.orig 2024-02-03 15:42:55 UTC ++++ components/password_manager/core/browser/password_store/login_database_unittest.cc +@@ -2106,7 +2106,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCurrent, LoginDatabaseMigrationTestBroken, testing::Values(1, 2, 3, 24)); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) class LoginDatabaseUndecryptableLoginsTest : public testing::Test { protected: LoginDatabaseUndecryptableLoginsTest() = default; 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 2a01a193027f..aafb8351d68c 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 2023-05-05 12:12:41 UTC +--- components/policy/core/browser/policy_pref_mapping_test.cc.orig 2024-02-03 15:42:55 UTC +++ components/policy/core/browser/policy_pref_mapping_test.cc -@@ -327,7 +327,7 @@ class PolicyTestCase { +@@ -318,7 +318,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 f4519d4f45e6..66ac3ce5bc26 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 2023-12-23 12:33:28 UTC +--- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2024-02-03 15:42:55 UTC +++ components/policy/core/common/cloud/cloud_policy_client.cc -@@ -508,7 +508,7 @@ void CloudPolicyClient::FetchPolicy(PolicyFetchReason +@@ -516,7 +516,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_core_common_policy__loader__common.cc b/www/ungoogled-chromium/files/patch-components_policy_core_common_policy__loader__common.cc index 35580deac1fe..580f31e777c3 100644 --- a/www/ungoogled-chromium/files/patch-components_policy_core_common_policy__loader__common.cc +++ b/www/ungoogled-chromium/files/patch-components_policy_core_common_policy__loader__common.cc @@ -1,20 +1,20 @@ ---- components/policy/core/common/policy_loader_common.cc.orig 2023-09-17 07:59:53 UTC +--- components/policy/core/common/policy_loader_common.cc.orig 2024-02-03 15:42:55 UTC +++ components/policy/core/common/policy_loader_common.cc @@ -46,7 +46,7 @@ const char* kSensitivePolicies[] = { key::kDefaultSearchProviderEnabled, key::kSafeBrowsingEnabled, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) key::kAutoOpenFileTypes, - key::kSafeBrowsingAllowlistDomains, key::kHomepageIsNewTabPage, -@@ -55,7 +55,7 @@ const char* kSensitivePolicies[] = { - key::kRestoreOnStartup, - key::kRestoreOnStartupURLs, + key::kPasswordProtectionChangePasswordURL, +@@ -56,7 +56,7 @@ const char* kSensitivePolicies[] = { + key::kSafeBrowsingAllowlistDomains, + key::kSiteSearchSettings, #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) key::kCommandLineFlagSecurityWarningsEnabled, #endif #if !BUILDFLAG(IS_IOS) diff --git a/www/ungoogled-chromium/files/patch-components_policy_core_common_policy__paths.cc b/www/ungoogled-chromium/files/patch-components_policy_core_common_policy__paths.cc index e191efba1473..48cc79a820c4 100644 --- a/www/ungoogled-chromium/files/patch-components_policy_core_common_policy__paths.cc +++ b/www/ungoogled-chromium/files/patch-components_policy_core_common_policy__paths.cc @@ -1,11 +1,11 @@ ---- components/policy/core/common/policy_paths.cc.orig 2023-10-13 13:20:35 UTC +--- components/policy/core/common/policy_paths.cc.orig 2024-02-03 15:42:55 UTC +++ components/policy/core/common/policy_paths.cc -@@ -16,6 +16,8 @@ namespace policy { - #if BUILDFLAG(GOOGLE_CHROME_BRANDING) || \ - BUILDFLAG(GOOGLE_CHROME_FOR_TESTING_BRANDING) +@@ -17,6 +17,8 @@ namespace policy { const char kPolicyPath[] = "/etc/opt/chrome/policies"; + #elif BUILDFLAG(GOOGLE_CHROME_FOR_TESTING_BRANDING) + const char kPolicyPath[] = "/etc/opt/chrome_for_testing/policies"; +#elif BUILDFLAG(IS_FREEBSD) +const char kPolicyPath[] = "/usr/local/etc/chromium/policies"; #else const char kPolicyPath[] = "/etc/chromium/policies"; - #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) || \ + #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) diff --git a/www/ungoogled-chromium/files/patch-components_policy_core_common_policy__utils.cc b/www/ungoogled-chromium/files/patch-components_policy_core_common_policy__utils.cc new file mode 100644 index 000000000000..e74592a74610 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_policy_core_common_policy__utils.cc @@ -0,0 +1,11 @@ +--- components/policy/core/common/policy_utils.cc.orig 2024-02-03 15:42:55 UTC ++++ components/policy/core/common/policy_utils.cc +@@ -28,7 +28,7 @@ bool IsPolicyTestingEnabled(PrefService* pref_service, + return true; + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (channel == version_info::Channel::DEV) { + return true; + } diff --git a/www/ungoogled-chromium/files/patch-components_qr__code__generator_BUILD.gn b/www/ungoogled-chromium/files/patch-components_qr__code__generator_BUILD.gn new file mode 100644 index 000000000000..d875fc1d0e7d --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_qr__code__generator_BUILD.gn @@ -0,0 +1,32 @@ +--- components/qr_code_generator/BUILD.gn.orig 2024-02-03 15:42:55 UTC ++++ components/qr_code_generator/BUILD.gn +@@ -39,20 +39,20 @@ source_set("qr_code_generator") { + ] + deps = [ + ":qr_code_generator_features", +- ":qr_code_generator_ffi_glue", ++# ":qr_code_generator_ffi_glue", + "//base", + ] + public_deps = [ "//base" ] + } + +-rust_static_library("qr_code_generator_ffi_glue") { +- allow_unsafe = true # Needed for FFI that underpins the `cxx` crate. +- crate_root = "qr_code_generator_ffi_glue.rs" +- sources = [ "qr_code_generator_ffi_glue.rs" ] +- cxx_bindings = [ "qr_code_generator_ffi_glue.rs" ] +- visibility = [ ":qr_code_generator" ] +- deps = [ "//third_party/rust/qr_code/v2:lib" ] +-} ++#rust_static_library("qr_code_generator_ffi_glue") { ++# allow_unsafe = true # Needed for FFI that underpins the `cxx` crate. ++# crate_root = "qr_code_generator_ffi_glue.rs" ++# sources = [ "qr_code_generator_ffi_glue.rs" ] ++# cxx_bindings = [ "qr_code_generator_ffi_glue.rs" ] ++# visibility = [ ":qr_code_generator" ] ++# deps = [ "//third_party/rust/qr_code/v2:lib" ] ++#} + + source_set("unit_tests") { + testonly = true diff --git a/www/ungoogled-chromium/files/patch-components_qr__code__generator_features.cc b/www/ungoogled-chromium/files/patch-components_qr__code__generator_features.cc new file mode 100644 index 000000000000..3ef382e44cd7 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_qr__code__generator_features.cc @@ -0,0 +1,11 @@ +--- components/qr_code_generator/features.cc.orig 2024-02-03 15:42:55 UTC ++++ components/qr_code_generator/features.cc +@@ -12,7 +12,7 @@ namespace qr_code_generator { + BASE_FEATURE(kRustyQrCodeGeneratorFeature, + "RustyQrCodeGenerator", + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_ANDROID) ++ 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_qr__code__generator_features.h b/www/ungoogled-chromium/files/patch-components_qr__code__generator_features.h new file mode 100644 index 000000000000..13207fa9e9ef --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_qr__code__generator_features.h @@ -0,0 +1,14 @@ +--- components/qr_code_generator/features.h.orig 2024-02-03 15:42:55 UTC ++++ components/qr_code_generator/features.h +@@ -26,7 +26,11 @@ BASE_DECLARE_FEATURE(kRustyQrCodeGeneratorFeature); + // See https://crbug.com/1431991 for more details about the feature and the + // Rust QR Code Generator project. + inline bool IsRustyQrCodeGeneratorFeatureEnabled() { ++#ifdef notyet + return base::FeatureList::IsEnabled(kRustyQrCodeGeneratorFeature); ++#else ++ return false; ++#endif + } + + } // namespace qr_code_generator diff --git a/www/ungoogled-chromium/files/patch-components_qr__code__generator_qr__code__generator.cc b/www/ungoogled-chromium/files/patch-components_qr__code__generator_qr__code__generator.cc new file mode 100644 index 000000000000..3f40ca70edf6 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_qr__code__generator_qr__code__generator.cc @@ -0,0 +1,47 @@ +--- components/qr_code_generator/qr_code_generator.cc.orig 2024-02-03 15:42:55 UTC ++++ components/qr_code_generator/qr_code_generator.cc +@@ -11,12 +11,16 @@ + #include + + #include "base/check_op.h" ++#ifdef notyet + #include "base/containers/span_rust.h" ++#endif + #include "base/memory/raw_ptr.h" + #include "base/notreached.h" + #include "base/numerics/safe_conversions.h" + #include "components/qr_code_generator/features.h" ++#ifdef notyet + #include "components/qr_code_generator/qr_code_generator_ffi_glue.rs.h" ++#endif + + namespace qr_code_generator { + +@@ -572,6 +576,7 @@ size_t SegmentSpanLength(base::span GenerateQrCodeUsingRust( + base::span in, + absl::optional min_version) { +@@ -596,6 +601,7 @@ absl::optional Generat + CHECK_EQ(code.data.size(), static_cast(code.qr_size * code.qr_size)); + return code; + } ++#endif + + } // namespace + +@@ -617,9 +623,11 @@ absl::optional QRCodeG + return absl::nullopt; + } + ++#ifdef notyet + if (IsRustyQrCodeGeneratorFeatureEnabled()) { + return GenerateQrCodeUsingRust(in, min_version); + } ++#endif + + std::vector segments; + const QRVersionInfo* version_info = nullptr; 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 new file mode 100644 index 000000000000..6a4f73686db9 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_search__engines_template__url__service.cc @@ -0,0 +1,11 @@ +--- components/search_engines/template_url_service.cc.orig 2024-02-03 15:42:55 UTC ++++ components/search_engines/template_url_service.cc +@@ -2588,7 +2588,7 @@ bool TemplateURLService::MatchesDefaultSearchProvider( + std::unique_ptr + TemplateURLService::GetEnterpriseSiteSearchManager(PrefService* prefs) { + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || 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_paint__preview__compositor_paint__preview__compositor__collection__impl.cc b/www/ungoogled-chromium/files/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc index cad028161414..65dd7bed4046 100644 --- a/www/ungoogled-chromium/files/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc +++ b/www/ungoogled-chromium/files/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc @@ -1,29 +1,29 @@ ---- components/services/paint_preview_compositor/paint_preview_compositor_collection_impl.cc.orig 2023-09-17 07:59:53 UTC +--- components/services/paint_preview_compositor/paint_preview_compositor_collection_impl.cc.orig 2024-02-03 15:42:55 UTC +++ components/services/paint_preview_compositor/paint_preview_compositor_collection_impl.cc -@@ -21,7 +21,7 @@ +@@ -22,7 +22,7 @@ #if BUILDFLAG(IS_WIN) #include "content/public/child/dwrite_font_proxy_init_win.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/services/font/public/cpp/font_loader.h" #endif -@@ -78,7 +78,7 @@ PaintPreviewCompositorCollectionImpl::PaintPreviewComp +@@ -79,7 +79,7 @@ PaintPreviewCompositorCollectionImpl::PaintPreviewComp // Initialize font access for Skia. #if BUILDFLAG(IS_WIN) content::InitializeDWriteFontProxy(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::PendingRemote font_service; content::UtilityThread::Get()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); -@@ -101,7 +101,7 @@ PaintPreviewCompositorCollectionImpl::PaintPreviewComp - base::BindOnce([] { SkFontMgr::RefDefault(); })); +@@ -102,7 +102,7 @@ PaintPreviewCompositorCollectionImpl::PaintPreviewComp + base::BindOnce([] { skia::DefaultFontMgr(); })); // Sanity check that fonts are working. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // No WebSandbox is provided on Linux so the local fonts aren't accessible. // This is fine since since the subsetted fonts are provided in the SkPicture. // However, we still need to check that the SkFontMgr starts as it is used by diff --git a/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 index d84000473787..9c50afad25ad 100644 --- 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 @@ -1,18 +1,18 @@ ---- components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.cc.orig 2023-09-17 07:59:53 UTC +--- 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{ -@@ -82,6 +83,7 @@ bool ScreenAIPreSandboxHook(sandbox::policy::SandboxLi +@@ -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_screen__ai__library__wrapper.cc b/www/ungoogled-chromium/files/patch-components_services_screen__ai_screen__ai__library__wrapper.cc deleted file mode 100644 index b7324ba3188a..000000000000 --- a/www/ungoogled-chromium/files/patch-components_services_screen__ai_screen__ai__library__wrapper.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- components/services/screen_ai/screen_ai_library_wrapper.cc.orig 2023-11-04 07:08:51 UTC -+++ components/services/screen_ai/screen_ai_library_wrapper.cc -@@ -190,7 +190,7 @@ ScreenAILibraryWrapper::PerformOcr(const SkBitmap& ima - - // TODO(crbug.com/1443341): Remove this after fixing the crash issue on Linux - // official. --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - free_library_allocated_char_array_(library_buffer.release()); - #endif - -@@ -222,7 +222,7 @@ ScreenAILibraryWrapper::ExtractLayout(const SkBitmap& - - // TODO(crbug.com/1443341): Remove this after fixing the crash issue on Linux - // official. --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - free_library_allocated_char_array_(library_buffer.release()); - #endif - -@@ -256,7 +256,7 @@ absl::optional> ScreenAILibraryWr - - // TODO(crbug.com/1443341): Remove this after fixing the crash issue on Linux - // official. --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - free_library_allocated_int32_array_(library_buffer.release()); - #endif - diff --git a/www/ungoogled-chromium/files/patch-components_supervised__user_core_browser_proto__fetcher.cc b/www/ungoogled-chromium/files/patch-components_supervised__user_core_browser_proto__fetcher.cc index 515e561211d0..9e4aca87feac 100644 --- a/www/ungoogled-chromium/files/patch-components_supervised__user_core_browser_proto__fetcher.cc +++ b/www/ungoogled-chromium/files/patch-components_supervised__user_core_browser_proto__fetcher.cc @@ -1,39 +1,39 @@ ---- components/supervised_user/core/browser/proto_fetcher.cc.orig 2023-11-04 07:08:51 UTC +--- components/supervised_user/core/browser/proto_fetcher.cc.orig 2024-02-03 15:42:55 UTC +++ components/supervised_user/core/browser/proto_fetcher.cc -@@ -525,8 +525,11 @@ class RetryingFetcherImpl final : public DeferredFetch +@@ -527,8 +527,11 @@ class RetryingFetcherImpl final : public DeferredFetch // Not copyable. RetryingFetcherImpl(const RetryingFetcherImpl&) = delete; RetryingFetcherImpl& operator=(const RetryingFetcherImpl&) = delete; - +#if defined(__clang__) && (__clang_major__ >= 15) void Start(ProtoFetcher::Callback callback) override { +#else + void Start(typename ProtoFetcher::Callback callback) override { +#endif callback_ = std::move(callback); Retry(); } -@@ -564,7 +567,11 @@ class RetryingFetcherImpl final : public DeferredFetch +@@ -566,7 +569,11 @@ class RetryingFetcherImpl final : public DeferredFetch } // Client callback. +#if defined(__clang__) && (__clang_major__ >= 15) ProtoFetcher::Callback callback_; +#else + typename ProtoFetcher::Callback callback_; +#endif // Retry controls. base::OneShotTimer timer_; -@@ -707,7 +714,11 @@ ParallelFetchManager::ParallelFetch +@@ -709,7 +716,11 @@ ParallelFetchManager::ParallelFetch template void ParallelFetchManager::Fetch( const Request& request, +#if defined(__clang__) && (__clang_major__ >= 15) Fetcher::Callback callback) { +#else + typename Fetcher::Callback callback) { +#endif CHECK(callback) << "Use base::DoNothing() instead of empty callback."; KeyType key = requests_in_flight_.Add(MakeFetcher(request)); requests_in_flight_.Lookup(key)->Start( 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 4b7b22ad7ea2..3d1ef98d5d60 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 2023-12-23 12:33:28 UTC +--- components/supervised_user/core/browser/supervised_user_service.cc.orig 2024-02-03 15:42:55 UTC +++ components/supervised_user/core/browser/supervised_user_service.cc -@@ -212,7 +212,7 @@ FirstTimeInterstitialBannerState SupervisedUserService +@@ -162,7 +162,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_) { 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 7297e0f0d14e..fc76e3d4d6ba 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,20 +1,20 @@ ---- components/supervised_user/core/common/features.cc.orig 2023-12-23 12:33:28 UTC +--- components/supervised_user/core/common/features.cc.orig 2024-02-03 15:42:55 UTC +++ components/supervised_user/core/common/features.cc -@@ -91,7 +91,7 @@ BASE_FEATURE(kEnableManagedByParentUi, +@@ -85,7 +85,7 @@ BASE_FEATURE(kEnableManagedByParentUi, "EnableManagedByParentUi", 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); -@@ -149,7 +149,7 @@ bool IsChildAccountSupervisionEnabled() { +@@ -143,7 +143,7 @@ bool IsChildAccountSupervisionEnabled() { 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) || 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 d9b1b79eda88..fc5b7d003f05 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 2023-12-23 12:33:28 UTC +--- components/sync/base/features.cc.orig 2024-02-03 15:42:55 UTC +++ components/sync/base/features.cc @@ -101,7 +101,7 @@ BASE_FEATURE(kEnablePreferencesAccountStorage, BASE_FEATURE(kSyncPollImmediatelyOnEveryStartup, - "SyncPollImmediatelyOnEveryStartup", + "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_user__education_common_product__messaging__controller.cc b/www/ungoogled-chromium/files/patch-components_user__education_common_product__messaging__controller.cc deleted file mode 100644 index 7ae8348dc317..000000000000 --- a/www/ungoogled-chromium/files/patch-components_user__education_common_product__messaging__controller.cc +++ /dev/null @@ -1,10 +0,0 @@ ---- components/user_education/common/product_messaging_controller.cc.orig 2023-11-04 07:08:51 UTC -+++ components/user_education/common/product_messaging_controller.cc -@@ -6,6 +6,7 @@ - - #include - #include -+#include - - #include "base/containers/contains.h" - #include "base/functional/callback.h" diff --git a/www/ungoogled-chromium/files/patch-components_user__education_views_help__bubble__view.cc b/www/ungoogled-chromium/files/patch-components_user__education_views_help__bubble__view.cc index f38a157a54bc..324ce2898837 100644 --- a/www/ungoogled-chromium/files/patch-components_user__education_views_help__bubble__view.cc +++ b/www/ungoogled-chromium/files/patch-components_user__education_views_help__bubble__view.cc @@ -1,11 +1,11 @@ ---- components/user_education/views/help_bubble_view.cc.orig 2023-12-23 12:33:28 UTC +--- components/user_education/views/help_bubble_view.cc.orig 2024-02-03 15:42:55 UTC +++ components/user_education/views/help_bubble_view.cc -@@ -1003,7 +1003,7 @@ gfx::Rect HelpBubbleView::GetAnchorRect() const { +@@ -1009,7 +1009,7 @@ gfx::Rect HelpBubbleView::GetAnchorRect() const { void HelpBubbleView::OnBeforeBubbleWidgetInit(views::Widget::InitParams* params, views::Widget* widget) const { BubbleDialogDelegateView::OnBeforeBubbleWidgetInit(params, widget); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Help bubbles anchored to menus may be clipped to their anchors' bounds, // resulting in visual errors, unless they use accelerated rendering. See // crbug.com/1445770 for details. diff --git a/www/ungoogled-chromium/files/patch-components_viz_host_host__display__client.cc b/www/ungoogled-chromium/files/patch-components_viz_host_host__display__client.cc new file mode 100644 index 000000000000..5114daf0ae4a --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_viz_host_host__display__client.cc @@ -0,0 +1,11 @@ +--- components/viz/host/host_display_client.cc.orig 2024-02-03 15:42:55 UTC ++++ components/viz/host/host_display_client.cc +@@ -64,7 +64,7 @@ void HostDisplayClient::AddChildWindowToBrowser( + } + #endif + +-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) + void HostDisplayClient::DidCompleteSwapWithNewSize(const gfx::Size& size) { + NOTIMPLEMENTED(); + } diff --git a/www/ungoogled-chromium/files/patch-components_viz_host_host__display__client.h b/www/ungoogled-chromium/files/patch-components_viz_host_host__display__client.h new file mode 100644 index 000000000000..052bd733f3d5 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_viz_host_host__display__client.h @@ -0,0 +1,11 @@ +--- components/viz/host/host_display_client.h.orig 2024-02-03 15:42:55 UTC ++++ components/viz/host/host_display_client.h +@@ -52,7 +52,7 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom + void AddChildWindowToBrowser(gpu::SurfaceHandle child_window) override; + #endif + +-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) + void DidCompleteSwapWithNewSize(const gfx::Size& size) override; + #endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) + diff --git a/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 8472e0a48b64..407292cd2e97 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 2023-11-04 07:08:51 UTC +--- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2024-02-03 15:42:55 UTC +++ components/viz/service/display_embedder/skia_output_surface_impl.cc -@@ -1512,7 +1512,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor +@@ -1528,7 +1528,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__embedder_skia__output__surface__impl__on__gpu.cc b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl__on__gpu.cc index 18a956045818..d24c1851b7dd 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl__on__gpu.cc +++ b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl__on__gpu.cc @@ -1,15 +1,15 @@ ---- components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.orig 2023-12-23 12:33:28 UTC +--- components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.orig 2024-02-03 15:42:55 UTC +++ components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc -@@ -1567,7 +1567,12 @@ void SkiaOutputSurfaceImplOnGpu::CopyOutputNV12( +@@ -1564,7 +1564,12 @@ void SkiaOutputSurfaceImplOnGpu::CopyOutputNV12( // Issue readbacks from the surfaces: for (size_t i = 0; i < CopyOutputResult::kNV12MaxPlanes; ++i) { +#if defined(__clang__) && (__clang_major__ >= 16) SkISize size(plane_surfaces[i]->width(), plane_surfaces[i]->height()); +#else + SkISize s = { plane_surfaces[i]->width(), plane_surfaces[i]->height() }; + SkISize size(s); +#endif SkImageInfo dst_info = SkImageInfo::Make( size, (i == 0) ? kAlpha_8_SkColorType : kR8G8_unorm_SkColorType, kUnpremul_SkAlphaType); 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 1af9a5547977..a78b8ba26bf8 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 2023-11-04 07:08:51 UTC +--- components/viz/service/display/skia_renderer.cc.orig 2024-02-03 15:42:55 UTC +++ components/viz/service/display/skia_renderer.cc -@@ -1219,7 +1219,7 @@ void SkiaRenderer::ClearFramebuffer() { +@@ -1340,7 +1340,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 new file mode 100644 index 000000000000..f74e8160250e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc @@ -0,0 +1,20 @@ +--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2024-02-03 15:42:55 UTC ++++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc +@@ -109,7 +109,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); +@@ -713,7 +713,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw + #if BUILDFLAG(IS_ANDROID) + if (display_client_ && enable_swap_competion_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 new file mode 100644 index 000000000000..f5ae7066bc75 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h @@ -0,0 +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 +@@ -210,7 +210,7 @@ class VIZ_SERVICE_EXPORT RootCompositorFrameSinkImpl + // to actually unref. + LocalSurfaceId to_evict_on_next_draw_and_swap_ = LocalSurfaceId(); + +-#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-components_viz_test_fake__display__client.cc b/www/ungoogled-chromium/files/patch-components_viz_test_fake__display__client.cc new file mode 100644 index 000000000000..0e88e07ff33d --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_viz_test_fake__display__client.cc @@ -0,0 +1,11 @@ +--- components/viz/test/fake_display_client.cc.orig 2024-02-03 15:42:55 UTC ++++ components/viz/test/fake_display_client.cc +@@ -27,7 +27,7 @@ void FakeDisplayClient::AddChildWindowToBrowser( + gpu::SurfaceHandle child_window) {} + #endif + +-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) + void FakeDisplayClient::DidCompleteSwapWithNewSize(const gfx::Size& size) {} + #endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) + diff --git a/www/ungoogled-chromium/files/patch-components_viz_test_fake__display__client.h b/www/ungoogled-chromium/files/patch-components_viz_test_fake__display__client.h new file mode 100644 index 000000000000..a9d29794d04e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_viz_test_fake__display__client.h @@ -0,0 +1,11 @@ +--- components/viz/test/fake_display_client.h.orig 2024-02-03 15:42:55 UTC ++++ components/viz/test/fake_display_client.h +@@ -36,7 +36,7 @@ class FakeDisplayClient : public mojom::DisplayClient + void AddChildWindowToBrowser(gpu::SurfaceHandle child_window) override; + #endif + +-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) + void DidCompleteSwapWithNewSize(const gfx::Size& size) override; + #endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) + diff --git a/www/ungoogled-chromium/files/patch-components_viz_test_mock__display__client.h b/www/ungoogled-chromium/files/patch-components_viz_test_mock__display__client.h new file mode 100644 index 000000000000..f933949438b1 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_viz_test_mock__display__client.h @@ -0,0 +1,11 @@ +--- components/viz/test/mock_display_client.h.orig 2024-02-03 15:42:55 UTC ++++ components/viz/test/mock_display_client.h +@@ -43,7 +43,7 @@ class MockDisplayClient : public mojom::DisplayClient + MOCK_METHOD1(SetWideColorEnabled, void(bool enabled)); + MOCK_METHOD1(SetPreferredRefreshRate, void(float refresh_rate)); + #endif +-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) + MOCK_METHOD1(DidCompleteSwapWithNewSize, void(const gfx::Size&)); + #endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) + diff --git a/www/ungoogled-chromium/files/patch-content_app_content__main__runner__impl.cc b/www/ungoogled-chromium/files/patch-content_app_content__main__runner__impl.cc index dfb3212bb0e3..2a2061155425 100644 --- a/www/ungoogled-chromium/files/patch-content_app_content__main__runner__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_app_content__main__runner__impl.cc @@ -1,122 +1,122 @@ ---- content/app/content_main_runner_impl.cc.orig 2023-11-04 07:08:51 UTC +--- content/app/content_main_runner_impl.cc.orig 2024-02-03 15:42:55 UTC +++ content/app/content_main_runner_impl.cc -@@ -144,13 +144,13 @@ +@@ -143,13 +143,13 @@ #include "content/browser/posix_file_descriptor_info_impl.h" #include "content/public/common/content_descriptors.h" -#if !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) #include "content/public/common/zygote/zygote_fork_delegate_linux.h" #endif #endif // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/files/file_path_watcher_inotify.h" #include "base/native_library.h" #include "base/rand_util.h" -@@ -188,6 +188,10 @@ +@@ -187,6 +187,10 @@ #include "media/base/media_switches.h" #endif +#if BUILDFLAG(IS_BSD) +#include "base/system/sys_info.h" +#endif + #if BUILDFLAG(IS_ANDROID) #include "base/system/sys_info.h" #include "content/browser/android/battery_metrics.h" -@@ -374,7 +378,7 @@ void InitializeZygoteSandboxForBrowserProcess( +@@ -373,7 +377,7 @@ void InitializeZygoteSandboxForBrowserProcess( } #endif // BUILDFLAG(USE_ZYGOTE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if BUILDFLAG(ENABLE_PPAPI) // Loads the (native) libraries but does not initialize them (i.e., does not -@@ -412,7 +416,10 @@ void PreloadLibraryCdms() { +@@ -411,7 +415,10 @@ void PreloadLibraryCdms() { void PreSandboxInit() { // Ensure the /dev/urandom is opened. + // we use arc4random +#if !BUILDFLAG(IS_BSD) base::GetUrandomFD(); +#endif // May use sysinfo(), sched_getaffinity(), and open various /sys/ and /proc/ // files. -@@ -424,9 +431,16 @@ void PreSandboxInit() { +@@ -423,9 +430,16 @@ void PreSandboxInit() { // https://boringssl.9oo91esource.qjz9zk/boringssl/+/HEAD/SANDBOXING.md CRYPTO_pre_sandbox_init(); +#if BUILDFLAG(IS_BSD) + // "cache" the amount of physical memory before pledge(2) + base::SysInfo::AmountOfPhysicalMemoryMB(); +#endif + +#if !BUILDFLAG(IS_BSD) // Pre-read /proc/sys/fs/inotify/max_user_watches so it doesn't have to be // allowed by the sandbox. base::GetMaxNumberOfInotifyWatches(); +#endif #if BUILDFLAG(ENABLE_PPAPI) // Ensure access to the Pepper plugins before the sandbox is turned on. -@@ -833,11 +847,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -832,11 +846,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam kFieldTrialDescriptor + base::GlobalDescriptors::kBaseDescriptor); #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) g_fds->Set(kCrashDumpSignal, kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor); -#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || - // BUILDFLAG(IS_OPENBSD) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #endif // !BUILDFLAG(IS_WIN) -@@ -1033,8 +1046,20 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -1029,8 +1042,20 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam process_type == switches::kZygoteProcess) { PreSandboxInit(); } +#elif BUILDFLAG(IS_BSD) + PreSandboxInit(); #endif +#if BUILDFLAG(IS_BSD) + if (process_type.empty()) { + sandbox::policy::SandboxLinux::Options sandbox_options; + sandbox::policy::SandboxLinux::GetInstance()->InitializeSandbox( + sandbox::policy::SandboxTypeFromCommandLine( + *base::CommandLine::ForCurrentProcess()), + sandbox::policy::SandboxLinux::PreSandboxHook(), sandbox_options); + } +#endif + delegate_->SandboxInitialized(process_type); #if BUILDFLAG(USE_ZYGOTE) -@@ -1102,7 +1127,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1098,7 +1123,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { ->ReconfigureAfterFeatureListInit(process_type); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If dynamic Mojo Core is being used, ensure that it's loaded very early in // the child/zygote process, before any sandbox is initialized. The library // is not fully initialized with IPC support until a ChildProcess is later -@@ -1137,6 +1162,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1133,6 +1158,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { content_main_params_.reset(); RegisterMainThreadFactories(); + +#if BUILDFLAG(IS_BSD) + if (!process_type.empty()) + PreSandboxInit(); +#endif if (process_type.empty()) return RunBrowser(std::move(main_params), start_minimal_browser); diff --git a/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn b/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn index fe6bdde7874d..20a02a72cd15 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 2023-12-23 12:33:28 UTC +--- content/browser/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ content/browser/BUILD.gn -@@ -2474,6 +2474,13 @@ source_set("browser") { +@@ -2453,6 +2453,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_audio_audio__service.cc b/www/ungoogled-chromium/files/patch-content_browser_audio_audio__service.cc index 6e8d91909525..675da3a96881 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_audio_audio__service.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_audio_audio__service.cc @@ -1,20 +1,20 @@ ---- content/browser/audio/audio_service.cc.orig 2023-04-08 11:38:38 UTC +--- content/browser/audio/audio_service.cc.orig 2024-02-03 15:42:55 UTC +++ content/browser/audio/audio_service.cc @@ -33,7 +33,7 @@ #if BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS) #include "ui/display/util/edid_parser.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/display/display_util.h" #endif // BUILDFLAG(IS_LINUX) -@@ -225,7 +225,7 @@ audio::mojom::AudioService& GetAudioService() { +@@ -196,7 +196,7 @@ audio::mojom::AudioService& GetAudioService() { ->PostTaskAndReplyWithResult( FROM_HERE, base::BindOnce(&ScanEdidBitstreams), base::BindOnce(&LaunchAudioService, std::move(receiver))); -#elif BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS) && BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) LaunchAudioService( std::move(receiver), ConvertEdidBitstreams(display::DisplayUtil::GetAudioFormats())); diff --git a/www/ungoogled-chromium/files/patch-content_browser_browser__main__loop.cc b/www/ungoogled-chromium/files/patch-content_browser_browser__main__loop.cc index af79fb42ce12..ded1b1ccff11 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 2023-12-23 12:33:28 UTC +--- content/browser/browser_main_loop.cc.orig 2024-02-03 15:42:55 UTC +++ content/browser/browser_main_loop.cc -@@ -247,6 +247,12 @@ +@@ -248,6 +248,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 -@@ -552,6 +558,12 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -553,6 +559,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 -@@ -589,7 +601,7 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -590,7 +602,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_compositor_viz__process__transport__factory.cc b/www/ungoogled-chromium/files/patch-content_browser_compositor_viz__process__transport__factory.cc new file mode 100644 index 000000000000..0553009913e1 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-content_browser_compositor_viz__process__transport__factory.cc @@ -0,0 +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 +@@ -118,7 +118,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_generic__sensor_frame__sensor__provider__proxy.cc b/www/ungoogled-chromium/files/patch-content_browser_generic__sensor_frame__sensor__provider__proxy.cc deleted file mode 100644 index 920a631de1a7..000000000000 --- a/www/ungoogled-chromium/files/patch-content_browser_generic__sensor_frame__sensor__provider__proxy.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- content/browser/generic_sensor/frame_sensor_provider_proxy.cc.orig 2023-12-23 12:33:28 UTC -+++ content/browser/generic_sensor/frame_sensor_provider_proxy.cc -@@ -20,7 +20,11 @@ namespace content { - - namespace { - -+#if (_LIBCPP_VERSION >= 160000) - constexpr std::vector -+#else -+std::vector -+#endif - SensorTypeToPermissionsPolicyFeatures(SensorType type) { - switch (type) { - case SensorType::AMBIENT_LIGHT: 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 ab38be8135c5..8672a4a1766f 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 2023-01-13 08:56:02 UTC +--- content/browser/gpu/compositor_util.cc.orig 2024-02-03 15:42:55 UTC +++ content/browser/gpu/compositor_util.cc -@@ -148,7 +148,7 @@ const GpuFeatureData GetGpuFeatureData( - {"video_decode", - SafeGetFeatureStatus(gpu_feature_info, - gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE), +@@ -149,7 +149,7 @@ const GpuFeatureData 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), -@@ -159,7 +159,7 @@ const GpuFeatureData GetGpuFeatureData( - {"video_encode", - SafeGetFeatureStatus(gpu_feature_info, - gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE), + 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), -#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_interest__group_header__direct__from__seller__signals.cc b/www/ungoogled-chromium/files/patch-content_browser_interest__group_header__direct__from__seller__signals.cc index 8d66a28779e3..41e6eeaa728c 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_interest__group_header__direct__from__seller__signals.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_interest__group_header__direct__from__seller__signals.cc @@ -1,14 +1,14 @@ ---- content/browser/interest_group/header_direct_from_seller_signals.cc.orig 2023-11-04 07:08:51 UTC +--- content/browser/interest_group/header_direct_from_seller_signals.cc.orig 2024-02-03 15:42:55 UTC +++ content/browser/interest_group/header_direct_from_seller_signals.cc -@@ -206,7 +206,11 @@ void OnJsonDecoded( +@@ -58,7 +58,11 @@ HeaderDirectFromSellerSignals::Result::Result( - } // namespace + HeaderDirectFromSellerSignals::Result::~Result() = default; +#if defined(__clang__) && (__clang_major__ >= 16) HeaderDirectFromSellerSignals::HeaderDirectFromSellerSignals() = default; +#else +HeaderDirectFromSellerSignals::HeaderDirectFromSellerSignals() {} +#endif - HeaderDirectFromSellerSignals::~HeaderDirectFromSellerSignals() = default; - + HeaderDirectFromSellerSignals::~HeaderDirectFromSellerSignals() { + base::UmaHistogramCounts10000( diff --git a/www/ungoogled-chromium/files/patch-content_browser_media_media__keys__listener__manager__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_media_media__keys__listener__manager__impl.cc index e33e979c7b2b..13e95b0227e2 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_media_media__keys__listener__manager__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_media_media__keys__listener__manager__impl.cc @@ -1,11 +1,11 @@ ---- content/browser/media/media_keys_listener_manager_impl.cc.orig 2023-12-23 12:33:28 UTC +--- content/browser/media/media_keys_listener_manager_impl.cc.orig 2024-02-03 15:42:55 UTC +++ content/browser/media/media_keys_listener_manager_impl.cc -@@ -252,7 +252,7 @@ void MediaKeysListenerManagerImpl::StartListeningForMe - // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is - // complete. +@@ -300,7 +300,7 @@ void MediaKeysListenerManagerImpl::StartListeningForMe + } + #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - system_media_controls_ = system_media_controls::SystemMediaControls::Create( - media::AudioManager::GetGlobalAppName()); - #endif + // Create SystemMediaControls with the SingletonHwnd. + browser_system_media_controls_ = + system_media_controls::SystemMediaControls::Create( diff --git a/www/ungoogled-chromium/files/patch-content_browser_network__service__instance__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_network__service__instance__impl.cc index 53453e580e24..c6858e9796e0 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_network__service__instance__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_network__service__instance__impl.cc @@ -1,29 +1,29 @@ ---- content/browser/network_service_instance_impl.cc.orig 2023-12-23 12:33:28 UTC +--- content/browser/network_service_instance_impl.cc.orig 2024-02-03 15:42:55 UTC +++ content/browser/network_service_instance_impl.cc -@@ -80,7 +80,7 @@ +@@ -81,7 +81,7 @@ #include "content/browser/network/network_service_process_tracker_win.h" #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/browser/system_dns_resolution/system_dns_resolver.h" #include "services/network/public/mojom/system_dns_resolution.mojom-forward.h" #endif -@@ -357,7 +357,7 @@ void CreateInProcessNetworkService( +@@ -359,7 +359,7 @@ void CreateInProcessNetworkService( std::move(receiver))); } -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Runs a self-owned SystemDnsResolverMojoImpl. This is meant to run on a // high-priority thread pool. void RunSystemDnsResolverOnThreadPool( -@@ -426,7 +426,7 @@ network::mojom::NetworkServiceParamsPtr CreateNetworkS +@@ -428,7 +428,7 @@ network::mojom::NetworkServiceParamsPtr CreateNetworkS } #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (GetContentClient() ->browser() ->ShouldRunOutOfProcessSystemDnsResolution() && diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_delegated__frame__host.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_delegated__frame__host.cc index bd7b0c44d2b2..5d72b42587e0 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_delegated__frame__host.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_delegated__frame__host.cc @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/delegated_frame_host.cc.orig 2023-09-17 07:59:53 UTC +--- content/browser/renderer_host/delegated_frame_host.cc.orig 2024-02-03 15:42:55 UTC +++ content/browser/renderer_host/delegated_frame_host.cc -@@ -312,7 +312,7 @@ void DelegatedFrameHost::EmbedSurface( +@@ -317,7 +317,7 @@ void DelegatedFrameHost::EmbedSurface( if (!primary_surface_id || primary_surface_id->local_surface_id() != local_surface_id_) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // On Windows and Linux, we would like to produce new content as soon as // possible or the OS will create an additional black gutter. Until we can // block resize on surface synchronization on these platforms, we will not diff --git a/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 818762f9fa59..953906dd9060 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,55 +1,55 @@ ---- content/browser/renderer_host/render_process_host_impl.cc.orig 2023-12-23 12:33:28 UTC +--- content/browser/renderer_host/render_process_host_impl.cc.orig 2024-02-03 15:42:55 UTC +++ content/browser/renderer_host/render_process_host_impl.cc @@ -223,7 +223,7 @@ #include "third_party/blink/public/mojom/android_font_lookup/android_font_lookup.mojom.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include "components/services/font/public/mojom/font_service.mojom.h" // nogncheck -@@ -953,7 +953,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = +@@ -952,7 +952,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; -@@ -1160,7 +1160,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1157,7 +1157,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; -@@ -1254,7 +1254,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1251,7 +1251,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_; -@@ -3331,7 +3331,7 @@ void RenderProcessHostImpl::AppendRendererCommandLine( +@@ -3328,7 +3328,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() && -@@ -3391,6 +3391,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin +@@ -3388,6 +3388,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin switches::kDisableSpeechAPI, switches::kDisableThreadedCompositing, switches::kDisableTouchDragDrop, + switches::kDisableUnveil, switches::kDisableUseSharedImagesForPepperVideo, switches::kDisableV8IdleTasks, switches::kDisableVideoCaptureUseGpuMemoryBuffer, 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 616ec7e61f28..7d862a1edf98 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 2023-12-23 12:33:28 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2024-02-03 15:42:55 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.cc @@ -121,7 +121,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" @@ -463,7 +463,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()) @@ -1724,7 +1724,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { return GetTextInputManager() && GetTextInputManager()->should_do_learning(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool RenderWidgetHostViewAura::SetCompositionFromExistingText( const gfx::Range& range, const std::vector& ui_ime_text_spans) { -@@ -2562,7 +2562,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { +@@ -2568,7 +2568,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; -@@ -2745,7 +2745,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit +@@ -2751,7 +2751,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 b77efd688359..b4876116b414 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 2023-10-13 13:20:35 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.h.orig 2024-02-03 15:42:55 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.h -@@ -257,7 +257,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura +@@ -258,7 +258,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_renderer__host_render__widget__host__view__event__handler.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__event__handler.cc index d109d25c8aaa..634e7b5df1a8 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__event__handler.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__event__handler.cc @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/render_widget_host_view_event_handler.cc.orig 2023-07-21 09:49:17 UTC +--- content/browser/renderer_host/render_widget_host_view_event_handler.cc.orig 2024-02-03 15:42:55 UTC +++ content/browser/renderer_host/render_widget_host_view_event_handler.cc -@@ -597,7 +597,7 @@ bool RenderWidgetHostViewEventHandler::CanRendererHand +@@ -599,7 +599,7 @@ bool RenderWidgetHostViewEventHandler::CanRendererHand if (event->type() == ui::ET_MOUSE_EXITED) { if (mouse_locked || selection_popup) return false; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Don't forward the mouse leave message which is received when the context // menu is displayed by the page. This confuses the page and causes state // changes. diff --git a/www/ungoogled-chromium/files/patch-content_browser_utility__sandbox__delegate.cc b/www/ungoogled-chromium/files/patch-content_browser_utility__sandbox__delegate.cc index 4a08305ce7d5..1784f0f436ac 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_utility__sandbox__delegate.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_utility__sandbox__delegate.cc @@ -1,32 +1,28 @@ ---- content/browser/utility_sandbox_delegate.cc.orig 2023-12-23 12:33:28 UTC +--- content/browser/utility_sandbox_delegate.cc.orig 2024-02-03 15:42:55 UTC +++ content/browser/utility_sandbox_delegate.cc -@@ -64,13 +64,13 @@ UtilitySandboxedProcessLauncherDelegate:: - #if BUILDFLAG(ENABLE_PPAPI) - sandbox_type_ == sandbox::mojom::Sandbox::kPpapi || - #endif --#if BUILDFLAG(IS_FUCHSIA) -+#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +@@ -67,10 +67,10 @@ UtilitySandboxedProcessLauncherDelegate:: + #if BUILDFLAG(IS_FUCHSIA) sandbox_type_ == sandbox::mojom::Sandbox::kVideoCapture || #endif -#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) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoEncoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -125,10 +125,10 @@ ZygoteCommunication* UtilitySandboxedProcessLauncherDe - // unsandboxed zygote and then apply their actual sandboxes in the forked +@@ -126,10 +126,10 @@ ZygoteCommunication* UtilitySandboxedProcessLauncherDe // process upon startup. if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork || + sandbox_type_ == sandbox::mojom::Sandbox::kOnDeviceModelExecution || -#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) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoEncoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS_ASH) 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 dc208ce38bd5..888867630fc8 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 2022-12-02 17:56:32 UTC +--- 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 @@ -19,8 +19,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 { 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, return false; return true; } +#endif } // namespace @@ -68,9 +72,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() { } 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 "you can try using --" << sandbox::policy::switches::kNoSandbox << "."; } +#endif } void ZygoteHostImpl::AddZygotePid(pid_t pid) { @@ -157,6 +167,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, 0, fds)); + CHECK_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC, 0, fds)); CHECK(base::UnixDomainSocket::EnableReceiveProcessId(fds[0])); -@@ -224,9 +235,12 @@ pid_t ZygoteHostImpl::LaunchZygote( +@@ -225,9 +236,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_child_BUILD.gn b/www/ungoogled-chromium/files/patch-content_child_BUILD.gn index 81140ab6a872..69b71cc77ea3 100644 --- a/www/ungoogled-chromium/files/patch-content_child_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-content_child_BUILD.gn @@ -1,16 +1,16 @@ ---- content/child/BUILD.gn.orig 2023-12-23 12:33:28 UTC +--- content/child/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ content/child/BUILD.gn -@@ -129,6 +129,13 @@ target(link_target_type, "child") { +@@ -131,6 +131,13 @@ target(link_target_type, "child") { ] } + if (is_bsd) { + sources -= [ + "sandboxed_process_thread_type_handler.cc", + "sandboxed_process_thread_type_handler.h", + ] + } + if (is_win) { sources += [ "dwrite_font_proxy/dwrite_font_proxy_init_impl_win.cc", diff --git a/www/ungoogled-chromium/files/patch-content_common_BUILD.gn b/www/ungoogled-chromium/files/patch-content_common_BUILD.gn index c7e5e189815c..1574526bed99 100644 --- a/www/ungoogled-chromium/files/patch-content_common_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-content_common_BUILD.gn @@ -1,12 +1,47 @@ ---- content/common/BUILD.gn.orig 2023-12-23 12:33:28 UTC +--- content/common/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ content/common/BUILD.gn -@@ -438,6 +438,9 @@ if (is_linux || is_chromeos) { +@@ -404,20 +404,29 @@ 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" ] + } +@@ -487,6 +496,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 60982604be55..4c542f897601 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 2023-12-23 12:33:28 UTC +--- content/common/features.cc.orig 2024-02-03 15:42:55 UTC +++ content/common/features.cc -@@ -154,7 +154,7 @@ BASE_FEATURE(kEnableBackForwardCacheForScreenReader, +@@ -174,7 +174,7 @@ BASE_FEATURE(kEnableBackForwardCacheForScreenReader, base::FEATURE_ENABLED_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); -@@ -246,7 +246,7 @@ BASE_FEATURE(kGroupNIKByJoiningOrigin, +@@ -256,7 +256,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 3dca36b0de1f..eb03d5218987 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 2023-12-23 12:33:28 UTC +--- content/common/features.h.orig 2024-02-03 15:42:55 UTC +++ content/common/features.h -@@ -37,7 +37,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kDeviceMonitorMac) +@@ -38,7 +38,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kDeviceMonitorMac) + #endif CONTENT_EXPORT BASE_DECLARE_FEATURE(kDocumentPolicyNegotiation); - CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnumerateDevicesHideDeviceIDs); CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnableBackForwardCacheForScreenReader); -#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); @@ -58,7 +58,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kForwardMemoryPres 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_gpu_gpu__sandbox__hook__bsd.cc b/www/ungoogled-chromium/files/patch-content_common_gpu__pre__sandbox__hook__bsd.cc similarity index 86% rename from www/ungoogled-chromium/files/patch-content_gpu_gpu__sandbox__hook__bsd.cc rename to www/ungoogled-chromium/files/patch-content_common_gpu__pre__sandbox__hook__bsd.cc index 6cb80ac48962..1524c25783b1 100644 --- a/www/ungoogled-chromium/files/patch-content_gpu_gpu__sandbox__hook__bsd.cc +++ b/www/ungoogled-chromium/files/patch-content_common_gpu__pre__sandbox__hook__bsd.cc @@ -1,72 +1,72 @@ ---- content/gpu/gpu_sandbox_hook_bsd.cc.orig 2023-05-05 12:12:41 UTC -+++ content/gpu/gpu_sandbox_hook_bsd.cc +--- content/common/gpu_pre_sandbox_hook_bsd.cc.orig 2024-02-03 15:42:55 UTC ++++ content/common/gpu_pre_sandbox_hook_bsd.cc @@ -0,0 +1,69 @@ +// 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/gpu/gpu_sandbox_hook_bsd.h" ++#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 GpuProcessPreSandboxHook(sandbox::policy::SandboxLinux::Options options) { ++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__bsd.h b/www/ungoogled-chromium/files/patch-content_common_gpu__pre__sandbox__hook__bsd.h new file mode 100644 index 000000000000..581ba1cfe5e4 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-content_common_gpu__pre__sandbox__hook__bsd.h @@ -0,0 +1,23 @@ +--- content/common/gpu_pre_sandbox_hook_bsd.h.orig 2024-02-03 15:42:55 UTC ++++ content/common/gpu_pre_sandbox_hook_bsd.h +@@ -0,0 +1,20 @@ ++// Copyright 2017 The Chromium Authors ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_BSD_H_ ++#define CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_BSD_H_ ++ ++#include "base/component_export.h" ++#include "sandbox/policy/sandbox.h" ++ ++namespace content { ++ ++// A pre-sandbox hook to use on Linux-based systems in sandboxed processes that ++// require general GPU usage. ++COMPONENT_EXPORT(GPU_PRE_SANDBOX_HOOK) ++bool GpuPreSandboxHook(sandbox::policy::SandboxLinux::Options options); ++ ++} // namespace content ++ ++#endif // CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_BSD_H_ diff --git a/www/ungoogled-chromium/files/patch-content_gpu_BUILD.gn b/www/ungoogled-chromium/files/patch-content_gpu_BUILD.gn deleted file mode 100644 index 98b2322a6551..000000000000 --- a/www/ungoogled-chromium/files/patch-content_gpu_BUILD.gn +++ /dev/null @@ -1,20 +0,0 @@ ---- content/gpu/BUILD.gn.orig 2023-06-05 19:39:05 UTC -+++ content/gpu/BUILD.gn -@@ -104,6 +104,17 @@ target(link_target_type, "gpu_sources") { - } - } - -+ if (is_bsd) { -+ sources -= [ -+ "gpu_sandbox_hook_linux.cc", -+ "gpu_sandbox_hook_linux.h", -+ ] -+ sources += [ -+ "gpu_sandbox_hook_bsd.cc", -+ "gpu_sandbox_hook_bsd.h", -+ ] -+ } -+ - if (is_chromeos_ash) { - deps += [ - "//components/services/font/public/cpp", 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 91ec5755fa97..34ee29699e2c 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,66 @@ ---- content/gpu/gpu_main.cc.orig 2023-12-23 12:33:28 UTC +--- content/gpu/gpu_main.cc.orig 2024-02-03 15:42:55 UTC +++ content/gpu/gpu_main.cc @@ -91,7 +91,7 @@ #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/gpu/gpu_sandbox_hook_linux.h" + #include "content/common/gpu_pre_sandbox_hook_linux.h" #include "sandbox/policy/linux/sandbox_linux.h" @@ -114,7 +114,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 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_); -@@ -289,7 +289,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -291,7 +291,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) { +@@ -330,7 +330,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) { +@@ -438,7 +439,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 +@@ -478,7 +479,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_gpu_gpu__sandbox__hook__bsd.h b/www/ungoogled-chromium/files/patch-content_gpu_gpu__sandbox__hook__bsd.h deleted file mode 100644 index 253d32561200..000000000000 --- a/www/ungoogled-chromium/files/patch-content_gpu_gpu__sandbox__hook__bsd.h +++ /dev/null @@ -1,19 +0,0 @@ ---- content/gpu/gpu_sandbox_hook_bsd.h.orig 2023-05-05 12:12:41 UTC -+++ content/gpu/gpu_sandbox_hook_bsd.h -@@ -0,0 +1,16 @@ -+// 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. -+ -+#ifndef CONTENT_GPU_GPU_SANDBOX_HOOK_BSD_H_ -+#define CONTENT_GPU_GPU_SANDBOX_HOOK_BSD_H_ -+ -+#include "sandbox/policy/sandbox.h" -+ -+namespace content { -+ -+bool GpuProcessPreSandboxHook(sandbox::policy::SandboxLinux::Options options); -+ -+} // namespace content -+ -+#endif // CONTENT_GPU_GPU_SANDBOX_HOOK_BSD_H_ 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 76b11df472f9..b708c0c3f47a 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 2023-12-23 12:33:28 UTC +--- content/public/browser/content_browser_client.cc.orig 2024-02-03 15:42:55 UTC +++ content/public/browser/content_browser_client.cc -@@ -1273,7 +1273,7 @@ bool ContentBrowserClient::ShouldRunOutOfProcessSystem +@@ -1286,7 +1286,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_common_content__features.cc b/www/ungoogled-chromium/files/patch-content_public_common_content__features.cc index 2a98684ad6fe..2e2dd2c67ad5 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 2023-12-23 12:33:28 UTC +--- content/public/common/content_features.cc.orig 2024-02-03 15:42:55 UTC +++ content/public/common/content_features.cc @@ -40,7 +40,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 @@ -52,7 +52,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 -@@ -1170,7 +1170,7 @@ BASE_FEATURE(kWebAssemblyTiering, +@@ -1190,7 +1190,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 -@@ -1212,7 +1212,11 @@ BASE_FEATURE(kWebUICodeCache, +@@ -1232,7 +1232,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 8e88023a0de9..1012c1bb664a 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 2023-12-23 12:33:28 UTC +--- content/public/common/content_switches.cc.orig 2024-02-03 15:42:55 UTC +++ content/public/common/content_switches.cc @@ -364,6 +364,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. -@@ -994,7 +996,7 @@ const char kEnableAutomation[] = "enable-automation"; +@@ -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 c9ceac0379ff..94cf18dd9a31 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 2023-12-23 12:33:28 UTC +--- content/public/common/content_switches.h.orig 2024-02-03 15:42:55 UTC +++ content/public/common/content_switches.h @@ -115,6 +115,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[]; -@@ -265,7 +266,7 @@ CONTENT_EXPORT extern const char kRendererWaitForJavaD +@@ -269,7 +270,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__process__impl.cc b/www/ungoogled-chromium/files/patch-content_renderer_render__process__impl.cc index d3b1d49d98f7..9dffb196f1e7 100644 --- a/www/ungoogled-chromium/files/patch-content_renderer_render__process__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_renderer_render__process__impl.cc @@ -1,20 +1,11 @@ ---- content/renderer/render_process_impl.cc.orig 2023-12-23 12:33:28 UTC +--- content/renderer/render_process_impl.cc.orig 2024-02-03 15:42:55 UTC +++ content/renderer/render_process_impl.cc -@@ -47,7 +47,7 @@ - #if BUILDFLAG(IS_WIN) - #include "base/win/win_util.h" - #endif --#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_64) - #include "v8/include/v8-wasm-trap-handler-posix.h" - #endif +@@ -44,7 +44,7 @@ + #include "third_party/blink/public/web/web_frame.h" + #include "v8/include/v8-initialization.h" -@@ -224,7 +224,7 @@ RenderProcessImpl::RenderProcessImpl() - v8::V8::SetFlagsFromString(kSABPerContextFlag, sizeof(kSABPerContextFlag)); - } - --#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_64) - if (base::FeatureList::IsEnabled(features::kWebAssemblyTrapHandler)) { - base::CommandLine* const command_line = - base::CommandLine::ForCurrentProcess(); +-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ + (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM64)) + #define ENABLE_WEB_ASSEMBLY_TRAP_HANDLER_LINUX + #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 a1872fb8a085..2e03ee417f95 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 2023-12-23 12:33:28 UTC +--- content/renderer/render_thread_impl.cc.orig 2024-02-03 15:42:55 UTC +++ content/renderer/render_thread_impl.cc -@@ -205,6 +205,8 @@ +@@ -206,6 +206,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_BSD) +#include #else #include #endif -@@ -1020,7 +1022,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1013,7 +1015,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) && -@@ -1029,7 +1031,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1022,7 +1024,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) && -@@ -1807,7 +1809,7 @@ std::unique_ptr RenderThreadImpl::Create +@@ -1797,7 +1799,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.cc b/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc index 582dac289c64..dc2e5301031b 100644 --- a/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc @@ -1,45 +1,45 @@ ---- content/renderer/renderer_blink_platform_impl.cc.orig 2023-12-23 12:33:28 UTC +--- content/renderer/renderer_blink_platform_impl.cc.orig 2024-02-03 15:42:55 UTC +++ content/renderer/renderer_blink_platform_impl.cc @@ -113,7 +113,7 @@ #if BUILDFLAG(IS_MAC) #include "content/child/child_process_sandbox_support_impl_mac.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/child/child_process_sandbox_support_impl_linux.h" #include "content/child/sandboxed_process_thread_type_handler.h" #endif -@@ -182,13 +182,13 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( - sudden_termination_disables_(0), +@@ -183,13 +183,13 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( is_locked_to_site_(false), - main_thread_scheduler_(main_thread_scheduler) { + main_thread_scheduler_(main_thread_scheduler), + next_frame_sink_id_(uint32_t{std::numeric_limits::max()} + 1) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sk_sp font_loader; #endif // RenderThread may not exist in some tests. if (RenderThreadImpl::current()) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::PendingRemote font_service; RenderThreadImpl::current()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); -@@ -197,7 +197,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -198,7 +198,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( #endif } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (sandboxEnabled()) { #if BUILDFLAG(IS_MAC) sandbox_support_ = std::make_unique(); -@@ -258,7 +258,7 @@ void RendererBlinkPlatformImpl::SetThreadType(base::Pl +@@ -259,7 +259,7 @@ void RendererBlinkPlatformImpl::SetThreadType(base::Pl #endif blink::WebSandboxSupport* RendererBlinkPlatformImpl::GetSandboxSupport() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return sandbox_support_.get(); #else // These platforms do not require sandbox support. 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 933e6c843204..a3fbb683138d 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,11 +1,11 @@ ---- content/renderer/renderer_blink_platform_impl.h.orig 2023-12-23 12:33:28 UTC +--- content/renderer/renderer_blink_platform_impl.h.orig 2024-02-03 15:42:55 UTC +++ content/renderer/renderer_blink_platform_impl.h -@@ -234,7 +234,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi +@@ -244,7 +244,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 228195a4f068..07d22da58822 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 2023-12-23 12:33:28 UTC +--- content/shell/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ content/shell/BUILD.gn -@@ -1023,7 +1023,7 @@ group("content_shell_crash_test") { +@@ -1027,7 +1027,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_test_BUILD.gn b/www/ungoogled-chromium/files/patch-content_test_BUILD.gn index 24262177f7b3..254f1cea1c82 100644 --- a/www/ungoogled-chromium/files/patch-content_test_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-content_test_BUILD.gn @@ -1,20 +1,20 @@ ---- content/test/BUILD.gn.orig 2023-12-23 12:33:28 UTC +--- content/test/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ content/test/BUILD.gn -@@ -2269,7 +2269,7 @@ static_library("run_all_unittests") { +@@ -2265,7 +2265,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" ] } } @@ -3367,7 +3367,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 9ee56dc42d26..1db9b73f2744 100644 --- a/www/ungoogled-chromium/files/patch-content_utility_services.cc +++ b/www/ungoogled-chromium/files/patch-content_utility_services.cc @@ -1,92 +1,92 @@ ---- content/utility/services.cc.orig 2023-12-23 12:33:28 UTC +--- content/utility/services.cc.orig 2024-02-03 15:42:55 UTC +++ content/utility/services.cc @@ -67,7 +67,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 #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" #endif // BUILDFLAG(ENABLE_ACCESSIBILITY_SERVICE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "media/capture/capture_switches.h" #include "services/viz/public/cpp/gpu/gpu.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -@@ -224,7 +224,7 @@ auto RunAudio(mojo::PendingReceiver receiver) { auto service = std::make_unique( std::move(receiver), base::SingleThreadTaskRunner::GetCurrentDefault()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) { mojo::PendingRemote remote_gpu; content::UtilityThread::Get()->BindHostReceiver( -@@ -345,7 +345,7 @@ auto RunOOPArcVideoAcceleratorFactoryService( +@@ -346,7 +346,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< -@@ -356,7 +356,7 @@ auto RunStableVideoDecoderFactoryProcessService( +@@ -357,7 +357,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) { -@@ -379,7 +379,7 @@ void RegisterIOThreadServices(mojo::ServiceFactory& se +@@ -380,7 +380,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)) { @@ -428,7 +428,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)) { @@ -437,7 +437,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_utility__main.cc b/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc index 4239a3025a30..83df8019fd70 100644 --- a/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc +++ b/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc @@ -1,112 +1,117 @@ ---- content/utility/utility_main.cc.orig 2023-12-23 12:33:28 UTC +--- content/utility/utility_main.cc.orig 2024-02-03 15:42:55 UTC +++ content/utility/utility_main.cc -@@ -37,7 +37,7 @@ +@@ -36,17 +36,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" -@@ -46,7 +46,9 @@ + #include "content/child/sandboxed_process_thread_type_handler.h" ++#if BUILDFLAG(IS_LINUX) + #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 -@@ -58,10 +60,14 @@ +@@ -58,10 +62,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" -@@ -73,7 +79,7 @@ +@@ -73,7 +82,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 #endif -@@ -99,7 +105,7 @@ namespace content { +@@ -99,7 +108,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( -@@ -127,7 +133,7 @@ std::vector GetNetworkContextsParentDirec +@@ -127,7 +136,7 @@ std::vector GetNetworkContextsParentDirec 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; -@@ -248,7 +254,8 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -250,7 +259,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, -@@ -259,7 +266,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -261,7 +271,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. -@@ -288,7 +295,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -296,7 +306,7 @@ int UtilityMain(MainFunctionParams parameters) { pre_sandbox_hook = base::BindOnce(&screen_ai::ScreenAIPreSandboxHook); 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); -@@ -315,6 +322,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -323,6 +333,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::policy::SandboxLinux::Options sandbox_options; -@@ -323,6 +331,11 @@ int UtilityMain(MainFunctionParams parameters) { + sandbox_options.use_amd_specific_policies = +@@ -330,6 +341,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_common_api_runtime.json b/www/ungoogled-chromium/files/patch-extensions_common_api_runtime.json index 594e9fa1e44e..2145cb725a6f 100644 --- a/www/ungoogled-chromium/files/patch-extensions_common_api_runtime.json +++ b/www/ungoogled-chromium/files/patch-extensions_common_api_runtime.json @@ -1,10 +1,10 @@ ---- extensions/common/api/runtime.json.orig 2023-09-17 07:59:53 UTC +--- extensions/common/api/runtime.json.orig 2024-02-03 15:42:55 UTC +++ extensions/common/api/runtime.json -@@ -89,6 +89,7 @@ +@@ -86,6 +86,7 @@ {"name": "cros", "description": "Specifies the Chrome operating system."}, {"name": "linux", "description": "Specifies the Linux operating system."}, {"name": "openbsd", "description": "Specifies the OpenBSD operating system."}, + {"name": "freebsd", "description": "Specifies the FreeBSD operating system."}, {"name": "fuchsia", "description": "Specifies the Fuchsia operating system."} ] }, 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 0665bdab9d2d..0ac84acbd562 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 2023-12-23 12:33:28 UTC +--- gpu/command_buffer/service/dawn_context_provider.cc.orig 2024-02-03 15:42:55 UTC +++ gpu/command_buffer/service/dawn_context_provider.cc -@@ -178,7 +178,7 @@ wgpu::BackendType DawnContextProvider::GetDefaultBacke +@@ -186,7 +186,7 @@ wgpu::BackendType DawnContextProvider::GetDefaultBacke return base::FeatureList::IsEnabled(features::kSkiaGraphiteDawnUseD3D12) ? wgpu::BackendType::D3D12 : wgpu::BackendType::D3D11; --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +-#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_shared__image_external__vk__image__backing.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc index fac12b99ffb1..543920db54d4 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc @@ -1,20 +1,20 @@ ---- gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig 2023-11-04 07:08:51 UTC +--- gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig 2024-02-03 15:42:55 UTC +++ gpu/command_buffer/service/shared_image/external_vk_image_backing.cc @@ -47,7 +47,7 @@ #include "ui/gl/gl_version_info.h" #include "ui/gl/scoped_binders.h" -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) #include "gpu/command_buffer/service/shared_image/external_vk_image_dawn_representation.h" - #endif - -@@ -679,7 +679,7 @@ std::unique_ptr ExternalVkIma + #if BUILDFLAG(DAWN_ENABLE_BACKEND_OPENGLES) + #include "gpu/command_buffer/service/shared_image/dawn_gl_texture_representation.h" +@@ -682,7 +682,7 @@ std::unique_ptr ExternalVkIma const wgpu::Device& wgpuDevice, wgpu::BackendType backend_type, std::vector view_formats) { -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) auto wgpu_format = ToDawnFormat(format()); if (wgpu_format == wgpu::TextureFormat::Undefined) { diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc index bf59491df6c3..ee17776f6d82 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc @@ -1,20 +1,11 @@ ---- gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc.orig 2023-11-04 07:08:51 UTC +--- gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc.orig 2024-02-03 15:42:55 UTC +++ gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc -@@ -99,7 +99,7 @@ base::flat_map CreateImag +@@ -139,7 +139,7 @@ bool IsFormatSupported(viz::SharedImageFormat format, } // namespace constexpr uint32_t kSupportedUsage = -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) SHARED_IMAGE_USAGE_WEBGPU | SHARED_IMAGE_USAGE_WEBGPU_SWAP_CHAIN_TEXTURE | SHARED_IMAGE_USAGE_WEBGPU_STORAGE_TEXTURE | #endif -@@ -268,7 +268,7 @@ bool ExternalVkImageBackingFactory::IsSupported( - return false; - } - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - if (format.IsLegacyMultiplanar()) { - // ExternalVkImageBacking doesn't work properly with external sampler - // multi-planar formats on Linux, see https://crbug.com/1394888. 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 f5ab58a223a3..a44a95c72425 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 2023-09-17 07:59:53 UTC +--- gpu/command_buffer/service/shared_image/shared_image_manager.cc.orig 2024-02-03 15:42:55 UTC +++ gpu/command_buffer/service/shared_image/shared_image_manager.cc -@@ -507,7 +507,7 @@ bool SharedImageManager::SupportsScanoutImages() { +@@ -548,7 +548,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 b9a8f49ecae2..86df4b577178 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 2023-12-23 12:33:28 UTC +--- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2024-02-03 15:42:55 UTC +++ gpu/command_buffer/service/webgpu_decoder_impl.cc @@ -1252,7 +1252,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) { -@@ -1879,7 +1879,7 @@ WebGPUDecoderImpl::AssociateMailboxDawn( +@@ -1889,7 +1889,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__control__list.cc b/www/ungoogled-chromium/files/patch-gpu_config_gpu__control__list.cc index 7d6087e62dea..679093115c56 100644 --- a/www/ungoogled-chromium/files/patch-gpu_config_gpu__control__list.cc +++ b/www/ungoogled-chromium/files/patch-gpu_config_gpu__control__list.cc @@ -1,20 +1,20 @@ ---- gpu/config/gpu_control_list.cc.orig 2023-11-04 07:08:51 UTC +--- gpu/config/gpu_control_list.cc.orig 2024-02-03 15:42:55 UTC +++ gpu/config/gpu_control_list.cc @@ -276,7 +276,7 @@ bool GpuControlList::More::GLVersionInfoMismatch( GpuControlList::GLType GpuControlList::More::GetDefaultGLType() { #if BUILDFLAG(IS_CHROMEOS) return kGLTypeGL; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kGLTypeGL; #elif BUILDFLAG(IS_MAC) return kGLTypeGL; -@@ -820,7 +820,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { +@@ -811,7 +811,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { return kOsAndroid; #elif BUILDFLAG(IS_FUCHSIA) return kOsFuchsia; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kOsLinux; #elif BUILDFLAG(IS_MAC) return kOsMacosx; diff --git a/www/ungoogled-chromium/files/patch-gpu_config_gpu__finch__features.cc b/www/ungoogled-chromium/files/patch-gpu_config_gpu__finch__features.cc index 897e33753c74..1e94f2171e9c 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,21 +1,21 @@ ---- gpu/config/gpu_finch_features.cc.orig 2023-11-04 07:08:51 UTC +--- gpu/config/gpu_finch_features.cc.orig 2024-02-03 15:42:55 UTC +++ gpu/config/gpu_finch_features.cc @@ -63,7 +63,7 @@ bool IsDeviceBlocked(const char* field, const std::str BASE_FEATURE(kUseGles2ForOopR, "UseGles2ForOopR", #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_DISABLED_BY_DEFAULT #else base::FEATURE_ENABLED_BY_DEFAULT -@@ -147,7 +147,8 @@ BASE_FEATURE(kAggressiveSkiaGpuResourcePurge, +@@ -143,7 +143,8 @@ BASE_FEATURE(kAggressiveSkiaGpuResourcePurge, BASE_FEATURE(kDefaultEnableGpuRasterization, "DefaultEnableGpuRasterization", #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ + BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/ungoogled-chromium/files/patch-gpu_config_gpu__info__collector.cc b/www/ungoogled-chromium/files/patch-gpu_config_gpu__info__collector.cc new file mode 100644 index 000000000000..647704decfc5 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-gpu_config_gpu__info__collector.cc @@ -0,0 +1,11 @@ +--- gpu/config/gpu_info_collector.cc.orig 2024-02-03 15:42:55 UTC ++++ gpu/config/gpu_info_collector.cc +@@ -362,7 +362,7 @@ void ReportWebGPUAdapterMetrics(dawn::native::Instance + void ReportWebGPUSupportMetrics(dawn::native::Instance* instance) { + static BASE_FEATURE(kCollectWebGPUSupportMetrics, + "CollectWebGPUSupportMetrics", +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + base::FEATURE_DISABLED_BY_DEFAULT); + #else + base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__init.cc b/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__init.cc index d2e24a50017e..4d9f91a6bdbf 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 2023-12-23 12:33:28 UTC +--- gpu/ipc/service/gpu_init.cc.orig 2024-02-03 15:42:55 UTC +++ gpu/ipc/service/gpu_init.cc @@ -357,7 +357,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 @@ -394,7 +394,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. -@@ -491,7 +491,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -495,7 +495,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 -@@ -573,7 +573,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -577,7 +577,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; -@@ -726,7 +726,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -733,7 +733,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. -@@ -781,7 +781,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -788,7 +788,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 -@@ -935,7 +935,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -941,7 +941,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 -@@ -1005,7 +1005,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -1011,7 +1011,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__function__pointers.cc b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.cc index 194afa826aa6..43f7f16e6b80 100644 --- a/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.cc +++ b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.cc @@ -1,20 +1,20 @@ ---- gpu/vulkan/vulkan_function_pointers.cc.orig 2023-11-04 07:08:51 UTC +--- gpu/vulkan/vulkan_function_pointers.cc.orig 2024-02-03 15:42:55 UTC +++ gpu/vulkan/vulkan_function_pointers.cc -@@ -1241,7 +1241,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer +@@ -1215,7 +1215,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (gfx::HasExtension(enabled_extensions, VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME)) { vkGetImageDrmFormatModifierPropertiesEXT = -@@ -1440,7 +1440,7 @@ void VulkanFunctionPointers::ResetForTesting() { +@@ -1414,7 +1414,7 @@ void VulkanFunctionPointers::ResetForTesting() { vkGetSwapchainImagesKHR = nullptr; vkQueuePresentKHR = nullptr; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) vkGetImageDrmFormatModifierPropertiesEXT = nullptr; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) } diff --git a/www/ungoogled-chromium/files/patch-ipc_ipc__channel.h b/www/ungoogled-chromium/files/patch-ipc_ipc__channel.h index b02bad5b4d05..17341fbf9237 100644 --- a/www/ungoogled-chromium/files/patch-ipc_ipc__channel.h +++ b/www/ungoogled-chromium/files/patch-ipc_ipc__channel.h @@ -1,11 +1,11 @@ ---- ipc/ipc_channel.h.orig 2023-03-10 11:01:21 UTC +--- ipc/ipc_channel.h.orig 2024-02-03 15:42:55 UTC +++ ipc/ipc_channel.h -@@ -233,7 +233,7 @@ class COMPONENT_EXPORT(IPC) Channel : public Sender { +@@ -240,7 +240,7 @@ class COMPONENT_EXPORT(IPC) Channel : public Sender { static std::string GenerateUniqueRandomChannelID(); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Sandboxed processes live in a PID namespace, so when sending the IPC hello // message from client to server we need to send the PID from the global // PID namespace. diff --git a/www/ungoogled-chromium/files/patch-media_base_media__switches.cc b/www/ungoogled-chromium/files/patch-media_base_media__switches.cc index cadcdde513ae..a28305438146 100644 --- a/www/ungoogled-chromium/files/patch-media_base_media__switches.cc +++ b/www/ungoogled-chromium/files/patch-media_base_media__switches.cc @@ -1,65 +1,74 @@ ---- media/base/media_switches.cc.orig 2023-12-23 12:33:28 UTC +--- media/base/media_switches.cc.orig 2024-02-03 15:42:55 UTC +++ media/base/media_switches.cc -@@ -17,7 +17,7 @@ +@@ -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 -@@ -702,7 +702,7 @@ BASE_FEATURE(kFallbackAfterDecodeError, +@@ -708,7 +708,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 -@@ -725,7 +725,7 @@ BASE_FEATURE(kGlobalMediaControlsCrOSUpdatedUI, +@@ -731,7 +731,7 @@ BASE_FEATURE(kGlobalMediaControlsCrOSUpdatedUI, // 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 -@@ -737,7 +737,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen, +@@ -743,7 +743,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 -@@ -776,7 +776,7 @@ BASE_FEATURE(kUnifiedAutoplay, +@@ -777,7 +777,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, -@@ -856,7 +856,7 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding, +@@ -863,7 +863,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", -@@ -1384,7 +1384,7 @@ const base::Feature MEDIA_EXPORT kUseOutOfProcessVideo +@@ -967,7 +967,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 +@@ -1402,7 +1402,7 @@ const base::Feature MEDIA_EXPORT kUseOutOfProcessVideo }; #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. const base::Feature MEDIA_EXPORT 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 097363ff628a..1e898273c29e 100644 --- a/www/ungoogled-chromium/files/patch-media_base_media__switches.h +++ b/www/ungoogled-chromium/files/patch-media_base_media__switches.h @@ -1,29 +1,29 @@ ---- media/base/media_switches.h.orig 2023-12-23 12:33:28 UTC +--- media/base/media_switches.h.orig 2024-02-03 15:42:55 UTC +++ media/base/media_switches.h -@@ -322,7 +322,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseDecoderStreamFor - MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseElementInsteadOfRegionCapture); +@@ -323,7 +323,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); - MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseMediaHistoryStore); -#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); -@@ -340,7 +340,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiH264TemporalLa +@@ -342,7 +342,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(kV4L2FlatStatefulVideoDecoder); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -461,7 +461,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kExposeOutOfProcessV +@@ -463,7 +463,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kExposeOutOfProcessV MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoDecoding); #endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoEncoding); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-media_base_video__frame.cc b/www/ungoogled-chromium/files/patch-media_base_video__frame.cc index 6a615018885f..55a517ab43e7 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 2023-11-04 07:08:51 UTC +--- media/base/video_frame.cc.orig 2024-02-03 15:42:55 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 absl::optional GetDefaultLayo 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, -@@ -903,7 +903,7 @@ scoped_refptr VideoFrame::WrapVideoFrame( +@@ -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_; -@@ -1311,7 +1311,7 @@ const gpu::MailboxHolder& VideoFrame::mailbox_holder( +@@ -1312,7 +1312,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) const std::vector& VideoFrame::DmabufFds() const { DCHECK_EQ(storage_type_, STORAGE_DMABUFS); -@@ -1424,7 +1424,7 @@ VideoFrame::VideoFrame(const VideoFrameLayout& layout, +@@ -1425,7 +1425,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_capture_video_fake__video__capture__device__factory.cc b/www/ungoogled-chromium/files/patch-media_capture_video_fake__video__capture__device__factory.cc index afdc0359e849..ff91c2e0d0a2 100644 --- a/www/ungoogled-chromium/files/patch-media_capture_video_fake__video__capture__device__factory.cc +++ b/www/ungoogled-chromium/files/patch-media_capture_video_fake__video__capture__device__factory.cc @@ -1,11 +1,11 @@ ---- media/capture/video/fake_video_capture_device_factory.cc.orig 2023-08-18 10:26:52 UTC +--- media/capture/video/fake_video_capture_device_factory.cc.orig 2024-02-03 15:42:55 UTC +++ media/capture/video/fake_video_capture_device_factory.cc -@@ -229,7 +229,7 @@ void FakeVideoCaptureDeviceFactory::GetDevicesInfo( +@@ -230,7 +230,7 @@ void FakeVideoCaptureDeviceFactory::GetDevicesInfo( int entry_index = 0; for (const auto& entry : devices_config_) { VideoCaptureApi api = -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE; #elif BUILDFLAG(IS_IOS) VideoCaptureApi::UNKNOWN; diff --git a/www/ungoogled-chromium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc b/www/ungoogled-chromium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc index 50cd194d1544..b389b3c8800e 100644 --- a/www/ungoogled-chromium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc +++ b/www/ungoogled-chromium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc @@ -1,156 +1,156 @@ ---- media/capture/video/linux/v4l2_capture_delegate.cc.orig 2023-11-04 07:08:51 UTC +--- media/capture/video/linux/v4l2_capture_delegate.cc.orig 2024-02-03 15:42:55 UTC +++ media/capture/video/linux/v4l2_capture_delegate.cc @@ -5,8 +5,10 @@ #include "media/capture/video/linux/v4l2_capture_delegate.h" #include +#if !BUILDFLAG(IS_BSD) #include #include +#endif #include #include #include -@@ -26,17 +28,19 @@ +@@ -27,17 +29,19 @@ #include "media/capture/video/blob_utils.h" #include "media/capture/video/linux/video_capture_device_linux.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "media/capture/capture_switches.h" #include "media/capture/video/linux/v4l2_capture_delegate_gpu_helper.h" #endif // BUILDFLAG(IS_LINUX) using media::mojom::MeteringMode; +#if !BUILDFLAG(IS_BSD) #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) // 16 bit depth, Realsense F200. #define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') #endif +#endif // TODO(aleksandar.stojiljkovic): Wrap this with kernel version check once the // format is introduced to kernel. -@@ -46,6 +50,14 @@ using media::mojom::MeteringMode; +@@ -47,6 +51,14 @@ using media::mojom::MeteringMode; #define V4L2_PIX_FMT_INVZ v4l2_fourcc('I', 'N', 'V', 'Z') #endif +#ifndef V4L2_COLORSPACE_OPRGB +#define V4L2_COLORSPACE_OPRGB V4L2_COLORSPACE_ADOBERGB +#endif + +#ifndef V4L2_XFER_FUNC_OPRGB +#define V4L2_XFER_FUNC_OPRGB V4L2_XFER_FUNC_ADOBERGB +#endif + namespace media { namespace { -@@ -260,7 +272,7 @@ bool V4L2CaptureDelegate::IsBlockedControl(int control +@@ -265,7 +277,7 @@ bool V4L2CaptureDelegate::IsBlockedControl(int control // static bool V4L2CaptureDelegate::IsControllableControl( int control_id, - const base::RepeatingCallback& do_ioctl) { + const base::RepeatingCallback& do_ioctl) { const int special_control_id = GetControllingSpecialControl(control_id); if (!special_control_id) { // The control is not controlled by a special control thus the control is -@@ -316,7 +328,7 @@ V4L2CaptureDelegate::V4L2CaptureDelegate( +@@ -321,7 +333,7 @@ V4L2CaptureDelegate::V4L2CaptureDelegate( is_capturing_(false), timeout_count_(0), rotation_(rotation) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) use_gpu_buffer_ = switches::IsVideoCaptureUseGpuMemoryBufferEnabled(); #endif // BUILDFLAG(IS_LINUX) } -@@ -443,7 +455,7 @@ void V4L2CaptureDelegate::AllocateAndStart( +@@ -448,7 +460,7 @@ void V4L2CaptureDelegate::AllocateAndStart( client_->OnStarted(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (use_gpu_buffer_) { v4l2_gpu_helper_ = std::make_unique( std::move(gmb_support_test_)); -@@ -793,7 +805,7 @@ void V4L2CaptureDelegate::SetGPUEnvironmentForTesting( +@@ -798,7 +810,7 @@ void V4L2CaptureDelegate::SetGPUEnvironmentForTesting( V4L2CaptureDelegate::~V4L2CaptureDelegate() = default; -bool V4L2CaptureDelegate::RunIoctl(int request, void* argp) { +bool V4L2CaptureDelegate::RunIoctl(unsigned int request, void* argp) { int num_retries = 0; for (; DoIoctl(request, argp) < 0 && num_retries < kMaxIOCtrlRetries; ++num_retries) { -@@ -803,7 +815,7 @@ bool V4L2CaptureDelegate::RunIoctl(int request, void* +@@ -808,7 +820,7 @@ bool V4L2CaptureDelegate::RunIoctl(int request, void* return num_retries != kMaxIOCtrlRetries; } -int V4L2CaptureDelegate::DoIoctl(int request, void* argp) { +int V4L2CaptureDelegate::DoIoctl(unsigned int request, void* argp) { return HANDLE_EINTR(v4l2_->ioctl(device_fd_.get(), request, argp)); } -@@ -814,6 +826,7 @@ bool V4L2CaptureDelegate::IsControllableControl(int co +@@ -819,6 +831,7 @@ bool V4L2CaptureDelegate::IsControllableControl(int co } void V4L2CaptureDelegate::ReplaceControlEventSubscriptions() { +#if !BUILDFLAG(IS_BSD) constexpr uint32_t kControlIds[] = {V4L2_CID_AUTO_EXPOSURE_BIAS, V4L2_CID_AUTO_WHITE_BALANCE, V4L2_CID_BRIGHTNESS, -@@ -841,6 +854,7 @@ void V4L2CaptureDelegate::ReplaceControlEventSubscript +@@ -846,6 +859,7 @@ void V4L2CaptureDelegate::ReplaceControlEventSubscript << ", {type = V4L2_EVENT_CTRL, id = " << control_id << "}"; } } +#endif } mojom::RangePtr V4L2CaptureDelegate::RetrieveUserControlRange(int control_id) { -@@ -1021,7 +1035,11 @@ void V4L2CaptureDelegate::DoCapture() { +@@ -1026,7 +1040,11 @@ void V4L2CaptureDelegate::DoCapture() { pollfd device_pfd = {}; device_pfd.fd = device_fd_.get(); +#if !BUILDFLAG(IS_BSD) device_pfd.events = POLLIN | POLLPRI; +#else + device_pfd.events = POLLIN; +#endif const int result = HANDLE_EINTR(v4l2_->poll(&device_pfd, 1, kCaptureTimeoutMs)); -@@ -1059,6 +1077,7 @@ void V4L2CaptureDelegate::DoCapture() { +@@ -1064,6 +1082,7 @@ void V4L2CaptureDelegate::DoCapture() { timeout_count_ = 0; } +#if !BUILDFLAG(IS_BSD) // Dequeue events if the driver has filled in some. if (device_pfd.revents & POLLPRI) { bool controls_changed = false; -@@ -1093,6 +1112,7 @@ void V4L2CaptureDelegate::DoCapture() { +@@ -1098,6 +1117,7 @@ void V4L2CaptureDelegate::DoCapture() { client_->OnCaptureConfigurationChanged(); } } +#endif // Deenqueue, send and reenqueue a buffer if the driver has filled one in. if (device_pfd.revents & POLLIN) { -@@ -1146,7 +1166,7 @@ void V4L2CaptureDelegate::DoCapture() { +@@ -1151,7 +1171,7 @@ void V4L2CaptureDelegate::DoCapture() { // workable on Linux. // See http://crbug.com/959919. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (use_gpu_buffer_) { v4l2_gpu_helper_->OnIncomingCapturedData( client_.get(), buffer_tracker->start(), -@@ -1219,7 +1239,7 @@ void V4L2CaptureDelegate::SetErrorState(VideoCaptureEr +@@ -1224,7 +1244,7 @@ void V4L2CaptureDelegate::SetErrorState(VideoCaptureEr client_->OnError(error, from_here, reason); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gfx::ColorSpace V4L2CaptureDelegate::BuildColorSpaceFromv4l2() { v4l2_colorspace v4l2_primary = (v4l2_colorspace)video_fmt_.fmt.pix.colorspace; v4l2_quantization v4l2_range = diff --git a/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 new file mode 100644 index 000000000000..a3800f548426 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc @@ -0,0 +1,29 @@ +--- media/gpu/chromeos/libyuv_image_processor_backend.cc.orig 2024-02-03 15:42:55 UTC ++++ media/gpu/chromeos/libyuv_image_processor_backend.cc +@@ -47,7 +47,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), +@@ -430,7 +430,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Vi + 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) +@@ -573,7 +573,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Vi + } + } + +-#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 8ac777ee5f7f..ce3cf63e58b9 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 2023-11-04 07:08:51 UTC +--- media/gpu/chromeos/mailbox_video_frame_converter.cc.orig 2024-02-03 15:42:55 UTC +++ media/gpu/chromeos/mailbox_video_frame_converter.cc -@@ -59,7 +59,7 @@ viz::SharedImageFormat GetSharedImageFormat(gfx::Buffe +@@ -61,7 +61,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_platform__video__frame__utils.cc b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc new file mode 100644 index 000000000000..c849f0f21bf7 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc @@ -0,0 +1,11 @@ +--- media/gpu/chromeos/platform_video_frame_utils.cc.orig 2024-02-03 15:42:55 UTC ++++ media/gpu/chromeos/platform_video_frame_utils.cc +@@ -119,7 +119,7 @@ class GbmDeviceWrapper { + // TODO(b/313513760): don't guard base::File::FLAG_WRITE behind + // BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_V4L2_CODEC) once the hardware video + // decoding sandbox allows R+W access to the render nodes. +-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_V4L2_CODEC) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_V4L2_CODEC) + // Needed on Linux for gbm_create_device(). + | base::File::FLAG_WRITE + #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 7145be00c95f..38f5d6cf9ce9 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,28 +1,28 @@ ---- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2023-12-23 12:33:28 UTC +--- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2024-02-03 15:42:55 UTC +++ media/gpu/chromeos/video_decoder_pipeline.cc -@@ -1048,14 +1048,14 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -999,14 +999,14 @@ 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()); CHECK(main_frame_pool_->AsPlatformVideoFramePool()); main_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator( *allocator); -#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 -@@ -1192,7 +1192,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1143,7 +1143,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) auxiliary_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator( *allocator); #endif 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 6ae70645f1f4..8116c94bd933 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 2023-12-23 12:33:28 UTC +--- media/gpu/vaapi/vaapi_video_decoder.cc.orig 2024-02-03 15:42:55 UTC +++ media/gpu/vaapi/vaapi_video_decoder.cc -@@ -776,7 +776,7 @@ void VaapiVideoDecoder::ApplyResolutionChangeWithScree +@@ -799,7 +799,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) absl::optional allocator = base::BindRepeating(&AllocateCustomFrameProxy, weak_this_); std::vector candidates = { diff --git a/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc b/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc index a2df0937a157..d510086ea1bb 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc @@ -1,47 +1,20 @@ ---- media/gpu/vaapi/vaapi_wrapper.cc.orig 2023-12-23 12:33:28 UTC +--- media/gpu/vaapi/vaapi_wrapper.cc.orig 2024-02-03 15:42:55 UTC +++ media/gpu/vaapi/vaapi_wrapper.cc @@ -71,7 +71,7 @@ using media_gpu_vaapi::kModuleVa_prot; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/files/file_util.h" #include "base/strings/string_split.h" #endif -@@ -1445,7 +1445,7 @@ bool IsVBREncodingSupported(VAProfile va_profile) { - return VASupportedProfiles::Get().IsProfileSupported(mode, va_profile); - } - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Some VA-API drivers (vdpau-va-driver) will crash if used with VA/DRM on - // NVIDIA GPUs. This function checks if such drivers are present. - bool IsBrokenNvidiaVaapiDriverPresent() { -@@ -1506,7 +1506,7 @@ void VADisplayStateSingleton::PreSandboxInitialization - VADisplayStateSingleton& va_display_state = GetInstance(); - base::AutoLock lock(va_display_state.lock_); - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - std::string va_driver_name; - auto env = base::Environment::Create(); - if (env->GetVar("LIBVA_DRIVER_NAME", &va_driver_name) && -@@ -1543,7 +1543,7 @@ void VADisplayStateSingleton::PreSandboxInitialization - if (base::EqualsCaseInsensitiveASCII(version_name, "vgem")) { - continue; - } --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Skip NVIDIA GPUs if the VA-API driver used for them is known for crashing - // with VA/DRM. - if (is_nvidia_va_drm_broken && -@@ -1576,7 +1576,7 @@ VADisplayStateHandle VADisplayStateSingleton::GetHandl +@@ -1514,7 +1514,7 @@ VADisplayStateHandle VADisplayStateSingleton::GetHandl return {}; } -#if BUILDFLAG(IS_OZONE) && BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_OZONE) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) // TODO(crbug.com/1116701): add vaapi support for other Ozone platforms on // Linux. See comment in OzonePlatform::PlatformProperties::supports_vaapi // for more details. This will also require revisiting everything that's 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 ea8532f595de..0ae6aeaa67ee 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 2023-12-23 12:33:28 UTC +--- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2024-02-03 15:42:55 UTC +++ media/video/gpu_memory_buffer_video_frame_pool.cc -@@ -774,7 +774,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa +@@ -790,7 +790,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 -@@ -1224,7 +1224,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo +@@ -1240,7 +1240,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 &= -@@ -1243,7 +1243,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo +@@ -1259,7 +1259,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 1529957e7ab9..cf6bd776f88a 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 2023-12-23 12:33:28 UTC +--- media/video/video_encode_accelerator_adapter.cc.orig 2024-02-03 15:42:55 UTC +++ media/video/video_encode_accelerator_adapter.cc -@@ -153,7 +153,7 @@ VideoEncodeAccelerator::Config SetUpVeaConfig( +@@ -154,7 +154,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 -@@ -478,7 +478,7 @@ void VideoEncodeAcceleratorAdapter::InitializeInternal +@@ -479,7 +479,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-mojo_public_c_system_thunks.cc b/www/ungoogled-chromium/files/patch-mojo_public_c_system_thunks.cc index 707e39658eb1..18abce4d2479 100644 --- a/www/ungoogled-chromium/files/patch-mojo_public_c_system_thunks.cc +++ b/www/ungoogled-chromium/files/patch-mojo_public_c_system_thunks.cc @@ -1,38 +1,38 @@ ---- mojo/public/c/system/thunks.cc.orig 2023-11-04 07:08:51 UTC +--- mojo/public/c/system/thunks.cc.orig 2024-02-03 15:42:55 UTC +++ mojo/public/c/system/thunks.cc @@ -24,7 +24,7 @@ #include "mojo/public/c/system/message_pipe.h" #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + #include #include "base/environment.h" #include "base/files/file_path.h" - #include "base/scoped_native_library.h" @@ -73,7 +73,7 @@ class CoreLibraryInitializer { MojoResult LoadLibrary(base::FilePath library_path) { #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) if (library_ && library_->is_valid()) return MOJO_RESULT_OK; @@ -87,7 +87,7 @@ class CoreLibraryInitializer { if (library_path.empty()) { // Default to looking for the library in the current working directory. -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const base::FilePath::CharType kDefaultLibraryPathValue[] = FILE_PATH_LITERAL("./libmojo_core.so"); #elif BUILDFLAG(IS_FUCHSIA) @@ -143,7 +143,7 @@ class CoreLibraryInitializer { private: #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - absl::optional library_; + std::optional library_; #endif }; 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 d99980f5fddf..ffcd86640c21 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 2023-12-23 12:33:28 UTC +--- mojo/public/tools/bindings/mojom.gni.orig 2024-02-03 15:42:55 UTC +++ mojo/public/tools/bindings/mojom.gni -@@ -758,6 +758,16 @@ template("mojom") { +@@ -760,6 +760,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 3c23ef8bb76b..cb91e33dd6ef 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 2023-12-23 12:33:28 UTC +--- net/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ net/BUILD.gn @@ -122,7 +122,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" ] } -@@ -1242,6 +1242,19 @@ component("net") { +@@ -1179,6 +1179,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", -@@ -1398,7 +1411,7 @@ component("net") { +@@ -1335,7 +1348,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", -@@ -2888,7 +2901,7 @@ test("net_unittests") { +@@ -2794,7 +2807,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", -@@ -2976,6 +2989,10 @@ test("net_unittests") { +@@ -2882,6 +2895,10 @@ test("net_unittests") { ] } + if (is_bsd) { + deps += [ "//sandbox/policy" ] + } + if (enable_websockets) { deps += [ "//net/server:tests" ] } -@@ -3046,7 +3063,7 @@ test("net_unittests") { +@@ -2952,7 +2969,7 @@ test("net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "tools/quic/quic_simple_server_test.cc" ] } -@@ -3181,7 +3198,7 @@ test("net_unittests") { +@@ -3087,7 +3104,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 cd4a602cc266..d5236988d91e 100644 --- a/www/ungoogled-chromium/files/patch-net_base_features.cc +++ b/www/ungoogled-chromium/files/patch-net_base_features.cc @@ -1,15 +1,15 @@ ---- net/base/features.cc.orig 2023-12-23 12:33:28 UTC +--- net/base/features.cc.orig 2024-02-03 15:42:55 UTC +++ net/base/features.cc -@@ -470,7 +470,12 @@ BASE_FEATURE(kSpdyHeadersToHttpResponseUseBuilder, +@@ -477,7 +477,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 9d3ecd3a221d..05a2f4c1409e 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 2023-08-18 10:26:52 UTC +--- net/cert/cert_verify_proc.h.orig 2024-02-03 15:42:55 UTC +++ net/cert/cert_verify_proc.h -@@ -79,7 +79,7 @@ class NET_EXPORT CertVerifyProc +@@ -130,7 +130,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_cert_pki_general__names.h b/www/ungoogled-chromium/files/patch-net_cert_pki_general__names.h deleted file mode 100644 index 438450760ea8..000000000000 --- a/www/ungoogled-chromium/files/patch-net_cert_pki_general__names.h +++ /dev/null @@ -1,10 +0,0 @@ ---- net/cert/pki/general_names.h.orig 2023-11-04 07:08:51 UTC -+++ net/cert/pki/general_names.h -@@ -8,6 +8,7 @@ - #include - #include - #include -+#include - - #include "net/base/net_export.h" - #include "net/cert/pki/cert_error_id.h" diff --git a/www/ungoogled-chromium/files/patch-net_filter_zstd__source__stream.cc b/www/ungoogled-chromium/files/patch-net_filter_zstd__source__stream.cc index 7a6d8cbf0674..105ac8652cd0 100644 --- a/www/ungoogled-chromium/files/patch-net_filter_zstd__source__stream.cc +++ b/www/ungoogled-chromium/files/patch-net_filter_zstd__source__stream.cc @@ -1,10 +1,10 @@ ---- net/filter/zstd_source_stream.cc.orig 2023-10-13 13:20:35 UTC +--- net/filter/zstd_source_stream.cc.orig 2024-02-03 15:42:55 UTC +++ net/filter/zstd_source_stream.cc -@@ -6,6 +6,7 @@ - +@@ -7,6 +7,7 @@ #include + #include #include +#include #define ZSTD_STATIC_LINKING_ONLY diff --git a/www/ungoogled-chromium/files/patch-net_socket_udp__socket__posix.cc b/www/ungoogled-chromium/files/patch-net_socket_udp__socket__posix.cc index f46d960787b4..00931e2fe3f8 100644 --- a/www/ungoogled-chromium/files/patch-net_socket_udp__socket__posix.cc +++ b/www/ungoogled-chromium/files/patch-net_socket_udp__socket__posix.cc @@ -1,39 +1,39 @@ ---- net/socket/udp_socket_posix.cc.orig 2023-12-23 12:33:28 UTC +--- net/socket/udp_socket_posix.cc.orig 2024-02-03 15:42:55 UTC +++ net/socket/udp_socket_posix.cc -@@ -612,12 +612,17 @@ int UDPSocketPosix::SetRecvEcn() { +@@ -610,12 +610,17 @@ int UDPSocketPosix::SetRecvEcn() { } } +#ifdef IP_RECVTOS int rv = setsockopt(socket_, IPPROTO_IP, IP_RECVTOS, &ecn, sizeof(ecn)); +#else + int rv = -1; + errno = EOPNOTSUPP; +#endif return rv == 0 ? OK : MapSystemError(errno); } void UDPSocketPosix::SetMsgConfirm(bool confirm) { -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) if (confirm) { sendto_flags_ |= MSG_CONFIRM; } else { -@@ -638,7 +643,7 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { +@@ -636,7 +641,7 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); int value = broadcast ? 1 : 0; int rv; -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) // SO_REUSEPORT on OSX permits multiple processes to each receive // UDP multicast or broadcast datagrams destined for the bound // port. -@@ -951,7 +956,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address) +@@ -949,7 +954,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address) #if BUILDFLAG(IS_CHROMEOS_ASH) if (last_error == EINVAL) return ERR_ADDRESS_IN_USE; -#elif BUILDFLAG(IS_APPLE) +#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) if (last_error == EADDRNOTAVAIL) return ERR_ADDRESS_IN_USE; #endif 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 0929885f9be9..1458f8c0c98d 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 2023-04-08 11:38:38 UTC +--- net/socket/udp_socket_unittest.cc.orig 2024-02-03 15:42:55 UTC +++ net/socket/udp_socket_unittest.cc -@@ -345,7 +345,7 @@ TEST_F(UDPSocketTest, PartialRecv) { +@@ -344,7 +344,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). -@@ -656,7 +656,7 @@ TEST_F(UDPSocketTest, ClientSetDoNotFragment) { +@@ -655,7 +655,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) -@@ -684,7 +684,7 @@ TEST_F(UDPSocketTest, ServerSetDoNotFragment) { +@@ -683,7 +683,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) -@@ -749,7 +749,7 @@ TEST_F(UDPSocketTest, JoinMulticastGroup) { +@@ -748,7 +748,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 -@@ -803,7 +803,7 @@ TEST_F(UDPSocketTest, MAYBE_SharedMulticastAddress) { +@@ -802,7 +802,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__comparision__tool.cc b/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__comparision__tool.cc index 5f3cc8b7932c..2fbe0f06883f 100644 --- a/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__comparision__tool.cc +++ b/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__comparision__tool.cc @@ -1,29 +1,29 @@ ---- net/tools/cert_verify_tool/cert_verify_comparision_tool.cc.orig 2023-11-04 07:08:51 UTC +--- net/tools/cert_verify_tool/cert_verify_comparision_tool.cc.orig 2024-02-03 15:42:55 UTC +++ net/tools/cert_verify_tool/cert_verify_comparision_tool.cc @@ -34,7 +34,7 @@ #include "net/url_request/url_request_context_builder.h" #include "net/url_request/url_request_context_getter.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 @@ -54,7 +54,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. // -@@ -125,7 +125,7 @@ class CertVerifyImpl { +@@ -122,7 +122,7 @@ class CertVerifyImpl { std::unique_ptr CreateCertVerifyImplFromName( base::StringPiece impl_name, scoped_refptr cert_net_fetcher) { -#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)) if (impl_name == "platform") { return std::make_unique( 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 3555c12e8bfc..51955ad226c2 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 2023-12-23 12:33:28 UTC +--- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2024-02-03 15:42:55 UTC +++ net/tools/cert_verify_tool/cert_verify_tool.cc -@@ -31,7 +31,7 @@ - #include "net/url_request/url_request_context_builder.h" - #include "net/url_request/url_request_context_getter.h" +@@ -32,7 +32,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 -@@ -63,7 +63,7 @@ void SetUpOnNetworkThread( +@@ -64,7 +64,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. // -@@ -545,7 +545,7 @@ int main(int argc, char** argv) { +@@ -562,7 +562,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-remoting_host_base_desktop__environment__options.cc b/www/ungoogled-chromium/files/patch-remoting_host_base_desktop__environment__options.cc index 628af848ec45..cd198691cad0 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_base_desktop__environment__options.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_base_desktop__environment__options.cc @@ -1,11 +1,11 @@ ---- remoting/host/base/desktop_environment_options.cc.orig 2023-03-10 11:01:21 UTC +--- remoting/host/base/desktop_environment_options.cc.orig 2024-02-03 15:42:55 UTC +++ remoting/host/base/desktop_environment_options.cc -@@ -119,7 +119,7 @@ bool DesktopEnvironmentOptions::capture_video_on_dedic +@@ -118,7 +118,7 @@ bool DesktopEnvironmentOptions::capture_video_on_dedic // TODO(joedow): Determine whether we can migrate additional platforms to // using the DesktopCaptureWrapper instead of the DesktopCaptureProxy. Then // clean up DesktopCapturerProxy::Core::CreateCapturer(). -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return capture_video_on_dedicated_thread_; #else return false; diff --git a/www/ungoogled-chromium/files/patch-remoting_host_client__session.cc b/www/ungoogled-chromium/files/patch-remoting_host_client__session.cc index efc9a595baee..11a101d35c64 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 2023-11-04 07:08:51 UTC +--- remoting/host/client_session.cc.orig 2024-02-03 15:42:55 UTC +++ remoting/host/client_session.cc -@@ -157,7 +157,7 @@ void ClientSession::NotifyClientResolution( +@@ -159,7 +159,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_host__attributes.cc b/www/ungoogled-chromium/files/patch-remoting_host_host__attributes.cc index 34b59bebe2df..0d8b40a47309 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_host__attributes.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_host__attributes.cc @@ -1,11 +1,11 @@ ---- remoting/host/host_attributes.cc.orig 2023-06-05 19:39:05 UTC +--- remoting/host/host_attributes.cc.orig 2024-02-03 15:42:55 UTC +++ remoting/host/host_attributes.cc -@@ -105,7 +105,7 @@ std::string GetHostAttributes() { +@@ -104,7 +104,7 @@ std::string GetHostAttributes() { if (media::InitializeMediaFoundation()) { result.push_back("HWEncoder"); } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) result.push_back("HWEncoder"); #endif diff --git a/www/ungoogled-chromium/files/patch-remoting_host_it2me_it2me__host.cc b/www/ungoogled-chromium/files/patch-remoting_host_it2me_it2me__host.cc index a7fd374314d1..a90205fdaab7 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_it2me_it2me__host.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_it2me_it2me__host.cc @@ -1,29 +1,29 @@ ---- remoting/host/it2me/it2me_host.cc.orig 2023-09-17 07:59:53 UTC +--- remoting/host/it2me/it2me_host.cc.orig 2024-02-03 15:42:55 UTC +++ remoting/host/it2me/it2me_host.cc -@@ -49,7 +49,7 @@ +@@ -52,7 +52,7 @@ #include "remoting/host/chromeos/features.h" #endif -#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) -@@ -121,7 +121,7 @@ void It2MeHost::Connect( +@@ -178,7 +178,7 @@ void It2MeHost::Connect( OnPolicyUpdate(std::move(policies)); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsRunningWayland()) { WaylandManager::Get()->Init(host_context_->ui_task_runner()); } -@@ -261,7 +261,7 @@ void It2MeHost::ConnectOnNetworkThread( +@@ -338,7 +338,7 @@ void It2MeHost::ConnectOnNetworkThread( // Set up the desktop environment options. DesktopEnvironmentOptions options(DesktopEnvironmentOptions::CreateDefault()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsRunningWayland()) { options.desktop_capture_options()->set_prefer_cursor_embedded(true); } diff --git a/www/ungoogled-chromium/files/patch-remoting_host_me2me__desktop__environment.cc b/www/ungoogled-chromium/files/patch-remoting_host_me2me__desktop__environment.cc index 9be23b1853e9..ce7f94619d11 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_me2me__desktop__environment.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_me2me__desktop__environment.cc @@ -1,38 +1,38 @@ ---- remoting/host/me2me_desktop_environment.cc.orig 2023-12-23 12:33:28 UTC +--- remoting/host/me2me_desktop_environment.cc.orig 2024-02-03 15:42:55 UTC +++ remoting/host/me2me_desktop_environment.cc @@ -125,7 +125,7 @@ std::string Me2MeDesktopEnvironment::GetCapabilities() capabilities += protocol::kRemoteWebAuthnCapability; } -#if BUILDFLAG(IS_LINUX) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) if (!IsRunningWayland()) { capabilities += " "; capabilities += protocol::kMultiStreamCapability; -@@ -171,7 +171,7 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnvironment( +@@ -164,7 +164,7 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnvironment( // properly under Xvfb. mutable_desktop_capture_options()->set_use_update_notifications(true); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Setting this option to false means that the capture differ wrapper will not // be used when the X11 capturer is selected. This reduces the X11 capture // time by a few milliseconds per frame and is safe because we can rely on -@@ -180,7 +180,7 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnvironment( +@@ -173,7 +173,7 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnvironment( mutable_desktop_capture_options()->set_detect_updated_region(false); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsRunningWayland()) { mutable_desktop_capture_options()->set_prefer_cursor_embedded(false); } -@@ -205,7 +205,7 @@ bool Me2MeDesktopEnvironment::InitializeSecurity( +@@ -198,7 +198,7 @@ bool Me2MeDesktopEnvironment::InitializeSecurity( // Otherwise, if the session is shared with the local user start monitoring // the local input and create the in-session UI. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool want_user_interface = false; #elif BUILDFLAG(IS_APPLE) // Don't try to display any UI on top of the system's login screen as this diff --git a/www/ungoogled-chromium/files/patch-remoting_host_remoting__me2me__host.cc b/www/ungoogled-chromium/files/patch-remoting_host_remoting__me2me__host.cc index 02d2503311f7..b5b3ab9d0564 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 2023-12-23 12:33:28 UTC +--- remoting/host/remoting_me2me_host.cc.orig 2024-02-03 15:42:55 UTC +++ remoting/host/remoting_me2me_host.cc @@ -127,7 +127,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) @@ -138,13 +138,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 @@ -157,7 +157,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) @@ -187,7 +187,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"; @@ -394,7 +394,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) @@ -463,7 +463,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_; @@ -772,7 +772,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) } @@ -833,7 +833,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, @@ -952,13 +952,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 = @@ -1030,7 +1030,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. @@ -1038,7 +1038,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(); })); @@ -1391,7 +1391,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) - absl::optional host_username_match_required = + std::optional host_username_match_required = policies.FindBool(policy::key::kRemoteAccessHostMatchUsername); if (!host_username_match_required.has_value()) { @@ -1800,7 +1800,7 @@ void HostProcess::StartHost() { // won't be advertised if it's missing a registry key or something. desktop_environment_options_.set_enable_remote_open_url(true); -#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 @@ -1833,7 +1833,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_ = @@ -1865,7 +1865,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(); @@ -1998,7 +1998,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 ...) @@ -2047,7 +2047,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-remoting_host_setup_start__host__main.cc b/www/ungoogled-chromium/files/patch-remoting_host_setup_start__host__main.cc index 5a51c6e6955d..6e7027be97be 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_setup_start__host__main.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_setup_start__host__main.cc @@ -1,29 +1,29 @@ ---- remoting/host/setup/start_host_main.cc.orig 2023-12-23 12:33:28 UTC +--- remoting/host/setup/start_host_main.cc.orig 2024-02-03 15:42:55 UTC +++ remoting/host/setup/start_host_main.cc @@ -36,7 +36,7 @@ #include #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/setup/daemon_controller_delegate_linux.h" #include "remoting/host/setup/start_host_as_root.h" #endif // BUILDFLAG(IS_LINUX) -@@ -242,7 +242,7 @@ bool InitializeCorpMachineParams(HostStarter::Params& +@@ -250,7 +250,7 @@ bool InitializeCorpMachineParams(HostStarter::Params& } // namespace int StartHostMain(int argc, char** argv) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Minimize the amount of code that runs as root on Posix systems. if (getuid() == 0) { return remoting::StartHostAsRoot(argc, argv); -@@ -274,7 +274,7 @@ int StartHostMain(int argc, char** argv) { +@@ -281,7 +281,7 @@ int StartHostMain(int argc, char** argv) { mojo::core::Init(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (command_line->HasSwitch("no-start")) { // On Linux, registering the host with systemd and starting it is the only // reason start_host requires root. The --no-start options skips that final diff --git a/www/ungoogled-chromium/files/patch-remoting_host_webauthn_remote__webauthn__caller__security__utils.cc b/www/ungoogled-chromium/files/patch-remoting_host_webauthn_remote__webauthn__caller__security__utils.cc index cc87f25fd08e..095f8ff9648d 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_webauthn_remote__webauthn__caller__security__utils.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_webauthn_remote__webauthn__caller__security__utils.cc @@ -1,29 +1,29 @@ ---- remoting/host/webauthn/remote_webauthn_caller_security_utils.cc.orig 2022-10-29 17:50:56 UTC +--- remoting/host/webauthn/remote_webauthn_caller_security_utils.cc.orig 2024-02-03 15:42:55 UTC +++ remoting/host/webauthn/remote_webauthn_caller_security_utils.cc -@@ -9,7 +9,7 @@ +@@ -10,7 +10,7 @@ #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "base/containers/fixed_flat_set.h" #include "base/files/file_path.h" #include "base/process/process_handle.h" -@@ -37,7 +37,7 @@ namespace { +@@ -38,7 +38,7 @@ namespace { // No static variables needed for debug builds. -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) constexpr auto kAllowedCallerPrograms = base::MakeFixedFlatSet({ -@@ -81,7 +81,7 @@ bool IsLaunchedByTrustedProcess() { +@@ -82,7 +82,7 @@ bool IsLaunchedByTrustedProcess() { #if !defined(NDEBUG) // Just return true on debug builds for the convenience of development. return true; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::ProcessId parent_pid = base::GetParentProcessId(base::GetCurrentProcessHandle()); // Note that on Linux the process image may no longer exist in its original diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_features.cc b/www/ungoogled-chromium/files/patch-sandbox_policy_features.cc index 92c31045660e..2ad6bb42b041 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 2023-11-11 14:10:41 UTC +--- sandbox/policy/features.cc.orig 2024-02-03 15:42:55 UTC +++ sandbox/policy/features.cc -@@ -19,7 +19,11 @@ namespace sandbox::policy::features { +@@ -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. -@@ -126,7 +130,7 @@ BASE_FEATURE(kForceSpectreVariant2Mitigation, +@@ -128,7 +132,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 c0e1e8739077..2b0a887ac3fc 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 2023-11-11 14:10:41 UTC +--- sandbox/policy/features.h.orig 2024-02-03 15:42:55 UTC +++ sandbox/policy/features.h @@ -44,7 +44,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); - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + 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 1e7db60c2b89..6fc93cf06fde 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 2023-09-17 07:59:53 UTC +--- services/audio/audio_sandbox_hook_linux.cc.orig 2024-02-03 15:42:55 UTC +++ services/audio/audio_sandbox_hook_linux.cc -@@ -143,6 +143,7 @@ void AddPulseAudioFilePermissions( +@@ -144,6 +144,7 @@ void AddPulseAudioFilePermissions( } #endif +#if !BUILDFLAG(IS_BSD) std::vector GetAudioFilePermissions() { std::vector permissions{ BrokerFilePermission::ReadOnly("/dev/urandom"), -@@ -171,10 +172,12 @@ void LoadAudioLibraries() { +@@ -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({ -@@ -194,6 +197,7 @@ bool AudioPreSandboxHook(sandbox::policy::SandboxLinux +@@ -195,6 +198,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_compute__pressure_cpu__probe.cc b/www/ungoogled-chromium/files/patch-services_device_compute__pressure_cpu__probe.cc index 1378a2940b46..6864c5ee3da7 100644 --- a/www/ungoogled-chromium/files/patch-services_device_compute__pressure_cpu__probe.cc +++ b/www/ungoogled-chromium/files/patch-services_device_compute__pressure_cpu__probe.cc @@ -1,10 +1,10 @@ ---- services/device/compute_pressure/cpu_probe.cc.orig 2023-05-05 12:12:41 UTC +--- services/device/compute_pressure/cpu_probe.cc.orig 2024-02-03 15:42:55 UTC +++ services/device/compute_pressure/cpu_probe.cc -@@ -44,6 +44,7 @@ std::unique_ptr CpuProbe::Create( +@@ -60,6 +60,7 @@ std::unique_ptr CpuProbe::Create( #elif BUILDFLAG(IS_MAC) return CpuProbeMac::Create(sampling_interval, std::move(sampling_callback)); #else + NOTIMPLEMENTED(); return nullptr; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) } 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 5930f534ca7a..8d01281b633f 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 2023-12-23 12:33:28 UTC +--- services/device/geolocation/location_arbitrator.cc.orig 2024-02-03 15:42:55 UTC +++ services/device/geolocation/location_arbitrator.cc -@@ -193,7 +193,7 @@ LocationArbitrator::NewNetworkLocationProvider( +@@ -194,7 +194,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_, diff --git a/www/ungoogled-chromium/files/patch-services_device_hid_BUILD.gn b/www/ungoogled-chromium/files/patch-services_device_hid_BUILD.gn index c6988fb161dc..ac8047fb73bb 100644 --- a/www/ungoogled-chromium/files/patch-services_device_hid_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-services_device_hid_BUILD.gn @@ -1,30 +1,30 @@ ---- services/device/hid/BUILD.gn.orig 2023-07-21 09:49:17 UTC +--- services/device/hid/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ services/device/hid/BUILD.gn -@@ -34,7 +34,26 @@ source_set("hid") { +@@ -36,7 +36,26 @@ source_set("hid") { "//services/device/public/mojom", ] - if ((is_linux || is_chromeos) && use_udev) { + if (is_openbsd) { + sources += [ + "hid_connection_fido.cc", + "hid_connection_fido.h", + "hid_service_fido.cc", + "hid_service_fido.h", + ] + libs = ["fido2", "cbor", "usbhid", "crypto", "util"] + } + + if (is_freebsd) { + sources += [ + "hid_connection_freebsd.cc", + "hid_connection_freebsd.h", + "hid_service_freebsd.cc", + "hid_service_freebsd.h", + ] + } + + if ((is_linux || is_chromeos) && !is_bsd && use_udev) { sources += [ "hid_connection_linux.cc", "hid_connection_linux.h", diff --git a/www/ungoogled-chromium/files/patch-services_device_usb_BUILD.gn b/www/ungoogled-chromium/files/patch-services_device_usb_BUILD.gn index bf0f26b44369..04497c96078a 100644 --- a/www/ungoogled-chromium/files/patch-services_device_usb_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-services_device_usb_BUILD.gn @@ -1,52 +1,52 @@ ---- services/device/usb/BUILD.gn.orig 2023-11-04 07:08:51 UTC +--- services/device/usb/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ services/device/usb/BUILD.gn -@@ -90,15 +90,17 @@ static_library("usb") { +@@ -92,15 +92,17 @@ static_library("usb") { deps += [ "//third_party/re2" ] } - if (is_mac) { - sources += [ - "usb_device_handle_mac.cc", - "usb_device_handle_mac.h", - "usb_device_mac.cc", - "usb_device_mac.h", - "usb_service_mac.cc", - "usb_service_mac.h", - ] + if (is_mac || is_openbsd) { + if (is_mac) { + sources += [ + "usb_device_handle_mac.cc", + "usb_device_handle_mac.h", + "usb_device_mac.cc", + "usb_device_mac.h", + "usb_service_mac.cc", + "usb_service_mac.h", + ] + } # These sources and deps are required for libusb. # TODO(https://crbug.com/1096743) Remove these sources. -@@ -122,6 +124,13 @@ static_library("usb") { +@@ -124,6 +126,13 @@ static_library("usb") { deps += [ "//third_party/libusb" ] } + if (is_freebsd) { + sources += [ + "usb_service_fake.cc", + "usb_service_fake.h", + ] + } + if (is_linux || is_chromeos) { sources += [ "usb_device_linux.cc", -@@ -139,7 +148,7 @@ static_library("usb") { +@@ -141,7 +150,7 @@ static_library("usb") { deps += [ "//device/udev_linux" ] } - if (is_android || is_chromeos || is_linux) { + if (is_android || is_chromeos || is_linux && !is_bsd) { sources += [ "usb_device_handle_usbfs.cc", "usb_device_handle_usbfs.h", diff --git a/www/ungoogled-chromium/files/patch-services_network_BUILD.gn b/www/ungoogled-chromium/files/patch-services_network_BUILD.gn index 0cdba42b2519..685787ca90e5 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 2023-12-23 12:33:28 UTC +--- services/network/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ services/network/BUILD.gn -@@ -394,7 +394,6 @@ if (is_linux || is_chromeos) { +@@ -397,7 +397,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 e1250b4ada0a..ebbd0df336bc 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 2023-12-23 12:33:28 UTC +--- services/network/network_context.cc.orig 2024-02-03 15:42:55 UTC +++ services/network/network_context.cc -@@ -470,7 +470,7 @@ NetworkContext::NetworkContextHttpAuthPreferences:: +@@ -471,7 +471,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_) { -@@ -2385,7 +2385,7 @@ void NetworkContext::OnHttpAuthDynamicParamsChanged( +@@ -2360,7 +2360,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 753099c096d1..67a28365272f 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 2023-12-23 12:33:28 UTC +--- services/network/network_context.h.orig 2024-02-03 15:42:55 UTC +++ services/network/network_context.h -@@ -677,7 +677,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -674,7 +674,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__service.cc b/www/ungoogled-chromium/files/patch-services_network_network__service.cc index 075b8ca407fb..48c213feb1a6 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 2023-12-23 12:33:28 UTC +--- services/network/network_service.cc.orig 2024-02-03 15:42:55 UTC +++ services/network/network_service.cc -@@ -96,7 +96,7 @@ +@@ -100,7 +100,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" -@@ -998,7 +998,7 @@ void NetworkService::SetExplicitlyAllowedPorts( +@@ -1070,7 +1070,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) { -@@ -1080,7 +1080,7 @@ NetworkService::CreateHttpAuthHandlerFactory(NetworkCo +@@ -1160,7 +1160,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 6ee082caae20..a8becf1a8f8e 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 2023-12-23 12:33:28 UTC +--- services/network/network_service.h.orig 2024-02-03 15:42:55 UTC +++ services/network/network_service.h -@@ -225,7 +225,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService +@@ -224,7 +224,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; -@@ -252,7 +252,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService +@@ -253,7 +253,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) -@@ -494,7 +494,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService +@@ -506,7 +506,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_mojom_BUILD.gn b/www/ungoogled-chromium/files/patch-services_network_public_mojom_BUILD.gn index 5c9ef60e4ac0..4570ffbf4df4 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 2023-12-23 12:33:28 UTC +--- services/network/public/mojom/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ services/network/public/mojom/BUILD.gn -@@ -521,11 +521,11 @@ mojom("url_loader_base") { +@@ -519,11 +519,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" ] -@@ -1442,7 +1442,7 @@ mojom("mojom") { +@@ -1439,7 +1439,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_on__device__model_on__device__model__service.h b/www/ungoogled-chromium/files/patch-services_on__device__model_on__device__model__service.h new file mode 100644 index 000000000000..97f59bbb6453 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-services_on__device__model_on__device__model__service.h @@ -0,0 +1,22 @@ +--- services/on_device_model/on_device_model_service.h.orig 2024-02-03 15:42:55 UTC ++++ services/on_device_model/on_device_model_service.h +@@ -18,6 +18,10 @@ + #include "sandbox/policy/linux/sandbox_linux.h" + #endif + ++#if BUILDFLAG(IS_BSD) ++#include "sandbox/policy/sandbox.h" ++#endif ++ + namespace on_device_model { + + class COMPONENT_EXPORT(ON_DEVICE_MODEL) OnDeviceModelService +@@ -27,7 +31,7 @@ class COMPONENT_EXPORT(ON_DEVICE_MODEL) OnDeviceModelS + // These are defined separately in pre_sandbox_init.cc for explicit security + // review coverage. + [[nodiscard]] static bool PreSandboxInit(); +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + static void AddSandboxLinuxOptions( + sandbox::policy::SandboxLinux::Options& options); + #endif diff --git a/www/ungoogled-chromium/files/patch-services_on__device__model_pre__sandbox__init.cc b/www/ungoogled-chromium/files/patch-services_on__device__model_pre__sandbox__init.cc new file mode 100644 index 000000000000..d0c11516d9e9 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-services_on__device__model_pre__sandbox__init.cc @@ -0,0 +1,38 @@ +--- services/on_device_model/pre_sandbox_init.cc.orig 2024-02-03 15:42:55 UTC ++++ services/on_device_model/pre_sandbox_init.cc +@@ -14,7 +14,7 @@ + #include "services/on_device_model/ml/chrome_ml.h" // nogncheck + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "gpu/config/gpu_info_collector.h" // nogncheck + #include "third_party/dawn/include/dawn/dawn_proc.h" // nogncheck + #include "third_party/dawn/include/dawn/native/DawnNative.h" // nogncheck +@@ -25,7 +25,7 @@ namespace on_device_model { + + namespace { + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + constexpr uint32_t kVendorIdAMD = 0x1002; + constexpr uint32_t kVendorIdIntel = 0x8086; + constexpr uint32_t kVendorIdNVIDIA = 0x10DE; +@@ -74,7 +74,7 @@ bool OnDeviceModelService::PreSandboxInit() { + } + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Warm any relevant drivers before attempting to bring up the sandbox. For + // good measure we initialize a device instance for any adapter with an + // appropriate backend on top of any integrated or discrete GPU. +@@ -100,7 +100,7 @@ bool OnDeviceModelService::PreSandboxInit() { + return true; + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // static + void OnDeviceModelService::AddSandboxLinuxOptions( + sandbox::policy::SandboxLinux::Options& options) { diff --git a/www/ungoogled-chromium/files/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc b/www/ungoogled-chromium/files/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc index fa9b47c8c519..59d670254adf 100644 --- a/www/ungoogled-chromium/files/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc +++ b/www/ungoogled-chromium/files/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc @@ -1,65 +1,65 @@ ---- services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc.orig 2023-10-13 13:20:35 UTC +--- services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc.orig 2024-02-03 15:42:55 UTC +++ services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc -@@ -53,7 +53,7 @@ uint32_t CalculatePrivateFootprintKb(const mojom::RawO +@@ -54,7 +54,7 @@ uint32_t CalculatePrivateFootprintKb(const mojom::RawO uint32_t shared_resident_kb) { DCHECK(os_dump.platform_private_footprint); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) uint64_t rss_anon_bytes = os_dump.platform_private_footprint->rss_anon_bytes; uint64_t vm_swap_bytes = os_dump.platform_private_footprint->vm_swap_bytes; return (rss_anon_bytes + vm_swap_bytes) / 1024; -@@ -81,7 +81,7 @@ memory_instrumentation::mojom::OSMemDumpPtr CreatePubl +@@ -83,7 +83,7 @@ memory_instrumentation::mojom::OSMemDumpPtr CreatePubl os_dump->is_peak_rss_resettable = internal_os_dump.is_peak_rss_resettable; os_dump->private_footprint_kb = CalculatePrivateFootprintKb(internal_os_dump, shared_resident_kb); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) os_dump->private_footprint_swap_kb = internal_os_dump.platform_private_footprint->vm_swap_bytes / 1024; #endif -@@ -217,7 +217,7 @@ void QueuedRequestDispatcher::SetUpAndDispatch( +@@ -219,7 +219,7 @@ void QueuedRequestDispatcher::SetUpAndDispatch( // On most platforms each process can dump data about their own process // so ask each process to do so Linux is special see below. -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) request->pending_responses.insert({client_info.pid, ResponseType::kOSDump}); client->RequestOSMemoryDump(request->memory_map_option(), {base::kNullProcessId}, -@@ -232,7 +232,7 @@ void QueuedRequestDispatcher::SetUpAndDispatch( +@@ -234,7 +234,7 @@ void QueuedRequestDispatcher::SetUpAndDispatch( // In some cases, OS stats can only be dumped from a privileged process to // get around to sandboxing/selinux restrictions (see crbug.com/461788). -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::vector pids; mojom::ClientProcess* browser_client = nullptr; base::ProcessId browser_client_pid = base::kNullProcessId; -@@ -278,7 +278,7 @@ void QueuedRequestDispatcher::SetUpAndDispatchVmRegion +@@ -280,7 +280,7 @@ void QueuedRequestDispatcher::SetUpAndDispatchVmRegion const OsCallback& os_callback) { // On Linux, OS stats can only be dumped from a privileged process to // get around to sandboxing/selinux restrictions (see crbug.com/461788). -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojom::ClientProcess* browser_client = nullptr; base::ProcessId browser_client_pid = 0; for (const auto& client_info : clients) { -@@ -328,7 +328,7 @@ QueuedRequestDispatcher::FinalizeVmRegionRequest( +@@ -330,7 +330,7 @@ QueuedRequestDispatcher::FinalizeVmRegionRequest( // each client process provides 1 OS dump, % the case where the client is // disconnected mid dump. OSMemDumpMap& extra_os_dumps = response.second.os_dumps; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) for (auto& kv : extra_os_dumps) { auto pid = kv.first == base::kNullProcessId ? original_pid : kv.first; DCHECK(results.find(pid) == results.end()); -@@ -389,7 +389,7 @@ void QueuedRequestDispatcher::Finalize(QueuedRequest* +@@ -391,7 +391,7 @@ void QueuedRequestDispatcher::Finalize(QueuedRequest* // crash). In the latter case (OS_LINUX) we expect the full map to come // from the browser process response. OSMemDumpMap& extra_os_dumps = response.second.os_dumps; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) for (const auto& kv : extra_os_dumps) { auto pid = kv.first == base::kNullProcessId ? original_pid : kv.first; DCHECK_EQ(pid_to_os_dump[pid], nullptr); diff --git a/www/ungoogled-chromium/files/patch-services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc b/www/ungoogled-chromium/files/patch-services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc index d0e94811411c..8393a9ee8cdf 100644 --- a/www/ungoogled-chromium/files/patch-services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc +++ b/www/ungoogled-chromium/files/patch-services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc @@ -1,11 +1,11 @@ ---- services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc.orig 2023-02-11 09:11:04 UTC +--- services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc.orig 2024-02-03 15:42:55 UTC +++ services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc -@@ -37,7 +37,7 @@ +@@ -38,7 +38,7 @@ #include "third_party/perfetto/protos/perfetto/trace/track_event/process_descriptor.pbzero.h" #include "third_party/perfetto/protos/perfetto/trace/track_event/thread_descriptor.pbzero.h" -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) #include "base/profiler/thread_delegate_posix.h" #define INITIALIZE_THREAD_DELEGATE_POSIX 1 #else // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_APPLE) diff --git a/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.cc b/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.cc index 32ce52b7c1cc..dc08359e662b 100644 --- a/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.cc +++ b/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.cc @@ -1,38 +1,38 @@ ---- services/video_capture/video_capture_service_impl.cc.orig 2023-10-13 13:20:35 UTC +--- services/video_capture/video_capture_service_impl.cc.orig 2024-02-03 15:42:55 UTC +++ services/video_capture/video_capture_service_impl.cc -@@ -40,7 +40,7 @@ +@@ -41,7 +41,7 @@ #include "services/video_capture/lacros/device_factory_adapter_lacros.h" #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "media/capture/capture_switches.h" #include "media/capture/video/video_capture_gpu_channel_host.h" #include "services/viz/public/cpp/gpu/context_provider_command_buffer.h" -@@ -107,7 +107,7 @@ class VideoCaptureServiceImpl::GpuDependenciesContext +@@ -108,7 +108,7 @@ class VideoCaptureServiceImpl::GpuDependenciesContext this}; }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Intended usage of this class is to create viz::Gpu in utility process and // connect to viz::GpuClient of browser process, which will call to Gpu service. // Also, this class holds the viz::ContextProvider to listen and monitor Gpu -@@ -288,7 +288,7 @@ void VideoCaptureServiceImpl::LazyInitializeGpuDepende +@@ -299,7 +299,7 @@ void VideoCaptureServiceImpl::LazyInitializeGpuDepende if (!gpu_dependencies_context_) gpu_dependencies_context_ = std::make_unique(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) { if (!viz_gpu_context_provider_) { viz_gpu_context_provider_ = -@@ -384,7 +384,7 @@ void VideoCaptureServiceImpl::OnGpuInfoUpdate(const CH +@@ -409,7 +409,7 @@ void VideoCaptureServiceImpl::OnGpuInfoUpdate(const CH } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) void VideoCaptureServiceImpl::SetVizGpu(std::unique_ptr viz_gpu) { viz_gpu_ = std::move(viz_gpu); } diff --git a/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.h b/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.h index 4ef5b7e38910..5495bfd96a7c 100644 --- a/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.h +++ b/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.h @@ -1,29 +1,29 @@ ---- services/video_capture/video_capture_service_impl.h.orig 2023-09-17 07:59:53 UTC +--- services/video_capture/video_capture_service_impl.h.orig 2024-02-03 15:42:55 UTC +++ services/video_capture/video_capture_service_impl.h -@@ -24,7 +24,7 @@ +@@ -26,7 +26,7 @@ #include "services/video_capture/ash/video_capture_device_factory_ash.h" #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "services/viz/public/cpp/gpu/gpu.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -@@ -62,7 +62,7 @@ class VideoCaptureServiceImpl : public mojom::VideoCap +@@ -69,7 +69,7 @@ class VideoCaptureServiceImpl : public mojom::VideoCap #if BUILDFLAG(IS_WIN) void OnGpuInfoUpdate(const CHROME_LUID& luid) override; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) void SetVizGpu(std::unique_ptr viz_gpu); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) private: -@@ -87,7 +87,7 @@ class VideoCaptureServiceImpl : public mojom::VideoCap +@@ -105,7 +105,7 @@ class VideoCaptureServiceImpl : public mojom::VideoCap factory_receivers_ash_; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) class VizGpuContextProvider; std::unique_ptr viz_gpu_context_provider_; std::unique_ptr viz_gpu_; diff --git a/www/ungoogled-chromium/files/patch-third__party_abseil-cpp_absl_base_internal_raw__logging.cc b/www/ungoogled-chromium/files/patch-third__party_abseil-cpp_absl_base_internal_raw__logging.cc deleted file mode 100644 index b61d636a13e8..000000000000 --- a/www/ungoogled-chromium/files/patch-third__party_abseil-cpp_absl_base_internal_raw__logging.cc +++ /dev/null @@ -1,16 +0,0 @@ ---- third_party/abseil-cpp/absl/base/internal/raw_logging.cc.orig 2023-08-18 10:26:52 UTC -+++ third_party/abseil-cpp/absl/base/internal/raw_logging.cc -@@ -56,10 +56,12 @@ - // ABSL_HAVE_SYSCALL_WRITE is defined when the platform provides the syscall - // syscall(SYS_write, /*int*/ fd, /*char* */ buf, /*size_t*/ len); - // for low level operations that want to avoid libc. --#if (defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)) && \ -+#if (defined(__linux__) || defined(__FreeBSD__)) && \ - !defined(__ANDROID__) - #include - #define ABSL_HAVE_SYSCALL_WRITE 1 -+#define ABSL_LOW_LEVEL_WRITE_SUPPORTED 1 -+#elif defined(__OpenBSD__) - #define ABSL_LOW_LEVEL_WRITE_SUPPORTED 1 - #else - #undef ABSL_HAVE_SYSCALL_WRITE 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 07393a2531c4..06bfed10b2ce 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 2023-10-13 13:20:35 UTC +--- third_party/angle/BUILD.gn.orig 2024-02-03 15:42:55 UTC +++ third_party/angle/BUILD.gn -@@ -325,7 +325,6 @@ config("extra_warnings") { +@@ -326,7 +326,6 @@ config("extra_warnings") { "-Wtautological-type-limit-compare", "-Wundefined-reinterpret-cast", "-Wunneeded-internal-declaration", - "-Wunused-but-set-variable", "-Wsuggest-destructor-override", "-Wsuggest-override", -@@ -496,7 +495,7 @@ template("angle_common_lib") { +@@ -497,7 +496,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" ] } -@@ -651,6 +650,9 @@ angle_static_library("angle_gpu_info_util") { +@@ -652,6 +651,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_common_system__utils.cpp b/www/ungoogled-chromium/files/patch-third__party_angle_src_common_system__utils.cpp new file mode 100644 index 000000000000..b8ce2542ca1b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-third__party_angle_src_common_system__utils.cpp @@ -0,0 +1,11 @@ +--- third_party/angle/src/common/system_utils.cpp.orig 2024-02-03 15:42:55 UTC ++++ third_party/angle/src/common/system_utils.cpp +@@ -25,7 +25,7 @@ namespace angle + { + std::string GetExecutableName() + { +-#if defined(ANGLE_PLATFORM_ANDROID) && __ANDROID_API__ >= 21 ++#if (defined(ANGLE_PLATFORM_ANDROID) && __ANDROID_API__ >= 21) || defined(ANGLE_PLATFORM_BSD) + // Support for "getprogname" function in bionic was introduced in L (API level 21) + const char *executableName = getprogname(); + return (executableName) ? std::string(executableName) : "ANGLE"; diff --git a/www/ungoogled-chromium/files/patch-third__party_angle_src_common_system__utils__linux.cpp b/www/ungoogled-chromium/files/patch-third__party_angle_src_common_system__utils__linux.cpp new file mode 100644 index 000000000000..b313113f4c63 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-third__party_angle_src_common_system__utils__linux.cpp @@ -0,0 +1,35 @@ +--- third_party/angle/src/common/system_utils_linux.cpp.orig 2024-02-03 15:42:55 UTC ++++ third_party/angle/src/common/system_utils_linux.cpp +@@ -15,8 +15,13 @@ + + #include + ++#if ANGLE_PLATFORM_OPENBSD ++#include ++#endif ++ + namespace angle + { ++#if ANGLE_PLATFORM_LINUX + std::string GetExecutablePath() + { + // We cannot use lstat to get the size of /proc/self/exe as it always returns 0 +@@ -32,6 +37,7 @@ std::string GetExecutablePath() + path[result] = '\0'; + return path; + } ++#endif + + std::string GetExecutableDirectory() + { +@@ -56,6 +62,10 @@ void SetCurrentThreadName(const char *name) + { + // There's a 15-character (16 including '\0') limit. If the name is too big (and ERANGE is + // returned), just ignore the name. ++#if ANGLE_PLATFORM_OPENBSD ++ pthread_set_name_np(pthread_self(), name); ++#else + pthread_setname_np(pthread_self(), name); ++#endif + } + } // namespace angle 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 9d51e9534a48..6607453b7ff2 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 2023-08-18 10:26:52 UTC +--- 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 -@@ -66,7 +66,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.h b/www/ungoogled-chromium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h index 1f6d9549da41..4c327174072f 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h +++ b/www/ungoogled-chromium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h @@ -1,11 +1,11 @@ ---- third_party/blink/public/common/renderer_preferences/renderer_preferences.h.orig 2023-08-18 10:26:52 UTC +--- third_party/blink/public/common/renderer_preferences/renderer_preferences.h.orig 2024-02-03 15:42:55 UTC +++ third_party/blink/public/common/renderer_preferences/renderer_preferences.h -@@ -64,7 +64,7 @@ struct BLINK_COMMON_EXPORT RendererPreferences { +@@ -63,7 +63,7 @@ struct BLINK_COMMON_EXPORT RendererPreferences { UserAgentOverride user_agent_override; std::string accept_languages; bool send_subresource_notification{false}; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::string system_font_family_name; #endif #if BUILDFLAG(IS_WIN) diff --git a/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 9f9d575306ff..d41ba2c9be4d 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 2023-08-18 10:26:52 UTC +--- third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h.orig 2024-02-03 15:42:55 UTC +++ third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h -@@ -162,7 +162,7 @@ struct BLINK_COMMON_EXPORT +@@ -157,7 +157,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 d1fbba07d061..e75f239e01df 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,11 +1,11 @@ ---- third_party/blink/public/platform/platform.h.orig 2023-11-04 07:08:51 UTC +--- third_party/blink/public/platform/platform.h.orig 2024-02-03 15:42:55 UTC +++ third_party/blink/public/platform/platform.h -@@ -344,7 +344,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -345,7 +345,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_public_platform_web__vector.h b/www/ungoogled-chromium/files/patch-third__party_blink_public_platform_web__vector.h index 135e7aeb131e..9297af44a15d 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_public_platform_web__vector.h +++ b/www/ungoogled-chromium/files/patch-third__party_blink_public_platform_web__vector.h @@ -1,11 +1,11 @@ ---- third_party/blink/public/platform/web_vector.h.orig 2022-10-01 07:40:07 UTC +--- third_party/blink/public/platform/web_vector.h.orig 2024-02-03 15:42:55 UTC +++ third_party/blink/public/platform/web_vector.h -@@ -81,7 +81,7 @@ class WebVector { +@@ -86,7 +86,7 @@ class WebVector { // The vector can be populated using reserve() and emplace_back(). WebVector() = default; -#if defined(ARCH_CPU_64_BITS) +#if defined(ARCH_CPU_64_BITS) || defined(__OpenBSD__) // Create a vector with |size| default-constructed elements. We define // a constructor with size_t otherwise we'd have a duplicate define. explicit WebVector(size_t size) : data_(size) {} 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 ae38a7b88e74..cea470a6d52b 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 2023-12-23 12:33:28 UTC +--- third_party/blink/renderer/controller/blink_initializer.cc.orig 2024-02-03 15:42:55 UTC +++ third_party/blink/renderer/controller/blink_initializer.cc @@ -78,12 +78,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 -@@ -232,7 +232,7 @@ void BlinkInitializer::RegisterInterfaces(mojo::Binder +@@ -251,7 +251,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)), -@@ -271,7 +271,7 @@ void BlinkInitializer::RegisterMemoryWatchers(Platform +@@ -290,7 +290,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 bf36a9571a5b..05cca7baf218 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 2023-12-23 12:33:28 UTC +--- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2024-02-03 15:42:55 UTC +++ third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -424,7 +424,7 @@ SkFontHinting RendererPreferencesToSkiaHinting( +@@ -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' -@@ -3351,7 +3351,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs +@@ -3360,7 +3360,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_frame_web__frame__test.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc index a0baeb575a87..1220c1003118 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2023-12-23 12:33:28 UTC +--- third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2024-02-03 15:42:55 UTC +++ third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -6468,7 +6468,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { +@@ -6465,7 +6465,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { } #if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // TODO(crbug.com/1090246): Fix these tests on Fuchsia and re-enable. // TODO(crbug.com/1317375): Build these tests on all platforms. #define MAYBE_SelectRangeStaysHorizontallyAlignedWhenMoved \ -@@ -6877,7 +6877,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc +@@ -6874,7 +6874,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc TEST_F(CompositedSelectionBoundsTest, LargeSelectionNoScroll) { RunTest("composited_selection_bounds_large_selection_noscroll.html"); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if !BUILDFLAG(IS_ANDROID) TEST_F(CompositedSelectionBoundsTest, Input) { web_view_helper_.GetWebView()->GetSettings()->SetDefaultFontSize(16); diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc index 4002c561aeab..8b3648e02a6c 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc.orig 2023-10-13 13:20:35 UTC +--- third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc.orig 2024-02-03 15:42:55 UTC +++ third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc -@@ -48,7 +48,7 @@ constexpr base::TimeDelta kEncodeRowSlackBeforeDeadlin +@@ -50,7 +50,7 @@ constexpr base::TimeDelta kEncodeRowSlackBeforeDeadlin /* The value is based on user statistics on Nov 2017. */ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN)) + BUILDFLAG(IS_WIN)) || BUILDFLAG(IS_BSD) const double kIdleTaskStartTimeoutDelayMs = 1000.0; #else const double kIdleTaskStartTimeoutDelayMs = 4000.0; // For ChromeOS, Mobile diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc index a83a8218ef78..2e6144cc35c9 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/core/inspector/inspector_memory_agent.cc.orig 2023-11-04 07:08:51 UTC +--- third_party/blink/renderer/core/inspector/inspector_memory_agent.cc.orig 2024-02-03 15:42:55 UTC +++ third_party/blink/renderer/core/inspector/inspector_memory_agent.cc -@@ -190,7 +190,7 @@ InspectorMemoryAgent::GetSamplingProfileById(uint32_t +@@ -192,7 +192,7 @@ InspectorMemoryAgent::GetSamplingProfileById(uint32_t Vector InspectorMemoryAgent::Symbolize( const WebVector& addresses) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // TODO(alph): Move symbolization to the client. Vector addresses_to_symbolize; for (const void* address : addresses) { 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 f019344f4cdd..56da89bb067f 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 2023-12-23 12:33:28 UTC +--- third_party/blink/renderer/core/layout/layout_view.cc.orig 2024-02-03 15:42:55 UTC +++ third_party/blink/renderer/core/layout/layout_view.cc -@@ -73,7 +73,7 @@ +@@ -72,7 +72,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 -@@ -808,7 +808,7 @@ void LayoutView::UpdateLayout() { - fragmentation_context_.Clear(); +@@ -813,7 +813,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_layout_ng_physical__fragment__rare__data.h b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_ng_physical__fragment__rare__data.h deleted file mode 100644 index 36e7d6193ed9..000000000000 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_ng_physical__fragment__rare__data.h +++ /dev/null @@ -1,10 +0,0 @@ ---- third_party/blink/renderer/core/layout/ng/physical_fragment_rare_data.h.orig 2023-09-17 07:59:53 UTC -+++ third_party/blink/renderer/core/layout/ng/physical_fragment_rare_data.h -@@ -5,6 +5,7 @@ - #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_PHYSICAL_FRAGMENT_RARE_DATA_H_ - #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_PHYSICAL_FRAGMENT_RARE_DATA_H_ - -+#include - #include - - #include "third_party/blink/renderer/core/layout/geometry/logical_rect.h" diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc index 138df21d9064..efe8d9bdf4a4 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc.orig 2023-12-23 12:33:28 UTC +--- third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc.orig 2024-02-03 15:42:55 UTC +++ third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc -@@ -157,7 +157,7 @@ bool ScrollbarThemeAura::SupportsDragSnapBack() const +@@ -150,7 +150,7 @@ bool ScrollbarThemeAura::SupportsDragSnapBack() const // is true for at least GTK and QT apps). // 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) return false; #else return true; -@@ -360,7 +360,7 @@ bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scr +@@ -354,7 +354,7 @@ bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scr const WebMouseEvent& event) { // 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 (event.button == WebPointerProperties::Button::kMiddle) return true; #endif diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_xml_xslt__processor.h b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_xml_xslt__processor.h new file mode 100644 index 000000000000..c3359d6b9be6 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_xml_xslt__processor.h @@ -0,0 +1,14 @@ +--- third_party/blink/renderer/core/xml/xslt_processor.h.orig 2024-02-03 15:42:55 UTC ++++ third_party/blink/renderer/core/xml/xslt_processor.h +@@ -77,7 +77,11 @@ class XSLTProcessor final : public ScriptWrappable { + + void reset(); + ++#if (LIBXML_VERSION > 21106) + static void ParseErrorFunc(void* user_data, const xmlError*); ++#else ++ static void ParseErrorFunc(void* user_data, xmlError*); ++#endif + static void GenericErrorFunc(void* user_data, const char* msg, ...); + + // Only for libXSLT callbacks diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_xml_xslt__processor__libxslt.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_xml_xslt__processor__libxslt.cc new file mode 100644 index 000000000000..5af5353c3fcc --- /dev/null +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_xml_xslt__processor__libxslt.cc @@ -0,0 +1,14 @@ +--- third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc.orig 2024-02-03 15:42:55 UTC ++++ third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc +@@ -66,7 +66,11 @@ void XSLTProcessor::GenericErrorFunc(void*, const char + // It would be nice to do something with this error message. + } + ++#if (LIBXML_VERSION > 21106) + void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) { ++#else ++void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) { ++#endif + FrameConsole* console = static_cast(user_data); + if (!console) + return; 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 7399ed3eb028..aac4ab7dd831 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 2023-06-05 19:39:05 UTC +--- 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 -@@ -7,7 +7,7 @@ declare_args() { +@@ -6,7 +6,7 @@ import("//build/config/chrome_build.gni") + declare_args() { # This enables building WebNN with XNNPACK. Currently only available for - # Windows and Linux on x64 or x86. - build_webnn_with_xnnpack = -- (is_linux || is_win) && (current_cpu == "x64" || current_cpu == "x86") -+ !is_bsd && (is_win && (current_cpu == "x64" || current_cpu == "x86")) + # 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)) - # This build flag enables WebNN on ChromeOS platform to access hardware - # acceleration by using ModelLoader mojo interface. 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 656405787501..c8b381969e51 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 2023-12-23 12:33:28 UTC +--- third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc.orig 2024-02-03 15:42:55 UTC +++ third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc -@@ -196,7 +196,7 @@ class SharedXnnpackContext : public ThreadSafeRefCount +@@ -197,7 +197,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_webgl_webgl__rendering__context__base.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc index ee261f45ca31..f51dfded8c30 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 2023-12-23 12:33:28 UTC +--- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2024-02-03 15:42:55 UTC +++ third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -6312,7 +6312,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid +@@ -6358,7 +6358,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