diff --git a/www/ungoogled-chromium/Makefile b/www/ungoogled-chromium/Makefile index 25e691dde1d6..b6612b6f1de1 100644 --- a/www/ungoogled-chromium/Makefile +++ b/www/ungoogled-chromium/Makefile @@ -1,407 +1,407 @@ PORTNAME= ungoogled-chromium -PORTVERSION= 121.0.6167.184 +PORTVERSION= 122.0.6261.69 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 \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libepoll-shim.so:devel/libepoll-shim \ libevent.so:devel/libevent \ libffi.so:devel/libffi \ libicuuc.so:devel/icu \ libjsoncpp.so:devel/jsoncpp \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libcairo.so:graphics/cairo \ libdrm.so:graphics/libdrm \ libexif.so:graphics/libexif \ libpng.so:graphics/png \ libwebp.so:graphics/webp \ libdav1d.so:multimedia/dav1d \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libfontconfig.so:x11-fonts/fontconfig \ libwayland-client.so:graphics/wayland \ libxkbcommon.so:x11/libxkbcommon \ libxshmfence.so:x11/libxshmfence RUN_DEPENDS= xdg-open:devel/xdg-utils \ noto-basic>0:x11-fonts/noto-basic USES= bison compiler:c++17-lang cpe desktop-file-utils gl gmake gnome \ iconv:wchar_t jpeg localbase:ldflags ninja perl5 pkgconfig \ python:build qt:5 shebangfix tar:xz xorg CPE_VENDOR= google CPE_PRODUCT= chrome USE_GL= gbm gl USE_GNOME= atk dconf gdkpixbuf2 glib20 gtk30 libxml2 libxslt USE_LDCONFIG= ${DATADIR} USE_PERL5= build USE_XORG= x11 xcb xcomposite xcursor xext xdamage xfixes xi \ xorgproto xrandr xrender xscrnsaver xtst USE_QT= buildtools:build SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper buildtools/linux64/clang-format MAKE_ARGS= -C out/${BUILDTYPE} ALL_TARGET= chrome BINARY_ALIAS= python3=${PYTHON_CMD} \ moc=${PREFIX}/bin/moc-qt5 # TODO bz@ : install libwidevinecdm.so (see third_party/widevine/cdm/BUILD.gn) # # Run "./out/${BUILDTYPE}/gn args out/${BUILDTYPE} --list" for all variables. # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= enable_widevine=true \ fatal_linker_warnings=false \ icu_use_data_file=false \ is_clang=true \ optimize_webui=true \ toolkit_views=true \ use_allocator_shim=false \ use_aura=true \ use_custom_libcxx=true \ use_custom_libunwind=true \ use_lld=true \ use_partition_alloc=true \ use_partition_alloc_as_malloc=false \ use_sysroot=false \ use_system_freetype=false \ use_system_harfbuzz=true \ use_system_libffi=true \ use_system_libjpeg=true \ use_udev=false \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" \ ffmpeg_branding="${FFMPEG_BRAND}" # sync with flags.gni GN_ARGS+= build_with_tflite_lib=false \ chrome_pgo_phase=0 \ clang_use_chrome_plugins=false \ disable_fieldtrial_testing_config=true \ enable_backup_ref_ptr_support=false \ enable_log_error_not_reached=true \ enable_hangout_services_extension=false \ enable_mdns=false \ enable_nacl=false \ enable_reading_list=false \ enable_remoting=false \ enable_reporting=false \ enable_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} < 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 || ${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 f6268bba601a..b26ebf8ea109 100644 --- a/www/ungoogled-chromium/distinfo +++ b/www/ungoogled-chromium/distinfo @@ -1,9 +1,9 @@ -TIMESTAMP = 1707897153 -SHA256 (chromium-121.0.6167.184.tar.xz) = 9fd6b82e7077ac26ec264bfcfc8ac8e0c2a0240378f035c9c0f34ad467aef09d -SIZE (chromium-121.0.6167.184.tar.xz) = 3351296496 -SHA256 (ungoogled-chromium-121.0.6167.184-1.tar.gz) = feb1039d4d5c13fbeb53736e0f0bbfea09c7d71af81bcc7b52d0fb42fd86a4a1 -SIZE (ungoogled-chromium-121.0.6167.184-1.tar.gz) = 666281 -SHA256 (chromium-121.0.6167.184-testdata.tar.xz) = 5d7a2db98f2dc8b3f405276e2c47c0caf60b469a8f31aac804ccd4779356fa61 -SIZE (chromium-121.0.6167.184-testdata.tar.xz) = 271163348 +TIMESTAMP = 1708892088 +SHA256 (chromium-122.0.6261.69.tar.xz) = f5bf4085ad3173883b45ea72b483d07f50ec3aa0f7546ac3837a9d26d0b4f9c0 +SIZE (chromium-122.0.6261.69.tar.xz) = 3416746640 +SHA256 (ungoogled-chromium-122.0.6261.69-1.tar.gz) = 6c2405ca58cae05ea1c8116495d7885a0f42f44ca3d70b2bd8f11c27abb23c52 +SIZE (ungoogled-chromium-122.0.6261.69-1.tar.gz) = 670261 +SHA256 (chromium-122.0.6261.69-testdata.tar.xz) = 2e66734827c136567a1d8f7bc5df2fa8f5558c78815509b60e1546089ae22b01 +SIZE (chromium-122.0.6261.69-testdata.tar.xz) = 282170324 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 a0b35734ba84..f4ede03ea198 100644 --- a/www/ungoogled-chromium/files/patch-BUILD.gn +++ b/www/ungoogled-chromium/files/patch-BUILD.gn @@ -1,89 +1,89 @@ ---- BUILD.gn.orig 2024-02-03 15:42:55 UTC +--- BUILD.gn.orig 2024-02-25 20:22:18 UTC +++ BUILD.gn -@@ -62,7 +62,7 @@ declare_args() { +@@ -63,7 +63,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) -@@ -94,7 +94,6 @@ group("gn_all") { +@@ -95,7 +95,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", -@@ -417,7 +416,7 @@ group("gn_all") { +@@ -425,7 +424,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", -@@ -609,6 +608,15 @@ group("gn_all") { +@@ -617,6 +616,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", -@@ -655,7 +663,7 @@ group("gn_all") { +@@ -663,7 +671,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)" ] } -@@ -1076,7 +1084,7 @@ if (use_blink && !is_cronet_build) { +@@ -1084,7 +1092,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 = [ -@@ -1166,7 +1174,7 @@ if (use_blink && !is_cronet_build) { +@@ -1175,7 +1183,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)" ] } -@@ -1175,7 +1183,7 @@ if (use_blink && !is_cronet_build) { +@@ -1184,7 +1192,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)" ] } -@@ -1616,7 +1624,7 @@ group("chromium_builder_perf") { +@@ -1634,7 +1642,7 @@ group("chromium_builder_perf") { data_deps += [ "//chrome/test:performance_browser_tests" ] } - if (!is_win) { + if (!is_win && !is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } diff --git a/www/ungoogled-chromium/files/patch-base_BUILD.gn b/www/ungoogled-chromium/files/patch-base_BUILD.gn index 16ea2291458f..ef521a04b43d 100644 --- a/www/ungoogled-chromium/files/patch-base_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-base_BUILD.gn @@ -1,143 +1,162 @@ ---- base/BUILD.gn.orig 2024-02-03 15:42:55 UTC +--- base/BUILD.gn.orig 2024-02-25 20:22:18 UTC +++ base/BUILD.gn -@@ -186,7 +186,7 @@ buildflag_header("ios_cronet_buildflags") { +@@ -187,7 +187,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" -@@ -1098,11 +1098,23 @@ component("base") { +@@ -1118,11 +1118,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" ] -@@ -1122,7 +1134,7 @@ component("base") { +@@ -1142,7 +1154,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" ] } -@@ -2077,6 +2089,22 @@ component("base") { +@@ -2088,6 +2100,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 += [ -@@ -2207,6 +2235,29 @@ component("base") { +@@ -2218,6 +2246,31 @@ 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", ++ "stack_canary_linux.cc", ++ "stack_canary_linux.h", + ] + sources += [ + "files/file_path_watcher_kqueue.cc", + "files/file_path_watcher_kqueue.h", + "files/file_path_watcher_bsd.cc", + "threading/platform_thread_bsd.cc", + ] + } + if (use_blink) { sources += [ "files/file_path_watcher.cc", -@@ -2217,7 +2268,7 @@ component("base") { +@@ -2228,7 +2281,7 @@ component("base") { } if (dep_libevent) { - deps += [ "//third_party/libevent" ] + public_deps += [ "//third_party/libevent" ] } if (use_libevent) { -@@ -3615,7 +3666,7 @@ test("base_unittests") { +@@ -2993,7 +3046,7 @@ if (is_apple) { + } + } + +-if (!is_nacl && (is_linux || is_chromeos)) { ++if (!is_nacl && !is_bsd && (is_linux || is_chromeos)) { + # This test must compile with -fstack-protector-all + source_set("stack_canary_linux_unittests") { + testonly = true +@@ -3629,14 +3682,14 @@ 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", -@@ -3637,7 +3688,7 @@ test("base_unittests") { + "nix/mime_util_xdg_unittest.cc", + ] + +- if (!is_nacl) { ++ if (!is_nacl && !is_bsd) { + deps += [ ":stack_canary_linux_unittests" ] + } + } +@@ -3651,7 +3704,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", -@@ -3648,7 +3699,7 @@ test("base_unittests") { +@@ -3662,7 +3715,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" ] } -@@ -3909,7 +3960,7 @@ test("base_unittests") { +@@ -3925,7 +3978,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 dcc48c6c3a9b..c65c98267491 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 2024-02-03 15:42:55 UTC +--- base/allocator/partition_allocator/partition_alloc.gni.orig 2024-02-25 20:22:18 UTC +++ base/allocator/partition_allocator/partition_alloc.gni -@@ -333,7 +333,7 @@ declare_args() { - # pkeys support is explicitly disabled in all Cronet builds, as some test +@@ -335,7 +335,7 @@ declare_args() { # dependencies that use partition_allocator are compiled in AOSP against a # version of glibc that does not include pkeys syscall numbers. -- enable_pkeys = is_linux && target_cpu == "x64" && !is_cronet_build -+ enable_pkeys = (is_linux && !is_bsd) && target_cpu == "x64" && !is_cronet_build + enable_pkeys = +- (is_linux || is_chromeos) && target_cpu == "x64" && !is_cronet_build ++ !is_bsd && (is_linux || is_chromeos) && target_cpu == "x64" && !is_cronet_build } - assert(!enable_pkeys || (is_linux && target_cpu == "x64"), - "Pkeys are only supported on x64 linux") + assert(!enable_pkeys || ((is_linux || is_chromeos) && target_cpu == "x64"), + "Pkeys are only supported on x64 linux and ChromeOS") diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn index 05b7ea1ba80d..f9bb6767d3ff 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig 2024-02-03 15:42:55 UTC +--- base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig 2024-02-25 20:22:18 UTC +++ base/allocator/partition_allocator/src/partition_alloc/BUILD.gn -@@ -855,7 +855,7 @@ if (is_clang_or_gcc) { +@@ -852,7 +852,7 @@ if (is_clang_or_gcc) { configs -= [ "//build/config/compiler:enable_arc" ] } } - if (is_chromeos || is_linux) { + if ((is_chromeos || is_linux) && !is_bsd) { shim_headers += [ "shim/allocator_shim_override_cpp_symbols.h", "shim/allocator_shim_override_glibc_weak_symbols.h", diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h index 71c8c2e23589..062ae211d75a 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h @@ -1,20 +1,20 @@ ---- base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h.orig 2023-12-23 12:33:28 UTC +--- base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h.orig 2024-02-25 20:22:18 UTC +++ base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h @@ -38,7 +38,7 @@ AslrMask(uintptr_t bits) { #if defined(ARCH_CPU_64_BITS) - #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) + #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) && !BUILDFLAG(IS_BSD) // We shouldn't allocate system pages at all for sanitizer builds. However, // we do, and if random hint addresses interfere with address ranges -@@ -124,7 +124,7 @@ AslrMask(uintptr_t bits) { +@@ -126,7 +126,7 @@ AslrMask(uintptr_t bits) { return AslrAddress(0x20000000ULL); } - #elif BUILDFLAG(IS_LINUX) + #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Linux on arm64 can use 39, 42, 48, or 52-bit user space, depending on // page size and number of levels of translation pages used. We use diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h index 65dd9d3e690c..cf46fed6f74e 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/page_allocator.h.orig 2023-12-23 12:33:28 UTC +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator.h.orig 2024-02-25 20:22:18 UTC +++ base/allocator/partition_allocator/src/partition_alloc/page_allocator.h -@@ -258,7 +258,7 @@ void DecommitAndZeroSystemPages(void* address, +@@ -256,7 +256,7 @@ bool DecommitAndZeroSystemPages(void* address, // recommitted. Do not assume that this will not change over time. constexpr PA_COMPONENT_EXPORT( PARTITION_ALLOC) bool DecommittedMemoryIsAlwaysZeroed() { -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) return false; #else return true; diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h index 175e765df3a7..d3bc48b0842c 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h @@ -1,38 +1,38 @@ ---- base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h.orig 2023-12-23 12:33:28 UTC +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h.orig 2024-02-25 20:22:18 UTC +++ base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h @@ -25,7 +25,7 @@ // elimination. #define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) --#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) -+#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) +-#elif (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)) && defined(ARCH_CPU_ARM64) ++#elif (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // This should work for all POSIX (if needed), but currently all other // supported OS/architecture combinations use either hard-coded values // (such as x86) or have means to determine these values without needing @@ -92,7 +92,7 @@ PageAllocationGranularityShift() { return 14; // 16kB #elif BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS) return static_cast(vm_page_shift); --#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) -+#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) +-#elif (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)) && defined(ARCH_CPU_ARM64) ++#elif (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // arm64 supports 4kb (shift = 12), 16kb (shift = 14), and 64kb (shift = 16) // page sizes. Retrieve from or initialize cache. size_t shift = page_characteristics.shift.load(std::memory_order_relaxed); @@ -113,7 +113,7 @@ PageAllocationGranularity() { // This is literally equivalent to |1 << PageAllocationGranularityShift()| // below, but was separated out for IS_APPLE to avoid << on a non-constexpr. return vm_page_size; --#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) -+#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) +-#elif (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)) && defined(ARCH_CPU_ARM64) ++#elif (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // arm64 supports 4kb, 16kb, and 64kb page sizes. Retrieve from or // initialize cache. size_t size = page_characteristics.size.load(std::memory_order_relaxed); -@@ -152,7 +152,7 @@ SystemPageShift() { - PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t +@@ -153,7 +153,7 @@ PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONS SystemPageSize() { #if (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ + (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_ARM64)) || \ - (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) // This is literally equivalent to |1 << SystemPageShift()| below, but was - // separated out for 64-bit IS_APPLE and arm64 on Linux to avoid << on a - // non-constexpr. + // separated out for 64-bit IS_APPLE and arm64 on Android/Linux to avoid << + // on a non-constexpr. diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h index 7e52a7b9473f..2c8226b34cdd 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h @@ -1,16 +1,16 @@ ---- base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h.orig 2023-12-23 12:33:28 UTC +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h.orig 2024-02-25 20:22:18 UTC +++ base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h -@@ -403,8 +403,12 @@ bool TryRecommitSystemPagesInternal( +@@ -411,8 +411,12 @@ bool TryRecommitSystemPagesInternal( void DiscardSystemPagesInternal(uintptr_t address, size_t length) { void* ptr = reinterpret_cast(address); -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) +#if BUILDFLAG(IS_BSD) + int ret = madvise(ptr, length, MADV_FREE); +#else int ret = madvise(ptr, length, MADV_FREE_REUSABLE); +#endif if (ret) { // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED. ret = madvise(ptr, length, MADV_DONTNEED); diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__address__space.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__address__space.cc index 150fce78566c..60d77fc19b01 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__address__space.cc +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__address__space.cc @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_address_space.cc.orig 2023-12-23 12:33:28 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_address_space.cc.orig 2024-02-25 20:22:18 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_address_space.cc -@@ -420,7 +420,7 @@ void PartitionAddressSpace::UninitThreadIsolatedPoolFo +@@ -421,7 +421,7 @@ void PartitionAddressSpace::UninitThreadIsolatedPoolFo } #endif --#if BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) +-#if (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)) && defined(ARCH_CPU_ARM64) ++#if (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) PageCharacteristics page_characteristics; diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_compiler__specific.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_compiler__specific.h deleted file mode 100644 index 4431128e9ba9..000000000000 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_compiler__specific.h +++ /dev/null @@ -1,32 +0,0 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h.orig 2023-12-23 12:33:28 UTC -+++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h -@@ -24,9 +24,9 @@ - // Annotate a function indicating it should not be inlined. - // Use like: - // NOINLINE void DoStuff() { ... } --#if defined(__clang__) && PA_HAS_ATTRIBUTE(noinline) -+#if defined(__clang__) && (__clang_major__ >= 15) && PA_HAS_ATTRIBUTE(noinline) - #define PA_NOINLINE [[clang::noinline]] --#elif defined(COMPILER_GCC) && PA_HAS_ATTRIBUTE(noinline) -+#elif (defined(COMPILER_GCC) || defined(__clang__)) && PA_HAS_ATTRIBUTE(noinline) - #define PA_NOINLINE __attribute__((noinline)) - #elif defined(COMPILER_MSVC) - #define PA_NOINLINE __declspec(noinline) -@@ -34,7 +34,7 @@ - #define PA_NOINLINE - #endif - --#if defined(__clang__) && defined(NDEBUG) && PA_HAS_ATTRIBUTE(always_inline) -+#if defined(__clang__) && (__clang_major__ >= 15) && defined(NDEBUG) && PA_HAS_ATTRIBUTE(always_inline) - #define PA_ALWAYS_INLINE [[clang::always_inline]] inline - #elif defined(COMPILER_GCC) && defined(NDEBUG) && \ - PA_HAS_ATTRIBUTE(always_inline) -@@ -53,7 +53,7 @@ - // prevent code folding, see NO_CODE_FOLDING() in base/debug/alias.h. - // Use like: - // void NOT_TAIL_CALLED FooBar(); --#if defined(__clang__) && PA_HAS_ATTRIBUTE(not_tail_called) -+#if defined(__clang__) && (__clang_major__ >= 15) && PA_HAS_ATTRIBUTE(not_tail_called) - #define PA_NOT_TAIL_CALLED [[clang::not_tail_called]] - #else - #define PA_NOT_TAIL_CALLED 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 1691ac5222bf..8588d9ff779a 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 2024-02-03 15:42:55 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc.orig 2024-02-25 20:22:18 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc -@@ -12,11 +12,11 @@ - #include - #include +@@ -13,11 +13,11 @@ + #include "partition_alloc/partition_alloc_base/posix/eintr_wrapper.h" + #include "partition_alloc/partition_alloc_base/strings/safe_sprintf.h" -#if !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) #include #endif -@@ -24,7 +24,7 @@ namespace partition_alloc::internal::base::debug { +@@ -25,7 +25,7 @@ namespace partition_alloc::internal::base::debug { namespace { -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) - constexpr size_t kBufferSize = 4096u; - -@@ -358,7 +358,7 @@ void PrintStackTraceInternal(const void** trace, size_ + // On Android the 'open' function has two versions: + // int open(const char *pathname, int flags); +@@ -369,7 +369,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_rand__util__posix.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc index a9500c88ce31..3d45f90f522d 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc @@ -1,13 +1,13 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc.orig 2023-12-23 12:33:28 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc.orig 2024-02-25 20:22:18 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc -@@ -90,6 +90,10 @@ void RandBytes(void* output, size_t output_length) { +@@ -102,6 +102,10 @@ void RandBytes(void* output, size_t output_length) { if (getentropy(output, output_length) == 0) { return; } +#elif BUILDFLAG(IS_BSD) + if (getentropy(output, output_length) == 0) { + return; + } #endif // If getrandom(2) above returned with an error and the /dev/urandom fallback // took place on Linux/ChromeOS bots, they would fail with a CHECK in diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h new file mode 100644 index 000000000000..261ac863f183 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h @@ -0,0 +1,11 @@ +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h.orig 2024-02-25 20:22:18 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h +@@ -37,6 +37,8 @@ typedef DWORD PlatformThreadId; + typedef zx_handle_t PlatformThreadId; + #elif BUILDFLAG(IS_APPLE) + typedef mach_port_t PlatformThreadId; ++#elif BUILDFLAG(IS_BSD) ++typedef uint64_t PlatformThreadId; + #elif BUILDFLAG(IS_POSIX) + typedef pid_t PlatformThreadId; + #endif diff --git a/www/ungoogled-chromium/files/patch-base_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 04d72ef5dc44..38d7db07cc13 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 2024-02-03 15:42:55 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc.orig 2024-02-25 20:22:18 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc -@@ -17,7 +17,7 @@ +@@ -18,7 +18,7 @@ #include "partition_alloc/partition_alloc_base/logging.h" #include "partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h" -#if 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 2c7dcf90d524..ed2d611605c4 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h @@ -1,20 +1,20 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig 2024-02-03 15:42:55 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig 2024-02-25 20:22:18 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h -@@ -255,7 +255,7 @@ constexpr bool kUseLazyCommit = false; +@@ -251,7 +251,7 @@ constexpr bool kUseLazyCommit = false; // On these platforms, lock all the partitions before fork(), and unlock after. // This may be required on more platforms in the future. #define PA_CONFIG_HAS_ATFORK_HANDLER() \ - (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // PartitionAlloc uses PartitionRootEnumerator to acquire all // PartitionRoots at BeforeFork and to release at AfterFork. -@@ -301,7 +301,7 @@ constexpr bool kUseLazyCommit = false; +@@ -299,7 +299,7 @@ constexpr bool kUseLazyCommit = false; // // Also enabled on ARM64 macOS, as the 16kiB pages on this platform lead to // larger slot spans. -#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) +#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_BSD) #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 69d14e15a403..44896d379a92 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 2024-02-03 15:42:55 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h.orig 2024-02-25 20:22:18 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h -@@ -111,7 +111,7 @@ PartitionPageShift() { - return 18; // 256 KiB +@@ -112,7 +112,7 @@ PartitionPageShift() { } #elif (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ + (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_ARM64)) || \ - (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t PartitionPageShift() { return PageAllocationGranularityShift() + 2; -@@ -313,7 +313,8 @@ constexpr size_t kNumPools = kMaxPoolHandle - 1; +@@ -314,7 +314,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_allocator_partition__allocator_src_partition__alloc_partition__page__constants.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__page__constants.h index 41a6e87ea5f6..41e4f9c75188 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__page__constants.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__page__constants.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h.orig 2023-12-23 12:33:28 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h.orig 2024-02-25 20:22:18 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h @@ -16,7 +16,7 @@ namespace partition_alloc::internal { // (1 << 12 or 1 << 14), as checked in PartitionRoot::Init(). And // PartitionPageSize() is 4 times the OS page size. static constexpr size_t kMaxSlotsPerSlotSpan = 4 * (1 << 14) / kSmallestBucket; --#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) -+#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) +-#elif (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)) && defined(ARCH_CPU_ARM64) ++#elif (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // System page size can be 4, 16, or 64 kiB on Linux on arm64. 64 kiB is // currently (kMaxSlotsPerSlotSpanBits == 13) not supported by the code, // so we use the 16 kiB maximum (64 kiB will crash). diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc index d4c8f066a440..ae4d14863fe3 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc @@ -1,38 +1,38 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig 2023-12-23 12:33:28 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig 2024-02-25 20:22:18 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_root.cc @@ -47,7 +47,7 @@ #include "wow64apiset.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #endif -@@ -281,7 +281,7 @@ void PartitionAllocMallocInitOnce() { +@@ -278,7 +278,7 @@ void PartitionAllocMallocInitOnce() { return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // When fork() is called, only the current thread continues to execute in the // child process. If the lock is held, but *not* by this thread when fork() is // called, we have a deadlock. -@@ -379,7 +379,7 @@ static size_t PartitionPurgeSlotSpan(PartitionRoot* ro - constexpr size_t kMaxSlotCount = +@@ -377,7 +377,7 @@ static size_t PartitionPurgeSlotSpan(PartitionRoot* ro (PartitionPageSize() * kMaxPartitionPagesPerRegularSlotSpan) / MinPurgeableSlotSize(); --#elif BUILDFLAG(IS_APPLE) || (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) -+#elif BUILDFLAG(IS_APPLE) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) + #elif BUILDFLAG(IS_APPLE) || \ +- ((BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)) && \ ++ ((BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && \ + defined(ARCH_CPU_ARM64)) // It's better for slot_usage to be stack-allocated and fixed-size, which // demands that its size be constexpr. On IS_APPLE and Linux on arm64, - // PartitionPageSize() is always SystemPageSize() << 2, so regardless of -@@ -948,7 +948,7 @@ void PartitionRoot::Init(PartitionOptions opts) { +@@ -942,7 +942,7 @@ void PartitionRoot::Init(PartitionOptions opts) { // apple OSes. PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) || (internal::SystemPageSize() == (size_t{1} << 14))); -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // Check runtime pagesize. Though the code is currently the same, it is // not merged with the IS_APPLE case above as a 1 << 16 case needs to be // added here in the future, to allow 64 kiB pagesize. That is only diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc index 63bfe6e25db8..6e0c280bc2bc 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc @@ -1,53 +1,53 @@ ---- base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc.orig 2023-12-23 12:33:28 UTC +--- base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc.orig 2024-02-25 20:22:18 UTC +++ base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc -@@ -18,7 +18,16 @@ +@@ -17,7 +17,16 @@ + #endif #if PA_CONFIG(HAS_LINUX_KERNEL) - #include +#if defined(OS_OPENBSD) +#include +#include +#elif defined(OS_FREEBSD) +#include +#include +#include +#else #include +#endif #include #include - #endif // PA_CONFIG(HAS_LINUX_KERNEL) -@@ -108,8 +117,16 @@ void SpinningMutex::FutexWait() { + +@@ -109,8 +118,16 @@ void SpinningMutex::FutexWait() { // |kLockedContended| anymore. Note that even without spurious wakeups, the // value of |state_| is not guaranteed when this returns, as another thread // may get the lock before we get to run. +#if defined(OS_FREEBSD) + int err = _umtx_op(&state_, UMTX_OP_WAIT_UINT_PRIVATE, + kLockedContended, nullptr, nullptr); +#elif defined(OS_OPENBSD) + int err = futex(reinterpret_cast(&state_), FUTEX_WAIT | FUTEX_PRIVATE_FLAG, + kLockedContended, nullptr, nullptr); +#else int err = syscall(SYS_futex, &state_, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, kLockedContended, nullptr, nullptr, 0); +#endif if (err) { // These are programming error, check them. -@@ -121,8 +138,16 @@ void SpinningMutex::FutexWait() { +@@ -122,8 +139,16 @@ void SpinningMutex::FutexWait() { void SpinningMutex::FutexWake() { int saved_errno = errno; +#if defined(OS_FREEBSD) + long retval = _umtx_op(&state_, UMTX_OP_WAKE_PRIVATE, + 1 /* wake up a single waiter */, nullptr, nullptr); +#elif defined(OS_OPENBSD) + long retval = futex(reinterpret_cast(&state_), FUTEX_WAKE | FUTEX_PRIVATE_FLAG, + 1 /* wake up a single waiter */, nullptr, nullptr); +#else long retval = syscall(SYS_futex, &state_, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1 /* wake up a single waiter */, nullptr, nullptr, 0); +#endif PA_CHECK(retval != -1); errno = saved_errno; } diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc new file mode 100644 index 000000000000..79bb0bad544d --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc @@ -0,0 +1,11 @@ +--- base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc.orig 2024-02-25 20:22:18 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc +@@ -16,7 +16,7 @@ + #include "partition_alloc/partition_alloc_check.h" + #include "partition_alloc/thread_isolation/thread_isolation.h" + +-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) + #error "This pkey code is currently only supported on Linux and ChromeOS" + #endif + diff --git a/www/ungoogled-chromium/files/patch-base_base__switches.cc b/www/ungoogled-chromium/files/patch-base_base__switches.cc index 974929fef847..50c791b95619 100644 --- a/www/ungoogled-chromium/files/patch-base_base__switches.cc +++ b/www/ungoogled-chromium/files/patch-base_base__switches.cc @@ -1,11 +1,11 @@ ---- base/base_switches.cc.orig 2023-10-13 13:20:35 UTC +--- base/base_switches.cc.orig 2024-02-25 20:22:18 UTC +++ base/base_switches.cc -@@ -180,7 +180,7 @@ const char kPackageVersionName[] = "package-version-na +@@ -172,7 +172,7 @@ const char kPackageVersionName[] = "package-version-na const char kPackageVersionCode[] = "package-version-code"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1176772): Remove kEnableCrashpad and IsCrashpadEnabled() when // Crashpad is fully enabled on Linux. Indicates that Crashpad should be // enabled. diff --git a/www/ungoogled-chromium/files/patch-base_base__switches.h b/www/ungoogled-chromium/files/patch-base_base__switches.h index 8fdb3bfab9e2..60dde09bd511 100644 --- a/www/ungoogled-chromium/files/patch-base_base__switches.h +++ b/www/ungoogled-chromium/files/patch-base_base__switches.h @@ -1,11 +1,11 @@ ---- base/base_switches.h.orig 2023-10-13 13:20:35 UTC +--- base/base_switches.h.orig 2024-02-25 20:22:18 UTC +++ base/base_switches.h -@@ -62,7 +62,7 @@ extern const char kPackageVersionName[]; +@@ -60,7 +60,7 @@ extern const char kPackageVersionName[]; extern const char kPackageVersionCode[]; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1176772): Remove kEnableCrashpad and IsCrashpadEnabled() when // Crashpad is fully enabled on Linux. extern const char kEnableCrashpad[]; diff --git a/www/ungoogled-chromium/files/patch-base_compiler__specific.h b/www/ungoogled-chromium/files/patch-base_compiler__specific.h index 993dd32e52f5..95071ee1c4c9 100644 --- a/www/ungoogled-chromium/files/patch-base_compiler__specific.h +++ b/www/ungoogled-chromium/files/patch-base_compiler__specific.h @@ -1,35 +1,11 @@ ---- base/compiler_specific.h.orig 2024-02-03 15:42:55 UTC +--- base/compiler_specific.h.orig 2024-02-25 20:22:18 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) -@@ -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 -@@ -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]] +@@ -316,7 +316,7 @@ + // + // In some cases it's desirable to remove this, e.g. on hot functions, or if + // we have purposely changed the reference canary. +-#if defined(COMPILER_GCC) || defined(__clang__) ++#if (defined(COMPILER_GCC) || defined(__clang__)) && !defined(__OpenBSD__) && !defined(__FreeBSD__) + #if HAS_ATTRIBUTE(__no_stack_protector__) + #define NO_STACK_PROTECTOR __attribute__((__no_stack_protector__)) #else - #define NOT_TAIL_CALLED 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 b597267cc7f9..907b6adfe9cb 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 2024-02-03 15:42:55 UTC +--- base/files/file_path_watcher_unittest.cc.orig 2024-02-25 20:22:18 UTC +++ base/files/file_path_watcher_unittest.cc -@@ -836,7 +836,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) { +@@ -847,7 +847,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. -@@ -1772,7 +1772,7 @@ namespace { +@@ -1783,7 +1783,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; -@@ -1806,7 +1806,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi +@@ -1817,7 +1817,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 55558c3efc75..6e03bee4018c 100644 --- a/www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc @@ -1,53 +1,53 @@ ---- base/files/file_util_posix.cc.orig 2024-02-03 15:42:55 UTC +--- base/files/file_util_posix.cc.orig 2024-02-25 20:22:18 UTC +++ base/files/file_util_posix.cc -@@ -772,33 +772,34 @@ bool CreateDirectoryAndGetError(const FilePath& full_p +@@ -779,33 +779,34 @@ bool CreateDirectoryAndGetError(const FilePath& full_p File::Error* error) { ScopedBlockingCall scoped_blocking_call( FROM_HERE, BlockingType::MAY_BLOCK); // For call to mkdir(). + const FilePath kFileSystemRoot("/"); std::vector subpaths; // Collect a list of all parent directories. FilePath last_path = full_path; - subpaths.push_back(full_path); + if (full_path != kFileSystemRoot) + subpaths.push_back(full_path); for (FilePath path = full_path.DirName(); - path.value() != last_path.value(); path = path.DirName()) { + (path.value() != last_path.value() && + (path != kFileSystemRoot)); path = path.DirName()) { subpaths.push_back(path); last_path = path; } // Iterate through the parents and create the missing ones. for (const FilePath& subpath : base::Reversed(subpaths)) { - if (DirectoryExists(subpath)) - continue; - if (mkdir(subpath.value().c_str(), 0700) == 0) - continue; - // Mkdir failed, but it might have failed with EEXIST, or some other error - // due to the directory appearing out of thin air. This can occur if - // two processes are trying to create the same file system tree at the same - // time. Check to see if it exists and make sure it is a directory. - int saved_errno = errno; - if (!DirectoryExists(subpath)) { - if (error) - *error = File::OSErrorToFileError(saved_errno); - errno = saved_errno; - return false; + if (!PathExists(subpath)) { + if ((mkdir(subpath.value().c_str(), 0700) == -1) && + ((full_path != subpath) ? (errno != ENOENT) : (-1))) { + int saved_errno = errno; + if (error) + *error = File::OSErrorToFileError(saved_errno); + return false; + } + } else if (!DirectoryExists(subpath)) { + if (error) + *error = File::OSErrorToFileError(ENOTDIR); + return false; } } return true; diff --git a/www/ungoogled-chromium/files/patch-base_files_file__util__unittest.cc b/www/ungoogled-chromium/files/patch-base_files_file__util__unittest.cc index 02e88eb5efc5..8cf070b985d7 100644 --- a/www/ungoogled-chromium/files/patch-base_files_file__util__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_files_file__util__unittest.cc @@ -1,20 +1,20 @@ ---- base/files/file_util_unittest.cc.orig 2023-12-23 12:33:28 UTC +--- base/files/file_util_unittest.cc.orig 2024-02-25 20:22:18 UTC +++ base/files/file_util_unittest.cc -@@ -3878,7 +3878,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { +@@ -3869,7 +3869,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { } #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) TEST_F(FileUtilTest, ReadFileToStringWithProcFileSystem) { FilePath file_path("/proc/cpuinfo"); std::string data = "temp"; -@@ -4601,7 +4601,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles +@@ -4592,7 +4592,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles NULL); #else size_t bytes_written = - ::write(::fileno(output_file.get()), content.c_str(), content.length()); + ::write(fileno(output_file.get()), content.c_str(), content.length()); #endif EXPECT_EQ(content.length(), bytes_written); ::fflush(output_file.get()); diff --git a/www/ungoogled-chromium/files/patch-base_functional_unretained__traits.h b/www/ungoogled-chromium/files/patch-base_functional_unretained__traits.h index e0916fa7404d..2689b8f3c9b1 100644 --- a/www/ungoogled-chromium/files/patch-base_functional_unretained__traits.h +++ b/www/ungoogled-chromium/files/patch-base_functional_unretained__traits.h @@ -1,11 +1,11 @@ ---- base/functional/unretained_traits.h.orig 2023-02-11 09:11:04 UTC +--- base/functional/unretained_traits.h.orig 2024-02-25 20:22:18 UTC +++ base/functional/unretained_traits.h -@@ -130,7 +130,7 @@ struct TypeSupportsUnretained { +@@ -99,7 +99,7 @@ struct SupportsUnretainedImpl { // official builds, and then in non-test code as well. - #if !defined(UNIT_TEST) && !defined(OFFICIAL_BUILD) - #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ -- defined(FORCE_UNRETAINED_COMPLETENESS_CHECKS_FOR_TESTS) -+ || BUILDFLAGS(IS_BSD) || defined(FORCE_UNRETAINED_COMPLETENESS_CHECKS_FOR_TESTS) - static_assert(IsCompleteTypeV || - IsIncompleteTypeSafeForUnretained>, - "T must be fully defined."); + #if defined(FORCE_UNRETAINED_COMPLETENESS_CHECKS_FOR_TESTS) || \ + (!defined(UNIT_TEST) && !defined(OFFICIAL_BUILD) && \ +- (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN))) ++ (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD))) + static_assert(v, + "Argument requires unretained storage, but type is not " + "fully defined. This prevents determining whether " diff --git a/www/ungoogled-chromium/files/patch-base_process_kill.h b/www/ungoogled-chromium/files/patch-base_process_kill.h index 8470d2dbfea6..874e399762b9 100644 --- a/www/ungoogled-chromium/files/patch-base_process_kill.h +++ b/www/ungoogled-chromium/files/patch-base_process_kill.h @@ -1,11 +1,11 @@ ---- base/process/kill.h.orig 2022-10-01 07:40:07 UTC +--- base/process/kill.h.orig 2024-02-25 20:22:18 UTC +++ base/process/kill.h -@@ -113,7 +113,7 @@ BASE_EXPORT TerminationStatus GetTerminationStatus(Pro +@@ -121,7 +121,7 @@ BASE_EXPORT TerminationStatus GetTerminationStatus(Pro BASE_EXPORT TerminationStatus GetKnownDeadTerminationStatus( ProcessHandle handle, int* exit_code); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Spawns a thread to wait asynchronously for the child |process| to exit // and then reaps it. BASE_EXPORT void EnsureProcessGetsReaped(Process process); diff --git a/www/ungoogled-chromium/files/patch-base_process_launch__posix.cc b/www/ungoogled-chromium/files/patch-base_process_launch__posix.cc index 75b6612ffbd1..522a9fe1f079 100644 --- a/www/ungoogled-chromium/files/patch-base_process_launch__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_process_launch__posix.cc @@ -1,12 +1,12 @@ ---- base/process/launch_posix.cc.orig 2022-10-01 07:40:07 UTC +--- base/process/launch_posix.cc.orig 2024-02-25 20:22:18 UTC +++ base/process/launch_posix.cc -@@ -64,6 +64,9 @@ +@@ -61,6 +61,9 @@ #error "macOS should use launch_mac.cc" #endif +#if defined(OS_FREEBSD) +#pragma weak environ +#endif extern char** environ; namespace base { diff --git a/www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc b/www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc index 983679187903..9d28322389c4 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc @@ -1,219 +1,227 @@ ---- base/process/process_metrics_openbsd.cc.orig 2023-09-17 07:59:53 UTC +--- base/process/process_metrics_openbsd.cc.orig 2024-02-25 20:22:18 UTC +++ base/process/process_metrics_openbsd.cc @@ -6,14 +6,23 @@ #include #include +#include #include #include +#include +#include + #include "base/memory/ptr_util.h" #include "base/process/process_metrics_iocounters.h" +#include "base/values.h" +#include "base/notreached.h" namespace base { +ProcessMetrics::ProcessMetrics(ProcessHandle process) + : process_(process) {} + // static std::unique_ptr ProcessMetrics::CreateProcessMetrics( ProcessHandle process) { -@@ -24,49 +33,23 @@ bool ProcessMetrics::GetIOCounters(IoCounters* io_coun +@@ -24,52 +33,26 @@ bool ProcessMetrics::GetIOCounters(IoCounters* io_coun return false; } -static int GetProcessCPU(pid_t pid) { +TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { struct kinfo_proc info; - size_t length; - int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid, - sizeof(struct kinfo_proc), 0 }; + size_t length = sizeof(struct kinfo_proc); + struct timeval tv; - if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) < 0) - return -1; + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_, + sizeof(struct kinfo_proc), 1 }; - mib[5] = (length / sizeof(struct kinfo_proc)); - if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) - return 0; + return TimeDelta(); - return info.p_pctcpu; -} + tv.tv_sec = info.p_rtime_sec; + tv.tv_usec = info.p_rtime_usec; -double ProcessMetrics::GetPlatformIndependentCPUUsage() { - TimeTicks time = TimeTicks::Now(); - - if (last_cpu_time_.is_zero()) { - // First call, just set the last values. - last_cpu_time_ = time; - return 0; - } - - int cpu = GetProcessCPU(process_); - - last_cpu_time_ = time; - double percentage = static_cast((cpu * 100.0) / FSCALE); - - return percentage; + return Microseconds(TimeValToMicroseconds(tv)); } -TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { - NOTREACHED(); - return TimeDelta(); -} - -ProcessMetrics::ProcessMetrics(ProcessHandle process) - : process_(process), - last_cpu_(0) {} - size_t GetSystemCommitCharge() { int mib[] = { CTL_VM, VM_METER }; - int pagesize; -@@ -84,6 +67,133 @@ size_t GetSystemCommitCharge() { - pagesize = getpagesize(); +- int pagesize; ++ size_t pagesize; + struct vmtotal vmtotal; + unsigned long mem_total, mem_free, mem_inactive; + size_t len = sizeof(vmtotal); +@@ -81,9 +64,136 @@ size_t GetSystemCommitCharge() { + mem_free = vmtotal.t_free; + mem_inactive = vmtotal.t_vm - vmtotal.t_avm; + +- pagesize = getpagesize(); ++ pagesize = checked_cast(getpagesize()); return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize); +} + +int ProcessMetrics::GetOpenFdCount() const { +#if 0 + struct kinfo_file *files; + kvm_t *kd = NULL; + int total_count = 0; + char errbuf[_POSIX2_LINE_MAX]; + + if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL) + goto out; + + if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, process_, + sizeof(struct kinfo_file), &total_count)) == NULL) { + total_count = 0; + goto out; + } + + kvm_close(kd); + +out: + return total_count; +#endif + return getdtablecount(); +} + +int ProcessMetrics::GetOpenFdSoftLimit() const { + return getdtablesize(); +// return GetMaxFds(); +} + +uint64_t ProcessMetrics::GetVmSwapBytes() const { + NOTIMPLEMENTED(); + return 0; +} + +bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo) { + NOTIMPLEMENTED_LOG_ONCE(); + return false; +} + +bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) { + NOTIMPLEMENTED(); + return false; +} + +bool GetVmStatInfo(VmStatInfo* vmstat) { + NOTIMPLEMENTED(); + return false; +} + +int ProcessMetrics::GetIdleWakeupsPerSecond() { + NOTIMPLEMENTED(); + return 0; +} + +Value::Dict SystemMemoryInfoKB::ToDict() const { + Value::Dict res; + res.Set("total", total); + res.Set("free", free); + res.Set("available", available); + res.Set("buffers", buffers); + res.Set("cached", cached); + res.Set("active_anon", active_anon); + res.Set("inactive_anon", inactive_anon); + res.Set("active_file", active_file); + res.Set("inactive_file", inactive_file); + res.Set("swap_total", swap_total); + res.Set("swap_free", swap_free); + res.Set("swap_used", swap_total - swap_free); + res.Set("dirty", dirty); + res.Set("reclaimable", reclaimable); + + NOTIMPLEMENTED(); + + return res; +} + +Value::Dict VmStatInfo::ToDict() const { + Value::Dict res; + res.Set("pswpin", static_cast(pswpin)); + res.Set("pswpout", static_cast(pswpout)); + res.Set("pgmajfault", static_cast(pgmajfault)); + + NOTIMPLEMENTED(); + + return res; +} + +SystemDiskInfo::SystemDiskInfo() { + reads = 0; + reads_merged = 0; + sectors_read = 0; + read_time = 0; + writes = 0; + writes_merged = 0; + sectors_written = 0; + write_time = 0; + io = 0; + io_time = 0; + weighted_io_time = 0; +} + +SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo&) = default; + +SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default; + +Value::Dict SystemDiskInfo::ToDict() const { + Value::Dict res; + + // Write out uint64_t variables as doubles. + // Note: this may discard some precision, but for JS there's no other option. + res.Set("reads", static_cast(reads)); + res.Set("reads_merged", static_cast(reads_merged)); + res.Set("sectors_read", static_cast(sectors_read)); + res.Set("read_time", static_cast(read_time)); + res.Set("writes", static_cast(writes)); + res.Set("writes_merged", static_cast(writes_merged)); + res.Set("sectors_written", static_cast(sectors_written)); + res.Set("write_time", static_cast(write_time)); + res.Set("io", static_cast(io)); + res.Set("io_time", static_cast(io_time)); + res.Set("weighted_io_time", static_cast(weighted_io_time)); + + NOTIMPLEMENTED(); + + return res; } } // namespace base diff --git a/www/ungoogled-chromium/files/patch-base_process_process__metrics__unittest.cc b/www/ungoogled-chromium/files/patch-base_process_process__metrics__unittest.cc index c20469935b12..a65bb10b94b5 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__metrics__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics__unittest.cc @@ -1,18 +1,12 @@ ---- base/process/process_metrics_unittest.cc.orig 2023-12-23 12:33:28 UTC +--- base/process/process_metrics_unittest.cc.orig 2024-02-25 20:22:18 UTC +++ base/process/process_metrics_unittest.cc -@@ -35,13 +35,13 @@ - #include - #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/process/internal_linux.h" - #endif +@@ -54,7 +54,8 @@ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) -+ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) || \ ++ BUILDFLAG(IS_BSD) #define ENABLE_CPU_TESTS 1 #else #define ENABLE_CPU_TESTS 0 diff --git a/www/ungoogled-chromium/files/patch-base_rand__util.h b/www/ungoogled-chromium/files/patch-base_rand__util.h index 114f20ea622e..515814d31102 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 2024-02-03 15:42:55 UTC +--- base/rand_util.h.orig 2024-02-25 20:22:18 UTC +++ base/rand_util.h -@@ -146,7 +146,7 @@ void RandomShuffle(Itr first, Itr last) { +@@ -149,7 +149,7 @@ void RandomShuffle(Itr first, Itr last) { std::shuffle(first, last, RandomBitGenerator()); } -#if BUILDFLAG(IS_POSIX) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_BSD) BASE_EXPORT int GetUrandomFD(); #endif diff --git a/www/ungoogled-chromium/files/patch-base_rand__util__posix.cc b/www/ungoogled-chromium/files/patch-base_rand__util__posix.cc index 42df3862c35d..6aba6acff1cc 100644 --- a/www/ungoogled-chromium/files/patch-base_rand__util__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_rand__util__posix.cc @@ -1,62 +1,62 @@ ---- base/rand_util_posix.cc.orig 2023-11-04 07:08:51 UTC +--- base/rand_util_posix.cc.orig 2024-02-25 20:22:18 UTC +++ base/rand_util_posix.cc -@@ -22,7 +22,7 @@ +@@ -23,7 +23,7 @@ #include "base/time/time.h" #include "build/build_config.h" -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) #include "third_party/lss/linux_syscall_support.h" #elif BUILDFLAG(IS_MAC) // TODO(crbug.com/995996): Waiting for this header to appear in the iOS SDK. -@@ -39,6 +39,7 @@ namespace base { +@@ -40,6 +40,7 @@ namespace base { namespace { +#if !BUILDFLAG(IS_BSD) #if BUILDFLAG(IS_AIX) // AIX has no 64-bit support for O_CLOEXEC. static constexpr int kOpenFlags = O_RDONLY; -@@ -63,10 +64,11 @@ class URandomFd { +@@ -64,10 +65,11 @@ class URandomFd { private: const int fd_; }; +#endif #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ BUILDFLAG(IS_ANDROID)) && \ - !BUILDFLAG(IS_NACL) + !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) // TODO(pasko): Unify reading kernel version numbers in: // mojo/core/channel_linux.cc // chrome/browser/android/seccomp_support_detector.cc -@@ -176,6 +178,7 @@ bool UseBoringSSLForRandBytes() { +@@ -177,6 +179,7 @@ bool UseBoringSSLForRandBytes() { namespace { - void RandBytes(void* output, size_t output_length, bool avoid_allocation) { + void RandBytes(span output, bool avoid_allocation) { +#if !BUILDFLAG(IS_BSD) #if !BUILDFLAG(IS_NACL) // The BoringSSL experiment takes priority over everything else. if (!avoid_allocation && internal::UseBoringSSLForRandBytes()) { -@@ -214,6 +217,9 @@ void RandBytes(void* output, size_t output_length, boo - const bool success = - ReadFromFD(urandom_fd, static_cast(output), output_length); +@@ -215,6 +218,9 @@ void RandBytes(span output, bool avoid_alloca + const int urandom_fd = GetUrandomFD(); + const bool success = ReadFromFD(urandom_fd, as_writable_chars(output)); CHECK(success); +#else -+ arc4random_buf(static_cast(output), output_length); ++ arc4random_buf(output.data(), output.size()); +#endif } } // namespace -@@ -233,9 +239,11 @@ void RandBytes(void* output, size_t output_length) { - RandBytes(output, output_length, /*avoid_allocation=*/false); +@@ -239,9 +245,11 @@ void RandBytes(void* output, size_t output_length) { + RandBytes(make_span(reinterpret_cast(output), output_length)); } +#if !BUILDFLAG(IS_BSD) int GetUrandomFD() { static NoDestructor urandom_fd; return urandom_fd->fd(); } +#endif } // namespace base diff --git a/www/ungoogled-chromium/files/patch-base_synchronization_lock__impl.h b/www/ungoogled-chromium/files/patch-base_synchronization_lock__impl.h index d75c80809b73..e6f4587deb66 100644 --- a/www/ungoogled-chromium/files/patch-base_synchronization_lock__impl.h +++ b/www/ungoogled-chromium/files/patch-base_synchronization_lock__impl.h @@ -1,23 +1,23 @@ ---- base/synchronization/lock_impl.h.orig 2023-04-08 11:38:38 UTC +--- base/synchronization/lock_impl.h.orig 2024-02-25 20:22:18 UTC +++ base/synchronization/lock_impl.h -@@ -104,6 +104,10 @@ void LockImpl::Unlock() { +@@ -106,6 +106,10 @@ void LockImpl::Unlock() { } #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FREEBSD) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wthread-safety-analysis" +#endif #if DCHECK_IS_ON() BASE_EXPORT void dcheck_trylock_result(int rv); -@@ -124,6 +128,9 @@ void LockImpl::Unlock() { +@@ -126,6 +130,9 @@ void LockImpl::Unlock() { dcheck_unlock_result(rv); #endif } +#if BUILDFLAG(IS_FREEBSD) +#pragma GCC diagnostic pop +#endif #endif // This is an implementation used for AutoLock templated on the lock type. diff --git a/www/ungoogled-chromium/files/patch-base_system_sys__info__openbsd.cc b/www/ungoogled-chromium/files/patch-base_system_sys__info__openbsd.cc index be70d3027d8d..8f10ea2d33fe 100644 --- a/www/ungoogled-chromium/files/patch-base_system_sys__info__openbsd.cc +++ b/www/ungoogled-chromium/files/patch-base_system_sys__info__openbsd.cc @@ -1,87 +1,94 @@ ---- base/system/sys_info_openbsd.cc.orig 2023-11-04 07:08:51 UTC +--- base/system/sys_info_openbsd.cc.orig 2024-02-25 20:22:18 UTC +++ base/system/sys_info_openbsd.cc -@@ -12,6 +12,7 @@ +@@ -3,7 +3,6 @@ + // found in the LICENSE file. + + #include "base/system/sys_info.h" +- + #include + #include + #include +@@ -12,6 +11,7 @@ #include "base/notreached.h" #include "base/posix/sysctl.h" +#include "base/strings/string_util.h" namespace { -@@ -27,9 +28,15 @@ uint64_t AmountOfMemory(int pages_name) { +@@ -27,9 +27,14 @@ uint64_t AmountOfMemory(int pages_name) { namespace base { +// pledge(2) -+int64_t aofpmem = 0; -+int64_t aofapmem = 0; -+int64_t shmmax = 0; ++uint64_t aofpmem = 0; ++uint64_t shmmax = 0; +char cpumodel[256]; + // static int SysInfo::NumberOfProcessors() { - int mib[] = {CTL_HW, HW_NCPU}; + int mib[] = {CTL_HW, HW_NCPUONLINE}; int ncpu; size_t size = sizeof(ncpu); if (sysctl(mib, std::size(mib), &ncpu, &size, NULL, 0) < 0) { -@@ -41,10 +48,26 @@ int SysInfo::NumberOfProcessors() { +@@ -41,10 +46,26 @@ int SysInfo::NumberOfProcessors() { // static uint64_t SysInfo::AmountOfPhysicalMemoryImpl() { - return AmountOfMemory(_SC_PHYS_PAGES); + // pledge(2) + if (!aofpmem) + aofpmem = AmountOfMemory(_SC_PHYS_PAGES); + return aofpmem; } // static +std::string SysInfo::CPUModelName() { + int mib[] = {CTL_HW, HW_MODEL}; + size_t len = std::size(cpumodel); + + if (cpumodel[0] == '\0') { + if (sysctl(mib, std::size(mib), cpumodel, &len, NULL, 0) < 0) + return std::string(); + } + + return std::string(cpumodel, len - 1); +} + +// static uint64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() { // We should add inactive file-backed memory also but there is no such // information from OpenBSD unfortunately. -@@ -56,16 +79,28 @@ uint64_t SysInfo::MaxSharedMemorySize() { +@@ -56,16 +77,28 @@ uint64_t SysInfo::MaxSharedMemorySize() { int mib[] = {CTL_KERN, KERN_SHMINFO, KERN_SHMINFO_SHMMAX}; size_t limit; size_t size = sizeof(limit); + // pledge(2) + if (shmmax) + goto out; if (sysctl(mib, std::size(mib), &limit, &size, NULL, 0) < 0) { NOTREACHED(); return 0; } - return static_cast(limit); + shmmax = static_cast(limit); +out: + return shmmax; } // static -std::string SysInfo::CPUModelName() { - return StringSysctl({CTL_HW, HW_MODEL}).value(); +SysInfo::HardwareInfo SysInfo::GetHardwareInfoSync() { + HardwareInfo info; + // Set the manufacturer to "OpenBSD" and the model to + // an empty string. + info.manufacturer = "OpenBSD"; + info.model = HardwareModelName(); + DCHECK(IsStringUTF8(info.manufacturer)); + DCHECK(IsStringUTF8(info.model)); + return info; } } // namespace base diff --git a/www/ungoogled-chromium/files/patch-base_threading_platform__thread__posix.cc b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__posix.cc index 5552940efd9e..9ee8cbb51a68 100644 --- a/www/ungoogled-chromium/files/patch-base_threading_platform__thread__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__posix.cc @@ -1,45 +1,45 @@ ---- base/threading/platform_thread_posix.cc.orig 2023-09-17 07:59:53 UTC +--- base/threading/platform_thread_posix.cc.orig 2024-02-25 20:22:18 UTC +++ base/threading/platform_thread_posix.cc -@@ -76,12 +76,12 @@ void* ThreadFunc(void* params) { +@@ -78,12 +78,12 @@ void* ThreadFunc(void* params) { if (!thread_params->joinable) base::DisallowSingleton(); -#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(USE_STARSCAN) +#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(USE_STARSCAN) && !BUILDFLAG(IS_BSD) partition_alloc::internal::PCScan::NotifyThreadCreated( partition_alloc::internal::GetStackPointer()); #endif -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) #if BUILDFLAG(IS_APPLE) PlatformThread::SetCurrentThreadRealtimePeriodValue( delegate->GetRealtimePeriod()); -@@ -353,7 +353,7 @@ void PlatformThreadBase::Detach(PlatformThreadHandle t +@@ -357,7 +357,7 @@ void PlatformThreadBase::Detach(PlatformThreadHandle t // static bool PlatformThreadBase::CanChangeThreadType(ThreadType from, ThreadType to) { -#if BUILDFLAG(IS_NACL) +#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD) return false; #else if (from >= to) { -@@ -374,6 +374,9 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type, +@@ -378,6 +378,9 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type, MessagePumpType pump_type_hint) { #if BUILDFLAG(IS_NACL) NOTIMPLEMENTED(); +// avoid pledge(2) violation +#elif BUILDFLAG(IS_BSD) + NOTIMPLEMENTED(); #else if (internal::SetCurrentThreadTypeForPlatform(thread_type, pump_type_hint)) return; -@@ -396,7 +399,7 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type, +@@ -400,7 +403,7 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type, // static ThreadPriorityForTest PlatformThreadBase::GetCurrentThreadPriorityForTest() { -#if BUILDFLAG(IS_NACL) +#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD) NOTIMPLEMENTED(); return ThreadPriorityForTest::kNormal; #else diff --git a/www/ungoogled-chromium/files/patch-base_trace__event_malloc__dump__provider.cc b/www/ungoogled-chromium/files/patch-base_trace__event_malloc__dump__provider.cc index 6f15f6103c4e..f3c276aa16fa 100644 --- a/www/ungoogled-chromium/files/patch-base_trace__event_malloc__dump__provider.cc +++ b/www/ungoogled-chromium/files/patch-base_trace__event_malloc__dump__provider.cc @@ -1,30 +1,30 @@ ---- base/trace_event/malloc_dump_provider.cc.orig 2023-09-17 07:59:53 UTC +--- base/trace_event/malloc_dump_provider.cc.orig 2024-02-25 20:22:18 UTC +++ base/trace_event/malloc_dump_provider.cc @@ -25,6 +25,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_BSD) +#include #else #include #endif -@@ -188,7 +190,7 @@ void ReportAppleAllocStats(size_t* total_virtual_size, +@@ -182,7 +184,7 @@ void ReportAppleAllocStats(size_t* total_virtual_size, #if (BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \ (!BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_WIN) && \ - !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_FUCHSIA)) + !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD)) void ReportMallinfoStats(ProcessMemoryDump* pmd, size_t* total_virtual_size, size_t* resident_size, -@@ -359,6 +361,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump +@@ -353,6 +355,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump &allocated_objects_count); #elif BUILDFLAG(IS_FUCHSIA) // TODO(fuchsia): Port, see https://crbug.com/706592. +#elif BUILDFLAG(IS_BSD) + total_virtual_size = 0; + allocated_objects_size = 0; #else ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size, &allocated_objects_size, &allocated_objects_count); diff --git a/www/ungoogled-chromium/files/patch-base_trace__event_trace__log.cc b/www/ungoogled-chromium/files/patch-base_trace__event_trace__log.cc deleted file mode 100644 index 35b0d7350137..000000000000 --- a/www/ungoogled-chromium/files/patch-base_trace__event_trace__log.cc +++ /dev/null @@ -1,16 +0,0 @@ ---- base/trace_event/trace_log.cc.orig 2023-11-04 07:08:51 UTC -+++ base/trace_event/trace_log.cc -@@ -2191,8 +2191,13 @@ void TraceLog::SetTraceBufferForTesting( - #if BUILDFLAG(USE_PERFETTO_CLIENT_LIBRARY) - void TraceLog::OnSetup(const perfetto::DataSourceBase::SetupArgs& args) { - AutoLock lock(track_event_lock_); -+#if defined(__clang__) && (__clang_major__ >= 16) - track_event_sessions_.emplace_back(args.internal_instance_index, *args.config, - args.backend_type); -+#else -+ track_event_sessions_.emplace_back(TrackEventSession{args.internal_instance_index, *args.config, -+ args.backend_type}); -+#endif - } - - void TraceLog::OnStart(const perfetto::DataSourceBase::StartArgs&) { 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 37c34ba3af4b..dfa3a3df9617 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,136 @@ ---- build/config/compiler/BUILD.gn.orig 2024-02-03 15:42:55 UTC +--- build/config/compiler/BUILD.gn.orig 2024-02-25 20:22:18 UTC +++ build/config/compiler/BUILD.gn -@@ -202,7 +202,7 @@ declare_args() { +@@ -204,7 +204,7 @@ declare_args() { # This greatly reduces the size of debug builds, at the cost of # debugging information which is required by some specialized # debugging tools. - simple_template_names = is_clang && !is_nacl && !is_win && !is_apple + simple_template_names = is_clang && !is_nacl && !is_win && !is_apple && !is_bsd } declare_args() { -@@ -266,13 +266,16 @@ config("default_include_dirs") { +@@ -268,13 +268,16 @@ config("default_include_dirs") { # Compiler instrumentation can introduce dependencies in DSOs to symbols in # the executable they are loaded into, so they are unresolved at link-time. config("no_unresolved_symbols") { - if (!using_sanitizer && + if (!using_sanitizer && !is_bsd && (is_linux || is_chromeos || is_android || is_fuchsia)) { ldflags = [ "-Wl,-z,defs", "-Wl,--as-needed", ] } + if (current_cpu == "x86" && is_openbsd) { + ldflags = [ "-Wl,-z,notext" ] + } } # compiler --------------------------------------------------------------------- -@@ -518,6 +521,10 @@ config("compiler") { +@@ -520,6 +523,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ if (use_gold) { -@@ -593,7 +600,7 @@ config("compiler") { +@@ -595,7 +602,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 -@@ -1175,7 +1182,7 @@ config("compiler_cpu_abi") { +@@ -1174,7 +1181,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" ] -@@ -1190,7 +1197,7 @@ config("compiler_cpu_abi") { +@@ -1189,7 +1196,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" ] -@@ -1525,7 +1532,7 @@ config("compiler_deterministic") { +@@ -1524,7 +1531,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", -@@ -1577,7 +1584,7 @@ config("compiler_deterministic") { +@@ -1576,7 +1583,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", -@@ -1862,7 +1869,7 @@ config("default_warnings") { - "-Wno-ignored-pragma-optimize", +@@ -1874,12 +1881,9 @@ config("default_warnings") { + + # TODO(crbug.com/1494809): Evaluate and possibly enable. + "-Wno-vla-extension", +- +- # TODO(https://crbug.com/1490607): Fix and re-enable. +- "-Wno-thread-safety-reference-return", ] - if (!is_nacl) { + if (!is_nacl && !is_bsd) { - cflags += [ - # TODO(crbug.com/1343975) Evaluate and possibly enable. - "-Wno-deprecated-builtins", -@@ -2065,7 +2072,7 @@ config("no_chromium_code") { + cflags_cc += [ + # TODO(https://crbug.com/1513724): Fix and re-enable. + "-Wno-c++11-narrowing-const-reference", +@@ -2067,7 +2071,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", -@@ -2594,7 +2601,7 @@ config("afdo_optimize_size") { +@@ -2596,7 +2600,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. -@@ -2621,7 +2628,7 @@ config("afdo") { +@@ -2623,7 +2627,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 ] } -@@ -2785,7 +2792,8 @@ config("symbols") { +@@ -2787,7 +2791,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_compiler_pgo_BUILD.gn b/www/ungoogled-chromium/files/patch-build_config_compiler_pgo_BUILD.gn deleted file mode 100644 index 141041ce6479..000000000000 --- a/www/ungoogled-chromium/files/patch-build_config_compiler_pgo_BUILD.gn +++ /dev/null @@ -1,19 +0,0 @@ ---- build/config/compiler/pgo/BUILD.gn.orig 2023-11-04 07:08:51 UTC -+++ build/config/compiler/pgo/BUILD.gn -@@ -139,13 +139,14 @@ config("pgo_optimization_flags") { - - # Enable basic block layout based on the extended TSP problem. This aims to - # improve icache utilization and reduce the binary size. -- if (use_thin_lto) { -+ # __clang_major__ >= 15 -+ if (use_thin_lto && !is_bsd) { - if (is_win) { - ldflags = [ "-mllvm:-enable-ext-tsp-block-placement=1" ] - } else { - ldflags = [ "-Wl,-mllvm,-enable-ext-tsp-block-placement=1" ] - } -- } else { -+ } else if (!is_bsd) { - cflags += [ - "-mllvm", - "-enable-ext-tsp-block-placement=1", diff --git a/www/ungoogled-chromium/files/patch-build_toolchain_gcc__toolchain.gni b/www/ungoogled-chromium/files/patch-build_toolchain_gcc__toolchain.gni index ac927c6bd503..8e8db349ffa3 100644 --- a/www/ungoogled-chromium/files/patch-build_toolchain_gcc__toolchain.gni +++ b/www/ungoogled-chromium/files/patch-build_toolchain_gcc__toolchain.gni @@ -1,44 +1,44 @@ ---- build/toolchain/gcc_toolchain.gni.orig 2023-12-23 12:33:28 UTC +--- build/toolchain/gcc_toolchain.gni.orig 2024-02-25 20:22:18 UTC +++ build/toolchain/gcc_toolchain.gni @@ -53,6 +53,13 @@ if (enable_resource_allowlist_generation) { "enable_resource_allowlist_generation=true does not work for target_os=$target_os") } +declare_args() { + extra_cflags = "" + extra_cppflags = "" + extra_cxxflags = "" + extra_ldflags = "" +} + # This template defines a toolchain for something that works like gcc # (including clang). # -@@ -878,22 +885,12 @@ template("gcc_toolchain") { +@@ -886,22 +893,12 @@ template("gcc_toolchain") { # use_gold too. template("clang_toolchain") { gcc_toolchain(target_name) { - _path = "$clang_base_path/bin" - _is_path_absolute = get_path_info(_path, "abspath") == _path - - # Preserve absolute paths for tools like distcc. - if (_is_path_absolute && filter_include([ _path ], [ "//*" ]) == []) { - prefix = _path - } else { - prefix = rebase_path(_path, root_build_dir) - } - - cc = "${prefix}/clang" - cxx = "${prefix}/clang++" + cc = "cc" + cxx = "c++" ld = cxx - readelf = "${prefix}/llvm-readelf" - ar = "${prefix}/llvm-ar" - nm = "${prefix}/llvm-nm" + readelf = "readelf" + ar = "ar" + nm = "nm" forward_variables_from(invoker, "*", [ "toolchain_args" ]) diff --git a/www/ungoogled-chromium/files/patch-cc_BUILD.gn b/www/ungoogled-chromium/files/patch-cc_BUILD.gn index fd0d5ae41680..69b74f542e52 100644 --- a/www/ungoogled-chromium/files/patch-cc_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-cc_BUILD.gn @@ -1,19 +1,19 @@ ---- cc/BUILD.gn.orig 2024-02-03 15:42:55 UTC +--- cc/BUILD.gn.orig 2024-02-25 20:22:18 UTC +++ cc/BUILD.gn -@@ -676,7 +676,7 @@ cc_test_static_library("test_support") { +@@ -678,7 +678,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) { -@@ -935,7 +935,6 @@ cc_test("cc_unittests") { +@@ -938,7 +938,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_paint_paint__op__writer.h b/www/ungoogled-chromium/files/patch-cc_paint_paint__op__writer.h deleted file mode 100644 index da0334b9c4b9..000000000000 --- a/www/ungoogled-chromium/files/patch-cc_paint_paint__op__writer.h +++ /dev/null @@ -1,41 +0,0 @@ ---- cc/paint/paint_op_writer.h.orig 2023-12-23 12:33:28 UTC -+++ cc/paint/paint_op_writer.h -@@ -122,10 +122,17 @@ class CC_PAINT_EXPORT PaintOpWriter { - // easier to keep serialized size calculation in sync with serialization and - // deserialization, and make it possible to allow dynamic sizing for some - // data types (see the specialized/overloaded functions). -+#if defined(__clang__) && (__clang_major__ >= 15) - template - static constexpr size_t SerializedSize(); - template - static constexpr size_t SerializedSize(const T& data); -+#else -+ template -+ static size_t SerializedSize(); -+ template -+ static size_t SerializedSize(const T& data); -+#endif - static size_t SerializedSize(const PaintImage& image); - static size_t SerializedSize(const PaintRecord& record); - static size_t SerializedSize(const SkHighContrastConfig& config); -@@ -463,12 +470,20 @@ constexpr size_t PaintOpWriter::SerializedSize -+#if defined(__clang__) && (__clang_major__ >= 15) - constexpr size_t PaintOpWriter::SerializedSize() { -+#else -+size_t PaintOpWriter::SerializedSize() { -+#endif - static_assert(std::is_arithmetic_v || std::is_enum_v); - return SerializedSizeSimple(); - } - template -+#if defined(__clang__) && (__clang_major__ >= 15) - constexpr size_t PaintOpWriter::SerializedSize(const T& data) { -+#else -+size_t PaintOpWriter::SerializedSize(const T& data) { -+#endif - return SerializedSizeSimple(); - } - 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 deleted file mode 100644 index e03479dc5c5b..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_app_app__management__strings.grdp +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/app/app_management_strings.grdp.orig 2024-02-03 15:42:55 UTC -+++ chrome/app/app_management_strings.grdp -@@ -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__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc index 1c4bd9a9c12e..a895f453e867 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 2024-02-03 15:42:55 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/app/chrome_main_delegate.cc @@ -146,7 +146,7 @@ #include "components/about_ui/credit_utils.h" #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) #include "components/nacl/common/nacl_paths.h" #include "components/nacl/zygote/nacl_fork_delegate_linux.h" #endif @@ -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 -@@ -338,7 +338,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -339,7 +339,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 -@@ -423,7 +423,7 @@ bool HandleVersionSwitches(const base::CommandLine& co +@@ -424,7 +424,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) || -@@ -601,7 +601,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -638,7 +638,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. -@@ -691,7 +691,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat +@@ -765,7 +765,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( -@@ -1048,7 +1048,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv +@@ -1138,7 +1138,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(); -@@ -1200,7 +1200,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1290,7 +1290,7 @@ std::optional ChromeMainDelegate::BasicStartupCom // TODO(crbug.com/1052397): Revisit the macro expression once build flag // switch of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // This will directly exit if the user asked for help. HandleHelpSwitches(command_line); #endif -@@ -1230,7 +1230,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1320,7 +1320,7 @@ std::optional ChromeMainDelegate::BasicStartupCom #if BUILDFLAG(IS_CHROMEOS) chromeos::dbus_paths::RegisterPathProvider(); #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) nacl::RegisterPathProvider(); #endif -@@ -1641,7 +1641,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1717,7 +1717,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)) { -@@ -1750,7 +1750,7 @@ absl::variant Chrome +@@ -1826,7 +1826,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 deleted file mode 100644 index c75fad5e0529..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_app_chromium__strings.grd +++ /dev/null @@ -1,38 +0,0 @@ ---- 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 - -@@ -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 - -@@ -920,7 +920,7 @@ Permissions you've already given to websites and apps - - - -- -+ - - Not used in Chromium. Placeholder to keep resource maps in sync. - -@@ -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 deleted file mode 100644 index f8443647c64e..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_app_generated__resources.grd +++ /dev/null @@ -1,92 +0,0 @@ ---- chrome/app/generated_resources.grd.orig 2024-02-09 10:34:36 UTC -+++ chrome/app/generated_resources.grd -@@ -2,7 +2,7 @@ - - -@@ -3665,7 +3665,7 @@ are declared in tools/grit/grit_rule.gni. - - - -- -+ - - Device Credentials - -@@ -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 - -@@ -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. - -@@ -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. - -@@ -10965,7 +10965,7 @@ Check your passwords anytime in - Update - -- -+ - - Finish update - -@@ -11312,7 +11312,7 @@ Check your passwords anytime in -+ - - Use system title bar and borders - -@@ -12310,7 +12310,7 @@ Check your passwords anytime in -+ - - Share information about your device? - -@@ -12718,7 +12718,7 @@ Please help our engineers fix this problem. Tell us wh - Set as default - - -- -+ - - Minimize - -@@ -14949,7 +14949,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 deleted file mode 100644 index 7010821a6d3e..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_app_google__chrome__strings.grd +++ /dev/null @@ -1,38 +0,0 @@ ---- 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 - -@@ -887,7 +887,7 @@ Permissions you've already given to websites and apps - - - -- -+ - - - Relaunch to Update - Your tabs will reopen -@@ -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_profiles__strings.grdp b/www/ungoogled-chromium/files/patch-chrome_app_profiles__strings.grdp deleted file mode 100644 index 0fc5699dd506..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_app_profiles__strings.grdp +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/app/profiles_strings.grdp.orig 2023-09-17 07:59:53 UTC -+++ chrome/app/profiles_strings.grdp -@@ -54,7 +54,7 @@ - Add Profile... - - -- -+ - - Add profile... - diff --git a/www/ungoogled-chromium/files/patch-chrome_app_settings__strings.grdp b/www/ungoogled-chromium/files/patch-chrome_app_settings__strings.grdp deleted file mode 100644 index c2c828b19f19..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_app_settings__strings.grdp +++ /dev/null @@ -1,35 +0,0 @@ ---- chrome/app/settings_strings.grdp.orig 2023-11-04 07:08:51 UTC -+++ chrome/app/settings_strings.grdp -@@ -183,12 +183,12 @@ - Manage accessibility features - - -- -+ - - Swipe between pages - - -- -+ - - Navigate back and forward with a swipe gesture - -@@ -222,7 +222,7 @@ - Theme - - -- -+ - - GTK - -@@ -242,7 +242,7 @@ - Use Classic - - -- -+ - - Reset to default - diff --git a/www/ungoogled-chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd b/www/ungoogled-chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd deleted file mode 100644 index 92a05007281d..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/app/theme/chrome_unscaled_resources.grd.orig 2024-02-03 15:42:55 UTC -+++ chrome/app/theme/chrome_unscaled_resources.grd -@@ -14,7 +14,7 @@ - - - -- -+ - - - -@@ -40,7 +40,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 deleted file mode 100644 index 70f3a27eab57..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_app_theme_theme__resources.grd +++ /dev/null @@ -1,46 +0,0 @@ ---- chrome/app/theme/theme_resources.grd.orig 2024-02-03 15:42:55 UTC -+++ chrome/app/theme/theme_resources.grd -@@ -153,14 +153,14 @@ - - - -- -+ - - - - - - -- -+ - - - -@@ -168,7 +168,7 @@ - - - -- -+ - - - -@@ -178,7 +178,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 62c8d3e44f5b..8bb9217e7154 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-02-09 10:34:36 UTC +--- chrome/browser/BUILD.gn.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/BUILD.gn -@@ -6514,6 +6514,13 @@ static_library("browser") { +@@ -6458,6 +6458,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 6875e193fa0f..65f6e9f0f84c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc @@ -1,189 +1,209 @@ ---- chrome/browser/about_flags.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/about_flags.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/about_flags.cc -@@ -232,7 +232,7 @@ +@@ -235,7 +235,7 @@ #include "ui/ui_features.h" #include "url/url_features.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/allocator/buildflags.h" #endif -@@ -330,7 +330,7 @@ +@@ -328,7 +328,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) -@@ -344,7 +344,7 @@ + +@@ -337,7 +337,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) -@@ -482,7 +482,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap +@@ -494,7 +494,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, -@@ -1452,7 +1452,7 @@ const FeatureEntry::FeatureVariation kChromeRefresh202 +@@ -1390,7 +1390,7 @@ const FeatureEntry::FeatureVariation kChromeRefresh202 nullptr}}; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kShortcutBoostSingleUrl[] = { {"ShortcutBoostSearchScore", "0"}, {"ShortcutBoostNonTopHitThreshold", "0"}, -@@ -3935,7 +3935,7 @@ const flags_ui::FeatureEntry::FeatureVariation +@@ -3750,7 +3750,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"), +@@ -4515,7 +4515,7 @@ const FeatureEntry kFeatureEntries[] = { }, - #endif // BUILDFLAG(IS_WIN) + #endif // BUILDFLAG(IS_ANDROID) + -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { "fluent-overlay-scrollbars", flag_descriptions::kFluentOverlayScrollbarsName, -@@ -5228,13 +5228,13 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5072,7 +5072,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kWebShare)}, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - {"ozone-platform-hint", flag_descriptions::kOzonePlatformHintName, - flag_descriptions::kOzonePlatformHintDescription, kOsLinux, + {"pulseaudio-loopback-for-cast", + flag_descriptions::kPulseaudioLoopbackForCastName, + flag_descriptions::kPulseaudioLoopbackForCastDescription, kOsLinux, +@@ -5088,7 +5088,7 @@ const FeatureEntry kFeatureEntries[] = { MULTI_VALUE_TYPE(kOzonePlatformHintRuntimeChoices)}, #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"skip-undecryptable-passwords", flag_descriptions::kSkipUndecryptablePasswordsName, flag_descriptions::kSkipUndecryptablePasswordsDescription, -@@ -5548,7 +5548,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5376,7 +5376,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)}, -@@ -6201,7 +6201,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6020,7 +6020,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, -@@ -7056,7 +7056,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6845,7 +6845,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)}, -@@ -8075,7 +8075,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(supervised_user::kEnableProtoApiForClassifyUrl)}, - #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) +@@ -7826,7 +7826,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(ash::features::kPrivacyIndicators)}, + #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"enable-network-service-sandbox", flag_descriptions::kEnableNetworkServiceSandboxName, flag_descriptions::kEnableNetworkServiceSandboxDescription, -@@ -8100,7 +8100,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7859,7 +7859,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, -@@ -8750,7 +8750,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8487,7 +8487,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)}, -@@ -9024,7 +9024,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8747,7 +8747,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, -@@ -9066,7 +9066,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8789,7 +8789,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, -@@ -9657,7 +9657,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9074,7 +9074,7 @@ const FeatureEntry kFeatureEntries[] = { + #endif + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + {"policy-indication-for-managed-default-search", + flag_descriptions::kPolicyIndicationForManagedDefaultSearchName, + flag_descriptions::kPolicyIndicationForManagedDefaultSearchDescription, +@@ -9374,7 +9374,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"document-picture-in-picture-api", flag_descriptions::kDocumentPictureInPictureApiName, flag_descriptions::kDocumentPictureInPictureApiDescription, -@@ -10781,7 +10781,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10441,7 +10441,7 @@ const FeatureEntry kFeatureEntries[] = { kOsDesktop | kOsAndroid, FEATURE_VALUE_TYPE(features::kProcessPerSiteUpToMainFrameThreshold)}, -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"camera-mic-effects", flag_descriptions::kCameraMicEffectsName, flag_descriptions::kCameraMicEffectsDescription, static_cast(kOsMac | kOsWin | kOsLinux), -@@ -10947,7 +10947,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10472,7 +10472,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(features::kSiteInstanceGroupsForDataUrls)}, + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + {"site-search-settings-policy", + flag_descriptions::kSiteSearchSettingsPolicyName, + flag_descriptions::kSiteSearchSettingsPolicyDescription, kOsAll, +@@ -10602,7 +10602,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, -@@ -11338,7 +11338,7 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kAutofillEnableCardBenefitsDescription, kOsAll, - FEATURE_VALUE_TYPE(autofill::features::kAutofillEnableCardBenefits)}, +@@ -10954,7 +10954,7 @@ const FeatureEntry kFeatureEntries[] = { + trusted_vault::kTrustedVaultFrequentDegradedRecoverabilityPolling)}, + #endif --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - {flag_descriptions::kAutofillContentEditablesId, - flag_descriptions::kAutofillContentEditablesName, - flag_descriptions::kAutofillContentEditablesDescription, +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + {"restart-to-gain-access-to-keychain", + flag_descriptions::kRestartToGainAccessToKeychainName, + flag_descriptions::kRestartToGainAccessToKeychainDescription, 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 5d63c1e5cd26..14cb0688a603 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc @@ -1,20 +1,20 @@ ---- chrome/browser/browser_features.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/browser_features.cc.orig 2024-02-25 20:22:18 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); -@@ -286,7 +286,7 @@ BASE_FEATURE(kNewTabPageTriggerForPrerender2, +@@ -302,7 +302,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__process__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc index cd2a55388044..84153ddfedb4 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 2024-02-03 15:42:55 UTC +--- chrome/browser/browser_process_impl.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/browser_process_impl.cc -@@ -218,7 +218,7 @@ +@@ -222,7 +222,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 -@@ -1224,7 +1224,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { +@@ -1237,7 +1237,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 -@@ -1470,7 +1470,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1496,7 +1496,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 0eb8f45a5164..ef23a8701bcc 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 2024-02-03 15:42:55 UTC +--- chrome/browser/browser_process_impl.h.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/browser_process_impl.h -@@ -386,7 +386,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -385,7 +385,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 d26ece805458..95d526321032 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc @@ -1,81 +1,81 @@ ---- chrome/browser/chrome_browser_interface_binders.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -126,13 +126,13 @@ +@@ -128,13 +128,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 -@@ -218,7 +218,7 @@ +@@ -222,7 +222,7 @@ #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/companion/visual_query/visual_query_suggestions_service_factory.h" #include "chrome/browser/ui/web_applications/sub_apps_service_impl.h" #include "chrome/browser/ui/webui/discards/discards.mojom.h" -@@ -862,7 +862,7 @@ void BindScreen2xMainContentExtractor( +@@ -829,7 +829,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< -@@ -1004,7 +1004,7 @@ void PopulateChromeFrameBinders( +@@ -1025,7 +1025,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)); -@@ -1012,7 +1012,7 @@ void PopulateChromeFrameBinders( +@@ -1033,7 +1033,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 -@@ -1094,7 +1094,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1120,7 +1120,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); -@@ -1115,7 +1115,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1132,7 +1132,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 -@@ -1653,7 +1653,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1676,7 +1676,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 72552d59f9fc..a5a38f04a1c4 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main.cc @@ -1,104 +1,104 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -247,11 +247,11 @@ +@@ -245,11 +245,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 -@@ -285,14 +285,14 @@ +@@ -282,14 +282,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" -@@ -354,14 +354,14 @@ +@@ -351,14 +351,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() { +@@ -1069,7 +1069,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 . -@@ -1124,7 +1124,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1125,7 +1125,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( -@@ -1323,7 +1323,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1324,7 +1324,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* +@@ -1373,7 +1373,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* *UrlLanguageHistogramFactory::GetForBrowserContext(profile)); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode()) { headless::ReportHeadlessActionMetrics(); } -@@ -1478,7 +1478,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl( +@@ -1481,7 +1481,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(); } -@@ -2008,7 +2008,7 @@ bool ChromeBrowserMainParts::ProcessSingletonNotificat +@@ -2007,7 +2007,7 @@ bool ChromeBrowserMainParts::ProcessSingletonNotificat // Drop the request if headless mode is in effect or the request is from // a headless Chrome process. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode() || command_line.HasSwitch(switches::kHeadless)) { return false; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__extra__parts__linux.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__extra__parts__linux.cc index dfbe5f0d4fcc..afdc7b3724a7 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__extra__parts__linux.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__extra__parts__linux.cc @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_browser_main_extra_parts_linux.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/chrome_browser_main_extra_parts_linux.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/chrome_browser_main_extra_parts_linux.cc -@@ -120,7 +120,7 @@ ChromeBrowserMainExtraPartsLinux::ChromeBrowserMainExt +@@ -117,7 +117,7 @@ ChromeBrowserMainExtraPartsLinux::ChromeBrowserMainExt ChromeBrowserMainExtraPartsLinux::~ChromeBrowserMainExtraPartsLinux() = default; void ChromeBrowserMainExtraPartsLinux::PreEarlyInitialization() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On the desktop, we fix the platform name if necessary. // See https://crbug.com/1246928. auto* const command_line = base::CommandLine::ForCurrentProcess(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__posix.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__posix.cc index 0c88e6ed28b2..16b813f4a880 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__posix.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__posix.cc @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_browser_main_posix.cc.orig 2022-12-02 17:56:32 UTC +--- chrome/browser/chrome_browser_main_posix.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/chrome_browser_main_posix.cc -@@ -73,7 +73,7 @@ void ExitHandler::ExitWhenPossibleOnUIThread(int signa +@@ -79,7 +79,7 @@ void ExitHandler::ExitWhenPossibleOnUIThread(int signa } else { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) switch (signal) { case SIGINT: case SIGHUP: diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc index 98c30d605cf4..e362db37eaa8 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 2024-02-09 10:34:36 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -458,7 +458,7 @@ +@@ -455,7 +455,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) -@@ -561,12 +561,12 @@ +@@ -558,12 +558,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 -@@ -577,14 +577,14 @@ +@@ -574,14 +574,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) -@@ -600,7 +600,7 @@ +@@ -597,7 +597,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" -@@ -1535,7 +1535,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre +@@ -1460,7 +1460,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre + #if BUILDFLAG(IS_CHROMEOS) registry->RegisterBooleanPref(prefs::kNativeClientForceAllowed, false); - registry->RegisterBooleanPref( - policy::policy_prefs::kPPAPISharedImagesForVideoDecoderAllowed, true); + #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOutOfProcessSystemDnsResolutionEnabled, true); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) -@@ -1659,7 +1659,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1579,7 +1579,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) -@@ -1696,7 +1696,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1616,7 +1616,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 -@@ -1717,7 +1717,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1637,7 +1637,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()); -@@ -1736,7 +1736,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1656,7 +1656,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>()); -@@ -2574,6 +2574,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2489,6 +2489,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()) { -@@ -2915,7 +2917,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2830,7 +2832,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin ThreadProfilerConfiguration::Get()->AppendCommandLineSwitchForChildProcess( command_line); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && !BUILDFLAG(IS_BSD) // Opt into a hardened stack canary mitigation if it hasn't already been // force-disabled. if (!browser_command_line.HasSwitch(switches::kChangeStackGuardOnFork)) { -@@ -4597,7 +4599,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -4482,7 +4484,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, -@@ -5160,7 +5162,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5037,7 +5039,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); -@@ -5170,7 +5172,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5047,7 +5049,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); -@@ -5201,7 +5203,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5078,7 +5080,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); -@@ -7109,7 +7111,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS +@@ -6974,7 +6976,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 7b5d60dbee23..daa28e64d84d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.h @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_content_browser_client.h.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -495,7 +495,7 @@ class ChromeContentBrowserClient : public content::Con - void OverridePageVisibilityState( - content::RenderFrameHost* render_frame_host, - content::PageVisibilityState* visibility_state) override; +@@ -489,7 +489,7 @@ class ChromeContentBrowserClient : public content::Con + bool IsPluginAllowedToUseDevChannelAPIs( + content::BrowserContext* browser_context, + const GURL& url) override; -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) void GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc b/www/ungoogled-chromium/files/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc index 430a5617578b..185cd20cb3ad 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc @@ -1,29 +1,29 @@ ---- chrome/browser/component_updater/widevine_cdm_component_installer.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/component_updater/widevine_cdm_component_installer.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/component_updater/widevine_cdm_component_installer.cc @@ -40,7 +40,7 @@ #include "third_party/widevine/cdm/buildflags.h" #include "third_party/widevine/cdm/widevine_cdm_common.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/common/media/component_widevine_cdm_hint_file_linux.h" #endif -@@ -77,7 +77,7 @@ static_assert(std::size(kWidevineSha2Hash) == crypto:: +@@ -78,7 +78,7 @@ static_assert(std::size(kWidevineSha2Hash) == crypto:: const char ImageLoaderComponentName[] = "WidevineCdm"; #endif -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // On Linux and ChromeOS the Widevine CDM is loaded at startup before the // zygote is locked down. As a result there is no need to register the CDM // with Chrome as it can't be used until Chrome is restarted. -@@ -363,7 +363,7 @@ void WidevineCdmComponentInstallerPolicy::UpdateCdmPat +@@ -364,7 +364,7 @@ void WidevineCdmComponentInstallerPolicy::UpdateCdmPat return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) VLOG(1) << "Updating hint file with Widevine CDM " << cdm_version; // This is running on a thread that allows IO, so simply update the hint file. diff --git a/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 deleted file mode 100644 index 7dd1017f2706..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_compose_chrome__compose__client.cc +++ /dev/null @@ -1,19 +0,0 @@ ---- 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 deleted file mode 100644 index 2face7964fe6..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_content__settings_one__time__permission__provider.cc +++ /dev/null @@ -1,30 +0,0 @@ ---- 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 -@@ -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); -@@ -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_bubble_download__bubble__update__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_bubble_download__bubble__update__service.cc deleted file mode 100644 index d0aca2998b82..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_bubble_download__bubble__update__service.cc +++ /dev/null @@ -1,32 +0,0 @@ ---- chrome/browser/download/bubble/download_bubble_update_service.cc.orig 2023-12-23 12:33:28 UTC -+++ chrome/browser/download/bubble/download_bubble_update_service.cc -@@ -89,7 +89,11 @@ ItemSortKey GetSortKey(const Item& item) { - // Helper to get an iterator to the last element in the cache. The cache - // must not be empty. - template -+#if defined(__clang__) && (__clang_major__ >= 16) - SortedItems::const_iterator GetLastIter(const SortedItems& cache) { -+#else -+typename SortedItems::const_iterator GetLastIter(const SortedItems& cache) { -+#endif - CHECK(!cache.empty()); - auto it = cache.end(); - return std::prev(it); -@@ -1089,9 +1093,17 @@ bool DownloadBubbleUpdateService::CacheManager::Remove - } - - template -+#if defined(__clang__) && (__clang_major__ >= 16) - SortedItems::iterator -+#else -+typename SortedItems::iterator -+#endif - DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheByIter( -+#if defined(__clang__) && (__clang_major__ >= 16) - SortedItems::iterator iter, -+#else -+ typename SortedItems::iterator iter, -+#endif - SortedItems& cache, - IterMap& iter_map) { - CHECK(iter != cache.end()); 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 0b94540c52d3..7693bb8098d1 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc @@ -1,20 +1,20 @@ ---- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1604,7 +1604,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe - bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferreredForFile( +@@ -1632,7 +1632,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe + bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferredForFile( const base::FilePath& path) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) { return !download_prefs_->ShouldOpenPdfInSystemReader(); } -@@ -1670,7 +1670,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow +@@ -1698,7 +1698,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__file__picker.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__file__picker.cc index 1bdd4835b529..da95dcdc85c5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__file__picker.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__file__picker.cc @@ -1,20 +1,20 @@ ---- chrome/browser/download/download_file_picker.cc.orig 2023-02-11 09:11:04 UTC +--- chrome/browser/download/download_file_picker.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/download/download_file_picker.cc -@@ -17,7 +17,7 @@ - #include "content/public/browser/download_manager.h" +@@ -18,7 +18,7 @@ #include "content/public/browser/web_contents.h" + #include "ui/shell_dialogs/selected_file_info.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_window.h" #include "ui/aura/window.h" -@@ -82,7 +82,7 @@ DownloadFilePicker::DownloadFilePicker(download::Downl +@@ -83,7 +83,7 @@ DownloadFilePicker::DownloadFilePicker(download::Downl // dialog in Linux (See SelectFileImpl() in select_file_dialog_linux_gtk.cc). // and windows.Here we make owning_window host to browser current active // window if it is null. https://crbug.com/1301898 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (!owning_window || !owning_window->GetHost()) { owning_window = BrowserList::GetInstance() ->GetLastActive() diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc index e5e821de0a9a..265fd192da76 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc @@ -1,29 +1,29 @@ ---- chrome/browser/download/download_item_model.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/download/download_item_model.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/download/download_item_model.cc -@@ -753,7 +753,7 @@ bool DownloadItemModel::IsCommandChecked( +@@ -744,7 +744,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(); -@@ -799,7 +799,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand +@@ -790,7 +790,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); -@@ -1079,7 +1079,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe +@@ -1071,7 +1071,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 5be8ba6ace66..cc7e525f14a6 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc @@ -1,90 +1,90 @@ ---- chrome/browser/download/download_prefs.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/download/download_prefs.cc.orig 2024-02-25 20:22:18 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" + #include "chrome/browser/flags/android/chrome_feature_list.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + using content::BrowserContext; using content::BrowserThread; using content::DownloadManager; @@ -73,7 +78,7 @@ namespace { // Consider downloads 'dangerous' if they go to the home directory on Linux and // to the desktop on any platform. bool DownloadPathIsDangerous(const base::FilePath& download_path) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath home_dir = base::GetHomeDir(); if (download_path == home_dir) { return true; @@ -179,7 +184,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi #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 -@@ -301,7 +306,7 @@ void DownloadPrefs::RegisterProfilePrefs( +@@ -298,7 +303,7 @@ void DownloadPrefs::RegisterProfilePrefs( registry->RegisterFilePathPref(prefs::kSaveFileDefaultDirectory, default_download_path); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOpenPdfDownloadInSystemReader, false); #endif #if BUILDFLAG(IS_ANDROID) @@ -461,7 +466,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) void DownloadPrefs::SetShouldOpenPdfInSystemReader(bool should_open) { if (should_open_pdf_in_system_reader_ == should_open) return; @@ -493,7 +498,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons 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(); -@@ -524,7 +529,7 @@ void DownloadPrefs::SaveAutoOpenState() { +@@ -533,7 +538,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; -@@ -648,7 +653,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa +@@ -657,7 +662,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_connectors__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc index 21aafa6d8464..95d985ee55f5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc @@ -1,11 +1,11 @@ ---- chrome/browser/enterprise/connectors/connectors_service.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/enterprise/connectors/connectors_service.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/enterprise/connectors/connectors_service.cc -@@ -531,7 +531,7 @@ bool ConnectorsService::ConnectorsEnabled() const { +@@ -513,7 +513,7 @@ bool ConnectorsService::ConnectorsEnabled() const { Profile* profile = Profile::FromBrowserContext(context_); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On desktop, the guest profile is actually the primary OTR profile of // the "regular" guest profile. The regular guest profile is never used // directly by users. Also, user are not able to create child OTR profiles diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc index a4350129a22b..3d2f72124f6b 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc.orig 2023-08-18 10:26:52 UTC +--- chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc -@@ -13,7 +13,7 @@ +@@ -14,7 +14,7 @@ #if BUILDFLAG(IS_WIN) #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/win_key_rotation_command.h" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/linux_key_rotation_command.h" #elif BUILDFLAG(IS_MAC) #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/mac_key_rotation_command.h" -@@ -46,7 +46,7 @@ std::unique_ptr KeyRotationCommand +@@ -47,7 +47,7 @@ std::unique_ptr KeyRotationCommand scoped_refptr url_loader_factory) { #if BUILDFLAG(IS_WIN) return std::make_unique(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return std::make_unique(url_loader_factory); #elif BUILDFLAG(IS_MAC) return std::make_unique(url_loader_factory); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn index 51d963b0a2fd..4b78122b0654 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn @@ -1,13 +1,13 @@ ---- chrome/browser/extensions/BUILD.gn.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1371,6 +1371,10 @@ static_library("extensions") { +@@ -1374,6 +1374,10 @@ static_library("extensions") { deps += [ "//chrome/services/printing/public/mojom" ] } + if (is_bsd) { + sources -= [ "api/image_writer_private/removable_storage_provider_linux.cc" ] + } + if (enable_service_discovery) { sources += [ "api/mdns/mdns_api.cc", diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h index 6d34ee964ec0..4be5451f1ad9 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h @@ -7,7 +7,7 @@ #include "build/build_config.h" -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include #include - diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc index 9eb96eabdc78..c3d472f9f776 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 2024-02-03 15:42:55 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2024-02-25 20:22:18 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 + #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 +@@ -106,7 +106,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:: +@@ -167,7 +167,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: // getPersistentSecret -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) EnterpriseReportingPrivateGetPersistentSecretFunction:: EnterpriseReportingPrivateGetPersistentSecretFunction() = default; -@@ -592,7 +592,7 @@ void EnterpriseReportingPrivateEnqueueRecordFunction:: +@@ -593,7 +593,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 70260fc8c6bf..95a78ca68ee3 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc -@@ -597,7 +597,7 @@ void PasswordsPrivateDelegateImpl::OnFetchingFamilyMem +@@ -600,7 +600,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_tabs_tabs__api.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc index 50afb3811fb6..53eacfcfe7b3 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/tabs/tabs_api.cc.orig 2023-11-04 07:08:51 UTC +--- chrome/browser/extensions/api/tabs/tabs_api.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/extensions/api/tabs/tabs_api.cc -@@ -844,7 +844,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio - // ui::SHOW_STATE_MINIMIZED above, on Linux the window is not created as +@@ -819,7 +819,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio // minimized. // TODO(crbug.com/1410400): Remove this workaround when linux is fixed. --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1410400): Find a fix for wayland as well. - - // Must be defined inside IS_LINUX to compile on windows/mac. +-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) + if (new_window->initial_show_state() == ui::SHOW_STATE_MINIMIZED) { + new_window->window()->Minimize(); + } diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_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 ef67ef69c571..62490b670e34 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc @@ -1,11 +1,11 @@ ---- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -323,7 +323,7 @@ const struct { +@@ -315,7 +315,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 8f2209bd649d..14e5d0317cd4 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,101 @@ ---- chrome/browser/flag_descriptions.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/flag_descriptions.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/flag_descriptions.cc -@@ -7424,7 +7424,7 @@ const char kLacrosMergeIcuDataFileDescription[] = +@@ -2899,7 +2899,7 @@ const char kCbdTimeframeRequiredDescription[] = + "value to the list."; + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + const char kPolicyIndicationForManagedDefaultSearchName[] = + "Enable policy indication for managed Default Search provider"; + const char kPolicyIndicationForManagedDefaultSearchDescription[] = +@@ -3217,7 +3217,7 @@ const char kSiteInstanceGroupsForDataUrlsDescription[] + "but in the same SiteInstanceGroup, and thus the same process."; + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + const char kSiteSearchSettingsPolicyName[] = "Enable SiteSearchSettings policy"; + const char kSiteSearchSettingsPolicyDescription[] = + "Allow site search engines to be defined by the SiteSearchSettings policy."; +@@ -7391,7 +7391,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 " -@@ -7664,7 +7664,7 @@ const char kSearchWebInSidePanelDescription[] = - // Random platform combinations ----------------------------------------------- +@@ -7637,7 +7637,7 @@ const char kV4L2FlatStatefulVideoDecoderDescription[] + + // Linux ----------------------------------------------------------------------- + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + const char kOzonePlatformHintChoiceDefault[] = "Default"; + const char kOzonePlatformHintChoiceAuto[] = "Auto"; + const char kOzonePlatformHintChoiceX11[] = "X11"; +@@ -7685,7 +7685,7 @@ const char kZeroCopyVideoCaptureDescription[] = + #endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kQuickCommandsName[] = "Quick Commands"; const char kQuickCommandsDescription[] = "Enable a text interface to browser features. Invoke with Ctrl-Space."; -@@ -7673,7 +7673,7 @@ const char kQuickCommandsDescription[] = +@@ -7694,7 +7694,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."; -@@ -7688,7 +7688,7 @@ const char kEnableProtoApiForClassifyUrlDescription[] +@@ -7709,7 +7709,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[] = -@@ -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"; -@@ -7732,7 +7732,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti +@@ -7741,7 +7741,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."; -@@ -7746,7 +7746,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail - "storage and requests initial sync."; +@@ -7761,7 +7761,7 @@ const char kRestartToGainAccessToKeychainDescription[] + "to restart Chrome to gain access to computer's password manager."; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kAsyncDnsName[] = "Async DNS resolver"; const char kAsyncDnsDescription[] = "Enables the built-in DNS resolver."; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -@@ -7852,7 +7852,7 @@ const char kElementCaptureDescription[] = +@@ -7862,7 +7862,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."; -@@ -7904,7 +7904,7 @@ const char kComposeName[] = "CCO Edits"; +@@ -7914,7 +7914,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 e3fe84bb172a..bd67c749852b 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,107 @@ ---- chrome/browser/flag_descriptions.h.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/flag_descriptions.h.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/flag_descriptions.h -@@ -4260,7 +4260,7 @@ extern const char kLacrosMergeIcuDataFileName[]; +@@ -1668,7 +1668,7 @@ extern const char kCbdTimeframeRequiredName[]; + extern const char kCbdTimeframeRequiredDescription[]; + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + extern const char kPolicyIndicationForManagedDefaultSearchName[]; + extern const char kPolicyIndicationForManagedDefaultSearchDescription[]; + #endif +@@ -1850,7 +1850,7 @@ extern const char kSiteInstanceGroupsForDataUrlsName[] + extern const char kSiteInstanceGroupsForDataUrlsDescription[]; + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + extern const char kSiteSearchSettingsPolicyName[]; + extern const char kSiteSearchSettingsPolicyDescription[]; + #endif +@@ -4245,7 +4245,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) -@@ -4400,14 +4400,14 @@ extern const char kSearchWebInSidePanelDescription[]; - // Random platform combinations ----------------------------------------------- +@@ -4385,7 +4385,7 @@ extern const char kV4L2FlatStatefulVideoDecoderDescrip + + // Linux --------------------------------------------------------------------- + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + extern const char kOzonePlatformHintChoiceDefault[]; + extern const char kOzonePlatformHintChoiceAuto[]; + extern const char kOzonePlatformHintChoiceX11[]; +@@ -4418,14 +4418,14 @@ extern const char kZeroCopyVideoCaptureDescription[]; + #endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_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) -@@ -4417,7 +4417,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa +@@ -4435,7 +4435,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[]; -@@ -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[]; -@@ -4435,13 +4435,13 @@ extern const char kForcePasswordInitialSyncWhenDecrypt - extern const char kForcePasswordInitialSyncWhenDecryptionFailsDescription[]; +@@ -4446,13 +4446,13 @@ extern const char kRestartToGainAccessToKeychainName[] + extern const char kRestartToGainAccessToKeychainDescription[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kAsyncDnsName[]; extern const char kAsyncDnsDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kFollowingFeedSidepanelName[]; extern const char kFollowingFeedSidepanelDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -4452,7 +4452,7 @@ extern const char kEnableProtoApiForClassifyUrlName[]; +@@ -4463,7 +4463,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[]; -@@ -4534,7 +4534,7 @@ extern const char kElementCaptureDescription[]; +@@ -4540,7 +4540,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[]; -@@ -4570,7 +4570,7 @@ extern const char kComposeName[]; +@@ -4576,7 +4576,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_headless_headless__mode__util.cc b/www/ungoogled-chromium/files/patch-chrome_browser_headless_headless__mode__util.cc index 12122d6e4de4..7bb36af66b13 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_headless_headless__mode__util.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_headless_headless__mode__util.cc @@ -1,20 +1,20 @@ ---- chrome/browser/headless/headless_mode_util.cc.orig 2023-11-04 07:08:51 UTC +--- chrome/browser/headless/headless_mode_util.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/headless/headless_mode_util.cc @@ -18,7 +18,7 @@ #include "chrome/common/chrome_switches.h" #include "content/public/common/content_switches.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/gl/gl_switches.h" // nogncheck #include "ui/ozone/public/ozone_switches.h" // nogncheck #endif // BUILDFLAG(IS_LINUX) -@@ -81,7 +81,7 @@ class HeadlessModeHandleImpl : public HeadlessModeHand +@@ -86,7 +86,7 @@ class HeadlessModeHandleImpl : public HeadlessModeHand command_line->AppendSwitchPath(switches::kUserDataDir, GetUserDataDir()); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Headless mode on Linux relies on ozone/headless platform. command_line->AppendSwitchASCII(::switches::kOzonePlatform, switches::kHeadless); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc index 6a75e0d1d3c0..1c71afe2b523 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc @@ -1,47 +1,47 @@ ---- chrome/browser/media/webrtc/chrome_screen_enumerator.cc.orig 2023-11-04 07:08:51 UTC +--- chrome/browser/media/webrtc/chrome_screen_enumerator.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/media/webrtc/chrome_screen_enumerator.cc @@ -21,7 +21,7 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) #include "ash/shell.h" #include "ui/aura/window.h" -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/functional/callback.h" #include "content/public/browser/desktop_capture.h" #endif -@@ -32,7 +32,7 @@ base::LazyInstance>::Destru - root_windows_for_testing_ = LAZY_INSTANCE_INITIALIZER; +@@ -32,7 +32,7 @@ base::LazyInstance>::DestructorAtExit g_desktop_capturer_for_testing = LAZY_INSTANCE_INITIALIZER; -@@ -78,7 +78,7 @@ blink::mojom::StreamDevicesSetPtr EnumerateScreens( +@@ -79,7 +79,7 @@ blink::mojom::StreamDevicesSetPtr EnumerateScreens( return stream_devices_set; } -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) blink::mojom::StreamDevicesSetPtr EnumerateScreens( blink::mojom::MediaStreamType stream_type) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); -@@ -129,7 +129,7 @@ void ChromeScreenEnumerator::SetRootWindowsForTesting( +@@ -130,7 +130,7 @@ void ChromeScreenEnumerator::SetRootWindowsForTesting( root_windows_for_testing_.Get() = std::move(root_windows); } -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void ChromeScreenEnumerator::SetDesktopCapturerForTesting( std::unique_ptr capturer) { g_desktop_capturer_for_testing.Get() = std::move(capturer); -@@ -142,7 +142,7 @@ void ChromeScreenEnumerator::EnumerateScreens( +@@ -143,7 +143,7 @@ void ChromeScreenEnumerator::EnumerateScreens( ScreensCallback screens_callback) const { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) content::GetUIThreadTaskRunner({})->PostTaskAndReplyWithResult( FROM_HERE, base::BindOnce(::EnumerateScreens, stream_type), base::BindOnce( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.h b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.h index a4c23bb1b520..4ea5c93eefff 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.h @@ -1,20 +1,20 @@ ---- chrome/browser/media/webrtc/chrome_screen_enumerator.h.orig 2023-03-10 11:01:21 UTC +--- chrome/browser/media/webrtc/chrome_screen_enumerator.h.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/media/webrtc/chrome_screen_enumerator.h -@@ -21,7 +21,7 @@ namespace aura { +@@ -20,7 +20,7 @@ namespace aura { class Window; } -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) namespace webrtc { class DesktopCapturer; } @@ -42,7 +42,7 @@ class ChromeScreenEnumerator : public media::ScreenEnu - #if BUILDFLAG(IS_CHROMEOS_ASH) - static void SetRootWindowsForTesting(std::vector root_windows); + static void SetRootWindowsForTesting( + std::vector> root_windows); -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) static void SetDesktopCapturerForTesting( std::unique_ptr capturer); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_desktop__media__picker__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_desktop__media__picker__controller.cc new file mode 100644 index 000000000000..4f0bfcbf404a --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_desktop__media__picker__controller.cc @@ -0,0 +1,11 @@ +--- chrome/browser/media/webrtc/desktop_media_picker_controller.cc.orig 2024-02-25 20:22:18 UTC ++++ chrome/browser/media/webrtc/desktop_media_picker_controller.cc +@@ -92,7 +92,7 @@ bool DesktopMediaPickerController::IsSystemAudioCaptur + } else { + return base::FeatureList::IsEnabled(media::kMacLoopbackAudioForScreenShare); + } +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (request_source == Params::RequestSource::kCast) { + return base::FeatureList::IsEnabled(media::kPulseaudioLoopbackForCast); + } else { diff --git a/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 0f0589ee302e..b15645e93c98 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc @@ -1,55 +1,55 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc -@@ -78,8 +78,10 @@ +@@ -79,8 +79,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" -@@ -104,7 +106,7 @@ +@@ -105,7 +107,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) -@@ -113,7 +115,7 @@ +@@ -114,7 +116,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 -@@ -837,7 +839,7 @@ void RecordStartupMetrics() { +@@ -838,7 +840,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, -@@ -1145,11 +1147,11 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt +@@ -1142,11 +1144,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 884b8ffe80c2..6f2ce41b252c 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 2024-02-03 15:42:55 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h -@@ -33,7 +33,7 @@ class PowerMetricsReporter; +@@ -28,7 +28,7 @@ class PowerMetricsReporter; class ProcessMonitor; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class PressureMetricsReporter; #endif // BUILDFLAG(IS_LINUX) -@@ -131,7 +131,7 @@ class ChromeBrowserMainExtraPartsMetrics : public Chro +@@ -115,7 +115,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 8ace2339f351..a6ce0b2fad01 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,92 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -185,7 +185,7 @@ +@@ -191,7 +191,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 -@@ -202,7 +202,7 @@ +@@ -208,7 +208,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) -@@ -806,7 +806,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -581,7 +581,7 @@ void ChromeMetricsServiceClient::RegisterPrefs(PrefReg + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + metrics::structured::StructuredMetricsService::RegisterPrefs(registry); + + #if !BUILDFLAG(IS_CHROMEOS_ASH) +@@ -767,7 +767,7 @@ void ChromeMetricsServiceClient::Initialize() { + RegisterUKMProviders(); + } + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + metrics::structured::Recorder::GetInstance()->SetUiTaskRunner( + base::SequencedTaskRunner::GetCurrentDefault()); + #endif +@@ -814,7 +814,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 -@@ -891,7 +891,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -899,7 +899,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) metrics_service_->RegisterMetricsProvider( std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || -@@ -1004,7 +1004,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -1009,7 +1009,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) -@@ -1204,7 +1204,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1174,7 +1174,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve + } + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + // Begin initializing the structured metrics system. Initialization must wait + // until a profile is added, because it reads keys stored within the user's + // cryptohome. We only initialize for profiles that are valid candidates +@@ -1205,7 +1205,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) // This creates the DesktopProfileSessionDurationsServices if it didn't exist // already. metrics::DesktopProfileSessionDurationsServiceFactory::GetForBrowserContext( +@@ -1548,7 +1548,7 @@ void ChromeMetricsServiceClient::CreateStructuredMetri + recorder = + std::make_unique( + cros_system_profile_provider_.get()); +-#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + + // Make sure that Structured Metrics recording delegates have been created + // before the service is created. This is handled in other places for ChromeOS diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.cc index 579260e4a05e..8e61a39758b9 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.cc @@ -1,174 +1,174 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2024-02-25 20:22:18 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_ +@@ -137,7 +137,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 +@@ -145,7 +145,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 +@@ -191,7 +191,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 +@@ -206,7 +206,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 +@@ -216,7 +216,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() +@@ -258,11 +258,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() +@@ -278,7 +278,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() { +@@ -508,7 +508,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 +@@ -566,7 +566,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 +@@ -580,7 +580,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) -@@ -570,7 +570,7 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -606,7 +606,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:: -@@ -625,7 +625,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -661,7 +661,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) -@@ -649,7 +649,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -685,7 +685,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, -@@ -658,11 +658,11 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -694,11 +694,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) -@@ -715,7 +715,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea +@@ -751,7 +751,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) -@@ -929,7 +929,7 @@ bool SystemNetworkContextManager::IsNetworkSandboxEnab +@@ -954,7 +954,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; } -@@ -1010,7 +1010,7 @@ void SystemNetworkContextManager::UpdateExplicitlyAllo +@@ -1040,7 +1040,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 9dfce83009dd..09212c2356b7 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.h @@ -1,29 +1,29 @@ ---- chrome/browser/net/system_network_context_manager.h.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/net/system_network_context_manager.h.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/net/system_network_context_manager.h -@@ -185,7 +185,7 @@ class SystemNetworkContextManager { +@@ -200,7 +200,7 @@ class SystemNetworkContextManager { class URLLoaderFactoryForSystem; class NetworkProcessLaunchWatcher; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class GssapiLibraryLoadObserver : public network::mojom::GssapiLibraryLoadObserver { public: -@@ -221,7 +221,7 @@ class SystemNetworkContextManager { +@@ -236,7 +236,7 @@ class SystemNetworkContextManager { void UpdateExplicitlyAllowedNetworkPorts(); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Applies the current value of the kEnforceLocalAnchorConstraintsEnabled // pref to the enforcement state. void UpdateEnforceLocalAnchorConstraintsEnabled(); -@@ -269,7 +269,7 @@ class SystemNetworkContextManager { +@@ -284,7 +284,7 @@ class SystemNetworkContextManager { - static absl::optional certificate_transparency_enabled_for_testing_; + static std::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_new__tab__page_new__tab__page__util.cc b/www/ungoogled-chromium/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc index 7a62f7247a11..dc3028ad57a1 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc @@ -1,20 +1,11 @@ ---- chrome/browser/new_tab_page/new_tab_page_util.cc.orig 2022-10-29 17:50:56 UTC +--- chrome/browser/new_tab_page/new_tab_page_util.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/new_tab_page/new_tab_page_util.cc -@@ -11,7 +11,7 @@ - - namespace { - bool IsOsSupportedForRecipe() { --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - return true; - #else - return false; -@@ -27,7 +27,7 @@ bool IsOsSupportedForCart() { +@@ -20,7 +20,7 @@ bool IsOsSupportedForCart() { } bool IsOsSupportedForDrive() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc new file mode 100644 index 000000000000..a1f687846576 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc @@ -0,0 +1,11 @@ +--- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2024-02-25 20:22:18 UTC ++++ chrome/browser/password_manager/chrome_password_manager_client.cc +@@ -674,7 +674,7 @@ void ChromePasswordManagerClient::NotifyUserCredential + } + + void ChromePasswordManagerClient::NotifyKeychainError() { +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + PasswordsClientUIDelegate* manage_passwords_ui_controller = + PasswordsClientUIDelegateFromWebContents(web_contents()); + manage_passwords_ui_controller->OnKeychainError(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc index 1614b36758d1..e5bc03875298 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 2024-02-03 15:42:55 UTC +--- chrome/browser/password_manager/password_reuse_manager_factory.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/password_manager/password_reuse_manager_factory.cc -@@ -133,7 +133,7 @@ PasswordReuseManagerFactory::BuildServiceInstanceForBr +@@ -136,7 +136,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_permissions_chrome__permissions__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_permissions_chrome__permissions__client.cc new file mode 100644 index 000000000000..0435c73bf859 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_permissions_chrome__permissions__client.cc @@ -0,0 +1,11 @@ +--- chrome/browser/permissions/chrome_permissions_client.cc.orig 2024-02-25 20:22:18 UTC ++++ chrome/browser/permissions/chrome_permissions_client.cc +@@ -225,7 +225,7 @@ void ChromePermissionsClient::AreSitesImportant( + bool ChromePermissionsClient::IsCookieDeletionDisabled( + content::BrowserContext* browser_context, + const GURL& origin) { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + if (!base::FeatureList::IsEnabled( + supervised_user::kClearingCookiesKeepsSupervisedUsersSignedIn)) { + return false; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_platform__util__linux.cc b/www/ungoogled-chromium/files/patch-chrome_browser_platform__util__linux.cc index 177b7cc5e8e7..cc687607ab05 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_platform__util__linux.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_platform__util__linux.cc @@ -1,12 +1,12 @@ ---- chrome/browser/platform_util_linux.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/platform_util_linux.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/platform_util_linux.cc -@@ -299,7 +299,9 @@ void RunCommand(const std::string& command, +@@ -300,7 +300,9 @@ void RunCommand(const std::string& command, base::LaunchOptions options; options.current_directory = working_directory; +#if !BUILDFLAG(IS_BSD) options.allow_new_privs = true; +#endif // xdg-open can fall back on mailcap which eventually might plumb through // to a command that needs a terminal. Set the environment variable telling // it that we definitely don't have a terminal available and that it should diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc index c16ee001da08..305b5699eb27 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,227 +1,227 @@ ---- 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.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -221,19 +221,20 @@ +@@ -222,19 +222,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) || -@@ -244,7 +245,7 @@ +@@ -245,7 +246,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[] = +@@ -808,14 +809,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 }, -@@ -1545,7 +1546,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - base::Value::Type::LIST }, +@@ -1554,7 +1555,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kGSSAPILibraryName, prefs::kGSSAPILibraryName, base::Value::Type::STRING }, -@@ -1590,7 +1591,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1599,7 +1600,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 }, -@@ -1616,18 +1617,18 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1625,18 +1626,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 }, -@@ -1640,7 +1641,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1649,7 +1650,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 }, -@@ -1738,7 +1739,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1747,7 +1748,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 }, -@@ -1831,7 +1832,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1845,7 +1846,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. -@@ -1840,7 +1841,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1854,7 +1855,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 }, -@@ -1865,7 +1866,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1879,7 +1880,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 }, -@@ -1941,7 +1942,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1943,7 +1944,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = ash::prefs::kUrlParameterToAutofillSAMLUsername, base::Value::Type::STRING }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) { key::kTabDiscardingExceptions, performance_manager::user_tuning::prefs::kManagedTabDiscardingExceptions, base::Value::Type::LIST }, -@@ -1969,7 +1970,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1971,7 +1972,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 }, -@@ -2006,7 +2007,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2003,7 +2004,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}, -@@ -2116,7 +2117,7 @@ std::unique_ptr BuildH +@@ -2128,7 +2129,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()); + std::make_unique()); // Note: This needs to be created after `DefaultSearchPolicyHandler`. -@@ -2295,7 +2296,7 @@ std::unique_ptr BuildH +@@ -2307,7 +2308,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( -@@ -2353,7 +2354,7 @@ std::unique_ptr BuildH +@@ -2365,7 +2366,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( -@@ -2747,7 +2748,7 @@ std::unique_ptr BuildH +@@ -2755,7 +2756,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( -@@ -2755,7 +2756,7 @@ std::unique_ptr BuildH +@@ -2763,7 +2764,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)); -@@ -2772,7 +2773,7 @@ std::unique_ptr BuildH +@@ -2780,7 +2781,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 +@@ -2805,7 +2806,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 5713b9a7e612..3de7bd419073 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 2024-02-03 15:42:55 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -490,18 +490,18 @@ +@@ -483,18 +483,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 -@@ -533,7 +533,7 @@ +@@ -526,7 +526,7 @@ #include "chrome/browser/sessions/session_service_log.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/color/system_theme.h" #endif -@@ -657,7 +657,7 @@ const char kPluginsPluginsList[] = "plugins.plugins_li +@@ -564,7 +564,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) -@@ -1017,7 +1017,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistryS - #endif // BUILDFLAG(IS_CHROMEOS_ASH) - - // Deprecated 02/2023. +@@ -969,7 +969,7 @@ const char kBorealisVmTokenHash[] = "borealis.vm_token + // key). + void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) { + // 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) -@@ -2022,12 +2022,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -1979,12 +1979,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 -@@ -2187,7 +2187,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local - #endif // BUILDFLAG(IS_CHROMEOS_ASH) +@@ -2114,7 +2114,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local + // Please don't delete the preceding line. It is used by PRESUBMIT.py. - // Added 02/2023 + // 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_print__backend__service__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc index 11426053cb7a..14bcaf018fb2 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc @@ -1,29 +1,29 @@ ---- chrome/browser/printing/print_backend_service_manager.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/printing/print_backend_service_manager.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/printing/print_backend_service_manager.cc -@@ -33,7 +33,7 @@ - #include "printing/buildflags/buildflags.h" +@@ -34,7 +34,7 @@ + #include "printing/printing_context.h" #include "printing/printing_features.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "content/public/common/content_switches.h" #endif -@@ -849,7 +849,7 @@ PrintBackendServiceManager::GetServiceFromBundle( +@@ -853,7 +853,7 @@ PrintBackendServiceManager::GetServiceFromBundle( host.BindNewPipeAndPassReceiver(), content::ServiceProcessHost::Options() .WithDisplayName(IDS_UTILITY_PROCESS_PRINT_BACKEND_SERVICE_NAME) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) .WithExtraCommandLineSwitches({switches::kMessageLoopTypeUi}) #endif .Pass()); -@@ -1022,7 +1022,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate +@@ -1026,7 +1026,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate return kNoClientsRegisteredResetOnIdleTimeout; case ClientType::kQueryWithUi: -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // No need to update if there were other query with UI clients. if (HasQueryWithUiClientForRemoteId(remote_id)) { - return absl::nullopt; + return std::nullopt; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc index 466db643ca3c..2f8c5b6d654c 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,110 @@ ---- 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.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -401,18 +401,18 @@ +@@ -313,7 +313,7 @@ + #include "chromeos/constants/chromeos_features.h" + #endif + +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "chrome/browser/policy/messaging_layer/util/manual_test_heartbeat_event_factory.h" + #endif + +@@ -408,18 +408,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" -@@ -643,7 +643,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -646,7 +646,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(); -@@ -763,26 +763,26 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -764,26 +764,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) -@@ -900,7 +900,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -907,7 +907,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 -@@ -998,7 +998,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1012,7 +1012,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(); -@@ -1042,7 +1042,7 @@ void ChromeBrowserMainExtraPartsProfiles:: - #if !BUILDFLAG(IS_ANDROID) - ProfileThemeUpdateServiceFactory::GetInstance(); +@@ -1053,7 +1053,7 @@ void ChromeBrowserMainExtraPartsProfiles:: + #if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_ANDROID) + ProfileStatisticsFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ProfileTokenWebSigninInterceptorFactory::GetInstance(); #endif #if !BUILDFLAG(IS_ANDROID) +@@ -1071,7 +1071,7 @@ void ChromeBrowserMainExtraPartsProfiles:: + #endif + ReduceAcceptLanguageFactory::GetInstance(); + RendererUpdaterFactory::GetInstance(); +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + reporting::ManualTestHeartbeatEventFactory::GetInstance(); + #endif + #if BUILDFLAG(IS_CHROMEOS_LACROS) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc index 3cd115e60e00..e46469e2491f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc @@ -1,40 +1,40 @@ ---- chrome/browser/profiles/profile_impl.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/profiles/profile_impl.cc -@@ -258,6 +258,10 @@ +@@ -259,6 +259,10 @@ #include "chrome/browser/spellchecker/spellcheck_service.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + using bookmarks::BookmarkModel; using content::BrowserThread; using content::DownloadManagerDelegate; -@@ -603,7 +607,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async +@@ -590,7 +594,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async #else { #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ProfileManager* profile_manager = g_browser_process->profile_manager(); ProfileAttributesEntry* entry = profile_manager->GetProfileAttributesStorage() -@@ -871,7 +875,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) +@@ -860,7 +864,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) } base::FilePath ProfileImpl::last_selected_directory() { +#if BUILDFLAG(IS_OPENBSD) + // If unveil(2) is used, force the file dialog directory to something we + // know is available. + auto* sandbox = sandbox::policy::SandboxLinux::GetInstance(); + if (sandbox->unveil_initialized()) + return GetPrefs()->GetFilePath(prefs::kDownloadDefaultDirectory); + else + return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); +#else return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); +#endif } void ProfileImpl::set_last_selected_directory(const base::FilePath& path) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profiles__state.cc b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profiles__state.cc index 2bcbb22727c5..d60cc7000953 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profiles__state.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profiles__state.cc @@ -1,11 +1,11 @@ ---- chrome/browser/profiles/profiles_state.cc.orig 2023-06-05 19:39:05 UTC +--- chrome/browser/profiles/profiles_state.cc.orig 2024-02-25 20:22:18 UTC +++ chrome/browser/profiles/profiles_state.cc -@@ -181,7 +181,7 @@ bool IsGuestModeRequested(const base::CommandLine& com +@@ -194,7 +194,7 @@ bool IsGuestModeRequested(const base::CommandLine& com PrefService* local_state, bool show_warning) { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) DCHECK(local_state); // Check if guest mode enforcement commandline switch or policy are provided. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_resources_sandbox__internals_sandbox__internals.ts b/www/ungoogled-chromium/files/patch-chrome_browser_resources_sandbox__internals_sandbox__internals.ts deleted file mode 100644 index f526fb2373ea..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_resources_sandbox__internals_sandbox__internals.ts +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/resources/sandbox_internals/sandbox_internals.ts.orig 2023-02-11 09:11:04 UTC -+++ chrome/browser/resources/sandbox_internals/sandbox_internals.ts -@@ -2,7 +2,7 @@ - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - --// -+// - import './strings.m.js'; - - import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; -@@ -121,7 +121,7 @@ function androidHandler() { - } - // - --// -+// - - /** - * Adds a status row that reports either Yes or No. -@@ -182,7 +182,7 @@ document.addEventListener('DOMContentLoaded', () => { - // - androidHandler(); - // -- // -+ // - linuxHandler(); - // - }); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts b/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts deleted file mode 100644 index 0f682ebe3cf3..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.ts.orig 2023-08-18 10:26:52 UTC -+++ chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.ts -@@ -18,7 +18,7 @@ export interface AppearanceBrowserProxy { - - useDefaultTheme(): void; - -- // -+ // - useGtkTheme(): void; - useQtTheme(): void; - // -@@ -48,7 +48,7 @@ export class AppearanceBrowserProxyImpl implements App - chrome.send('useDefaultTheme'); - } - -- // -+ // - useGtkTheme() { - chrome.send('useGtkTheme'); - } diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html b/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html deleted file mode 100644 index b09764b89f4f..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2023-09-17 07:59:53 UTC -+++ chrome/browser/resources/settings/appearance_page/appearance_page.html -@@ -27,7 +27,7 @@ -
-
$i18n{themes}
[[themeSublabel_]]
-
-- -+ - - -- -+ -