diff --git a/www/ungoogled-chromium/Makefile b/www/ungoogled-chromium/Makefile index 8c5877eb30a2..82a3b764ce7c 100644 --- a/www/ungoogled-chromium/Makefile +++ b/www/ungoogled-chromium/Makefile @@ -1,405 +1,405 @@ PORTNAME= ungoogled-chromium -PORTVERSION= 118.0.5993.117 +PORTVERSION= 119.0.6045.105 UGVERSION= ${DISTVERSION}-1 CATEGORIES= www wayland MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ https://nerd.hu/distfiles/:external DISTFILES= chromium-${DISTVERSION}${EXTRACT_SUFX} \ ungoogled-chromium-${UGVERSION}.tar.gz:external MAINTAINER= chromium@FreeBSD.org COMMENT= Google web browser based on WebKit sans integration with Google WWW= https://github.com/ungoogled-software/ungoogled-chromium LICENSE= BSD3CLAUSE LGPL21 MPL11 LICENSE_COMB= multi ONLY_FOR_ARCHS= aarch64 amd64 i386 PATCH_DEPENDS= gpatch:devel/patch \ ${PYTHON_VERSION}:lang/python${PYTHON_SUFFIX} BUILD_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \ gperf:devel/gperf \ flock:sysutils/flock \ node:www/node \ xcb-proto>0:x11/xcb-proto \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ ${LOCALBASE}/share/usbids/usb.ids:misc/usbids \ ${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib@${PY_FLAVOR} \ ${LOCALBASE}/include/va/va.h:multimedia/libva \ ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri \ ${LOCALBASE}/libdata/pkgconfig/Qt5Core.pc:devel/qt5-core \ ${LOCALBASE}/libdata/pkgconfig/Qt5Widgets.pc:x11-toolkits/qt5-widgets LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-core \ libatspi.so:accessibility/at-spi2-core \ libspeechd.so:accessibility/speech-dispatcher \ libsnappy.so:archivers/snappy \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libepoll-shim.so:devel/libepoll-shim \ libevent.so:devel/libevent \ libffi.so:devel/libffi \ libicuuc.so:devel/icu \ libjsoncpp.so:devel/jsoncpp \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libcairo.so:graphics/cairo \ libdrm.so:graphics/libdrm \ libexif.so:graphics/libexif \ libpng.so:graphics/png \ libwebp.so:graphics/webp \ libdav1d.so:multimedia/dav1d \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libfontconfig.so:x11-fonts/fontconfig \ libwayland-client.so:graphics/wayland \ libxkbcommon.so:x11/libxkbcommon \ libxshmfence.so:x11/libxshmfence RUN_DEPENDS= xdg-open:devel/xdg-utils \ noto-basic>0:x11-fonts/noto-basic USES= bison compiler:c++17-lang cpe desktop-file-utils gl gmake gnome \ iconv:wchar_t jpeg localbase:ldflags ninja perl5 pkgconfig \ python:build qt:5 shebangfix tar:xz xorg CPE_VENDOR= google CPE_PRODUCT= chrome USE_GL= gbm gl USE_GNOME= atk dconf gdkpixbuf2 glib20 gtk30 libxml2 libxslt USE_LDCONFIG= ${DATADIR} USE_PERL5= build USE_XORG= x11 xcb xcomposite xcursor xext xdamage xfixes xi \ xorgproto xrandr xrender xscrnsaver xtst USE_QT= buildtools:build SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper buildtools/linux64/clang-format MAKE_ARGS= -C out/${BUILDTYPE} ALL_TARGET= chrome BINARY_ALIAS= python3=${PYTHON_CMD} \ moc=${PREFIX}/bin/moc-qt5 # TODO bz@ : install libwidevinecdm.so (see third_party/widevine/cdm/BUILD.gn) # # Run "./out/${BUILDTYPE}/gn args out/${BUILDTYPE} --list" for all variables. # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= enable_widevine=true \ fatal_linker_warnings=false \ icu_use_data_file=false \ is_clang=true \ optimize_webui=true \ toolkit_views=true \ use_allocator_shim=false \ use_aura=true \ use_custom_libcxx=false \ use_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_hangout_services_extension=false \ enable_mdns=false \ enable_nacl=false \ enable_reading_list=false \ enable_remoting=false \ enable_reporting=false \ enable_rust=false \ enable_service_discovery=false \ exclude_unwind_tables=true \ google_api_key="" \ google_default_client_id="" \ google_default_client_secret="" \ safe_browsing_mode=0 \ treat_warnings_as_errors=false \ use_official_google_api_keys=false \ use_unofficial_version_number=false # TODO: investigate building with these options: # use_system_minigbm GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles SUB_FILES= ungoogled-chromium.desktop ungoogled-chromium SUB_LIST+= COMMENT="${COMMENT}" OPTIONS_DEFINE= CODECS CUPS DEBUG DRIVER KERBEROS LTO PIPEWIRE TEST WIDEVINE OPTIONS_DEFAULT= CODECS CUPS DRIVER KERBEROS PIPEWIRE SNDIO OPTIONS_EXCLUDE_aarch64=LTO OPTIONS_GROUP= AUDIO OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO OPTIONS_RADIO= KERBEROS OPTIONS_RADIO_KERBEROS= HEIMDAL HEIMDAL_BASE MIT OPTIONS_SUB= yes CODECS_DESC= Compile and enable patented codecs like H.264 DRIVER_DESC= Install chromedriver HEIMDAL_BASE_DESC= Heimdal Kerberos (base) HEIMDAL_DESC= Heimdal Kerberos (security/heimdal) MIT_DESC= MIT Kerberos (security/krb5) ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \ alsa-lib>=1.1.1_1:audio/alsa-lib ALSA_VARS= GN_ARGS+=use_alsa=true ALSA_VARS_OFF= GN_ARGS+=use_alsa=false CODECS_VARS= GN_ARGS+=proprietary_codecs=true \ FFMPEG_BRAND="Chrome" CODECS_VARS_OFF= GN_ARGS+=proprietary_codecs=false \ FFMPEG_BRAND="Chromium" CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_VARS= GN_ARGS+=use_cups=true CUPS_VARS_OFF= GN_ARGS+=use_cups=false DEBUG_BUILD_DEPENDS= esbuild:devel/esbuild DEBUG_VARS= BUILDTYPE=Debug \ GN_ARGS+=is_debug=true \ GN_ARGS+=is_component_build=false \ GN_ARGS+=symbol_level=1 \ GN_BOOTSTRAP_FLAGS+=--debug \ WANTSPACE="21 GB" DEBUG_VARS_OFF= BUILDTYPE=Release \ GN_ARGS+=blink_symbol_level=0 \ GN_ARGS+=is_debug=false \ GN_ARGS+=is_official_build=true \ GN_ARGS+=symbol_level=0 \ WANTSPACE="14 GB" DRIVER_MAKE_ARGS= chromedriver HEIMDAL_LIB_DEPENDS= libkrb.so.26:security/heimdal KERBEROS_VARS= GN_ARGS+=use_kerberos=true KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false LTO_VARS= GN_ARGS+=use_thin_lto=true \ GN_ARGS+=thin_lto_enable_optimizations=true \ WANTSPACE="14 GB" LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false MIT_LIB_DEPENDS= libkrb.so.3:security/krb5 PIPEWIRE_DESC= Screen capture via PipeWire PIPEWIRE_LIB_DEPENDS= libpipewire-0.3.so:multimedia/pipewire PIPEWIRE_VARS= GN_ARGS+=rtc_use_pipewire=true \ GN_ARGS+=rtc_link_pipewire=true PIPEWIRE_VARS_OFF= GN_ARGS+=rtc_use_pipewire=false \ GN_ARGS+=rtc_link_pipewire=false PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false # With SNDIO=on we exclude audio_manager_linux from the build (see # media/audio/BUILD.gn) and use audio_manager_openbsd which does not # support falling back to ALSA or PulseAudio. SNDIO_PREVENTS= ALSA PULSEAUDIO SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_VARS= GN_ARGS+=use_sndio=true SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false WIDEVINE_DESC= Depend on foreign-cdm to enable playback of DRM content WIDEVINE_RUN_DEPENDS= foreign-cdm>0:www/foreign-cdm .include "Makefile.tests" TEST_DISTFILES= chromium-${DISTVERSION}-testdata${EXTRACT_SUFX} \ test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz:external TEST_ALL_TARGET= ${TEST_TARGETS} .include .include # for COMPILER_VERSION .if ${PORT_OPTIONS:MHEIMDAL_BASE} && !exists(/usr/lib/libkrb5.so) IGNORE= you have selected HEIMDAL_BASE but do not have Heimdal installed in base .endif .if ${COMPILER_VERSION} < 160 LLVM_DEFAULT= 16 BUILD_DEPENDS+= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} BINARY_ALIAS+= cpp=${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT} \ cc=${LOCALBASE}/bin/clang${LLVM_DEFAULT} \ c++=${LOCALBASE}/bin/clang++${LLVM_DEFAULT} \ ar=${LOCALBASE}/bin/llvm-ar${LLVM_DEFAULT} \ nm=${LOCALBASE}/bin/llvm-nm${LLVM_DEFAULT} \ ld=${LOCALBASE}/bin/ld.lld${LLVM_DEFAULT} .else BINARY_ALIAS+= ar=/usr/bin/llvm-ar \ nm=/usr/bin/llvm-nm .endif # - swiftshader/lib/{libEGL.so,libGLESv2.so} is x86 only # - map ffmpeg target to ${ARCH} .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " FFMPEG_TARGET= arm64 .elif ${ARCH} == amd64 BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" FFMPEG_TARGET= x64 .elif ${ARCH} == i386 BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" FFMPEG_TARGET= ia32 .endif FFMPEG_BDIR= ${WRKSRC}/build.${FFMPEG_TARGET}.freebsd/${FFMPEG_BRAND} FFMPEG_CDIR= ${WRKSRC}/third_party/ffmpeg/chromium/config/${FFMPEG_BRAND}/freebsd/${FFMPEG_TARGET} # Allow relocations against read-only segments (override lld default) LDFLAGS_i386= -Wl,-znotext # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include WRKSRC= ${WRKDIR}/chromium-${DISTVERSION} pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "To build Ungoogled Chromium, you should have around 2GB of memory" @${ECHO_MSG} "and around ${WANTSPACE} of free disk space." @${ECHO_MSG} post-extract-TEST-on: @${MKDIR} ${WRKSRC}/third_party/test_fonts/test_fonts @${MV} ${WRKDIR}/test_fonts ${WRKSRC}/third_party/test_fonts/ pre-patch: cd ${WRKDIR}/ungoogled-chromium-${UGVERSION} && ${PYTHON_CMD} \ utils/prune_binaries.py ${WRKSRC} pruning.list cd ${WRKDIR}/ungoogled-chromium-${UGVERSION} && PATCH_BIN=gpatch \ ${PYTHON_CMD} utils/patches.py apply ${WRKSRC} patches cd ${WRKDIR}/ungoogled-chromium-${UGVERSION} && ${PYTHON_CMD} \ utils/domain_substitution.py apply -r domain_regex.list -f \ domain_substitution.list -c ${WRKSRC}/domsubcache.tar.gz ${WRKSRC} pre-configure: # We used to remove bundled libraries to be sure that chromium uses # system libraries and not shipped ones. # cd ${WRKSRC} && ${PYTHON_CMD} \ #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved] cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ ./build/linux/unbundle/replace_gn_files.py --system-libraries \ dav1d flac fontconfig freetype harfbuzz-ng icu libdrm libevent libpng \ libusb libwebp libxml libxslt openh264 opus snappy || ${FALSE} # 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}${MANPREFIX}/man/man1/ungoogled-chromium.1 @${SED} -i "" -e 's,\@\@PACKAGE\@\@,chromium,g;s,\@\@MENUNAME\@\@,Chromium Web Browser,g' \ ${STAGEDIR}${MANPREFIX}/man/man1/ungoogled-chromium.1 ${CP} ${WRKSRC}/chrome/app/theme/chromium/product_logo_22_mono.png ${WRKSRC}/chrome/app/theme/chromium/product_logo_22.png .for s in 22 24 48 64 128 256 @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps ${INSTALL_DATA} ${WRKSRC}/chrome/app/theme/chromium/product_logo_${s}.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/ungoogled-chromium.png .endfor ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.png ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.pak ${STAGEDIR}${DATADIR} .for d in protoc mksnapshot ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor .for d in snapshot_blob.bin v8_context_snapshot.bin ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chrome \ ${STAGEDIR}${DATADIR}/ungoogled-chromium cd ${WRKSRC}/out/${BUILDTYPE} && \ ${COPYTREE_SHARE} "locales resources" ${STAGEDIR}${DATADIR} @${MKDIR} ${STAGEDIR}${DESKTOPDIR} ${INSTALL_DATA} ${WRKDIR}/ungoogled-chromium.desktop \ ${STAGEDIR}${DESKTOPDIR} ${INSTALL_SCRIPT} ${WRKDIR}/ungoogled-chromium ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/chrome/tools/build/linux/chrome-wrapper \ ${STAGEDIR}${DATADIR} # ANGLE, EGL, Vk .for f in libEGL.so libGLESv2.so libVkICD_mock_icd.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvulkan.so.1 \ ${STAGEDIR}${DATADIR}/libvulkan.so .if ${BUILDTYPE} == Debug ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libVkLayer_khronos_validation.so ${STAGEDIR}${DATADIR} .endif # SwiftShader .if ${ARCH} != aarch64 ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvk_swiftshader.so ${STAGEDIR}${DATADIR} .endif post-install-DEBUG-on: ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/*.so \ ${STAGEDIR}${DATADIR} ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/character_data_generator \ ${STAGEDIR}${DATADIR} post-install-DRIVER-on: ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver \ ${STAGEDIR}${PREFIX}/bin/ungoogled-chromedriver do-test-TEST-on: .for t in ${TEST_TARGETS} cd ${WRKSRC}/out/${BUILDTYPE} && ${SETENV} LC_ALL=en_US.UTF-8 \ ./${t} --gtest_filter=-${EXCLUDE_${t}:ts:} || ${TRUE} .endfor .include diff --git a/www/ungoogled-chromium/distinfo b/www/ungoogled-chromium/distinfo index a6ff4524face..1e5f817ded65 100644 --- a/www/ungoogled-chromium/distinfo +++ b/www/ungoogled-chromium/distinfo @@ -1,9 +1,9 @@ -TIMESTAMP = 1698422936 -SHA256 (chromium-118.0.5993.117.tar.xz) = 7029d851e4a2e8d5a145a6f6ba76f18f5c3043f57b2c750b35d96e92f3453786 -SIZE (chromium-118.0.5993.117.tar.xz) = 3249866084 -SHA256 (ungoogled-chromium-118.0.5993.117-1.tar.gz) = 41afb5933668b67059d48613c136c4535ed7a5a3387361cd118aff38593ae4e3 -SIZE (ungoogled-chromium-118.0.5993.117-1.tar.gz) = 660283 -SHA256 (chromium-118.0.5993.117-testdata.tar.xz) = cc7eb88774d2b6ab3c0c6c280526cab1c92319d57bfb42575dc0858b2ef09079 -SIZE (chromium-118.0.5993.117-testdata.tar.xz) = 267124300 +TIMESTAMP = 1699083208 +SHA256 (chromium-119.0.6045.105.tar.xz) = 73cb8c39e928f8c627d747d37a3b020f08913ef5508f893758d70bdbd545dbcf +SIZE (chromium-119.0.6045.105.tar.xz) = 3299629128 +SHA256 (ungoogled-chromium-119.0.6045.105-1.tar.gz) = e5d74a46cd79b79a3f2f8f8fadce8329ad50f4a4facd76365d28e0761173aa26 +SIZE (ungoogled-chromium-119.0.6045.105-1.tar.gz) = 659861 +SHA256 (chromium-119.0.6045.105-testdata.tar.xz) = 7b8e9f51677e64e2ad653aa5b915b74545299a259238ca1ffd24f1e677470f78 +SIZE (chromium-119.0.6045.105-testdata.tar.xz) = 271101180 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 fe1bfc5ebc11..5e53f231fe01 100644 --- a/www/ungoogled-chromium/files/patch-BUILD.gn +++ b/www/ungoogled-chromium/files/patch-BUILD.gn @@ -1,89 +1,89 @@ ---- BUILD.gn.orig 2023-10-13 13:20:35 UTC +--- BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ BUILD.gn @@ -61,7 +61,7 @@ declare_args() { root_extra_deps = [] } -if (is_official_build) { +if (is_official_build && !is_bsd) { # An official (maximally optimized!) component (optimized for build times) # build doesn't make sense and usually doesn't work. assert(!is_component_build) @@ -95,7 +95,6 @@ group("gn_all") { "//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") { } } - 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") { } } + 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", @@ -658,7 +666,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)" ] } @@ -1086,7 +1094,7 @@ if (use_blink && !is_cronet_build) { ] } - if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos) { + if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos && !is_bsd) { - script_test("webdriver_wpt_tests") { + script_test("chrome_wpt_tests") { script = "//third_party/blink/tools/run_wpt_tests.py" args = [ -@@ -1176,7 +1184,7 @@ if (use_blink && !is_cronet_build) { +@@ -1159,7 +1167,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)" ] } -@@ -1185,7 +1193,7 @@ if (use_blink && !is_cronet_build) { +@@ -1168,7 +1176,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)" ] } -@@ -1645,7 +1653,7 @@ group("chromium_builder_perf") { +@@ -1629,7 +1637,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 67aa35e39495..17a30c32de0c 100644 --- a/www/ungoogled-chromium/files/patch-base_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-base_BUILD.gn @@ -1,143 +1,143 @@ ---- base/BUILD.gn.orig 2023-10-13 13:20:35 UTC +--- base/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ base/BUILD.gn -@@ -198,7 +198,7 @@ buildflag_header("ios_cronet_buildflags") { +@@ -186,7 +186,7 @@ buildflag_header("ios_cronet_buildflags") { flags = [ "CRONET_BUILD=$is_cronet_build" ] } -enable_message_pump_epoll = is_linux || is_chromeos || is_android +enable_message_pump_epoll = (is_linux || is_chromeos || is_android) && !is_bsd buildflag_header("message_pump_buildflags") { header = "message_pump_buildflags.h" header_dir = "base/message_loop" -@@ -1111,11 +1111,23 @@ component("base") { +@@ -1101,11 +1101,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" ] -@@ -1135,7 +1147,7 @@ component("base") { +@@ -1125,7 +1137,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" ] } -@@ -2080,6 +2092,22 @@ component("base") { +@@ -2077,6 +2089,22 @@ component("base") { ] } + if (is_openbsd) { + sources += [ + "process/process_handle_openbsd.cc", + "process/process_iterator_openbsd.cc", + "process/process_metrics_openbsd.cc", + "system/sys_info_openbsd.cc", + ] + } else if (is_freebsd) { + sources += [ + "process/process_handle_freebsd.cc", + "process/process_iterator_freebsd.cc", + "process/process_metrics_freebsd.cc", + "system/sys_info_freebsd.cc", + ] + } + # iOS if (is_ios) { sources += [ -@@ -2212,6 +2240,29 @@ component("base") { +@@ -2209,6 +2237,29 @@ component("base") { } } + if (is_bsd) { + sources -= [ + "files/file_path_watcher_inotify.cc", + "files/scoped_file_linux.cc", + "system/sys_info_linux.cc", + "process/process_iterator_linux.cc", + "process/process_linux.cc", + "process/process_metrics_linux.cc", + "process/process_handle_linux.cc", + "profiler/stack_copier_signal.cc", + "profiler/stack_copier_signal.h", + "profiler/thread_delegate_posix.cc", + "profiler/thread_delegate_posix.h", + "threading/platform_thread_linux.cc", + ] + sources += [ + "files/file_path_watcher_kqueue.cc", + "files/file_path_watcher_kqueue.h", + "files/file_path_watcher_bsd.cc", + "threading/platform_thread_bsd.cc", + ] + } + if (use_blink) { sources += [ "files/file_path_watcher.cc", -@@ -2222,7 +2273,7 @@ component("base") { +@@ -2219,7 +2270,7 @@ component("base") { } if (dep_libevent) { - deps += [ "//third_party/libevent" ] + public_deps += [ "//third_party/libevent" ] } if (use_libevent) { -@@ -3596,7 +3647,7 @@ test("base_unittests") { +@@ -3599,7 +3650,7 @@ test("base_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "debug/proc_maps_linux_unittest.cc", "files/scoped_file_linux_unittest.cc", -@@ -3617,7 +3668,7 @@ test("base_unittests") { +@@ -3620,7 +3671,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", -@@ -3628,7 +3679,7 @@ test("base_unittests") { +@@ -3631,7 +3682,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" ] } -@@ -3884,7 +3935,7 @@ test("base_unittests") { +@@ -3892,7 +3943,7 @@ test("base_unittests") { } } - if (is_fuchsia || is_linux || is_chromeos) { + if ((is_fuchsia || is_linux || is_chromeos) && !is_bsd) { sources += [ "debug/elf_reader_unittest.cc", "debug/test_elf_image_builder.cc", diff --git a/www/ungoogled-chromium/files/patch-base_allocator_dispatcher_tls.h b/www/ungoogled-chromium/files/patch-base_allocator_dispatcher_tls.h index 4df995cf06b5..122247d1d432 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_dispatcher_tls.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_dispatcher_tls.h @@ -1,11 +1,11 @@ ---- base/allocator/dispatcher/tls.h.orig 2023-06-05 19:39:05 UTC +--- base/allocator/dispatcher/tls.h.orig 2023-11-04 07:08:51 UTC +++ base/allocator/dispatcher/tls.h -@@ -50,7 +50,7 @@ struct BASE_EXPORT MMapAllocator { +@@ -74,7 +74,7 @@ struct BASE_EXPORT MMapAllocator { partition_alloc::PartitionPageSize(); #elif BUILDFLAG(IS_APPLE) constexpr static size_t AllocationChunkSize = 16384; -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) constexpr static size_t AllocationChunkSize = 16384; #else constexpr static size_t AllocationChunkSize = 4096; diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_BUILD.gn b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_BUILD.gn index 3221722b44f5..6fad70ce0381 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_BUILD.gn @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/BUILD.gn.orig 2023-10-13 13:20:35 UTC +--- base/allocator/partition_allocator/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ base/allocator/partition_allocator/BUILD.gn -@@ -562,7 +562,7 @@ source_set("allocator_shim") { +@@ -569,7 +569,7 @@ source_set("allocator_shim") { ] configs += [ ":mac_no_default_new_delete_symbols" ] } - if (is_chromeos || is_linux) { + if ((is_chromeos || is_linux) && !is_bsd) { sources += [ "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_partition__alloc.gni b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni index 205a0817c445..042ffbd2d64c 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/partition_alloc.gni.orig 2023-10-13 13:20:35 UTC +--- base/allocator/partition_allocator/partition_alloc.gni.orig 2023-11-04 07:08:51 UTC +++ base/allocator/partition_allocator/partition_alloc.gni -@@ -328,7 +328,7 @@ declare_args() { +@@ -319,7 +319,7 @@ declare_args() { # pkeys support is explicitly disabled in all Cronet builds, as some test # dependencies that use partition_allocator are compiled in AOSP against a # version of glibc that does not include pkeys syscall numbers. - enable_pkeys = is_linux && target_cpu == "x64" && !is_cronet_build + enable_pkeys = (is_linux && !is_bsd) && target_cpu == "x64" && !is_cronet_build } assert(!enable_pkeys || (is_linux && target_cpu == "x64"), "Pkeys are only supported on x64 linux") diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_debug_stack__trace__posix.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_debug_stack__trace__posix.cc index ef9e4dc2877f..10b74b577ee3 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_debug_stack__trace__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_debug_stack__trace__posix.cc @@ -1,34 +1,34 @@ ---- base/allocator/partition_allocator/partition_alloc_base/debug/stack_trace_posix.cc.orig 2023-10-13 13:20:35 UTC +--- base/allocator/partition_allocator/partition_alloc_base/debug/stack_trace_posix.cc.orig 2023-11-04 07:08:51 UTC +++ base/allocator/partition_allocator/partition_alloc_base/debug/stack_trace_posix.cc @@ -12,11 +12,11 @@ #include #include -#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) #include // For ElfW() macro. #endif -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) #define HAVE_DLADDR #include #endif @@ -25,7 +25,7 @@ namespace partition_alloc::internal::base::debug { namespace { -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) constexpr size_t kBufferSize = 4096u; -@@ -359,7 +359,7 @@ void PrintStackTraceInternal(void* const* trace, size_ +@@ -359,7 +359,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(void* const* trace, size_t size) { + void PrintStackTraceInternal(const void* const* trace, size_t size) { diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h index 86e574f8011e..9545b1bfbd47 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h @@ -1,21 +1,21 @@ ---- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2023-09-17 07:59:53 UTC +--- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2023-11-04 07:08:51 UTC +++ base/allocator/partition_allocator/partition_alloc_constants.h -@@ -95,7 +95,7 @@ PartitionPageShift() { +@@ -107,7 +107,7 @@ PartitionPageShift() { return 18; // 256 KiB } #elif (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ - (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t PartitionPageShift() { return PageAllocationGranularityShift() + 2; -@@ -297,7 +297,8 @@ constexpr size_t kNumPools = kMaxPoolHandle - 1; +@@ -309,7 +309,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_base__paths__posix.cc b/www/ungoogled-chromium/files/patch-base_base__paths__posix.cc index 091857f7db2a..9fd6f5ce5b82 100644 --- a/www/ungoogled-chromium/files/patch-base_base__paths__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_base__paths__posix.cc @@ -1,98 +1,108 @@ ---- base/base_paths_posix.cc.orig 2022-10-01 07:40:07 UTC +--- base/base_paths_posix.cc.orig 2023-11-04 07:08:51 UTC +++ base/base_paths_posix.cc @@ -15,6 +15,7 @@ #include #include +#include "base/command_line.h" #include "base/environment.h" #include "base/files/file_path.h" #include "base/files/file_util.h" -@@ -25,9 +26,13 @@ +@@ -26,9 +27,13 @@ #include "base/process/process_metrics.h" #include "build/build_config.h" -#if BUILDFLAG(IS_FREEBSD) +#if BUILDFLAG(IS_BSD) #include #include +#if BUILDFLAG(IS_OPENBSD) +#include +#define MAXTOKENS 2 +#endif #elif BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_AIX) #include #endif -@@ -68,13 +73,65 @@ bool PathProviderPosix(int key, FilePath* result) { +@@ -48,8 +53,7 @@ bool PathProviderPosix(int key, FilePath* result) { + *result = bin_dir; + return true; + #elif BUILDFLAG(IS_FREEBSD) +- int name[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; +- absl::optional bin_dir = StringSysctl(name, std::size(name)); ++ absl::optional bin_dir = StringSysctl({ CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }); + if (!bin_dir.has_value() || bin_dir.value().length() <= 1) { + NOTREACHED() << "Unable to resolve path."; + return false; +@@ -65,13 +69,65 @@ bool PathProviderPosix(int key, FilePath* result) { *result = FilePath(bin_dir); return true; #elif BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_AIX) - // There is currently no way to get the executable path on OpenBSD - char* cpath; - if ((cpath = getenv("CHROME_EXE_PATH")) != NULL) - *result = FilePath(cpath); - else - *result = FilePath("/usr/local/chrome/chrome"); - return true; + char *cpath; +#if !BUILDFLAG(IS_AIX) + struct kinfo_file *files; + kvm_t *kd = NULL; + char errbuf[_POSIX2_LINE_MAX]; + static char retval[PATH_MAX]; + int cnt; + struct stat sb; + pid_t cpid = getpid(); + bool ret = false; + + const base::CommandLine* command_line = + base::CommandLine::ForCurrentProcess(); + + VLOG(1) << "PathProviderPosix argv: " << command_line->argv()[0]; + + if (realpath(command_line->argv()[0].c_str(), retval) == NULL) + goto out; + + if (stat(command_line->argv()[0].c_str(), &sb) < 0) + goto out; + + if (!command_line->HasSwitch("no-sandbox")) { + ret = true; + *result = FilePath(retval); + VLOG(1) << "PathProviderPosix (sandbox) result: " << retval; + goto out; + } + + if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL) + goto out; + + if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, cpid, + sizeof(struct kinfo_file), &cnt)) == NULL) + goto out; + + for (int i = 0; i < cnt; i++) { + if (files[i].fd_fd == KERN_FILE_TEXT && + files[i].va_fsid == static_cast(sb.st_dev) && + files[i].va_fileid == sb.st_ino) { + ret = true; + *result = FilePath(retval); + VLOG(1) << "PathProviderPosix result: " << retval; + } + } +out: + if (kd) + kvm_close(kd); + if (!ret) { +#endif + if ((cpath = getenv("CHROME_EXE_PATH")) != NULL) + *result = FilePath(cpath); + else + *result = FilePath("/usr/local/ungoogled-chromium/ungoogled-chromium"); + return true; +#if !BUILDFLAG(IS_AIX) + } + return ret; +#endif #endif } case DIR_SRC_TEST_DATA_ROOT: { diff --git a/www/ungoogled-chromium/files/patch-base_debug_stack__trace__posix.cc b/www/ungoogled-chromium/files/patch-base_debug_stack__trace__posix.cc index 3d0bf250ba3e..0cb049fb2255 100644 --- a/www/ungoogled-chromium/files/patch-base_debug_stack__trace__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_debug_stack__trace__posix.cc @@ -1,84 +1,101 @@ ---- base/debug/stack_trace_posix.cc.orig 2023-09-17 07:59:53 UTC +--- base/debug/stack_trace_posix.cc.orig 2023-11-04 07:08:51 UTC +++ base/debug/stack_trace_posix.cc @@ -41,7 +41,7 @@ // execinfo.h and backtrace(3) are really only present in glibc and in macOS // libc. #if BUILDFLAG(IS_APPLE) || \ - (defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__AIX)) + (defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__AIX) && !BUILDFLAG(IS_BSD)) #define HAVE_BACKTRACE #include #endif -@@ -59,7 +59,7 @@ +@@ -59,8 +59,10 @@ #include #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ++#if !BUILDFLAG(IS_BSD) + #include ++#endif + #include "base/debug/proc_maps_linux.h" #endif - -@@ -300,7 +300,7 @@ void PrintToStderr(const char* output) { +@@ -302,7 +304,7 @@ void PrintToStderr(const char* output) { std::ignore = HANDLE_EINTR(write(STDERR_FILENO, output, strlen(output))); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void AlarmSignalHandler(int signal, siginfo_t* info, void* void_context) { // We have seen rare cases on AMD linux where the default signal handler // either does not run or a thread (Probably an AMD driver thread) prevents -@@ -317,7 +317,11 @@ void AlarmSignalHandler(int signal, siginfo_t* info, v +@@ -319,7 +321,11 @@ void AlarmSignalHandler(int signal, siginfo_t* info, v "Warning: Default signal handler failed to terminate process.\n"); PrintToStderr("Calling exit_group() directly to prevent timeout.\n"); // See: https://man7.org/linux/man-pages/man2/exit_group.2.html +#if BUILDFLAG(IS_BSD) + _exit(EXIT_FAILURE); +#else syscall(SYS_exit_group, EXIT_FAILURE); +#endif } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || // BUILDFLAG(IS_CHROMEOS) -@@ -534,7 +538,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf +@@ -536,7 +542,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf _exit(EXIT_FAILURE); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Set an alarm to trigger in case the default handler does not terminate // the process. See 'AlarmSignalHandler' for more details. struct sigaction action; -@@ -559,6 +563,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf +@@ -561,6 +567,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf // signals that do not re-raise autonomously), such as signals delivered via // kill() and asynchronous hardware faults such as SEGV_MTEAERR, which would // otherwise be lost when re-raising the signal via raise(). +#if !BUILDFLAG(IS_BSD) long retval = syscall(SYS_rt_tgsigqueueinfo, getpid(), syscall(SYS_gettid), info->si_signo, info); if (retval == 0) { -@@ -573,6 +578,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf +@@ -575,6 +582,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf if (errno != EPERM) { _exit(EXIT_FAILURE); } +#endif #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || // BUILDFLAG(IS_CHROMEOS) -@@ -821,6 +827,9 @@ class SandboxSymbolizeHelper { +@@ -764,6 +772,7 @@ class SandboxSymbolizeHelper { + return -1; + } + ++#if !BUILDFLAG(IS_BSD) + // This class is copied from + // third_party/crashpad/crashpad/util/linux/scoped_pr_set_dumpable.h. + // It aims at ensuring the process is dumpable before opening /proc/self/mem. +@@ -856,11 +865,15 @@ class SandboxSymbolizeHelper { + r.base = cur_base; + } + } ++#endif + + // Parses /proc/self/maps in order to compile a list of all object file names // for the modules that are loaded in the current process. // Returns true on success. bool CacheMemoryRegions() { +#if BUILDFLAG(IS_BSD) + return false; +#else // Reads /proc/self/maps. std::string contents; if (!ReadProcMaps(&contents)) { -@@ -838,6 +847,7 @@ class SandboxSymbolizeHelper { +@@ -878,6 +891,7 @@ class SandboxSymbolizeHelper { is_initialized_ = true; return true; +#endif } // Opens all object files and caches their file descriptors. diff --git a/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc index 3222cc00f427..d2e585447ba4 100644 --- a/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc @@ -1,29 +1,29 @@ ---- base/files/file_path_watcher_unittest.cc.orig 2023-09-17 07:59:53 UTC +--- base/files/file_path_watcher_unittest.cc.orig 2023-11-04 07:08:51 UTC +++ base/files/file_path_watcher_unittest.cc -@@ -586,7 +586,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) { +@@ -705,7 +705,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. -@@ -1525,7 +1525,7 @@ namespace { +@@ -1641,7 +1641,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; -@@ -1559,7 +1559,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi +@@ -1675,7 +1675,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 0f2476efd374..66d45ef47f19 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,52 +1,53 @@ ---- base/files/file_util_posix.cc.orig 2023-05-05 12:12:41 UTC +--- base/files/file_util_posix.cc.orig 2023-11-04 07:08:51 UTC +++ base/files/file_util_posix.cc -@@ -756,32 +756,34 @@ bool CreateDirectoryAndGetError(const FilePath& full_p +@@ -756,33 +756,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; ++ 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_process_process__handle__freebsd.cc b/www/ungoogled-chromium/files/patch-base_process_process__handle__freebsd.cc index 07eed6768732..c736c91cab41 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__handle__freebsd.cc +++ b/www/ungoogled-chromium/files/patch-base_process_process__handle__freebsd.cc @@ -1,25 +1,25 @@ ---- base/process/process_handle_freebsd.cc.orig 2022-10-01 07:40:07 UTC +--- base/process/process_handle_freebsd.cc.orig 2023-11-04 07:08:51 UTC +++ base/process/process_handle_freebsd.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/process/process_handle.h" +#include "base/files/file_util.h" #include #include -@@ -15,10 +16,13 @@ namespace base { +@@ -19,10 +20,13 @@ namespace base { ProcessId GetParentProcessId(ProcessHandle process) { struct kinfo_proc info; - size_t length; + size_t length = sizeof(struct kinfo_proc); int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process }; if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) + return -1; + + if (length < sizeof(struct kinfo_proc)) return -1; return info.ki_ppid; diff --git a/www/ungoogled-chromium/files/patch-base_process_process__unittest.cc b/www/ungoogled-chromium/files/patch-base_process_process__unittest.cc index 04a4a227d43b..3de852e93c14 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_process_process__unittest.cc @@ -1,11 +1,11 @@ ---- base/process/process_unittest.cc.orig 2023-05-05 12:12:41 UTC +--- base/process/process_unittest.cc.orig 2023-11-04 07:08:51 UTC +++ base/process/process_unittest.cc -@@ -195,7 +195,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) { +@@ -198,7 +198,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) { // was spawned and a time recorded after it was spawned. However, since the // base::Time and process creation clocks don't match, tolerate some error. constexpr base::TimeDelta kTolerance = -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux, process creation time is relative to boot time which has a // 1-second resolution. Tolerate 1 second for the imprecise boot time and // 100 ms for the imprecise clock. diff --git a/www/ungoogled-chromium/files/patch-base_rand__util__posix.cc b/www/ungoogled-chromium/files/patch-base_rand__util__posix.cc index 30f57169df85..42df3862c35d 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 2022-12-02 17:56:32 UTC +--- base/rand_util_posix.cc.orig 2023-11-04 07:08:51 UTC +++ base/rand_util_posix.cc @@ -22,7 +22,7 @@ #include "base/time/time.h" #include "build/build_config.h" -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) #include "third_party/lss/linux_syscall_support.h" #elif BUILDFLAG(IS_MAC) // TODO(crbug.com/995996): Waiting for this header to appear in the iOS SDK. -@@ -46,6 +46,7 @@ static constexpr int kOpenFlags = O_RDONLY; - static constexpr int kOpenFlags = O_RDONLY | O_CLOEXEC; - #endif +@@ -39,6 +39,7 @@ namespace base { + + namespace { +#if !BUILDFLAG(IS_BSD) - // We keep the file descriptor for /dev/urandom around so we don't need to - // reopen it (which is expensive), and since we may not even be able to reopen - // it if we are later put in a sandbox. This class wraps the file descriptor so + #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 { 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() { namespace { void RandBytes(void* output, size_t output_length, 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); CHECK(success); +#else + arc4random_buf(static_cast(output), output_length); +#endif } } // namespace @@ -233,9 +239,11 @@ void RandBytes(void* output, size_t output_length) { RandBytes(output, output_length, /*avoid_allocation=*/false); } +#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_system_sys__info.h b/www/ungoogled-chromium/files/patch-base_system_sys__info.h index 99d46f36bca5..8cf23c746362 100644 --- a/www/ungoogled-chromium/files/patch-base_system_sys__info.h +++ b/www/ungoogled-chromium/files/patch-base_system_sys__info.h @@ -1,20 +1,20 @@ ---- base/system/sys_info.h.orig 2023-10-13 13:20:35 UTC +--- base/system/sys_info.h.orig 2023-11-04 07:08:51 UTC +++ base/system/sys_info.h -@@ -266,6 +266,8 @@ class BASE_EXPORT SysInfo { +@@ -304,6 +304,8 @@ class BASE_EXPORT SysInfo { static void ResetCpuSecurityMitigationsEnabledForTesting(); #endif + static uint64_t MaxSharedMemorySize(); + private: friend class test::ScopedAmountOfPhysicalMemoryOverride; FRIEND_TEST_ALL_PREFIXES(SysInfoTest, AmountOfAvailablePhysicalMemory); -@@ -278,7 +280,7 @@ class BASE_EXPORT SysInfo { +@@ -316,7 +318,7 @@ class BASE_EXPORT SysInfo { static HardwareInfo GetHardwareInfoSync(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) static uint64_t AmountOfAvailablePhysicalMemory( const SystemMemoryInfoKB& meminfo); #endif diff --git a/www/ungoogled-chromium/files/patch-base_system_sys__info__openbsd.cc b/www/ungoogled-chromium/files/patch-base_system_sys__info__openbsd.cc index ebad387696c4..be70d3027d8d 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,94 +1,87 @@ ---- base/system/sys_info_openbsd.cc.orig 2022-10-01 07:40:07 UTC +--- base/system/sys_info_openbsd.cc.orig 2023-11-04 07:08:51 UTC +++ base/system/sys_info_openbsd.cc -@@ -11,6 +11,7 @@ - #include +@@ -12,6 +12,7 @@ #include "base/notreached.h" + #include "base/posix/sysctl.h" +#include "base/strings/string_util.h" namespace { -@@ -26,9 +27,15 @@ uint64_t AmountOfMemory(int pages_name) { +@@ -27,9 +28,15 @@ uint64_t AmountOfMemory(int pages_name) { namespace base { +// pledge(2) +int64_t aofpmem = 0; +int64_t aofapmem = 0; +int64_t shmmax = 0; +char cpumodel[256]; + // static int SysInfo::NumberOfProcessors() { - int mib[] = {CTL_HW, HW_NCPU}; + int mib[] = {CTL_HW, HW_NCPUONLINE}; int ncpu; size_t size = sizeof(ncpu); if (sysctl(mib, std::size(mib), &ncpu, &size, NULL, 0) < 0) { -@@ -40,10 +47,26 @@ int SysInfo::NumberOfProcessors() { +@@ -41,10 +48,26 @@ int SysInfo::NumberOfProcessors() { // static uint64_t SysInfo::AmountOfPhysicalMemoryImpl() { - return AmountOfMemory(_SC_PHYS_PAGES); + // pledge(2) + if (!aofpmem) + aofpmem = AmountOfMemory(_SC_PHYS_PAGES); + return aofpmem; } // static +std::string SysInfo::CPUModelName() { + int mib[] = {CTL_HW, HW_MODEL}; + size_t len = std::size(cpumodel); + + if (cpumodel[0] == '\0') { + if (sysctl(mib, std::size(mib), cpumodel, &len, NULL, 0) < 0) + return std::string(); + } + + return std::string(cpumodel, len - 1); +} + +// static uint64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() { // We should add inactive file-backed memory also but there is no such // information from OpenBSD unfortunately. -@@ -55,23 +78,28 @@ uint64_t SysInfo::MaxSharedMemorySize() { +@@ -56,16 +79,28 @@ uint64_t SysInfo::MaxSharedMemorySize() { int mib[] = {CTL_KERN, KERN_SHMINFO, KERN_SHMINFO_SHMMAX}; size_t limit; size_t size = sizeof(limit); + // pledge(2) + if (shmmax) + goto out; if (sysctl(mib, std::size(mib), &limit, &size, NULL, 0) < 0) { NOTREACHED(); return 0; } - return static_cast(limit); + shmmax = static_cast(limit); +out: + return shmmax; } // static -std::string SysInfo::CPUModelName() { -- int mib[] = {CTL_HW, HW_MODEL}; -- char name[256]; -- size_t len = std::size(name); -- if (sysctl(mib, std::size(mib), name, &len, NULL, 0) < 0) { -- NOTREACHED(); -- return std::string(); -- } -- return name; +- 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_test_launcher_test__launcher.cc b/www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc index d95974cac4a0..4b5d43684baf 100644 --- a/www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc +++ b/www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc @@ -1,10 +1,10 @@ ---- base/test/launcher/test_launcher.cc.orig 2023-10-13 13:20:35 UTC +--- base/test/launcher/test_launcher.cc.orig 2023-11-04 07:08:51 UTC +++ base/test/launcher/test_launcher.cc -@@ -68,6 +68,7 @@ +@@ -70,6 +70,7 @@ #include "testing/gtest/include/gtest/gtest.h" #if BUILDFLAG(IS_POSIX) +#include #include #include "base/files/file_descriptor_watcher_posix.h" diff --git a/www/ungoogled-chromium/files/patch-base_threading_platform__thread__unittest.cc b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__unittest.cc index b42ba7b3cde1..f59e0a4cf66e 100644 --- a/www/ungoogled-chromium/files/patch-base_threading_platform__thread__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__unittest.cc @@ -1,38 +1,38 @@ ---- base/threading/platform_thread_unittest.cc.orig 2023-09-17 07:59:53 UTC +--- base/threading/platform_thread_unittest.cc.orig 2023-11-04 07:08:51 UTC +++ base/threading/platform_thread_unittest.cc @@ -32,7 +32,7 @@ #include "base/time/time.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include #include @@ -423,7 +423,7 @@ TEST(PlatformThreadTest, // and hardcodes what we know. Please inform scheduler-dev@ch40m1um.qjz9zk if this // proprerty changes for a given platform. TEST(PlatformThreadTest, CanChangeThreadType) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Ubuntu, RLIMIT_NICE and RLIMIT_RTPRIO are 0 by default, so we won't be - // able to increase priority to any level. - constexpr bool kCanIncreasePriority = false; -@@ -695,12 +695,16 @@ INSTANTIATE_TEST_SUITE_P( + // able to increase priority to any level unless we are root (euid == 0). + bool kCanIncreasePriority = false; +@@ -706,12 +706,16 @@ INSTANTIATE_TEST_SUITE_P( #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) namespace { bool IsTidCacheCorrect() { +#if BUILDFLAG(IS_BSD) + return PlatformThread::CurrentId() == reinterpret_cast(pthread_self()); +#else return PlatformThread::CurrentId() == syscall(__NR_gettid); +#endif } void* CheckTidCacheCorrectWrapper(void*) { diff --git a/www/ungoogled-chromium/files/patch-base_trace__event_trace__log.cc b/www/ungoogled-chromium/files/patch-base_trace__event_trace__log.cc index d21980c3a7e0..35b0d7350137 100644 --- a/www/ungoogled-chromium/files/patch-base_trace__event_trace__log.cc +++ b/www/ungoogled-chromium/files/patch-base_trace__event_trace__log.cc @@ -1,16 +1,16 @@ ---- base/trace_event/trace_log.cc.orig 2023-10-13 13:20:35 UTC +--- base/trace_event/trace_log.cc.orig 2023-11-04 07:08:51 UTC +++ base/trace_event/trace_log.cc -@@ -2190,8 +2190,13 @@ void TraceLog::SetTraceBufferForTesting( +@@ -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 64b2ac670abc..f3a9eb61ac8c 100644 --- a/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn @@ -1,140 +1,140 @@ ---- build/config/compiler/BUILD.gn.orig 2023-10-13 13:20:35 UTC +--- build/config/compiler/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ build/config/compiler/BUILD.gn -@@ -192,7 +192,7 @@ declare_args() { +@@ -196,7 +196,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() { -@@ -256,13 +256,16 @@ config("default_include_dirs") { +@@ -260,13 +260,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 --------------------------------------------------------------------- @@ -507,6 +510,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ if (use_gold) { @@ -582,7 +589,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 += [ @@ -768,7 +775,7 @@ config("compiler") { ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ] - 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 -@@ -1112,7 +1119,7 @@ config("compiler_cpu_abi") { +@@ -1133,7 +1140,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" ] -@@ -1127,7 +1134,7 @@ config("compiler_cpu_abi") { +@@ -1148,7 +1155,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" ] -@@ -1462,7 +1469,7 @@ config("compiler_deterministic") { +@@ -1483,7 +1490,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", -@@ -1514,7 +1521,7 @@ config("compiler_deterministic") { +@@ -1535,7 +1542,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", -@@ -1778,7 +1785,7 @@ config("default_warnings") { - "-Wno-ignored-pragma-optimize", - ] +@@ -1828,7 +1835,7 @@ config("default_warnings") { + ] + } - if (!is_nacl) { + if (!is_nacl && !is_bsd) { cflags += [ # TODO(crbug.com/1343975) Evaluate and possibly enable. "-Wno-deprecated-builtins", -@@ -1991,7 +1998,7 @@ config("no_chromium_code") { +@@ -2021,7 +2028,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", -@@ -2501,7 +2508,7 @@ config("afdo_optimize_size") { +@@ -2550,7 +2557,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. -@@ -2528,7 +2535,7 @@ config("afdo") { +@@ -2577,7 +2584,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 ] } -@@ -2692,7 +2699,8 @@ config("symbols") { +@@ -2741,7 +2748,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 index a4c568ac811b..141041ce6479 100644 --- a/www/ungoogled-chromium/files/patch-build_config_compiler_pgo_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-build_config_compiler_pgo_BUILD.gn @@ -1,19 +1,19 @@ ---- build/config/compiler/pgo/BUILD.gn.orig 2023-10-13 13:20:35 UTC +--- build/config/compiler/pgo/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ build/config/compiler/pgo/BUILD.gn -@@ -143,13 +143,14 @@ config("pgo_optimization_flags") { +@@ -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_config_linux_atspi2_BUILD.gn b/www/ungoogled-chromium/files/patch-build_config_linux_atspi2_BUILD.gn new file mode 100644 index 000000000000..7db5ce0b19d7 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-build_config_linux_atspi2_BUILD.gn @@ -0,0 +1,25 @@ +--- build/config/linux/atspi2/BUILD.gn.orig 2023-11-04 07:08:51 UTC ++++ build/config/linux/atspi2/BUILD.gn +@@ -21,10 +21,21 @@ if (use_atk) { + minor = atspi_version[1] + micro = atspi_version[2] + ++ # These aren't necessarily used if atspi is not old enough to require them. ++ # Also, gn considers variables unused if the only use of them is ++ # short-circuited away, so for example if major == 2 and minor == 48, micro ++ # would be unused. ++ not_needed([ ++ "major", ++ "minor", ++ "micro", ++ ]) ++ + # ATSPI 2.49.90 now defines these for us and it's an error for us to + # redefine them on the compiler command line. + # See ATSPI 927344a34cd5bf81fc64da4968241735ecb4f03b +- if (minor < 49 || (minor == 49 && micro < 90)) { ++ if (major < 2 || (major == 2 && minor < 49) || ++ (major == 2 && minor == 49 && micro < 90)) { + defines = [ + "ATSPI_MAJOR_VERSION=$major", + "ATSPI_MINOR_VERSION=$minor", diff --git a/www/ungoogled-chromium/files/patch-build_toolchain_gcc__toolchain.gni b/www/ungoogled-chromium/files/patch-build_toolchain_gcc__toolchain.gni index 91dbed420c1f..d5ac2463d0c3 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-09-17 07:59:53 UTC +--- build/toolchain/gcc_toolchain.gni.orig 2023-11-04 07:08:51 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). # -@@ -874,22 +881,12 @@ template("gcc_toolchain") { +@@ -875,22 +882,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, - [ + forward_variables_from(invoker, "*", [ "toolchain_args" ]) + diff --git a/www/ungoogled-chromium/files/patch-build_toolchain_toolchain.gni b/www/ungoogled-chromium/files/patch-build_toolchain_toolchain.gni index f352c3f39a4b..4b7d3aedee6e 100644 --- a/www/ungoogled-chromium/files/patch-build_toolchain_toolchain.gni +++ b/www/ungoogled-chromium/files/patch-build_toolchain_toolchain.gni @@ -1,11 +1,11 @@ ---- build/toolchain/toolchain.gni.orig 2023-10-13 13:20:35 UTC +--- build/toolchain/toolchain.gni.orig 2023-11-04 07:08:51 UTC +++ build/toolchain/toolchain.gni -@@ -67,7 +67,7 @@ if (host_os == "mac") { +@@ -72,7 +72,7 @@ if (host_os == "mac") { host_shlib_extension = ".dylib" } else if (host_os == "win") { host_shlib_extension = ".dll" -} else if (host_os == "linux" || host_os == "aix") { +} else if (is_posix) { host_shlib_extension = ".so" } else { assert(false, "Host platform not supported") diff --git a/www/ungoogled-chromium/files/patch-cc_BUILD.gn b/www/ungoogled-chromium/files/patch-cc_BUILD.gn index 32906c52a3b7..11d0d7c8c032 100644 --- a/www/ungoogled-chromium/files/patch-cc_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-cc_BUILD.gn @@ -1,19 +1,19 @@ ---- cc/BUILD.gn.orig 2023-10-13 13:20:35 UTC +--- cc/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ cc/BUILD.gn -@@ -674,7 +674,7 @@ cc_test_static_library("test_support") { +@@ -675,7 +675,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) { -@@ -929,7 +929,6 @@ cc_test("cc_unittests") { +@@ -930,7 +930,6 @@ cc_test("cc_unittests") { data = [ "//components/test/data/viz/" ] data_deps = [ "//testing/buildbot/filters:cc_unittests_filters", - "//third_party/mesa_headers", ] if (is_android && enable_chrome_android_internal) { diff --git a/www/ungoogled-chromium/files/patch-cc_base_features.cc b/www/ungoogled-chromium/files/patch-cc_base_features.cc index 7e0caa2cbefe..d0a1240cdb76 100644 --- a/www/ungoogled-chromium/files/patch-cc_base_features.cc +++ b/www/ungoogled-chromium/files/patch-cc_base_features.cc @@ -1,11 +1,11 @@ ---- cc/base/features.cc.orig 2023-10-13 13:20:35 UTC +--- cc/base/features.cc.orig 2023-11-04 07:08:51 UTC +++ cc/base/features.cc -@@ -85,7 +85,7 @@ BASE_FEATURE(kNormalPriorityImageDecoding, +@@ -84,7 +84,7 @@ BASE_FEATURE(kNormalPriorityImageDecoding, // be using a separate flag to control the launch on GL. BASE_FEATURE(kUseDMSAAForTiles, "UseDMSAAForTiles", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/ungoogled-chromium/files/patch-chrome_app_chrome__main.cc b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main.cc index 4ef69db12a70..67152198dec3 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_chrome__main.cc +++ b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main.cc @@ -1,34 +1,34 @@ ---- chrome/app/chrome_main.cc.orig 2023-06-05 19:39:05 UTC +--- chrome/app/chrome_main.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/app/chrome_main.cc -@@ -27,11 +27,11 @@ +@@ -29,11 +29,11 @@ #include "chrome/app/notification_metrics.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/base_switches.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/app/chrome_main_linux.h" #endif -@@ -136,7 +136,7 @@ int ChromeMain(int argc, const char** argv) { +@@ -138,7 +138,7 @@ int ChromeMain(int argc, const char** argv) { SetUpBundleOverrides(); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) AppendExtraArgumentsToCommandLine(command_line); #endif -@@ -164,7 +164,7 @@ int ChromeMain(int argc, const char** argv) { - headless::SetUpCommandLine(command_line); +@@ -167,7 +167,7 @@ int ChromeMain(int argc, const char** argv) { + headless_mode_handle = headless::InitHeadlessMode(); } else { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (headless::IsOldHeadlessMode()) { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) command_line->AppendSwitch(::headless::switches::kEnableCrashReporter); diff --git a/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc index a903d7ccc2df..762c65ae80be 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc +++ b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc @@ -1,112 +1,112 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/app/chrome_main_delegate.cc -@@ -143,7 +143,7 @@ +@@ -145,7 +145,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 -@@ -186,16 +186,16 @@ +@@ -188,16 +188,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 -@@ -334,7 +334,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -336,7 +336,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 -@@ -419,7 +419,7 @@ bool HandleVersionSwitches(const base::CommandLine& co +@@ -421,7 +421,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) || -@@ -546,7 +546,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -593,7 +593,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. -@@ -636,7 +636,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat +@@ -683,7 +683,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( -@@ -994,7 +994,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv +@@ -1012,7 +1012,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(); -@@ -1141,7 +1141,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1159,7 +1159,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo // TODO(crbug.com/1052397): Revisit the macro expression once build flag // switch of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // This will directly exit if the user asked for help. HandleHelpSwitches(command_line); #endif -@@ -1171,7 +1171,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1189,7 +1189,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo #if BUILDFLAG(IS_CHROMEOS) chromeos::dbus_paths::RegisterPathProvider(); #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) nacl::RegisterPathProvider(); #endif -@@ -1561,7 +1561,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1589,7 +1589,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)) { -@@ -1663,7 +1663,7 @@ absl::variant Chrome +@@ -1691,7 +1691,7 @@ absl::variant Chrome // This entry is not needed on Linux, where the NaCl loader // process is launched via nacl_helper instead. -#if BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) {switches::kNaClLoaderProcess, NaClMain}, #else {"", nullptr}, // To avoid constant array of size 0 diff --git a/www/ungoogled-chromium/files/patch-chrome_app_chromium__strings.grd b/www/ungoogled-chromium/files/patch-chrome_app_chromium__strings.grd index 872ea94d8aea..2aec929902cc 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_chromium__strings.grd +++ b/www/ungoogled-chromium/files/patch-chrome_app_chromium__strings.grd @@ -1,38 +1,38 @@ ---- chrome/app/chromium_strings.grd.orig 2023-09-17 07:59:53 UTC +--- chrome/app/chromium_strings.grd.orig 2023-11-04 07:08:51 UTC +++ chrome/app/chromium_strings.grd @@ -315,7 +315,7 @@ If you update this file, be sure also to update google Welcome to Chromium; new browser window opened - + Welcome to Chromium @@ -465,7 +465,7 @@ If you update this file, be sure also to update google 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 -@@ -870,7 +870,7 @@ Permissions you've already given to websites and apps +@@ -896,7 +896,7 @@ Permissions you've already given to websites and apps - + Not used in Chromium. Placeholder to keep resource maps in sync. -@@ -1255,7 +1255,7 @@ Permissions you've already given to websites and apps +@@ -1272,7 +1272,7 @@ Permissions you've already given to websites and apps - + Not used in Chromium. Placeholder to keep resource maps in sync. diff --git a/www/ungoogled-chromium/files/patch-chrome_app_generated__resources.grd b/www/ungoogled-chromium/files/patch-chrome_app_generated__resources.grd index 033843af3382..d84988236942 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_generated__resources.grd +++ b/www/ungoogled-chromium/files/patch-chrome_app_generated__resources.grd @@ -1,92 +1,92 @@ ---- chrome/app/generated_resources.grd.orig 2023-10-13 13:20:35 UTC +--- chrome/app/generated_resources.grd.orig 2023-11-04 07:08:51 UTC +++ chrome/app/generated_resources.grd @@ -2,7 +2,7 @@ -@@ -3601,7 +3601,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -3605,7 +3605,7 @@ are declared in tools/grit/grit_rule.gni. - + Device Credentials -@@ -5432,7 +5432,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -5445,7 +5445,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 -@@ -6145,7 +6145,7 @@ Keep your key file in a safe place. You will need it t +@@ -6158,7 +6158,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. -@@ -6191,7 +6191,7 @@ Keep your key file in a safe place. You will need it t +@@ -6204,7 +6204,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. @@ -10396,7 +10396,7 @@ Check your passwords anytime in Update - + Finish update @@ -10743,7 +10743,7 @@ Check your passwords anytime in + Use system title bar and borders -@@ -11728,7 +11728,7 @@ Check your passwords anytime in - + Share information about your device? -@@ -12136,7 +12136,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -12142,7 +12142,7 @@ Please help our engineers fix this problem. Tell us wh Set as default - + Minimize -@@ -14346,7 +14346,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -14349,7 +14349,7 @@ Please help our engineers fix this problem. Tell us wh Open Anyway - + System Signals Utilities diff --git a/www/ungoogled-chromium/files/patch-chrome_app_google__chrome__strings.grd b/www/ungoogled-chromium/files/patch-chrome_app_google__chrome__strings.grd index 1897a1b57b2f..5543890f4f2d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_google__chrome__strings.grd +++ b/www/ungoogled-chromium/files/patch-chrome_app_google__chrome__strings.grd @@ -1,38 +1,38 @@ ---- chrome/app/google_chrome_strings.grd.orig 2023-09-17 07:59:53 UTC +--- chrome/app/google_chrome_strings.grd.orig 2023-11-04 07:08:51 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 -@@ -855,7 +855,7 @@ Permissions you've already given to websites and apps +@@ -881,7 +881,7 @@ Permissions you've already given to websites and apps - + Relaunch to Update - Your tabs will reopen -@@ -1278,7 +1278,7 @@ Permissions you've already given to websites and apps +@@ -1297,7 +1297,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_settings__strings.grdp b/www/ungoogled-chromium/files/patch-chrome_app_settings__strings.grdp index c45f92b652c6..c2c828b19f19 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_settings__strings.grdp +++ b/www/ungoogled-chromium/files/patch-chrome_app_settings__strings.grdp @@ -1,35 +1,35 @@ ---- chrome/app/settings_strings.grdp.orig 2023-10-13 13:20:35 UTC +--- 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 swipe gesture + 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_browser_BUILD.gn b/www/ungoogled-chromium/files/patch-chrome_browser_BUILD.gn index 06d64439c40c..7b4ddb342f93 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 2023-10-13 13:20:35 UTC +--- chrome/browser/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/BUILD.gn -@@ -6366,6 +6366,13 @@ static_library("browser") { +@@ -6462,6 +6462,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 f00517fa13c5..460761b4ac05 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc @@ -1,171 +1,171 @@ ---- chrome/browser/about_flags.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/about_flags.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/about_flags.cc -@@ -226,7 +226,7 @@ +@@ -227,7 +227,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 -@@ -325,7 +325,7 @@ +@@ -327,7 +327,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) -@@ -339,7 +339,7 @@ +@@ -341,7 +341,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) -@@ -439,7 +439,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap +@@ -471,7 +471,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, -@@ -1476,7 +1476,7 @@ const FeatureEntry::FeatureVariation kChromeRefresh202 - std::size(kChromeRefresh2023Level1), nullptr}}; +@@ -1546,7 +1546,7 @@ const FeatureEntry::FeatureVariation kChromeRefresh202 + nullptr}}; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kShortcutBoostSearchAndUrl1414[] = { {"ShortcutBoostSearchScore", "1414"}, {"ShortcutBoostUrlScore", "1414"}}; -@@ -5048,13 +5048,13 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5304,13 +5304,13 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kWebShare)}, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"ozone-platform-hint", flag_descriptions::kOzonePlatformHintName, flag_descriptions::kOzonePlatformHintDescription, kOsLinux, MULTI_VALUE_TYPE(kOzonePlatformHintRuntimeChoices)}, #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"skip-undecryptable-passwords", flag_descriptions::kSkipUndecryptablePasswordsName, flag_descriptions::kSkipUndecryptablePasswordsDescription, -@@ -5356,7 +5356,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5621,7 +5621,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(feed::kFeedSportsCard)}, #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)}, -@@ -6034,7 +6034,7 @@ const FeatureEntry kFeatureEntries[] = { - kOsAll, FEATURE_VALUE_TYPE(omnibox::kUseExistingAutocompleteClient)}, +@@ -6288,7 +6288,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, -@@ -6862,7 +6862,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7123,7 +7123,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)}, -@@ -7857,7 +7857,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8131,7 +8131,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(supervised_user::kEnableProtoApiForClassifyUrl)}, #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"enable-network-service-sandbox", flag_descriptions::kEnableNetworkServiceSandboxName, flag_descriptions::kEnableNetworkServiceSandboxDescription, -@@ -8562,7 +8562,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8824,7 +8824,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)}, -@@ -8853,7 +8853,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9128,7 +9128,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(ash::features::kWallpaperRefreshRevamp)}, #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, -@@ -8909,7 +8909,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9184,7 +9184,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, -@@ -9452,7 +9452,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9748,7 +9748,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) {"document-picture-in-picture-api", flag_descriptions::kDocumentPictureInPictureApiName, flag_descriptions::kDocumentPictureInPictureApiDescription, -@@ -10069,7 +10069,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10347,7 +10347,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kWebUIOmniboxPopupDescription, kOsDesktop, FEATURE_VALUE_TYPE(omnibox::kWebUIOmniboxPopup)}, -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) {"webui-system-font", flag_descriptions::kWebUiSystemFontName, flag_descriptions::kWebUiSystemFontDescription, kOsAll, FEATURE_VALUE_TYPE(features::kWebUiSystemFont)}, -@@ -10272,7 +10272,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10548,7 +10548,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) {"data-retention-policies-disable-sync-types-needed", flag_descriptions::kDataRetentionPoliciesDisableSyncTypesNeededName, flag_descriptions::kDataRetentionPoliciesDisableSyncTypesNeededDescription, -@@ -10666,7 +10666,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10954,7 +10954,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kProcessPerSiteUpToMainFrameThreshold)}, #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - {"camera-mic-preview", flag_descriptions::kCameraMicPreviewName, - flag_descriptions::kCameraMicPreviewDescription, + {"camera-mic-effects", flag_descriptions::kCameraMicEffectsName, + flag_descriptions::kCameraMicEffectsDescription, static_cast(kOsMac | kOsWin | kOsLinux | kOsFuchsia), -@@ -10843,7 +10843,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -11141,7 +11141,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kDigestAuthEnableSecureAlgorithmsDescription, kOsAll, FEATURE_VALUE_TYPE(net::features::kDigestAuthEnableSecureAlgorithms)}, -#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, 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 87d7151bfa80..3c62a8141ec6 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc @@ -1,29 +1,29 @@ ---- chrome/browser/browser_process_impl.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/browser_process_impl.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/browser_process_impl.cc -@@ -218,7 +218,7 @@ +@@ -219,7 +219,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 -@@ -1211,7 +1211,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { +@@ -1213,7 +1213,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 -@@ -1445,7 +1445,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1447,7 +1447,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_chrome__browser__interface__binders.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc index eb44acf6385e..15266bef8ec3 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc @@ -1,81 +1,81 @@ ---- chrome/browser/chrome_browser_interface_binders.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/chrome_browser_interface_binders.cc @@ -129,13 +129,13 @@ #endif // BUILDFLAG(FULL_SAFE_BROWSING) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/connectors_internals/connectors_internals.mojom.h" #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/app_settings/web_app_settings_ui.h" #include "ui/webui/resources/cr_components/app_management/app_management.mojom.h" #endif -@@ -217,7 +217,7 @@ +@@ -218,7 +218,7 @@ #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/companion/visual_search/visual_search_suggestions_service_factory.h" + #include "chrome/browser/ui/web_applications/sub_apps_service_impl.h" #include "chrome/browser/ui/webui/discards/discards.mojom.h" - #include "chrome/browser/ui/webui/discards/discards_ui.h" -@@ -831,7 +831,7 @@ void BindScreen2xMainContentExtractor( +@@ -841,7 +841,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< -@@ -977,7 +977,7 @@ void PopulateChromeFrameBinders( +@@ -988,7 +988,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)); -@@ -985,7 +985,7 @@ void PopulateChromeFrameBinders( +@@ -996,7 +996,7 @@ void PopulateChromeFrameBinders( #endif - #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #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 -@@ -1065,7 +1065,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1076,7 +1076,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); -@@ -1080,7 +1080,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1092,7 +1092,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 -@@ -1578,7 +1578,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1601,7 +1601,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 f866ca0295f9..44f8b30e4c72 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,69 +1,78 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -247,11 +247,11 @@ +@@ -248,11 +248,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 -@@ -286,14 +286,14 @@ +@@ -287,14 +287,14 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h" #include "chrome/browser/metrics/desktop_session_duration/touch_mode_stats_tracker.h" #include "chrome/browser/profiles/profile_activity_metrics_recorder.h" #include "ui/base/pointer/touch_ui_controller.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/headless/headless_mode_metrics.h" // nogncheck #include "chrome/browser/headless/headless_mode_util.h" // nogncheck #include "components/headless/select_file_dialog/headless_select_file_dialog.h" -@@ -1034,7 +1034,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1041,7 +1041,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 . -@@ -1090,7 +1090,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1097,7 +1097,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( -@@ -1326,7 +1326,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1333,7 +1333,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(); } -@@ -1432,7 +1432,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl( +@@ -1439,7 +1439,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(); } +@@ -2020,7 +2020,7 @@ bool ChromeBrowserMainParts::ProcessSingletonNotificat + + // Drop the request if headless mode is in effect or the request is from + // a headless Chrome process. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + if (headless::IsHeadlessMode() || + command_line.HasSwitch(switches::kHeadless)) { + return false; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc index 1ce5421f92ba..67ba36a57ab1 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,165 +1,160 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -435,7 +435,7 @@ - #include "components/user_manager/user_manager.h" - #include "services/service_manager/public/mojom/interface_provider_spec.mojom.h" +@@ -442,7 +442,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) - #include "base/android/application_status_listener.h" -@@ -529,12 +529,12 @@ +@@ -542,12 +542,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 -@@ -543,14 +543,14 @@ - #include "components/crash/content/browser/crash_handler_host_linux.h" +@@ -558,14 +558,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) -@@ -579,11 +579,11 @@ - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" +@@ -581,7 +581,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" @@ -1573,7 +1573,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre - registry->RegisterBooleanPref(prefs::kNewBaseUrlInheritanceBehaviorAllowed, - true); registry->RegisterBooleanPref(prefs::kNativeClientForceAllowed, false); + registry->RegisterBooleanPref( + policy::policy_prefs::kPPAPISharedImagesForVideoDecoderAllowed, true); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOutOfProcessSystemDnsResolutionEnabled, true); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) @@ -1695,7 +1695,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) -@@ -1734,7 +1734,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1732,7 +1732,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 -@@ -1755,7 +1755,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1753,7 +1753,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()); -@@ -1774,7 +1774,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1772,7 +1772,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>()); -@@ -2605,6 +2605,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2603,6 +2603,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()) { -@@ -2982,7 +2984,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2986,7 +2988,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)) { -@@ -4590,7 +4592,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -4617,7 +4619,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, -@@ -5132,7 +5134,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5159,7 +5161,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); -@@ -5142,7 +5144,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5169,7 +5171,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); -@@ -5173,7 +5175,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5200,7 +5202,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); -@@ -6991,7 +6993,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS +@@ -7061,7 +7063,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS } bool ChromeContentBrowserClient::ShouldRunOutOfProcessSystemDnsResolution() { -#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 a28d4a91d3c3..2d24d8108e40 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.h @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_content_browser_client.h.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -478,7 +478,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -482,7 +482,7 @@ class ChromeContentBrowserClient : public content::Con void OverridePageVisibilityState( content::RenderFrameHost* render_frame_host, content::PageVisibilityState* visibility_state) override; -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) void GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_content__settings_one__time__permission__provider.cc b/www/ungoogled-chromium/files/patch-chrome_browser_content__settings_one__time__permission__provider.cc index 3b13980826c7..b399a104be8f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_content__settings_one__time__permission__provider.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_content__settings_one__time__permission__provider.cc @@ -1,30 +1,30 @@ ---- chrome/browser/content_settings/one_time_permission_provider.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/content_settings/one_time_permission_provider.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/content_settings/one_time_permission_provider.cc -@@ -225,8 +225,13 @@ void OneTimePermissionProvider::OnSuspend() { +@@ -226,8 +226,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); -@@ -320,8 +325,13 @@ void OneTimePermissionProvider::DeleteEntriesMatchingG +@@ -329,8 +334,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 index 4cfd72df6461..a056c38ce009 100644 --- 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 @@ -1,32 +1,32 @@ ---- chrome/browser/download/bubble/download_bubble_update_service.cc.orig 2023-07-21 09:49:17 UTC +--- chrome/browser/download/bubble/download_bubble_update_service.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/download/bubble/download_bubble_update_service.cc -@@ -91,7 +91,11 @@ ItemSortKey GetSortKey(const Item& item) { +@@ -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); -@@ -967,9 +971,17 @@ bool DownloadBubbleUpdateService::CacheManager::Remove +@@ -1029,9 +1033,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_download__commands.h b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.h index 2e1a8072c090..b8ff00ad4adf 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.h @@ -1,11 +1,11 @@ ---- chrome/browser/download/download_commands.h.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/download/download_commands.h.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/download/download_commands.h -@@ -60,7 +60,7 @@ class DownloadCommands { +@@ -62,7 +62,7 @@ class DownloadCommands { void ExecuteCommand(Command command); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) bool IsDownloadPdf() const; bool CanOpenPdfInSystemViewer() const; Browser* GetBrowser() const; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc index 711b3bf3720e..c026265805b8 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc @@ -1,29 +1,29 @@ ---- chrome/browser/download/download_item_model.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/download/download_item_model.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/download/download_item_model.cc -@@ -766,7 +766,7 @@ bool DownloadItemModel::IsCommandChecked( +@@ -754,7 +754,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(); -@@ -812,7 +812,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand - base::UmaHistogramBoolean("Download.SetAlwaysOpenTo", !is_checked); +@@ -800,7 +800,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); -@@ -1108,7 +1108,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe +@@ -1082,7 +1082,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 06fdd8779d8f..de18029a0e40 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc @@ -1,90 +1,90 @@ ---- chrome/browser/download/download_prefs.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/download/download_prefs.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/download/download_prefs.cc @@ -11,6 +11,7 @@ #include #include "base/check.h" +#include "base/command_line.h" #include "base/feature_list.h" #include "base/files/file_util.h" #include "base/functional/bind.h" @@ -63,6 +64,10 @@ #include "chrome/browser/download/bubble/download_bubble_prefs.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + using content::BrowserContext; using content::BrowserThread; using content::DownloadManager; @@ -73,7 +78,7 @@ namespace { // Consider downloads 'dangerous' if they go to the home directory on Linux and // to the desktop on any platform. bool DownloadPathIsDangerous(const base::FilePath& download_path) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath home_dir = base::GetHomeDir(); if (download_path == home_dir) { return true; @@ -181,7 +186,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi #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 -@@ -307,7 +312,7 @@ void DownloadPrefs::RegisterProfilePrefs( +@@ -305,7 +310,7 @@ void DownloadPrefs::RegisterProfilePrefs( registry->RegisterTimePref(prefs::kDownloadLastCompleteTime, /*default_value=*/base::Time()); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOpenPdfDownloadInSystemReader, false); #endif #if BUILDFLAG(IS_ANDROID) -@@ -476,7 +481,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens +@@ -474,7 +479,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; -@@ -508,7 +513,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons +@@ -506,7 +511,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(); -@@ -539,7 +544,7 @@ void DownloadPrefs::SaveAutoOpenState() { +@@ -537,7 +542,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; -@@ -663,7 +668,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa +@@ -661,7 +666,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa #else // If the stored download directory is an absolute path, we presume it's // correct; there's not really much more validation we can do here. +#if BUILDFLAG(IS_OPENBSD) + // If unveil(2) is used, force the file dialog directory to something we + // know is available. + auto* sandbox = sandbox::policy::SandboxLinux::GetInstance(); + if (!sandbox->unveil_initialized() && path.IsAbsolute()) +#else if (path.IsAbsolute()) +#endif return path; // When the default download directory is *not* an absolute path, we use the diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.h b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.h index a986e6b5c04b..f156c2dda185 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.h @@ -1,20 +1,20 @@ ---- chrome/browser/download/download_prefs.h.orig 2023-04-08 11:38:38 UTC +--- chrome/browser/download/download_prefs.h.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/download/download_prefs.h @@ -118,7 +118,7 @@ class DownloadPrefs { void DisableAutoOpenByUserBasedOnExtension(const base::FilePath& file_name); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Store the user preference to disk. If |should_open| is true, also disable // the built-in PDF plugin. If |should_open| is false, enable the PDF plugin. void SetShouldOpenPdfInSystemReader(bool should_open); -@@ -183,7 +183,7 @@ class DownloadPrefs { +@@ -182,7 +182,7 @@ class DownloadPrefs { std::unique_ptr auto_open_allowed_by_urls_; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) bool should_open_pdf_in_system_reader_; #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc index cfdf4aa3a4b0..a9e4bbf111e2 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-09-17 07:59:53 UTC +--- chrome/browser/enterprise/connectors/connectors_service.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/enterprise/connectors/connectors_service.cc -@@ -514,7 +514,7 @@ bool ConnectorsService::ConnectorsEnabled() const { +@@ -519,7 +519,7 @@ bool ConnectorsService::ConnectorsEnabled() const { Profile* profile = Profile::FromBrowserContext(context_); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On desktop, the guest profile is actually the primary OTR profile of // the "regular" guest profile. The regular guest profile is never used // directly by users. Also, user are not able to create child OTR profiles diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc index 78d60af5608d..00fb17e0abff 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc @@ -1,38 +1,38 @@ ---- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc @@ -55,7 +55,7 @@ #include "base/strings/utf_string_conversions.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h" #include "components/device_signals/core/browser/signals_aggregator.h" #include "components/device_signals/core/common/signals_constants.h" -@@ -140,7 +140,7 @@ void UploadSecurityEventReport(base::Value::Dict event +@@ -129,7 +129,7 @@ void UploadSecurityEventReport(base::Value::Dict event std::move(upload_callback)); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void PopulateSignals(base::Value::Dict event, policy::CloudPolicyClient* client, std::string name, -@@ -427,7 +427,7 @@ void RealtimeReportingClient::ReportPastEvent(const st +@@ -416,7 +416,7 @@ void RealtimeReportingClient::ReportPastEvent(const st /*include_profile_user_name=*/false); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void AddCrowdstrikeSignalsToEvent( base::Value::Dict& event, -@@ -486,7 +486,7 @@ void RealtimeReportingClient::ReportEventWithTimestamp +@@ -475,7 +475,7 @@ void RealtimeReportingClient::ReportEventWithTimestamp if (include_profile_user_name) { event.Set(kKeyProfileUserName, GetProfileUserName()); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) Profile* profile = Profile::FromBrowserContext(context_); device_signals::SignalsAggregator* signals_aggregator = enterprise_signals::SignalsAggregatorFactory::GetForProfile(profile); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn index 7013b6659ea1..15956fc13ef9 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn @@ -1,13 +1,13 @@ ---- chrome/browser/extensions/BUILD.gn.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1366,6 +1366,10 @@ static_library("extensions") { +@@ -1369,6 +1369,10 @@ static_library("extensions") { deps += [ "//chrome/services/printing/public/mojom" ] } + if (is_bsd) { + sources -= [ "api/image_writer_private/removable_storage_provider_linux.cc" ] + } + if (enable_service_discovery) { sources += [ "api/mdns/mdns_api.cc", diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc index 8e1dc713906d..27f2b66606d3 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc @@ -43,7 +43,7 @@ #include "extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.h" #include "extensions/browser/api/networking_private/networking_private_delegate_factory.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h" #endif -@@ -107,7 +107,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt +@@ -114,7 +114,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt extensions::SettingsPrivateEventRouterFactory::GetInstance(); extensions::SettingsOverridesAPI::GetFactoryInstance(); extensions::SidePanelService::GetFactoryInstance(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extensions::SystemIndicatorManagerFactory::GetInstance(); #endif extensions::TabGroupsEventRouterFactory::GetInstance(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_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 c8ffb8327ef4..685771ed062d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc -@@ -603,7 +603,7 @@ void PasswordsPrivateDelegateImpl::OnFetchingFamilyMem +@@ -605,7 +605,7 @@ void PasswordsPrivateDelegateImpl::OnFetchingFamilyMem } void PasswordsPrivateDelegateImpl::OsReauthTimeoutCall() { -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) PasswordsPrivateEventRouter* router = PasswordsPrivateEventRouterFactory::GetForProfile(profile_); if (router) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc index 12c4c2abfc7c..0500e77eb932 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -197,7 +197,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -193,7 +193,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist (*s_allowlist)[::prefs::kSidePanelHorizontalAlignment] = settings_api::PrefType::PREF_TYPE_BOOLEAN; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kUseCustomChromeFrame] = settings_api::PrefType::PREF_TYPE_BOOLEAN; #endif -@@ -209,7 +209,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -205,7 +205,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist settings_api::PrefType::PREF_TYPE_STRING; (*s_allowlist)[::prefs::kPolicyThemeColor] = settings_api::PrefType::PREF_TYPE_NUMBER; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kSystemTheme] = settings_api::PrefType::PREF_TYPE_NUMBER; #endif 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 e185eb590b2f..50afb3811fb6 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-10-13 13:20:35 UTC +--- chrome/browser/extensions/api/tabs/tabs_api.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/extensions/api/tabs/tabs_api.cc -@@ -843,7 +843,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio +@@ -844,7 +844,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio // ui::SHOW_STATE_MINIMIZED above, on Linux the window is not created as // 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. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc index 0c5f841a8b7f..76a832c4d16e 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/webstore_private/webstore_private_api.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/extensions/api/webstore_private/webstore_private_api.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/extensions/api/webstore_private/webstore_private_api.cc -@@ -912,7 +912,7 @@ void WebstorePrivateBeginInstallWithManifest3Function: +@@ -907,7 +907,7 @@ void WebstorePrivateBeginInstallWithManifest3Function: RequestExtensionApproval(contents); return; } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Shows a parental permission dialog directly bypassing the extension // install dialog view. The parental permission dialog contains a superset // of data from the extension install dialog: requested extension diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc b/www/ungoogled-chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc index 235eab37a560..79e779823929 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc @@ -1,11 +1,11 @@ ---- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -313,7 +313,7 @@ const struct { +@@ -323,7 +323,7 @@ const struct { FILE_PATH_LITERAL("Library/Mobile Documents/com~apple~CloudDocs"), kDontBlockChildren}, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux also block access to devices via /dev. {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), kBlockAllChildren}, // And security sensitive data in /proc and /sys. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc index a3d52a6652b8..48ba23d5db56 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc @@ -1,101 +1,101 @@ ---- chrome/browser/flag_descriptions.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/flag_descriptions.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/flag_descriptions.cc -@@ -2592,7 +2592,7 @@ const char kWebUIOmniboxPopupName[] = "WebUI Omnibox P +@@ -2603,7 +2603,7 @@ const char kWebUIOmniboxPopupName[] = "WebUI Omnibox P const char kWebUIOmniboxPopupDescription[] = "If enabled, shows the omnibox suggestions popup in WebUI."; -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) const char kWebUiSystemFontName[] = "WebUI System font"; const char kWebUiSystemFontDescription[] = "If enabled, all WebUI surfaces will use the default UI font of the " -@@ -7155,7 +7155,7 @@ const char kLacrosMergeIcuDataFileDescription[] = +@@ -7268,7 +7268,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 " -@@ -7370,7 +7370,7 @@ const char kSearchWebInSidePanelDescription[] = +@@ -7479,7 +7479,7 @@ const char kSearchWebInSidePanelDescription[] = // Random platform combinations ----------------------------------------------- #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kQuickCommandsName[] = "Quick Commands"; const char kQuickCommandsDescription[] = "Enable a text interface to browser features. Invoke with Ctrl-Space."; -@@ -7379,7 +7379,7 @@ const char kQuickCommandsDescription[] = +@@ -7488,7 +7488,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."; -@@ -7394,7 +7394,7 @@ const char kEnableProtoApiForClassifyUrlDescription[] +@@ -7503,7 +7503,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[] = -@@ -7418,7 +7418,7 @@ const char kWebShareDescription[] = +@@ -7527,7 +7527,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"; -@@ -7438,7 +7438,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti +@@ -7547,7 +7547,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."; -@@ -7452,7 +7452,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail +@@ -7561,7 +7561,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail "storage and requests initial sync."; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kAsyncDnsName[] = "Async DNS resolver"; const char kAsyncDnsDescription[] = "Enables the built-in DNS resolver."; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -@@ -7559,7 +7559,7 @@ const char kElasticOverscrollDescription[] = +@@ -7660,7 +7660,7 @@ const char kElasticOverscrollDescription[] = #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kUIDebugToolsName[] = "Debugging tools for UI"; const char kUIDebugToolsDescription[] = "Enables additional keyboard shortcuts to help debugging."; -@@ -7571,7 +7571,7 @@ const char kSyncPollImmediatelyOnEveryStartupDescripti +@@ -7672,7 +7672,7 @@ const char kSyncPollImmediatelyOnEveryStartupDescripti #endif #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) const char kDataRetentionPoliciesDisableSyncTypesNeededName[] = "Data Retention Policies Disable Sync Types"; const char kDataRetentionPoliciesDisableSyncTypesNeededDescription[] = -@@ -7616,7 +7616,7 @@ const char kEnableAudioFocusEnforcementDescription[] = +@@ -7717,7 +7717,7 @@ const char kEnableAudioFocusEnforcementDescription[] = "any one time. Requires #enable-media-session-service to be enabled too."; #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#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 8ef49006e8c7..54d35447dd1f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h @@ -1,107 +1,107 @@ ---- chrome/browser/flag_descriptions.h.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/flag_descriptions.h.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/flag_descriptions.h -@@ -1475,7 +1475,7 @@ extern const char kOmnibox2023RefreshConnectionSecurit +@@ -1488,7 +1488,7 @@ extern const char kOmnibox2023RefreshConnectionSecurit extern const char kWebUIOmniboxPopupName[]; extern const char kWebUIOmniboxPopupDescription[]; -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) extern const char kWebUiSystemFontName[]; extern const char kWebUiSystemFontDescription[]; #endif -@@ -4106,7 +4106,7 @@ extern const char kLacrosMergeIcuDataFileName[]; +@@ -4175,7 +4175,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) -@@ -4236,14 +4236,14 @@ extern const char kSearchWebInSidePanelDescription[]; +@@ -4302,14 +4302,14 @@ extern const char kSearchWebInSidePanelDescription[]; // Random platform combinations ----------------------------------------------- #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kQuickCommandsName[]; extern const char kQuickCommandsDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // defined (OS_FUCHSIA) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kWebShareName[]; extern const char kWebShareDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -@@ -4253,7 +4253,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa +@@ -4319,7 +4319,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[]; -@@ -4263,7 +4263,7 @@ extern const char kOzonePlatformHintName[]; +@@ -4329,7 +4329,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[]; -@@ -4271,13 +4271,13 @@ extern const char kForcePasswordInitialSyncWhenDecrypt +@@ -4337,13 +4337,13 @@ extern const char kForcePasswordInitialSyncWhenDecrypt extern const char kForcePasswordInitialSyncWhenDecryptionFailsDescription[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kAsyncDnsName[]; extern const char kAsyncDnsDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kFollowingFeedSidepanelName[]; extern const char kFollowingFeedSidepanelDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -4288,7 +4288,7 @@ extern const char kEnableProtoApiForClassifyUrlName[]; +@@ -4354,7 +4354,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[]; -@@ -4370,7 +4370,7 @@ extern const char kElasticOverscrollDescription[]; +@@ -4431,7 +4431,7 @@ extern const char kElasticOverscrollDescription[]; #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kUIDebugToolsName[]; extern const char kUIDebugToolsDescription[]; -@@ -4379,7 +4379,7 @@ extern const char kSyncPollImmediatelyOnEveryStartupDe +@@ -4440,7 +4440,7 @@ extern const char kSyncPollImmediatelyOnEveryStartupDe #endif #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) extern const char kDataRetentionPoliciesDisableSyncTypesNeededName[]; extern const char kDataRetentionPoliciesDisableSyncTypesNeededDescription[]; #endif -@@ -4406,7 +4406,7 @@ extern const char kEnableAudioFocusEnforcementName[]; +@@ -4467,7 +4467,7 @@ extern const char kEnableAudioFocusEnforcementName[]; extern const char kEnableAudioFocusEnforcementDescription[]; #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#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[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) 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 dfce838b75a4..12122d6e4de4 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,26 +1,20 @@ ---- chrome/browser/headless/headless_mode_util.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/headless/headless_mode_util.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/headless/headless_mode_util.cc -@@ -10,12 +10,12 @@ - // New headless mode is available on Linux, Windows and Mac platforms. - // More platforms will be added later, so avoid function level clutter - // by providing stub implementations at the end of the file. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - - #include "base/base_switches.h" +@@ -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) -@@ -73,7 +73,7 @@ void SetUpCommandLine(const base::CommandLine* command - ::switches::kNoErrorDialogs); - } +@@ -81,7 +81,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. - base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( - ::switches::kOzonePlatform, switches::kHeadless); + 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 392f12e0d9c5..6a75e0d1d3c0 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-07-21 09:49:17 UTC +--- chrome/browser/media/webrtc/chrome_screen_enumerator.cc.orig 2023-11-04 07:08:51 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; } // namespace -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) namespace { base::LazyInstance>::DestructorAtExit g_desktop_capturer_for_testing = LAZY_INSTANCE_INITIALIZER; @@ -78,7 +78,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( 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); -@@ -143,7 +143,7 @@ void ChromeScreenEnumerator::EnumerateScreens( +@@ -142,7 +142,7 @@ void ChromeScreenEnumerator::EnumerateScreens( + ScreensCallback screens_callback) const { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); - DCHECK(base::FeatureList::IsEnabled(blink::features::kGetAllScreensMedia)); -#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_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 6b89340c302b..1bb40b2461e5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc @@ -1,55 +1,55 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc @@ -78,8 +78,10 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if defined(__GLIBC__) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if defined(__GLIBC__) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) +#if !BUILDFLAG(IS_BSD) #include +#endif #include "base/linux_util.h" #include "base/strings/string_split.h" @@ -108,7 +110,7 @@ #include "chromeos/crosapi/cpp/crosapi_constants.h" #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/pressure/pressure_metrics_reporter.h" #endif // BUILDFLAG(IS_LINUX) @@ -117,7 +119,7 @@ #include "components/user_manager/user_manager.h" #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/power_metrics/system_power_monitor.h" #endif @@ -917,7 +919,7 @@ void RecordStartupMetrics() { // 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, -@@ -1227,11 +1229,11 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt +@@ -1239,11 +1241,11 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt } #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) pressure_metrics_reporter_ = std::make_unique(); #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::trace_event::TraceLog::GetInstance()->AddEnabledStateObserver( power_metrics::SystemPowerMonitor::GetInstance()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc index 2d4f060da6ff..ecdcdb5275b9 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc @@ -1,56 +1,56 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -183,7 +183,7 @@ +@@ -184,7 +184,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 -@@ -209,7 +209,7 @@ +@@ -210,7 +210,7 @@ #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/family_link_user_metrics_provider.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS_LACROS))||BUILDFLAG(IS_ANDROID)) -@@ -809,7 +809,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -810,7 +810,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 +@@ -892,7 +892,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) metrics_service_->RegisterMetricsProvider( std::make_unique()); -@@ -1007,7 +1007,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -1011,7 +1011,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) -@@ -1206,7 +1206,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1210,7 +1210,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) // This creates the DesktopProfileSessionDurationsServices if it didn't exist // already. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.cc index 053bee882d63..75c744fd7a58 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,115 +1,156 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2023-11-04 07:08:51 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/chromium_strings.h" + #include "chrome/grit/branded_strings.h" #include "ui/base/l10n/l10n_util.h" -@@ -183,7 +183,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut +@@ -136,7 +136,7 @@ SystemNetworkContextManager* g_system_network_context_ + // received a failed launch for a sandboxed network service. + bool g_previously_failed_to_launch_sandboxed_service = false; + +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Whether kerberos library loading will work in the network service due to the + // sandbox. + bool g_network_service_will_allow_gssapi_library_load = false; +@@ -144,7 +144,7 @@ bool g_network_service_will_allow_gssapi_library_load + const char* kGssapiDesiredPref = + #if BUILDFLAG(IS_CHROMEOS) + prefs::kKerberosEnabled; +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + prefs::kReceivedHttpAuthNegotiateHeader; + #endif + #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +@@ -190,7 +190,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut auth_dynamic_params->basic_over_http_enabled = local_state->GetBoolean(prefs::kBasicAuthOverHttpEnabled); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) auth_dynamic_params->delegate_by_kdc_policy = local_state->GetBoolean(prefs::kAuthNegotiateDelegateByKdcPolicy); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -@@ -241,7 +241,7 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() +@@ -205,7 +205,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut + local_state->GetString(prefs::kAuthAndroidNegotiateAccountType); + #endif // BUILDFLAG(IS_ANDROID) + +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + auth_dynamic_params->allow_gssapi_library_load = + local_state->GetBoolean(kGssapiDesiredPref); + #endif // BUILDFLAG(IS_CHROMEOS) +@@ -215,7 +215,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut + + void OnNewHttpAuthDynamicParams( + network::mojom::HttpAuthDynamicParamsPtr& params) { +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // The kerberos library is incompatible with the network service sandbox, so + // if library loading is now enabled, the network service needs to be + // restarted. It will be restarted unsandboxed because is +@@ -257,11 +257,11 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() if (g_previously_failed_to_launch_sandboxed_service) { return NetworkSandboxState::kDisabledBecauseOfFailedLaunch; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* local_state = g_browser_process->local_state(); #endif -@@ -262,7 +262,7 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() +-#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 || +@@ -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) -@@ -457,7 +457,7 @@ void SystemNetworkContextManager::DeleteInstance() { +@@ -473,7 +473,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) {} -@@ -515,7 +515,7 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -531,7 +531,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) -@@ -562,7 +562,7 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -578,7 +578,7 @@ SystemNetworkContextManager::SystemNetworkContextManag #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #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:: -@@ -611,7 +611,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -627,7 +627,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) -@@ -640,7 +640,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -656,7 +656,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterBooleanPref(prefs::kChromeRootStoreEnabled, false); #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #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, -@@ -649,11 +649,11 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -665,11 +665,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) - } -@@ -702,7 +702,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea + +@@ -720,7 +720,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) -@@ -1009,7 +1009,7 @@ void SystemNetworkContextManager::UpdateChromeRootStor +@@ -1028,7 +1028,7 @@ void SystemNetworkContextManager::UpdateChromeRootStor #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #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_policy_configuration__policy__handler__list__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc index c0412a6ec8af..0e0af62fcc4d 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,197 +1,200 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -212,17 +212,17 @@ +@@ -216,19 +216,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) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) + #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) || -@@ -782,14 +782,14 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || +@@ -787,14 +788,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 }, -@@ -1500,7 +1500,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1514,7 +1515,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::INTEGER }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kGSSAPILibraryName, prefs::kGSSAPILibraryName, base::Value::Type::STRING }, -@@ -1548,7 +1548,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1556,7 +1557,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 }, -@@ -1574,18 +1574,18 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1582,18 +1583,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 }, -@@ -1598,7 +1598,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1606,7 +1607,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 }, -@@ -1699,7 +1699,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1707,7 +1708,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 }, -@@ -1786,7 +1786,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1794,7 +1795,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. -@@ -1795,7 +1795,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1803,7 +1804,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 }, -@@ -1826,7 +1826,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1834,7 +1835,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #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 }, -@@ -1905,7 +1905,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1910,7 +1911,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = ash::prefs::kUrlParameterToAutofillSAMLUsername, base::Value::Type::STRING }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) { key::kBatterySaverModeAvailability, performance_manager::user_tuning::prefs::kBatterySaverModeState, base::Value::Type::INTEGER }, -@@ -1936,7 +1936,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1941,7 +1942,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 }, -@@ -2048,7 +2048,7 @@ std::unique_ptr BuildH +@@ -2060,7 +2061,7 @@ std::unique_ptr BuildH // Policies for all platforms - End #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) handlers->AddHandler( std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -2230,7 +2230,7 @@ std::unique_ptr BuildH +@@ -2242,7 +2243,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( -@@ -2288,7 +2288,7 @@ std::unique_ptr BuildH +@@ -2300,7 +2301,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( -@@ -2676,7 +2676,7 @@ std::unique_ptr BuildH +@@ -2694,7 +2695,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( -@@ -2684,7 +2684,7 @@ std::unique_ptr BuildH +@@ -2702,7 +2703,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)); -@@ -2697,7 +2697,7 @@ std::unique_ptr BuildH +@@ -2715,7 +2716,7 @@ std::unique_ptr BuildH handlers->AddHandler( std::make_unique( 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) || 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 53f979a63b68..0898164b532a 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,69 +1,75 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -475,13 +475,13 @@ +@@ -482,18 +482,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 -@@ -514,7 +514,7 @@ + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" + #endif + +@@ -525,7 +525,7 @@ #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 -@@ -659,7 +659,7 @@ const char kPluginsPluginsList[] = "plugins.plugins_li +@@ -671,7 +671,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) -@@ -945,7 +945,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistryS +@@ -992,7 +992,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistryS #endif // BUILDFLAG(IS_CHROMEOS_ASH) // Deprecated 02/2023. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterDictionaryPref(kWebAppsUrlHandlerInfo); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -1856,12 +1856,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -1943,12 +1943,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 - -@@ -2011,7 +2011,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local +@@ -2103,7 +2103,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local #endif // BUILDFLAG(IS_CHROMEOS_ASH) // Added 02/2023 -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) local_state->ClearPref(kWebAppsUrlHandlerInfo); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_printing_printer__query.cc b/www/ungoogled-chromium/files/patch-chrome_browser_printing_printer__query.cc index d7f07777273e..1dcc9b394046 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_printing_printer__query.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_printing_printer__query.cc @@ -1,11 +1,11 @@ ---- chrome/browser/printing/printer_query.cc.orig 2023-06-05 19:39:05 UTC +--- chrome/browser/printing/printer_query.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/printing/printer_query.cc -@@ -341,7 +341,7 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Di +@@ -339,7 +339,7 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Di crash_key = std::make_unique( print_backend->GetPrinterDriverInfo(printer_name)); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS) +#if (BUILDFLAG(IS_BSD) || BUILDFLAG(IS_LINUX)) && BUILDFLAG(USE_CUPS) PrinterBasicInfo basic_info; if (print_backend->GetPrinterBasicInfo(printer_name, &basic_info) == mojom::ResultCode::kSuccess) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc index 55d909bb0676..3df05d67d6a6 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,88 +1,92 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -384,18 +384,18 @@ +@@ -392,18 +392,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" -@@ -595,7 +595,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -606,7 +606,7 @@ void ChromeBrowserMainExtraPartsProfiles:: if (breadcrumbs::IsEnabled()) { BreadcrumbManagerKeyedServiceFactory::GetInstance(); } -#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(); -@@ -688,23 +688,23 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -706,26 +706,26 @@ void ChromeBrowserMainExtraPartsProfiles:: + enterprise_commands::UserRemoteCommandsServiceFactory::GetInstance(); #endif - enterprise::ProfileIdServiceFactory::GetInstance(); #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) -@@ -813,7 +813,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -840,7 +840,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 -@@ -907,7 +907,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -935,7 +935,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(); -@@ -948,7 +948,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -976,7 +976,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if !BUILDFLAG(IS_ANDROID) ProfileThemeUpdateServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ProfileTokenWebSigninInterceptorFactory::GetInstance(); #endif #if !BUILDFLAG(IS_ANDROID) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_renderer__preferences__util.cc b/www/ungoogled-chromium/files/patch-chrome_browser_renderer__preferences__util.cc index f917e76e298c..e4cae54149d2 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_renderer__preferences__util.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_renderer__preferences__util.cc @@ -1,29 +1,29 @@ ---- chrome/browser/renderer_preferences_util.cc.orig 2023-07-21 09:49:17 UTC +--- chrome/browser/renderer_preferences_util.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/renderer_preferences_util.cc -@@ -36,7 +36,7 @@ +@@ -38,7 +38,7 @@ #include "ui/views/controls/textfield/textfield.h" #endif -#if defined(USE_AURA) && BUILDFLAG(IS_LINUX) +#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" #include "ui/linux/linux_ui.h" -@@ -149,7 +149,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc +@@ -152,7 +152,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc prefs->caret_blink_interval = views::Textfield::GetCaretBlinkInterval(); #endif -#if defined(USE_AURA) && BUILDFLAG(IS_LINUX) +#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(profile); if (linux_ui_theme) { if (ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme()) { -@@ -172,7 +172,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc +@@ -175,7 +175,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) content::UpdateFontRendererPreferencesFromSystemSettings(prefs); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_route.ts b/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_route.ts index b1e167a35046..544dea3f8546 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_route.ts +++ b/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_route.ts @@ -1,11 +1,11 @@ ---- chrome/browser/resources/settings/route.ts.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/resources/settings/route.ts.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/resources/settings/route.ts -@@ -236,7 +236,7 @@ function createBrowserSettingsRoutes(): SettingsRoutes +@@ -240,7 +240,7 @@ function createBrowserSettingsRoutes(): SettingsRoutes r.ACCESSIBILITY = r.ADVANCED.createSection( '/accessibility', 'a11y', loadTimeData.getString('a11yPageTitle')); - // + // r.CAPTIONS = r.ACCESSIBILITY.createChild('/captions'); // diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_sync_sync__service__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_sync_sync__service__factory.cc index a7a2f4c2d65c..0c98e16ac64a 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_sync_sync__service__factory.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_sync_sync__service__factory.cc @@ -1,29 +1,29 @@ ---- chrome/browser/sync/sync_service_factory.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/sync/sync_service_factory.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/sync/sync_service_factory.cc -@@ -82,7 +82,7 @@ +@@ -81,7 +81,7 @@ #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h" #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || // BUILDFLAG(IS_WIN) -@@ -131,7 +131,7 @@ std::unique_ptr BuildSyncService( +@@ -126,7 +126,7 @@ std::unique_ptr BuildSyncService( // TODO(crbug.com/1052397): Reassess whether the following block needs to be // included in lacros-chrome once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) syncer::SyncPrefs prefs(profile->GetPrefs()); local_sync_backend_enabled = prefs.IsLocalSyncEnabled(); -@@ -256,7 +256,7 @@ SyncServiceFactory::SyncServiceFactory() +@@ -252,7 +252,7 @@ SyncServiceFactory::SyncServiceFactory() DependsOn(PasswordStoreFactory::GetInstance()); DependsOn(PowerBookmarkServiceFactory::GetInstance()); #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) DependsOn(SavedTabGroupServiceFactory::GetInstance()); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || // BUILDFLAG(IS_WIN) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service.cc index f711f838e7e1..d2be10113968 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service.cc @@ -1,20 +1,20 @@ ---- chrome/browser/themes/theme_service.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/themes/theme_service.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/themes/theme_service.cc -@@ -74,7 +74,7 @@ +@@ -75,7 +75,7 @@ #include "extensions/browser/extension_registry_observer.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui.h" #include "ui/ozone/public/ozone_platform.h" #endif -@@ -330,7 +330,7 @@ CustomThemeSupplier* ThemeService::GetThemeSupplier() +@@ -331,7 +331,7 @@ CustomThemeSupplier* ThemeService::GetThemeSupplier() } bool ThemeService::ShouldUseCustomFrame() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!ui::OzonePlatform::GetInstance() ->GetPlatformRuntimeProperties() .supports_server_side_window_decorations) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_actions_chrome__action__id.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_actions_chrome__action__id.h index c9f64aff75f7..9863c48e38a9 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_actions_chrome__action__id.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_actions_chrome__action__id.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/actions/chrome_action_id.h.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/actions/chrome_action_id.h.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/actions/chrome_action_id.h -@@ -532,7 +532,7 @@ +@@ -542,7 +542,7 @@ IDC_CONTENT_CONTEXT_QUICK_ANSWERS_INLINE_ANSWER) \ E(kActionContentContextQuickAnswersInlineQuery, \ IDC_CONTENT_CONTEXT_QUICK_ANSWERS_INLINE_QUERY) -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define CHROME_PLATFORM_SPECIFIC_ACTION_IDS \ E(kUseSystemTitleBar, IDC_USE_SYSTEM_TITLE_BAR) \ E(kRestoreWindow, IDC_RESTORE_WINDOW) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser.h index 4842c9fd6d9d..9e43c0bbb53e 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/browser.h.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/browser.h.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/browser.h -@@ -290,7 +290,7 @@ class Browser : public TabStripModelObserver, - int32_t restore_id = kDefaultRestoreId; +@@ -294,7 +294,7 @@ class Browser : public TabStripModelObserver, + absl::optional display_id; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // When the browser window is shown, the desktop environment is notified // using this ID. In response, the desktop will stop playing the "waiting // for startup" animation (if any). diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__command__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__command__controller.cc index 713a94ea0fc6..dcec51996681 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__command__controller.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__command__controller.cc @@ -1,53 +1,53 @@ ---- chrome/browser/ui/browser_command_controller.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/ui/browser_command_controller.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/browser_command_controller.cc -@@ -123,7 +123,7 @@ +@@ -124,7 +124,7 @@ #include "components/user_manager/user_manager.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui.h" #endif -@@ -304,7 +304,7 @@ bool BrowserCommandController::IsReservedCommandOrKey( +@@ -305,7 +305,7 @@ bool BrowserCommandController::IsReservedCommandOrKey( #endif } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If this key was registered by the user as a content editing hotkey, then // it is not reserved. auto* linux_ui = ui::LinuxUi::instance(); -@@ -555,7 +555,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -556,7 +556,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo // 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) case IDC_MINIMIZE_WINDOW: browser_->window()->Minimize(); break; -@@ -567,7 +567,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -568,7 +568,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo break; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) case IDC_USE_SYSTEM_TITLE_BAR: { PrefService* prefs = profile()->GetPrefs(); prefs->SetBoolean(prefs::kUseCustomChromeFrame, -@@ -1210,12 +1210,12 @@ void BrowserCommandController::InitCommandState() { +@@ -1214,12 +1214,12 @@ void BrowserCommandController::InitCommandState() { #endif // 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) command_updater_.UpdateCommandEnabled(IDC_MINIMIZE_WINDOW, true); command_updater_.UpdateCommandEnabled(IDC_MAXIMIZE_WINDOW, true); command_updater_.UpdateCommandEnabled(IDC_RESTORE_WINDOW, true); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool use_system_title_bar = true; #if BUILDFLAG(IS_OZONE) use_system_title_bar = ui::OzonePlatform::GetInstance() diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__dialogs.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__dialogs.h new file mode 100644 index 000000000000..dbe747d092a2 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__dialogs.h @@ -0,0 +1,29 @@ +--- chrome/browser/ui/browser_dialogs.h.orig 2023-11-04 07:08:51 UTC ++++ chrome/browser/ui/browser_dialogs.h +@@ -26,7 +26,7 @@ + #include "ui/gfx/native_widget_types.h" + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + #include "chrome/browser/web_applications/web_app_callback_app_identity.h" + #include "chrome/browser/web_applications/web_app_id.h" + #include "chrome/browser/web_applications/web_app_install_info.h" +@@ -84,7 +84,7 @@ class Widget; + } // namespace views + + #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) + namespace webapps { + class MlInstallOperationTracker; + struct Screenshot; +@@ -162,7 +162,7 @@ void ShowBluetoothDevicePairConfirmDialog( + #endif // PAIR_BLUETOOTH_ON_DEMAND() + + #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) + // Callback used to indicate whether a user has accepted the installation of a + // web app. The boolean parameter is true when the user accepts the dialog. The + // WebAppInstallInfo parameter contains the information about the app, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.cc index 18d63cea4cb8..2130a1951baa 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/chrome_pages.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/chrome_pages.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/chrome_pages.cc -@@ -77,7 +77,7 @@ +@@ -78,7 +78,7 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/web_applications/web_app_utils.h" #endif -@@ -667,7 +667,7 @@ void ShowShortcutCustomizationApp(Profile* profile, +@@ -673,7 +673,7 @@ void ShowShortcutCustomizationApp(Profile* profile, } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) void ShowWebAppSettingsImpl(Browser* browser, Profile* profile, const std::string& app_id, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.h index b4d18fee26a1..331389fea8e3 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.h @@ -1,20 +1,20 @@ ---- chrome/browser/ui/chrome_pages.h.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/chrome_pages.h.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/chrome_pages.h @@ -38,7 +38,7 @@ enum class ConsentLevel; } // namespace signin #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) namespace web_app { enum class AppSettingsPageEntryPoint; } // namespace web_app -@@ -249,7 +249,7 @@ void ShowShortcutCustomizationApp(Profile* profile, +@@ -250,7 +250,7 @@ void ShowShortcutCustomizationApp(Profile* profile, #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Show chrome://app-settings/ page. void ShowWebAppSettings(Browser* browser, const std::string& app_id, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc index cc786986b23b..7e1384351dd7 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc -@@ -16,7 +16,7 @@ +@@ -19,7 +19,7 @@ // NOTE(koz): Linux doesn't use the thick shadowed border, so we add padding // here. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const int ExclusiveAccessBubble::kPaddingPx = 8; #else const int ExclusiveAccessBubble::kPaddingPx = 15; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc index 17ebf2437aa2..54d2979b20b8 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc -@@ -1961,7 +1961,7 @@ const gfx::VectorIcon& GetSharingHubVectorIcon() { +@@ -1981,7 +1981,7 @@ const gfx::VectorIcon& GetSharingHubVectorIcon() { OmniboxFieldTrial::IsChromeRefreshActionChipIconsEnabled() ? omnibox::kShareWinChromeRefreshIcon : omnibox::kShareWinIcon; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return OmniboxFieldTrial::IsChromeRefreshIconsEnabled() || OmniboxFieldTrial::IsChromeRefreshActionChipIconsEnabled() ? omnibox::kShareLinuxChromeRefreshIcon diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc index d34b5671c9be..ef75fda44f6d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/startup/bad_flags_prompt.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/startup/bad_flags_prompt.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/startup/bad_flags_prompt.cc -@@ -99,7 +99,7 @@ const char* const kBadFlags[] = { +@@ -103,7 +103,7 @@ const char* const kBadFlags[] = { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Speech dispatcher is buggy, it can crash and it can make Chrome freeze. // http://crbug.com/327295 switches::kEnableSpeechDispatcher, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc index 9ad6f5d61e78..6ff8648c67a5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc @@ -1,38 +1,38 @@ ---- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/startup/startup_browser_creator.cc @@ -133,7 +133,7 @@ #include "chrome/credential_provider/common/gcp_strings.h" #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/headless/headless_mode_util.h" #include "chrome/browser/ui/startup/web_app_info_recorder_utils.h" #include "components/headless/policy/headless_mode_policy.h" -@@ -921,7 +921,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -925,7 +925,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( TRACE_EVENT0("startup", "StartupBrowserCreator::ProcessCmdLineImpl"); ComputeAndRecordLaunchMode(command_line); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode() && headless::HeadlessModePolicy::IsHeadlessModeDisabled( g_browser_process->local_state())) { -@@ -1025,7 +1025,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1029,7 +1029,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( silent_launch = true; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Writes open and installed web apps to the specified file without // launching a new browser window or tab. if (base::FeatureList::IsEnabled(features::kListWebAppsSwitch) && -@@ -1238,7 +1238,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1242,7 +1242,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( CHECK_EQ(profile_info.mode, StartupProfileMode::kBrowserWindow) << "Failed launch with app: couldn't pick a profile"; std::string app_id = command_line.GetSwitchValueASCII(switches::kAppId); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If Chrome Apps are deprecated and |app_id| is a Chrome App, display the // deprecation UI instead of launching the app. if (apps::OpenDeprecatedApplicationPrompt(privacy_safe_profile, app_id)) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_tab__helpers.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_tab__helpers.cc index 032ff9151f7f..94792d1016c5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_tab__helpers.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_tab__helpers.cc @@ -1,26 +1,26 @@ ---- chrome/browser/ui/tab_helpers.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/tab_helpers.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/tab_helpers.cc -@@ -221,7 +221,7 @@ +@@ -224,7 +224,7 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/blocked_content/framebust_block_tab_helper.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/hats/hats_helper.h" -@@ -593,12 +593,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con +@@ -612,12 +612,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) metrics::DesktopSessionDurationObserver::CreateForWebContents(web_contents); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled( features::kHappinessTrackingSurveysForDesktopDemo) || base::FeatureList::IsEnabled(features::kTrustSafetySentimentSurvey) || diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.cc index db00551c7d82..3dd828e91a2b 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/ui_features.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/ui_features.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/ui_features.cc -@@ -306,7 +306,7 @@ BASE_FEATURE(kTopChromeWebUIUsesSpareRenderer, +@@ -311,7 +311,7 @@ BASE_FEATURE(kTopChromeWebUIUsesSpareRenderer, "TopChromeWebUIUsesSpareRenderer", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables alternate update-related text to be displayed in browser app menu // button, menu item and confirmation dialog. BASE_FEATURE(kUpdateTextOptions, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h index 8d94fa36a21e..c9caefdd0d78 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/ui_features.h.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/ui_features.h.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/ui_features.h -@@ -194,7 +194,7 @@ BASE_DECLARE_FEATURE(kToolbarUseHardwareBitmapDraw); +@@ -195,7 +195,7 @@ BASE_DECLARE_FEATURE(kToolbarUseHardwareBitmapDraw); BASE_DECLARE_FEATURE(kTopChromeWebUIUsesSpareRenderer); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kUpdateTextOptions); extern const base::FeatureParam kUpdateTextOptionNumber; #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc index d712b7a3d3fe..4a6469af0d91 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc @@ -1,43 +1,43 @@ ---- chrome/browser/ui/views/accelerator_table.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/ui/views/accelerator_table.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/views/accelerator_table.cc @@ -72,11 +72,11 @@ const AcceleratorMapping kAcceleratorMap[] = { {ui::VKEY_S, ui::EF_PLATFORM_ACCELERATOR, IDC_SAVE_PAGE}, {ui::VKEY_9, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_LAST_TAB}, {ui::VKEY_NUMPAD9, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_LAST_TAB}, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {ui::VKEY_9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB}, {ui::VKEY_NUMPAD9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB}, #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {ui::VKEY_NEXT, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_MOVE_TAB_NEXT}, {ui::VKEY_PRIOR, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_MOVE_TAB_PREVIOUS}, @@ -104,7 +104,7 @@ const AcceleratorMapping kAcceleratorMap[] = { {ui::VKEY_NUMPAD7, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_6}, {ui::VKEY_8, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_7}, {ui::VKEY_NUMPAD8, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_7}, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {ui::VKEY_1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0}, {ui::VKEY_NUMPAD1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0}, {ui::VKEY_2, ui::EF_ALT_DOWN, IDC_SELECT_TAB_1}, -@@ -149,7 +149,7 @@ const AcceleratorMapping kAcceleratorMap[] = { +@@ -154,7 +154,7 @@ const AcceleratorMapping kAcceleratorMap[] = { IDC_SHOW_AVATAR_MENU}, // Platform-specific key maps. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {ui::VKEY_BROWSER_BACK, ui::EF_NONE, IDC_BACK}, {ui::VKEY_BROWSER_FORWARD, ui::EF_NONE, IDC_FORWARD}, {ui::VKEY_BROWSER_HOME, ui::EF_NONE, IDC_HOME}, -@@ -244,7 +244,7 @@ const AcceleratorMapping kAcceleratorMap[] = { +@@ -249,7 +249,7 @@ const AcceleratorMapping kAcceleratorMap[] = { #endif // !BUILDFLAG(IS_CHROMEOS) #endif // !BUILDFLAG(IS_MAC) #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) {ui::VKEY_S, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_CONTENT_CONTEXT_RUN_LAYOUT_EXTRACTION}, #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc index a5b582881274..5661fb85e919 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc -@@ -41,7 +41,7 @@ +@@ -39,7 +39,7 @@ + #include "ui/wm/core/wm_state.h" + #endif // defined(USE_AURA) - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include #include #include -@@ -136,7 +136,7 @@ void ChromeBrowserMainExtraPartsViews::PreProfileInit( +@@ -132,7 +132,7 @@ void ChromeBrowserMainExtraPartsViews::PreProfileInit( + return controller; + })); - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On the Linux desktop, we want to prevent the user from logging in as root, // so that we don't destroy the profile. Now that we have some minimal ui // initialized, check to see if we're running as root and bail if we are. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc index 9326e025c862..022b35cd7225 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/frame/browser_view.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/views/frame/browser_view.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -2110,7 +2110,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra +@@ -2138,7 +2138,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra // CrOS cleanup is done. // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) contents_web_view_->SetFastResize(is_dragging); if (!is_dragging) { // When tab dragging is ended, we need to make sure the web contents get diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc index 49501a27e66d..b05cfbf9213e 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc @@ -1,38 +1,38 @@ ---- chrome/browser/ui/views/frame/opaque_browser_frame_view.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/views/frame/opaque_browser_frame_view.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/views/frame/opaque_browser_frame_view.cc @@ -54,7 +54,7 @@ #include "ui/views/window/vector_icons/vector_icons.h" #include "ui/views/window/window_shape.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "ui/views/controls/menu/menu_runner.h" #endif -@@ -568,7 +568,7 @@ OpaqueBrowserFrameView::FrameButtonStyle +@@ -566,7 +566,7 @@ OpaqueBrowserFrameView::FrameButtonStyle OpaqueBrowserFrameView::GetFrameButtonStyle() const { // 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) return FrameButtonStyle::kMdButton; #else return FrameButtonStyle::kImageButton; -@@ -591,7 +591,7 @@ bool OpaqueBrowserFrameView::ShouldDrawRestoredFrameSh +@@ -589,7 +589,7 @@ bool OpaqueBrowserFrameView::ShouldDrawRestoredFrameSh return false; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) ui::WindowTiledEdges OpaqueBrowserFrameView::GetTiledEdges() const { return frame()->tiled_edges(); } -@@ -789,7 +789,7 @@ gfx::Rect OpaqueBrowserFrameView::GetIconBounds() cons +@@ -787,7 +787,7 @@ gfx::Rect OpaqueBrowserFrameView::GetIconBounds() cons } void OpaqueBrowserFrameView::WindowIconPressed() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Chrome OS doesn't show the window icon, and Windows handles this on its own // due to the hit test being HTSYSMENU. menu_runner_ = std::make_unique( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.h index 9ea1dc88b807..670aebe8851a 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.h @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/frame/opaque_browser_frame_view.h.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/views/frame/opaque_browser_frame_view.h.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/views/frame/opaque_browser_frame_view.h -@@ -116,7 +116,7 @@ class OpaqueBrowserFrameView : public BrowserNonClient +@@ -115,7 +115,7 @@ class OpaqueBrowserFrameView : public BrowserNonClient const gfx::Rect& bounding_rect) const override; bool IsTranslucentWindowOpacitySupported() const override; bool ShouldDrawRestoredFrameShadow() const override; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) ui::WindowTiledEdges GetTiledEdges() const override; #endif int WebAppButtonHeight() const override; -@@ -233,7 +233,7 @@ class OpaqueBrowserFrameView : public BrowserNonClient +@@ -232,7 +232,7 @@ class OpaqueBrowserFrameView : public BrowserNonClient // Background painter for the window frame. std::unique_ptr frame_background_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr menu_runner_; #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc index d4f13663eae0..5db5a176b32a 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc @@ -1,92 +1,92 @@ ---- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc -@@ -53,7 +53,7 @@ +@@ -55,7 +55,7 @@ #include "ui/aura/window.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/views/frame/browser_frame_view_paint_utils_linux.h" #include "chrome/browser/ui/views/frame/desktop_browser_frame_aura_linux.h" #endif -@@ -80,7 +80,7 @@ constexpr int kBackToTabImageSize = 16; +@@ -82,7 +82,7 @@ constexpr int kBackToTabImageSize = 16; // The height of the controls bar at the top of the window. constexpr int kTopControlsHeight = 30; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Frame border when window shadow is not drawn. constexpr int kFrameBorderThickness = 4; #endif -@@ -175,7 +175,7 @@ class WindowEventObserver : public ui::EventObserver { +@@ -177,7 +177,7 @@ class WindowEventObserver : public ui::EventObserver { gfx::Rect input_bounds = pip_browser_frame_view_->GetLocalBounds(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Calculate input bounds for Linux. This is needed because the input bounds // is not necessary the same as the local bounds on Linux. if (pip_browser_frame_view_->ShouldDrawFrameShadow()) { -@@ -534,7 +534,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow +@@ -558,7 +558,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow + AddChildView(std::move(auto_pip_setting_overlay)); } - #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) frame_background_ = std::make_unique(); #endif -@@ -709,7 +709,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( +@@ -734,7 +734,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( for (ContentSettingImageView* view : content_setting_views_) view->SetIconColor(color_provider->GetColor(kColorPipWindowForeground)); -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // On Linux the top bar background will be drawn in OnPaint(). top_bar_container_view_->SetBackground(views::CreateSolidBackground( color_provider->GetColor(kColorPipWindowTopBarBackground))); -@@ -772,7 +772,7 @@ void PictureInPictureBrowserFrameView::RemovedFromWidg +@@ -803,7 +803,7 @@ void PictureInPictureBrowserFrameView::RemovedFromWidg BrowserNonClientFrameView::RemovedFromWidget(); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gfx::Insets PictureInPictureBrowserFrameView::MirroredFrameBorderInsets() const { auto border = FrameBorderInsets(); -@@ -1016,7 +1016,7 @@ void PictureInPictureBrowserFrameView::AnimationProgre +@@ -1052,7 +1052,7 @@ void PictureInPictureBrowserFrameView::AnimationProgre // views::View implementations: void PictureInPictureBrowserFrameView::OnPaint(gfx::Canvas* canvas) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Draw the PiP window frame borders and shadows, including the top bar // background. if (window_frame_provider_) { -@@ -1140,7 +1140,7 @@ void PictureInPictureBrowserFrameView::UpdateTopBarVie +@@ -1176,7 +1176,7 @@ void PictureInPictureBrowserFrameView::UpdateTopBarVie } gfx::Insets PictureInPictureBrowserFrameView::FrameBorderInsets() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (window_frame_provider_) { const auto insets = window_frame_provider_->GetFrameThicknessDip(); const auto tiled_edges = frame()->tiled_edges(); -@@ -1161,7 +1161,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor +@@ -1197,7 +1197,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor } gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return FrameBorderInsets(); #elif BUILDFLAG(IS_CHROMEOS_ASH) return gfx::Insets(chromeos::kResizeInsideBoundsSize); -@@ -1182,7 +1182,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie +@@ -1218,7 +1218,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie top_height + border_thickness.bottom()); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void PictureInPictureBrowserFrameView::SetWindowFrameProvider( ui::WindowFrameProvider* window_frame_provider) { DCHECK(window_frame_provider); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h index 60b1eec3f7e7..4c5d8419bc16 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h @@ -1,47 +1,47 @@ ---- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h @@ -24,7 +24,7 @@ #include "ui/views/controls/image_view.h" #include "ui/views/widget/widget_observer.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/window_frame_provider.h" #endif @@ -32,7 +32,7 @@ // window, so to prevent cutting off important dialogs we resize the // picture-in-picture window to fit them. While ChromeOS also uses Aura, it does // not have this issue so we do not resize on ChromeOS. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #define RESIZE_DOCUMENT_PICTURE_IN_PICTURE_TO_DIALOG 1 #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) @@ -97,7 +97,7 @@ class PictureInPictureBrowserFrameView void Layout() override; void AddedToWidget() override; void RemovedFromWidget() override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gfx::Insets MirroredFrameBorderInsets() const override; gfx::Insets GetInputInsets() const override; SkRRect GetRestoredClipRegion() const override; -@@ -186,7 +186,7 @@ class PictureInPictureBrowserFrameView +@@ -188,7 +188,7 @@ class PictureInPictureBrowserFrameView // Called when mouse entered or exited the pip window. void OnMouseEnteredOrExitedWindow(bool entered); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Sets the window frame provider so that it will be used for drawing. void SetWindowFrameProvider(ui::WindowFrameProvider* window_frame_provider); -@@ -349,7 +349,7 @@ class PictureInPictureBrowserFrameView +@@ -355,7 +355,7 @@ class PictureInPictureBrowserFrameView // `top_bar_color_animation_`. absl::optional current_foreground_color_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Used to draw window frame borders and shadow on Linux when GTK theme is // enabled. raw_ptr window_frame_provider_ = nullptr; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_dice__web__signin__interception__backdrop__layer.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_dice__web__signin__interception__backdrop__layer.cc new file mode 100644 index 000000000000..8b8dcee0dd1b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_dice__web__signin__interception__backdrop__layer.cc @@ -0,0 +1,11 @@ +--- chrome/browser/ui/views/profiles/dice_web_signin_interception_backdrop_layer.cc.orig 2023-11-04 07:08:51 UTC ++++ chrome/browser/ui/views/profiles/dice_web_signin_interception_backdrop_layer.cc +@@ -89,7 +89,7 @@ void DiceWebSigninInterceptionBackdropLayer::DrawDarkB + // The dark layer should be drawn on top of this region, but it's not easily + // accessible in code, and requires specific implementations. + // After the 2023 refresh, this drag area no longer exists. +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // On linux, the drag area is accessible through the + // `MirroredFrameBorderInsets()` function, which crashes on non-Linux + // platforms. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc index 3f8cfbd626ca..813888189968 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc @@ -1,29 +1,47 @@ ---- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc -@@ -53,7 +53,7 @@ namespace { +@@ -56,7 +56,7 @@ namespace { const int kModalDialogWidth = 448; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) const int kEnterpriseConfirmationDialogWidth = 512; const int kEnterpriseConfirmationDialogHeight = 576; #endif -@@ -179,7 +179,7 @@ SigninViewControllerDelegateViews::CreateProfileCustom +@@ -182,7 +182,7 @@ SigninViewControllerDelegateViews::CreateProfileCustom #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) || BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // static std::unique_ptr SigninViewControllerDelegateViews::CreateEnterpriseConfirmationWebView( -@@ -454,7 +454,7 @@ SigninViewControllerDelegate::CreateProfileCustomizati +@@ -327,7 +327,7 @@ SigninViewControllerDelegateViews::SigninViewControlle + SetButtons(ui::DIALOG_BUTTON_NONE); + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_LACROS) ++ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + // On the local profile creation dialog, cancelling the dialog (for instance + // through the VKEY_ESCAPE accelerator) should delete the profile. + if (delete_profile_on_cancel) { +@@ -417,7 +417,7 @@ void SigninViewControllerDelegateViews::DisplayModal() + } + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_LACROS) ++ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + void SigninViewControllerDelegateViews::DeleteProfileOnCancel() { + ProfileAttributesEntry* entry = + g_browser_process->profile_manager() +@@ -490,7 +490,7 @@ SigninViewControllerDelegate::CreateProfileCustomizati #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) || BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // static SigninViewControllerDelegate* SigninViewControllerDelegate::CreateEnterpriseConfirmationDelegate( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h index 4b4735122f5e..7e862d2bb3a2 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h @@ -1,11 +1,20 @@ ---- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h @@ -73,7 +73,7 @@ class SigninViewControllerDelegateViews #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) || BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) static std::unique_ptr CreateEnterpriseConfirmationWebView( Browser* browser, const AccountInfo& account_info, +@@ -137,7 +137,7 @@ class SigninViewControllerDelegateViews + InitializeSigninWebDialogUI initialize_signin_web_dialog_ui); + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_LACROS) ++ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + // Deletes the ephemeral profile when cancelling the local profile creation + // dialog. + void DeleteProfileOnCancel(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tab__search__bubble__host.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tab__search__bubble__host.cc index b8125499a3c5..e2cdb481571d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tab__search__bubble__host.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tab__search__bubble__host.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/tab_search_bubble_host.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/ui/views/tab_search_bubble_host.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/views/tab_search_bubble_host.cc -@@ -184,7 +184,7 @@ bool TabSearchBubbleHost::ShouldTabSearchRenderBeforeT +@@ -186,7 +186,7 @@ bool TabSearchBubbleHost::ShouldTabSearchRenderBeforeT // Mac should have tabsearch on the right side. Windows >= Win10 has the // Tab Search button as a FrameCaptionButton, but it still needs to be on the // left if it exists. -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return features::IsChromeRefresh2023(); #else return false; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab.cc index 471bef18fa86..0e6898a5ae29 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/tabs/tab.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/views/tabs/tab.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/views/tabs/tab.cc -@@ -606,7 +606,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& +@@ -611,7 +611,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& if (mouse_hovered_ || !GetWidget()->IsMouseEventsEnabled()) return; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Move the hit test area for hovering up so that it is not overlapped by tab // hover cards when they are shown. // TODO(crbug.com/978134): Once Linux/CrOS widget transparency is solved, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc index 950a84f2f4f5..4ef7c7697ab5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc @@ -1,56 +1,56 @@ ---- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/views/tabs/tab_drag_controller.cc -@@ -89,7 +89,7 @@ +@@ -91,7 +91,7 @@ #include "components/remote_cocoa/browser/window.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/aura/client/drag_drop_client.h" #endif -@@ -206,7 +206,7 @@ bool IsWindowDragUsingSystemDragDropAllowed() { +@@ -208,7 +208,7 @@ bool IsWindowDragUsingSystemDragDropAllowed() { void UpdateSystemDnDDragImage(TabDragContext* attached_context, const gfx::ImageSkia& image) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) aura::Window* root_window = attached_context->GetWidget()->GetNativeWindow()->GetRootWindow(); if (aura::client::GetDragDropClient(root_window)) { -@@ -386,7 +386,7 @@ void TabDragController::Init(TabDragContext* source_co +@@ -388,7 +388,7 @@ void TabDragController::Init(TabDragContext* source_co // synchronous on desktop Linux, so use that. // - ChromeOS Ash // Releasing capture on Ash cancels gestures so avoid it. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) can_release_capture_ = false; #endif start_point_in_screen_ = gfx::Point(source_view_offset, mouse_offset.y()); -@@ -1011,7 +1011,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon +@@ -1013,7 +1013,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) // EndMoveLoop is going to snap the window back to its original location. // Hide it so users don't see this. Hiding a window in Linux aura causes // it to lose capture so skip it. -@@ -2051,7 +2051,7 @@ void TabDragController::CompleteDrag() { +@@ -2053,7 +2053,7 @@ void TabDragController::CompleteDrag() { } // If source window was maximized - maximize the new window as well. -#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) // Keeping maximized state breaks snap to Grid on Windows when dragging // tabs from maximized windows. TODO:(crbug.com/727051) Explore doing this // for other desktop OS's. kMaximizedStateRetainedOnTabDrag in -@@ -2465,7 +2465,7 @@ TabDragController::Liveness TabDragController::GetLoca +@@ -2485,7 +2485,7 @@ TabDragController::Liveness TabDragController::GetLoca } // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Exclude windows which are pending deletion via Browser::TabStripEmpty(). // These windows can be returned in the Linux Aura port because the browser // window which was used for dragging is not hidden once all of its tabs are diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc index 313ecb2c2807..fd24663e9f5f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc @@ -1,83 +1,83 @@ ---- chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc @@ -464,7 +464,7 @@ std::string GetFileExtension(FileExtension file_extens } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_BSD) SiteConfig GetSiteConfigurationFromAppName(const std::string& app_name) { SiteConfig config; bool is_app_found = false; -@@ -1933,7 +1933,7 @@ void WebAppIntegrationTestDriver::DeletePlatformShortc +@@ -1936,7 +1936,7 @@ void WebAppIntegrationTestDriver::DeletePlatformShortc if (app_name.empty()) { app_name = GetSiteConfiguration(site).app_name; } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ASSERT_TRUE(override_registration_->test_override->IsShortcutCreated( profile(), app_id, app_name)); ASSERT_TRUE( -@@ -3249,7 +3249,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginEna +@@ -3253,7 +3253,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginEna app_state->id, app_state->name); ASSERT_TRUE(icon_color.has_value()); ASSERT_THAT(site_config.icon_color, testing::Eq(icon_color.value())); -#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ASSERT_TRUE(override_registration_->test_override->IsRunOnOsLoginEnabled( profile(), app_state->id, app_state->name)); #endif -@@ -3264,7 +3264,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3268,7 +3268,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis GetAppBySiteMode(after_state_change_action_state_.get(), profile(), site); ASSERT_TRUE(app_state); base::ScopedAllowBlockingForTesting allow_blocking; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ASSERT_FALSE(override_registration_->test_override->IsRunOnOsLoginEnabled( profile(), app_state->id, app_state->name)); #endif -@@ -3274,7 +3274,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3278,7 +3278,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis void WebAppIntegrationTestDriver::CheckSiteHandlesFile( Site site, FileExtension file_extension) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!BeforeStateCheckAction(__FUNCTION__)) { return; } -@@ -3290,7 +3290,7 @@ void WebAppIntegrationTestDriver::CheckSiteHandlesFile +@@ -3294,7 +3294,7 @@ void WebAppIntegrationTestDriver::CheckSiteHandlesFile void WebAppIntegrationTestDriver::CheckSiteNotHandlesFile( Site site, FileExtension file_extension) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!BeforeStateCheckAction(__FUNCTION__)) { return; } -@@ -4073,7 +4073,7 @@ base::FilePath WebAppIntegrationTestDriver::GetShortcu +@@ -4079,7 +4079,7 @@ base::FilePath WebAppIntegrationTestDriver::GetShortcu base::FilePath shortcut_dir, const std::string& app_name, - const AppId& app_id) { + const webapps::AppId& app_id) { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return override_registration_->test_override->GetShortcutPath( profile(), shortcut_dir, app_id, app_name); #else -@@ -4260,7 +4260,7 @@ bool WebAppIntegrationTestDriver::IsShortcutAndIconCre - const AppId& id) { +@@ -4273,7 +4273,7 @@ bool WebAppIntegrationTestDriver::IsShortcutAndIconCre + const webapps::AppId& id) { base::ScopedAllowBlockingForTesting allow_blocking; bool is_shortcut_and_icon_correct = false; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool is_shortcut_correct = override_registration_->test_override->IsShortcutCreated(profile, id, name); -@@ -4304,7 +4304,7 @@ bool WebAppIntegrationTestDriver::DoIconColorsMatch(Pr +@@ -4317,7 +4317,7 @@ bool WebAppIntegrationTestDriver::DoIconColorsMatch(Pr do_icon_colors_match = (expected_icon_pixel_color == shortcut_pixel_color_apps_folder.value()); } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) SkColor expected_icon_pixel_color = GetSiteConfigurationFromAppName(name).icon_color; absl::optional actual_color_install_icon_size = diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webauthn_sheet__models.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webauthn_sheet__models.cc deleted file mode 100644 index c25ebdd35d03..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webauthn_sheet__models.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- chrome/browser/ui/webauthn/sheet_models.cc.orig 2023-10-13 13:20:35 UTC -+++ chrome/browser/ui/webauthn/sheet_models.cc -@@ -1499,7 +1499,11 @@ AuthenticatorMultiSourcePickerSheetModel:: - using ICloudKeychainMech = - AuthenticatorRequestDialogModel::Mechanism::ICloudKeychain; - bool has_local_passkeys = -+#if (_LIBCPP_VERSION >= 160000) - std::ranges::any_of(dialog_model->mechanisms(), [](const auto& mech) { -+#else -+ base::ranges::any_of(dialog_model->mechanisms(), [](const auto& mech) { -+#endif - return absl::holds_alternative(mech.type) && - absl::get(mech.type).value().source != - device::AuthenticatorType::kPhone; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc index 9e353a2413a5..3e5314662fa0 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc @@ -1,92 +1,92 @@ ---- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -211,7 +211,7 @@ +@@ -213,7 +213,7 @@ #include "chrome/browser/ui/webui/chromeos/chrome_url_disabled/chrome_url_disabled_ui.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/webui_js_error/webui_js_error_ui.h" #endif -@@ -237,17 +237,17 @@ +@@ -239,17 +239,17 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/discards/discards_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/sandbox/sandbox_internals_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h" #endif -@@ -400,7 +400,7 @@ bool IsAboutUI(const GURL& url) { +@@ -402,7 +402,7 @@ bool IsAboutUI(const GURL& url) { #if !BUILDFLAG(IS_ANDROID) || url.host_piece() == chrome::kChromeUITermsHost #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) || url.host_piece() == chrome::kChromeUILinuxProxyConfigHost #endif #if BUILDFLAG(IS_CHROMEOS_ASH) @@ -661,7 +661,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we if (url.host_piece() == chrome::kChromeUIMobileSetupHost) return &NewWebUI; #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIWebUIJsErrorHost) return &NewWebUI; #endif -@@ -723,7 +723,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -724,7 +724,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we if (url.host_piece() == chrome::kChromeUINaClHost) return &NewWebUI; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) if (url.host_piece() == chrome::kChromeUITabModalConfirmDialogHost) -@@ -790,27 +790,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -795,27 +795,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we } #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUISandboxHost) { return &NewWebUI; } #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIConnectorsInternalsHost) return &NewWebUI; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIDiscardsHost) return &NewWebUI; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIBrowserSwitchHost) return &NewWebUI; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIWebAppSettingsHost) return &NewWebUI; #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc index 0d4cd760669c..1a05ddef3407 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/webui/connectors_internals/device_trust_utils.cc.orig 2023-03-10 11:01:21 UTC +--- chrome/browser/ui/webui/connectors_internals/device_trust_utils.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/webui/connectors_internals/device_trust_utils.cc @@ -6,7 +6,7 @@ #include "build/build_config.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "base/base64url.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/policy/chrome_browser_policy_connector.h" -@@ -24,7 +24,7 @@ namespace utils { +@@ -29,7 +29,7 @@ namespace utils { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) connectors_internals::mojom::KeyTrustLevel ParseTrustLevel( BPKUR::KeyTrustLevel trust_level) { -@@ -92,7 +92,7 @@ connectors_internals::mojom::Int32ValuePtr ToMojomValu +@@ -97,7 +97,7 @@ connectors_internals::mojom::Int32ValuePtr ToMojomValu } // namespace connectors_internals::mojom::KeyInfoPtr GetKeyInfo() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) auto* key_manager = g_browser_process->browser_policy_connector() ->chrome_browser_cloud_management_controller() ->GetDeviceTrustKeyManager(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_ntp_app__launcher__handler.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_ntp_app__launcher__handler.cc index b6ea29b315a7..46e3ec55b378 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_ntp_app__launcher__handler.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_ntp_app__launcher__handler.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/webui/ntp/app_launcher_handler.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/ui/webui/ntp/app_launcher_handler.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/webui/ntp/app_launcher_handler.cc -@@ -320,7 +320,7 @@ base::Value::Dict AppLauncherHandler::CreateExtensionI +@@ -312,7 +312,7 @@ base::Value::Dict AppLauncherHandler::CreateExtensionI bool is_deprecated_app = false; auto* context = extension_service_->GetBrowserContext(); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) is_deprecated_app = extensions::IsExtensionUnsupportedDeprecatedApp(context, extension->id()); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc index e6a3c5918502..55c5353432be 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc @@ -1,65 +1,65 @@ ---- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -134,7 +134,7 @@ +@@ -136,7 +136,7 @@ #include "ash/webui/settings/public/constants/routes.mojom.h" #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) #include "ui/display/screen.h" #endif -@@ -154,7 +154,7 @@ +@@ -155,7 +155,7 @@ #include "chrome/browser/ui/webui/certificate_manager_localized_strings_provider.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui_factory.h" #include "ui/ozone/public/ozone_platform.h" #endif -@@ -262,7 +262,7 @@ void AddCommonStrings(content::WebUIDataSource* html_s +@@ -263,7 +263,7 @@ void AddCommonStrings(content::WebUIDataSource* html_s base::FeatureList::IsEnabled( supervised_user::kClearingCookiesKeepsSupervisedUsersSignedIn)); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool allow_qt_theme = base::FeatureList::IsEnabled(ui::kAllowQt); #else bool allow_qt_theme = false; -@@ -293,7 +293,7 @@ void AddA11yStrings(content::WebUIDataSource* html_sou +@@ -294,7 +294,7 @@ void AddA11yStrings(content::WebUIDataSource* html_sou {"focusHighlightLabel", IDS_SETTINGS_ACCESSIBILITY_FOCUS_HIGHLIGHT_DESCRIPTION}, #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"overscrollHistoryNavigationTitle", IDS_SETTINGS_OVERSCROLL_HISTORY_NAVIGATION_TITLE}, {"overscrollHistoryNavigationSubtitle", -@@ -432,7 +432,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -433,7 +433,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht {"huge", IDS_SETTINGS_HUGE_FONT_SIZE}, {"sidePanelAlignLeft", IDS_SETTINGS_SIDE_PANEL_ALIGN_LEFT}, {"sidePanelAlignRight", IDS_SETTINGS_SIDE_PANEL_ALIGN_RIGHT}, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"gtkTheme", IDS_SETTINGS_GTK_THEME}, {"useGtkTheme", IDS_SETTINGS_USE_GTK_THEME}, {"qtTheme", IDS_SETTINGS_QT_THEME}, -@@ -442,7 +442,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -443,7 +443,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht #else {"resetToDefaultTheme", IDS_SETTINGS_RESET_TO_DEFAULT_THEME}, #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, #endif #if BUILDFLAG(IS_MAC) -@@ -467,7 +467,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -468,7 +468,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) bool show_custom_chrome_frame = ui::OzonePlatform::GetInstance() ->GetPlatformRuntimeProperties() .supports_server_side_window_decorations; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h index 488ad5de5154..5b8d44672ebc 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/os_integration/os_integration_test_override.h.orig 2023-06-05 19:39:05 UTC +--- chrome/browser/web_applications/os_integration/os_integration_test_override.h.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/web_applications/os_integration/os_integration_test_override.h -@@ -92,7 +92,7 @@ class OsIntegrationTestOverride +@@ -93,7 +93,7 @@ class OsIntegrationTestOverride virtual const base::FilePath& chrome_apps_folder() = 0; virtual void EnableOrDisablePathOnLogin(const base::FilePath& file_path, bool enable_on_login) = 0; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) virtual const base::FilePath& desktop() = 0; virtual const base::FilePath& startup() = 0; virtual const base::FilePath& applications_dir() = 0; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h index d1bc5ca32b80..ad4fc6be2453 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h.orig 2023-06-05 19:39:05 UTC +--- chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h -@@ -43,7 +43,7 @@ void UnregisterFileHandlersWithOs(const AppId& app_id, +@@ -44,7 +44,7 @@ void UnregisterFileHandlersWithOs(const webapps::AppId const base::FilePath& profile_path, ResultCallback callback); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Exposed for testing purposes. Register the set of // MIME-type-to-file-extensions mappings corresponding to |file_handlers|. File // I/O and callouts to the Linux shell are performed asynchronously. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h index 3e23b7eee175..e563d909b0f4 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h @@ -1,20 +1,20 @@ ---- chrome/browser/web_applications/os_integration/web_app_shortcut.h.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/web_applications/os_integration/web_app_shortcut.h.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/web_applications/os_integration/web_app_shortcut.h -@@ -21,7 +21,7 @@ +@@ -22,7 +22,7 @@ #include "ui/gfx/image/image_family.h" #include "url/gurl.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/web_applications/os_integration/web_app_shortcut_linux.h" #endif // BUILDFLAG(IS_LINUX) -@@ -70,7 +70,7 @@ struct ShortcutInfo { +@@ -71,7 +71,7 @@ struct ShortcutInfo { std::set file_handler_extensions; std::set file_handler_mime_types; std::set protocol_handlers; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::set actions; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc index 80c5c0a2b2a8..c3e40761b54f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/policy/web_app_policy_manager.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/web_applications/policy/web_app_policy_manager.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/web_applications/policy/web_app_policy_manager.cc -@@ -117,7 +117,7 @@ namespace web_app { +@@ -128,7 +128,7 @@ namespace web_app { BASE_FEATURE(kDesktopPWAsForceUnregisterOSIntegration, "DesktopPWAsForceUnregisterOSIntegration", -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.cc index a6593f7e6b74..e4d4546b2617 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.cc @@ -1,119 +1,119 @@ ---- chrome/browser/web_applications/test/os_integration_test_override_impl.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/web_applications/test/os_integration_test_override_impl.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/web_applications/test/os_integration_test_override_impl.cc @@ -127,7 +127,7 @@ std::vector GetFileExtensionsForProgId( } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Performs a blocking read of app icons from the disk. SkColor IconManagerReadIconTopLeftColorForSize(WebAppIconManager& icon_manager, - const AppId& app_id, + const webapps::AppId& app_id, @@ -224,7 +224,7 @@ bool OsIntegrationTestOverrideImpl::SimulateDeleteShor GetShortcutPath(profile, chrome_apps_folder(), app_id, app_name); CHECK(base::PathExists(app_folder_shortcut_path)); return base::DeletePathRecursively(app_folder_shortcut_path); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FilePath desktop_shortcut_path = GetShortcutPath(profile, desktop(), app_id, app_name); LOG(INFO) << desktop_shortcut_path; @@ -264,7 +264,7 @@ bool OsIntegrationTestOverrideImpl::DeleteApplicationM } #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool OsIntegrationTestOverrideImpl::DeleteDesktopDirOnLinux() { if (desktop_.IsValid()) { return desktop_.Delete(); @@ -278,7 +278,7 @@ bool OsIntegrationTestOverrideImpl::IsRunOnOsLoginEnab Profile* profile, - const AppId& app_id, + const webapps::AppId& app_id, const std::string& app_name) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::string shortcut_filename = "chrome-" + app_id + "-" + profile->GetBaseName().value() + ".desktop"; return base::PathExists(startup().Append(shortcut_filename)); @@ -334,7 +334,7 @@ bool OsIntegrationTestOverrideImpl::IsFileExtensionHan is_file_handled = shell_integration::CanApplicationHandleURL(app_path, test_file_url); base::DeleteFile(test_file_path); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FilePath user_applications_dir = applications_dir().Append("applications"); bool database_update_called = false; @@ -378,7 +378,7 @@ OsIntegrationTestOverrideImpl::GetShortcutIconTopLeftC return absl::nullopt; } return GetIconTopLeftColorFromShortcutFile(shortcut_path); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) WebAppProvider* provider = WebAppProvider::GetForLocalAppsUnchecked(profile); if (!provider) { return absl::nullopt; @@ -428,7 +428,7 @@ base::FilePath OsIntegrationTestOverrideImpl::GetShort app_installed_profiles.end()) { return shortcut_path; } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::string shortcut_filename = "chrome-" + app_id + "-" + profile->GetBaseName().value() + ".desktop"; base::FilePath shortcut_path = shortcut_dir.Append(shortcut_filename); @@ -454,7 +454,7 @@ bool OsIntegrationTestOverrideImpl::IsShortcutCreated( base::FilePath app_shortcut_path = GetShortcutPath(profile, chrome_apps_folder(), app_id, app_name); return base::PathExists(app_shortcut_path); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FilePath desktop_shortcut_path = GetShortcutPath(profile, desktop(), app_id, app_name); return base::PathExists(desktop_shortcut_path); @@ -643,7 +643,7 @@ void OsIntegrationTestOverrideImpl::EnableOrDisablePat } #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const base::FilePath& OsIntegrationTestOverrideImpl::desktop() { return desktop_.GetPath(); } @@ -678,7 +678,7 @@ OsIntegrationTestOverrideImpl::OsIntegrationTestOverri #elif BUILDFLAG(IS_MAC) bool success = chrome_apps_folder_.CreateUniqueTempDirUnderPath(base_path); CHECK(success); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool success = desktop_.CreateUniqueTempDirUnderPath(base_path); CHECK(success); success = startup_.CreateUniqueTempDirUnderPath(base_path); @@ -699,7 +699,7 @@ OsIntegrationTestOverrideImpl::OsIntegrationTestOverri #elif BUILDFLAG(IS_MAC) bool success = chrome_apps_folder_.CreateUniqueTempDir(); CHECK(success); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool success = desktop_.CreateUniqueTempDir(); CHECK(success); success = startup_.CreateUniqueTempDir(); @@ -709,7 +709,7 @@ OsIntegrationTestOverrideImpl::OsIntegrationTestOverri #endif } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto callback = base::BindRepeating([](base::FilePath filename_in, std::string xdg_command, std::string file_contents) { @@ -756,7 +756,7 @@ OsIntegrationTestOverrideImpl::~OsIntegrationTestOverr } } } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Reset the file handling callback. SetUpdateMimeInfoDatabaseOnLinuxCallbackForTesting( UpdateMimeInfoDatabaseOnLinuxCallback()); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h index ef20c5cc87ab..4e2ef9eb6fb4 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h @@ -1,38 +1,38 @@ ---- chrome/browser/web_applications/test/os_integration_test_override_impl.h.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/web_applications/test/os_integration_test_override_impl.h.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/web_applications/test/os_integration_test_override_impl.h -@@ -38,7 +38,7 @@ class ShellLinkItem; +@@ -39,7 +39,7 @@ class ShellLinkItem; namespace web_app { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) struct LinuxFileRegistration { base::FilePath file_name; std::string xdg_command; -@@ -112,7 +112,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra +@@ -113,7 +113,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra bool DeleteApplicationMenuDirOnWin(); #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool DeleteDesktopDirOnLinux(); #endif // BUILDFLAG(IS_LINUX) -@@ -231,7 +231,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra +@@ -232,7 +232,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra const base::FilePath& chrome_apps_folder() override; void EnableOrDisablePathOnLogin(const base::FilePath& file_path, bool enable_on_login) override; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const base::FilePath& desktop() override; const base::FilePath& startup() override; const base::FilePath& applications_dir() override; -@@ -278,7 +278,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra +@@ -279,7 +279,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra base::ScopedTempDir chrome_apps_folder_; std::map startup_enabled_; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::ScopedTempDir desktop_; base::ScopedTempDir startup_; base::ScopedTempDir applications_dir_; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__install__info.h b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__install__info.h new file mode 100644 index 000000000000..dde3815f165f --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__install__info.h @@ -0,0 +1,11 @@ +--- chrome/browser/web_applications/web_app_install_info.h.orig 2023-11-04 07:08:51 UTC ++++ chrome/browser/web_applications/web_app_install_info.h +@@ -36,7 +36,7 @@ + #include "url/gurl.h" + + static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)); ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)); + + class SkBitmap; + diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_authenticator__request__dialog__model.cc b/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_authenticator__request__dialog__model.cc deleted file mode 100644 index 9462891492c1..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_authenticator__request__dialog__model.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- chrome/browser/webauthn/authenticator_request_dialog_model.cc.orig 2023-10-13 13:20:35 UTC -+++ chrome/browser/webauthn/authenticator_request_dialog_model.cc -@@ -495,7 +495,11 @@ void AuthenticatorRequestDialogModel:: - // extra step. Jump to Windows instead. - if (base::FeatureList::IsEnabled(device::kWebAuthnNewPasskeyUI) && - transport_availability_.has_win_native_api_authenticator && -+#if (_LIBCPP_VERSION >= 160000) - std::ranges::all_of(mechanisms_, [](const auto& mech) { -+#else -+ base::ranges::all_of(mechanisms_, [](const auto& mech) { -+#endif - return absl::holds_alternative(mech.type) || - (absl::holds_alternative(mech.type) && - absl::get(mech.type).value().source == diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc index b68d2019a282..52d7b1b0cbe8 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc @@ -1,23 +1,20 @@ ---- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/browser/webauthn/chrome_authenticator_request_delegate.cc -@@ -670,7 +670,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureDisc +@@ -672,7 +672,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureDisc g_observer->ConfiguringCable(request_type); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // No caBLEv1 on Linux. It tends to crash bluez. if (base::Contains(pairings_from_extension, device::CableDiscoveryData::Version::V1, -@@ -886,7 +886,11 @@ void ChromeAuthenticatorRequestDelegate::OnTransportAv - if (data.has_platform_authenticator_credential == - device::FidoRequestHandlerBase::RecognizedCredential:: - kHasRecognizedCredential && -+#if (_LIBCPP_VERSION >= 160000) - std::ranges::none_of(data.recognized_credentials, -+#else -+ base::ranges::none_of(data.recognized_credentials, -+#endif - IsCredentialFromPlatformAuthenticator)) { - data.has_platform_authenticator_credential = device:: - FidoRequestHandlerBase::RecognizedCredential::kNoRecognizedCredential; +@@ -879,7 +879,7 @@ void ChromeAuthenticatorRequestDelegate::OnTransportAv + device::FidoRequestHandlerBase::TransportAvailabilityInfo data) { + if (base::FeatureList::IsEnabled(device::kWebAuthnFilterGooglePasskeys) && + dialog_model()->relying_party_id() == kGoogleRpId && +- std::ranges::any_of(data.recognized_credentials, ++ base::ranges::any_of(data.recognized_credentials, + IsCredentialFromPlatformAuthenticator)) { + // Regrettably, Chrome will create webauthn credentials for things other + // than authentication (e.g. credit card autofill auth) under the rp id diff --git a/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc b/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc index 6a472ff7edb6..20b55e66adf6 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc @@ -1,74 +1,74 @@ ---- chrome/common/chrome_features.cc.orig 2023-10-19 07:19:47 UTC +--- chrome/common/chrome_features.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/common/chrome_features.cc @@ -76,7 +76,7 @@ BASE_FEATURE(kAppShimNotificationAttribution, BASE_FEATURE(kAsyncDns, "AsyncDns", #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT @@ -84,7 +84,7 @@ BASE_FEATURE(kAsyncDns, ); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Enables or disables the Autofill survey triggered by opening a prompt to // save address info. BASE_FEATURE(kAutofillAddressSurvey, @@ -102,7 +102,7 @@ BASE_FEATURE(kAutofillPasswordSurvey, base::FEATURE_DISABLED_BY_DEFAULT); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Enables the Restart background mode optimization. When all Chrome UI is // closed and it goes in the background, allows to restart the browser to // discard memory. -@@ -297,7 +297,7 @@ BASE_FEATURE(kDesktopPWAsEnforceWebAppSettingsPolicy, - // Enables or disables Desktop PWAs to be auto-started on OS login. +@@ -304,7 +304,7 @@ BASE_FEATURE(kDesktopPWAsEnforceWebAppSettingsPolicy, BASE_FEATURE(kDesktopPWAsRunOnOsLogin, "DesktopPWAsRunOnOsLogin", --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -326,7 +326,7 @@ BASE_FEATURE(kDesktopPWAsWebBundles, +@@ -338,7 +338,7 @@ BASE_FEATURE(kDesktopPWAsWebBundles, base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Controls whether Chrome Apps are supported. See https://crbug.com/1221251. // If the feature is disabled, Chrome Apps continue to work. If enabled, Chrome // Apps will not launch and will be marked in the UI as deprecated. -@@ -370,7 +370,7 @@ const base::FeatureParam kDnsOverHttpsFallbackPa +@@ -382,7 +382,7 @@ const base::FeatureParam kDnsOverHttpsFallbackPa const base::FeatureParam kDnsOverHttpsShowUiParam { &kDnsOverHttps, "ShowUi", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) true #else false -@@ -858,7 +858,7 @@ BASE_FEATURE(kKAnonymityServiceStorage, - "KAnonymityServiceStorage", - base::FEATURE_ENABLED_BY_DEFAULT); +@@ -889,7 +889,7 @@ BASE_FEATURE(kLacrosSharedComponentsDir, + base::FEATURE_DISABLED_BY_DEFAULT); + #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) BASE_FEATURE(kLinuxLowMemoryMonitor, "LinuxLowMemoryMonitor", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -871,7 +871,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit +@@ -902,7 +902,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit &kLinuxLowMemoryMonitor, "critical_level", 255}; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_FEATURE(kListWebAppsSwitch, "ListWebAppsSwitch", base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.h b/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.h index 4c90e60fe174..7bf820e488dc 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.h @@ -1,45 +1,45 @@ ---- chrome/common/chrome_features.h.orig 2023-10-13 13:20:35 UTC +--- chrome/common/chrome_features.h.orig 2023-11-04 07:08:51 UTC +++ chrome/common/chrome_features.h @@ -61,13 +61,13 @@ BASE_DECLARE_FEATURE(kAppShimNotificationAttribution); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAsyncDns); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillAddressSurvey); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillCardSurvey); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillPasswordSurvey); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kBackgroundModeAllowRestart); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -201,7 +201,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings); +@@ -204,7 +204,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kDesktopPWAsWebBundles); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kChromeAppsDeprecation); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kKeepForceInstalledPreinstalledApps); -@@ -499,7 +499,7 @@ BASE_DECLARE_FEATURE(kKAnonymityServiceOHTTPRequests); - COMPONENT_EXPORT(CHROME_FEATURES) - BASE_DECLARE_FEATURE(kKAnonymityServiceStorage); +@@ -508,7 +508,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) + BASE_DECLARE_FEATURE(kLacrosSharedComponentsDir); + #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kLinuxLowMemoryMonitor); COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam kLinuxLowMemoryMonitorModerateLevel; -@@ -507,7 +507,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -516,7 +516,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam kLinuxLowMemoryMonitorCriticalLevel; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kListWebAppsSwitch); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths.cc b/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths.cc index f73d82842ea4..845581679afd 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths.cc @@ -1,88 +1,88 @@ ---- chrome/common/chrome_paths.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/common/chrome_paths.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/common/chrome_paths.cc @@ -30,7 +30,7 @@ #include "base/apple/foundation_util.h" #endif -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) #include "components/policy/core/common/policy_paths.h" #endif -@@ -49,14 +49,14 @@ +@@ -51,14 +51,14 @@ namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The path to the external extension .json files. // /usr/share seems like a good choice, see: http://www.pathname.com/fhs/ const base::FilePath::CharType kFilepathSinglePrefExtensions[] = #if BUILDFLAG(GOOGLE_CHROME_BRANDING) - FILE_PATH_LITERAL("/usr/share/google-chrome/extensions"); + FILE_PATH_LITERAL("/usr/local/share/ungoogled-chromium/extensions"); #else - FILE_PATH_LITERAL("/usr/share/chromium/extensions"); + FILE_PATH_LITERAL("/usr/local/share/ungoogled-chromium/extensions"); #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -211,7 +211,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -213,7 +213,7 @@ bool PathProvider(int key, base::FilePath* result) { } break; case chrome::DIR_DEFAULT_DOWNLOADS_SAFE: -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!GetUserDownloadsDirectorySafe(&cur)) { return false; } -@@ -504,7 +504,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -516,7 +516,7 @@ bool PathProvider(int key, base::FilePath* result) { return false; } break; -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) case chrome::DIR_POLICY_FILES: { cur = base::FilePath(policy::kPolicyPath); break; -@@ -515,7 +515,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -527,7 +527,7 @@ bool PathProvider(int key, base::FilePath* result) { #if BUILDFLAG(IS_CHROMEOS_ASH) || \ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ BUILDFLAG(CHROMIUM_BRANDING)) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) case chrome::DIR_USER_EXTERNAL_EXTENSIONS: { if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur)) { return false; -@@ -524,7 +524,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -536,7 +536,7 @@ bool PathProvider(int key, base::FilePath* result) { break; } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: { cur = base::FilePath(kFilepathSinglePrefExtensions); break; -@@ -571,7 +571,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -583,7 +583,7 @@ bool PathProvider(int key, base::FilePath* result) { break; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) case chrome::DIR_NATIVE_MESSAGING: #if BUILDFLAG(IS_MAC) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) -@@ -585,9 +585,12 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -597,9 +597,12 @@ bool PathProvider(int key, base::FilePath* result) { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) cur = base::FilePath( FILE_PATH_LITERAL("/etc/opt/chrome/native-messaging-hosts")); +#elif BUILDFLAG(IS_FREEBSD) + cur = base::FilePath(FILE_PATH_LITERAL( + "/usr/local/etc/ungoogled-chromium/native-messaging-hosts")); #else cur = base::FilePath( - FILE_PATH_LITERAL("/etc/chromium/native-messaging-hosts")); + FILE_PATH_LITERAL("/etc/ungoogled-chromium/native-messaging-hosts")); #endif #endif // !BUILDFLAG(IS_MAC) break; diff --git a/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.cc b/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.cc index 4769927a96e8..37ce56410ad1 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.cc @@ -1,19 +1,19 @@ ---- chrome/common/chrome_switches.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/common/chrome_switches.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/common/chrome_switches.cc -@@ -849,14 +849,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- +@@ -861,14 +861,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kEnableNewAppMenuIcon[] = "enable-new-app-menu-icon"; // Causes the browser to launch directly in guest mode. const char kGuest[] = "guest"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Writes open and installed web apps for each profile to the specified file // without launching a new browser window or tab. Pass a absolute file path to // specify where to output the information. Can be used together with optional diff --git a/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.h b/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.h index b1f80fdcfa38..b0f3211db6ec 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.h @@ -1,17 +1,17 @@ ---- chrome/common/chrome_switches.h.orig 2023-10-13 13:20:35 UTC +--- chrome/common/chrome_switches.h.orig 2023-11-04 07:08:51 UTC +++ chrome/common/chrome_switches.h -@@ -269,12 +269,12 @@ extern const char kAllowNaClSocketAPI[]; +@@ -273,12 +273,12 @@ extern const char kAllowNaClSocketAPI[]; #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kEnableNewAppMenuIcon[]; extern const char kGuest[]; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extern const char kListApps[]; extern const char kProfileBaseName[]; extern const char kProfileManagementAttributes[]; diff --git a/www/ungoogled-chromium/files/patch-chrome_common_crash__keys.cc b/www/ungoogled-chromium/files/patch-chrome_common_crash__keys.cc new file mode 100644 index 000000000000..ae49ec594e1e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_common_crash__keys.cc @@ -0,0 +1,23 @@ +--- chrome/common/crash_keys.cc.orig 2023-11-04 07:08:51 UTC ++++ chrome/common/crash_keys.cc +@@ -32,20 +32,10 @@ namespace crash_keys { + namespace { + + // A convenient wrapper around a crash key and its name. +-// +-// The CrashKey contract requires that CrashKeyStrings are never +-// moved, copied, or deleted (see +-// third_party/crashpad/crashpad/client/annotation.h); since this class holds +-// a CrashKeyString, it likewise cannot be moved, copied, or deleted. + class CrashKeyWithName { + public: + explicit CrashKeyWithName(std::string name) + : name_(std::move(name)), crash_key_(name_.c_str()) {} +- CrashKeyWithName(const CrashKeyWithName&) = delete; +- CrashKeyWithName& operator=(const CrashKeyWithName&) = delete; +- CrashKeyWithName(CrashKeyWithName&&) = delete; +- CrashKeyWithName& operator=(CrashKeyWithName&&) = delete; +- ~CrashKeyWithName() = delete; + + void Clear() { crash_key_.Clear(); } + void Set(base::StringPiece value) { crash_key_.Set(value); } diff --git a/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h b/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h index 143820b556b8..bf46f6f3f9a5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h @@ -1,82 +1,82 @@ ---- chrome/common/pref_names.h.orig 2023-10-13 13:20:35 UTC +--- chrome/common/pref_names.h.orig 2023-11-04 07:08:51 UTC +++ chrome/common/pref_names.h -@@ -1316,7 +1316,7 @@ inline constexpr char kUseAshProxy[] = "lacros.proxy.u +@@ -1302,7 +1302,7 @@ inline constexpr char kUseAshProxy[] = "lacros.proxy.u // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Linux specific preference on whether we should match the system theme. inline constexpr char kSystemTheme[] = "extensions.theme.system_theme"; #endif -@@ -1442,7 +1442,7 @@ inline constexpr char kShowUpdatePromotionInfoBar[] = +@@ -1428,7 +1428,7 @@ inline constexpr char kShowUpdatePromotionInfoBar[] = "browser.show_update_promotion_info_bar"; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Boolean that is false if we should show window manager decorations. If // true, we draw a custom chrome frame (thicker title bar and blue border). inline constexpr char kUseCustomChromeFrame[] = "browser.custom_chrome_frame"; -@@ -1986,7 +1986,7 @@ inline constexpr char kDownloadLastCompleteTime[] = +@@ -1969,7 +1969,7 @@ inline constexpr char kDownloadLastCompleteTime[] = "download.last_complete_time"; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) inline constexpr char kOpenPdfDownloadInSystemReader[] = "download.open_pdf_in_system_reader"; #endif -@@ -2392,14 +2392,14 @@ inline constexpr char kMediaStorageIdSalt[] = "media.s +@@ -2380,14 +2380,14 @@ inline constexpr char kMediaStorageIdSalt[] = "media.s inline constexpr char kMediaCdmOriginData[] = "media.cdm.origin_data"; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // A boolean pref to determine whether or not the network service is running // sandboxed. inline constexpr char kNetworkServiceSandboxEnabled[] = "net.network_service_sandbox"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Records whether the user has seen an HTTP auth "negotiate" header. inline constexpr char kReceivedHttpAuthNegotiateHeader[] = "net.received_http_auth_negotiate_headers"; -@@ -2477,7 +2477,7 @@ inline constexpr char kAmbientAuthenticationInPrivateM +@@ -2465,7 +2465,7 @@ inline constexpr char kAmbientAuthenticationInPrivateM inline constexpr char kBasicAuthOverHttpEnabled[] = "auth.basic_over_http_enabled"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Boolean that specifies whether OK-AS-DELEGATE flag from KDC is respected // along with kAuthNegotiateDelegateAllowlist. inline constexpr char kAuthNegotiateDelegateByKdcPolicy[] = -@@ -3551,7 +3551,7 @@ inline constexpr char kFileOrDirectoryPickerWithoutGes +@@ -3494,7 +3494,7 @@ inline constexpr char kFileOrDirectoryPickerWithoutGes inline constexpr char kSandboxExternalProtocolBlocked[] = "profile.sandbox_external_protocol_blocked"; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Boolean that indicates if system notifications are allowed to be used in // place of Chrome notifications. inline constexpr char kAllowSystemNotifications[] = -@@ -3607,7 +3607,7 @@ inline constexpr char kCACertificateManagementAllowed[ +@@ -3550,7 +3550,7 @@ inline constexpr char kCACertificateManagementAllowed[ inline constexpr char kChromeRootStoreEnabled[] = "chrome_root_store_enabled"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) inline constexpr char kEnforceLocalAnchorConstraintsEnabled[] = "enforce_local_anchor_constraints_enabled"; #endif -@@ -3921,7 +3921,7 @@ inline constexpr char kThrottleNonVisibleCrossOriginIf +@@ -3864,7 +3864,7 @@ inline constexpr char kThrottleNonVisibleCrossOriginIf inline constexpr char kNewBaseUrlInheritanceBehaviorAllowed[] = "new_base_url_inheritance_behavior_allowed"; -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If this exists and is true, Chrome may run system DNS resolution out of the // network process. If false, Chrome will run system DNS resolution in the // network process. If non-existent, Chrome will decide where to run system DNS diff --git a/www/ungoogled-chromium/files/patch-chrome_common_url__constants.cc b/www/ungoogled-chromium/files/patch-chrome_common_url__constants.cc index b8c9e49ff8cf..9d7537447efa 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_url__constants.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_url__constants.cc @@ -1,11 +1,11 @@ ---- chrome/common/url_constants.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/common/url_constants.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/common/url_constants.cc -@@ -560,7 +560,7 @@ const char kPhoneHubPermissionLearnMoreURL[] = +@@ -592,7 +592,7 @@ const char kPhoneHubPermissionLearnMoreURL[] = "https://support.9oo91e.qjz9zk/chromebook/?p=multidevice"; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kChromeAppsDeprecationLearnMoreURL[] = "https://support.9oo91e.qjz9zk/chrome/?p=chrome_app_deprecation"; #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_common_url__constants.h b/www/ungoogled-chromium/files/patch-chrome_common_url__constants.h index d47beee0aca8..49dd76750136 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_url__constants.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_url__constants.h @@ -1,11 +1,11 @@ ---- chrome/common/url_constants.h.orig 2023-10-13 13:20:35 UTC +--- chrome/common/url_constants.h.orig 2023-11-04 07:08:51 UTC +++ chrome/common/url_constants.h -@@ -537,7 +537,7 @@ extern const char kOutdatedPluginLearnMoreURL[]; +@@ -567,7 +567,7 @@ extern const char kOutdatedPluginLearnMoreURL[]; extern const char kPhoneHubPermissionLearnMoreURL[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // "Learn more" URL for the chrome apps deprecation dialog. extern const char kChromeAppsDeprecationLearnMoreURL[]; diff --git a/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.cc b/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.cc index 4e6b3cfbf86a..1f96669755a4 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.cc @@ -1,68 +1,68 @@ ---- chrome/common/webui_url_constants.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/common/webui_url_constants.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/common/webui_url_constants.cc @@ -499,18 +499,18 @@ const char kOsUIShortcutCustomizationAppURL[] = "os:// const char kOsUIVersionURL[] = "os://version"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kChromeUIWebUIJsErrorHost[] = "webuijserror"; const char kChromeUIWebUIJsErrorURL[] = "chrome://webuijserror/"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) const char kChromeUIConnectorsInternalsHost[] = "connectors-internals"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kChromeUIDiscardsHost[] = "discards"; const char kChromeUIDiscardsURL[] = "chrome://discards/"; #endif @@ -525,14 +525,14 @@ const char kChromeUILinuxProxyConfigHost[] = "linux-pr #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) const char kChromeUISandboxHost[] = "sandbox"; #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) const char kChromeUIBrowserSwitchHost[] = "browser-switch"; const char kChromeUIBrowserSwitchURL[] = "chrome://browser-switch/"; const char kChromeUIEnterpriseProfileWelcomeHost[] = @@ -551,7 +551,7 @@ const char kChromeUIProfilePickerUrl[] = "chrome://pro const char kChromeUIProfilePickerStartupQuery[] = "startup"; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) const char kChromeUITabModalConfirmDialogHost[] = "tab-modal-confirm-dialog"; -@@ -631,7 +631,7 @@ const char kPrivacySandboxSubPagePath[] = "/privacySan +@@ -636,7 +636,7 @@ const char kCookiesSubPagePath[] = "/cookies"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kChromeUIWebAppSettingsURL[] = "chrome://app-settings/"; const char kChromeUIWebAppSettingsHost[] = "app-settings"; #endif -@@ -866,7 +866,7 @@ const char* const kChromeDebugURLs[] = { +@@ -870,7 +870,7 @@ const char* const kChromeDebugURLs[] = { blink::kChromeUIGpuJavaCrashURL, kChromeUIJavaCrashURL, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) kChromeUIWebUIJsErrorURL, #endif kChromeUIQuitURL, diff --git a/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.h b/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.h index ce89e22f3ed3..f87de4d1c752 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.h @@ -1,58 +1,58 @@ ---- chrome/common/webui_url_constants.h.orig 2023-10-13 13:20:35 UTC +--- chrome/common/webui_url_constants.h.orig 2023-11-04 07:08:51 UTC +++ chrome/common/webui_url_constants.h -@@ -419,24 +419,24 @@ extern const char kOsUIShortcutCustomizationAppURL[]; +@@ -418,24 +418,24 @@ extern const char kOsUIShortcutCustomizationAppURL[]; extern const char kOsUIVersionURL[]; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kChromeUIWebUIJsErrorHost[]; extern const char kChromeUIWebUIJsErrorURL[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) extern const char kChromeUIConnectorsInternalsHost[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kChromeUIDiscardsHost[]; extern const char kChromeUIDiscardsURL[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kChromeUIWebAppSettingsURL[]; extern const char kChromeUIWebAppSettingsHost[]; #endif -@@ -451,7 +451,7 @@ extern const char kChromeUILinuxProxyConfigHost[]; +@@ -450,7 +450,7 @@ extern const char kChromeUILinuxProxyConfigHost[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) extern const char kChromeUISandboxHost[]; #endif -@@ -463,7 +463,7 @@ extern const char kChromeUISearchEngineChoiceHost[]; +@@ -462,7 +462,7 @@ extern const char kChromeUISearchEngineChoiceHost[]; // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) extern const char kChromeUIBrowserSwitchHost[]; extern const char kChromeUIBrowserSwitchURL[]; extern const char kChromeUIEnterpriseProfileWelcomeHost[]; -@@ -479,7 +479,7 @@ extern const char kChromeUIProfilePickerUrl[]; +@@ -478,7 +478,7 @@ extern const char kChromeUIProfilePickerUrl[]; extern const char kChromeUIProfilePickerStartupQuery[]; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) extern const char kChromeUITabModalConfirmDialogHost[]; diff --git a/www/ungoogled-chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc b/www/ungoogled-chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc index b1b8754e2628..7806d175db0d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc @@ -1,47 +1,47 @@ ---- chrome/services/printing/print_backend_service_impl.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/services/printing/print_backend_service_impl.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/services/printing/print_backend_service_impl.cc @@ -46,7 +46,7 @@ #include "printing/backend/cups_connection_pool.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/no_destructor.h" #include "ui/linux/linux_ui.h" #include "ui/linux/linux_ui_delegate_stub.h" @@ -73,7 +73,7 @@ namespace printing { namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void InstantiateLinuxUiDelegate() { // TODO(crbug.com/809738) Until a real UI can be used in a utility process, // need to use the stub version. @@ -82,7 +82,7 @@ void InstantiateLinuxUiDelegate() { #endif scoped_refptr GetPrintingTaskRunner() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Use task runner associated with equivalent of UI thread. Needed for calls // made through `PrintDialogLinuxInterface` to properly execute. CHECK(base::SequencedTaskRunner::HasCurrentDefault()); -@@ -466,7 +466,7 @@ void PrintBackendServiceImpl::Init( +@@ -460,7 +460,7 @@ void PrintBackendServiceImpl::Init( // `InitCommon()`. InitializeProcessForPrinting(); print_backend_ = PrintBackend::CreateInstance(locale); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Test framework already initializes the UI, so this should not go in // `InitCommon()`. Additionally, low-level Linux UI is not needed when tests // are using `TestPrintingContext`. -@@ -686,7 +686,7 @@ void PrintBackendServiceImpl::UpdatePrintSettings( +@@ -680,7 +680,7 @@ void PrintBackendServiceImpl::UpdatePrintSettings( crash_keys_ = std::make_unique( print_backend_->GetPrinterDriverInfo(*printer_name)); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_CUPS) // Try to fill in advanced settings based upon basic info options. PrinterBasicInfo basic_info; if (print_backend_->GetPrinterBasicInfo(*printer_name, &basic_info) == diff --git a/www/ungoogled-chromium/files/patch-chrome_services_speech_audio__source__fetcher__impl.cc b/www/ungoogled-chromium/files/patch-chrome_services_speech_audio__source__fetcher__impl.cc index b1d2833748f6..7aca1c62597d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_services_speech_audio__source__fetcher__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_services_speech_audio__source__fetcher__impl.cc @@ -1,11 +1,11 @@ ---- chrome/services/speech/audio_source_fetcher_impl.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/services/speech/audio_source_fetcher_impl.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/services/speech/audio_source_fetcher_impl.cc -@@ -132,7 +132,7 @@ void AudioSourceFetcherImpl::Start( +@@ -129,7 +129,7 @@ void AudioSourceFetcherImpl::Start( // TODO(crbug.com/1185978): Check implementation / sandbox policy on Mac and // Windows. -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) is_started_ = true; // Initialize the AudioCapturerSource with |this| as the CaptureCallback, // get the parameters for the device ID, then start audio capture. diff --git a/www/ungoogled-chromium/files/patch-chrome_test_BUILD.gn b/www/ungoogled-chromium/files/patch-chrome_test_BUILD.gn index 9cd1d8512fc8..ff007a7aa0b2 100644 --- a/www/ungoogled-chromium/files/patch-chrome_test_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-chrome_test_BUILD.gn @@ -1,11 +1,11 @@ ---- chrome/test/BUILD.gn.orig 2023-10-13 13:20:35 UTC +--- chrome/test/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ chrome/test/BUILD.gn -@@ -10966,7 +10966,7 @@ test("chrome_app_unittests") { +@@ -11050,7 +11050,7 @@ test("chrome_app_unittests") { "//components/heap_profiling/in_process", "//components/safe_browsing:buildflags", ] - if (!is_fuchsia && !is_mac) { + if (!is_fuchsia && !is_mac && !is_bsd) { deps += [ "//third_party/breakpad:client" ] } if (is_android) { diff --git a/www/ungoogled-chromium/files/patch-chrome_utility_services.cc b/www/ungoogled-chromium/files/patch-chrome_utility_services.cc index 417e26d9b70a..e64548f55b1c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_utility_services.cc +++ b/www/ungoogled-chromium/files/patch-chrome_utility_services.cc @@ -1,56 +1,56 @@ ---- chrome/utility/services.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/utility/services.cc.orig 2023-11-04 07:08:51 UTC +++ chrome/utility/services.cc @@ -56,7 +56,7 @@ #include "chrome/services/system_signals/mac/mac_system_signals_service.h" #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/services/system_signals/linux/linux_system_signals_service.h" #endif // BUILDFLAG(IS_LINUX) @@ -82,7 +82,7 @@ #include "chrome/services/file_util/file_util_service.h" // nogncheck #endif -#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) +#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) #include "chrome/services/file_util/document_analysis_service.h" // nogncheck #endif -@@ -216,7 +216,7 @@ auto RunMacNotificationService( +@@ -218,7 +218,7 @@ auto RunMacNotificationService( } #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto RunSystemSignalsService( mojo::PendingReceiver receiver) { -@@ -276,7 +276,7 @@ auto RunCupsIppParser( +@@ -278,7 +278,7 @@ auto RunCupsIppParser( } #endif -#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) +#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) auto RunDocumentAnalysis( mojo::PendingReceiver receiver) { return std::make_unique(std::move(receiver)); -@@ -452,7 +452,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -466,7 +466,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& services.Add(RunWindowsIconReader); #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) services.Add(RunSystemSignalsService); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -468,7 +468,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -482,7 +482,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& services.Add(RunFileUtil); #endif -#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) +#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) services.Add(RunDocumentAnalysis); #endif diff --git a/www/ungoogled-chromium/files/patch-chromecast_browser_cast__content__browser__client.cc b/www/ungoogled-chromium/files/patch-chromecast_browser_cast__content__browser__client.cc index 0cc67d926f9a..69fe61c1d1d6 100644 --- a/www/ungoogled-chromium/files/patch-chromecast_browser_cast__content__browser__client.cc +++ b/www/ungoogled-chromium/files/patch-chromecast_browser_cast__content__browser__client.cc @@ -1,11 +1,11 @@ ---- chromecast/browser/cast_content_browser_client.cc.orig 2023-10-13 13:20:35 UTC +--- chromecast/browser/cast_content_browser_client.cc.orig 2023-11-04 07:08:51 UTC +++ chromecast/browser/cast_content_browser_client.cc -@@ -451,7 +451,7 @@ void CastContentBrowserClient::AppendExtraCommandLineS +@@ -435,7 +435,7 @@ void CastContentBrowserClient::AppendExtraCommandLineS switches::kAudioOutputChannels)); } } else if (process_type == switches::kGpuProcess) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Necessary for accelerated 2d canvas. By default on Linux, Chromium // assumes GLES2 contexts can be lost to a power-save mode, which breaks GPU // canvas apps. diff --git a/www/ungoogled-chromium/files/patch-components_autofill__payments__strings.grdp b/www/ungoogled-chromium/files/patch-components_autofill__payments__strings.grdp index 2a1a0d9b8002..74ce3d5a2484 100644 --- a/www/ungoogled-chromium/files/patch-components_autofill__payments__strings.grdp +++ b/www/ungoogled-chromium/files/patch-components_autofill__payments__strings.grdp @@ -1,11 +1,11 @@ ---- components/autofill_payments_strings.grdp.orig 2023-10-13 13:20:35 UTC +--- components/autofill_payments_strings.grdp.orig 2023-11-04 07:08:51 UTC +++ components/autofill_payments_strings.grdp -@@ -130,7 +130,7 @@ +@@ -134,7 +134,7 @@ Save card - + - - Do you want to save this card to your Google Account? + + Do you want to save this card in your Google Account? diff --git a/www/ungoogled-chromium/files/patch-components_autofill_core_browser_contact__info__sync__util.cc b/www/ungoogled-chromium/files/patch-components_autofill_core_browser_contact__info__sync__util.cc deleted file mode 100644 index 6fa84fd5d59f..000000000000 --- a/www/ungoogled-chromium/files/patch-components_autofill_core_browser_contact__info__sync__util.cc +++ /dev/null @@ -1,18 +0,0 @@ ---- components/autofill/core/browser/contact_info_sync_util.cc.orig 2023-10-13 13:20:35 UTC -+++ components/autofill/core/browser/contact_info_sync_util.cc -@@ -174,9 +174,15 @@ class ContactInfoProfileSetter { - CHECK(observations.empty()); - for (const sync_pb::ContactInfoSpecifics::Observation& proto_observation : - proto_observations) { -+#if defined(__clang__) && (__clang_major__ >= 15) - observations.emplace_back(proto_observation.type(), - ProfileTokenQuality::FormSignatureHash( - proto_observation.form_hash())); -+#else -+ observations.emplace_back() = { static_cast(proto_observation.type()), -+ ProfileTokenQuality::FormSignatureHash( -+ proto_observation.form_hash()) }; -+#endif - } - } - diff --git a/www/ungoogled-chromium/files/patch-components_autofill_core_browser_payments_iban__save__manager.cc b/www/ungoogled-chromium/files/patch-components_autofill_core_browser_payments_iban__save__manager.cc new file mode 100644 index 000000000000..e22d0f05900f --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_autofill_core_browser_payments_iban__save__manager.cc @@ -0,0 +1,14 @@ +--- components/autofill/core/browser/payments/iban_save_manager.cc.orig 2023-11-04 07:08:51 UTC ++++ components/autofill/core/browser/payments/iban_save_manager.cc +@@ -63,7 +63,11 @@ bool IbanSaveManager::AttemptToOfferIbanLocalSave( + bool IbanSaveManager::ShouldOfferLocalSave(const Iban& iban_import_candidate) { + // Only offer to save new IBANs. Users can go to the payment methods settings + // page to update existing IBANs if desired. ++#if (_LIBCPP_VERSION >= 160000) + return std::ranges::none_of( ++#else ++ return base::ranges::none_of( ++#endif + personal_data_manager_->GetLocalIbans(), [&](const auto& iban) { + return iban->value() == iban_import_candidate.value(); + }); diff --git a/www/ungoogled-chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc b/www/ungoogled-chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc index 88f510ab110d..141a7d3f9218 100644 --- a/www/ungoogled-chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc +++ b/www/ungoogled-chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc @@ -1,12 +1,12 @@ ---- components/autofill/core/browser/personal_data_manager.cc.orig 2023-10-13 13:20:35 UTC +--- components/autofill/core/browser/personal_data_manager.cc.orig 2023-11-04 07:08:51 UTC +++ components/autofill/core/browser/personal_data_manager.cc -@@ -2492,7 +2492,8 @@ bool PersonalDataManager::ShouldShowCardsFromAccountOp +@@ -2384,7 +2384,8 @@ bool PersonalDataManager::ShouldShowCardsFromAccountOp // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) // This option should only be shown for users that have not enabled the Sync // Feature and that have server credit cards available. // TODO(crbug.com/1462552): Simplify once ConsentLevel::kSync and diff --git a/www/ungoogled-chromium/files/patch-components_autofill_core_browser_webdata_autofill__sync__bridge__util.cc b/www/ungoogled-chromium/files/patch-components_autofill_core_browser_webdata_autofill__sync__bridge__util.cc deleted file mode 100644 index e97c675e8f40..000000000000 --- a/www/ungoogled-chromium/files/patch-components_autofill_core_browser_webdata_autofill__sync__bridge__util.cc +++ /dev/null @@ -1,22 +0,0 @@ ---- components/autofill/core/browser/webdata/autofill_sync_bridge_util.cc.orig 2023-10-13 13:20:35 UTC -+++ components/autofill/core/browser/webdata/autofill_sync_bridge_util.cc -@@ -553,11 +553,19 @@ ServerCvc AutofillWalletCvcStructDataFromWalletCredent - base::StringToInt64(wallet_credential_specifics.instrument_id(), - &instrument_id); - -+#if defined(__clang__) && (__clang_major__ >= 15) - return ServerCvc( - instrument_id, base::UTF8ToUTF16(wallet_credential_specifics.cvc()), - base::Time::UnixEpoch() + - base::Milliseconds(wallet_credential_specifics - .last_updated_time_unix_epoch_millis())); -+#else -+ return ServerCvc( { -+ instrument_id, base::UTF8ToUTF16(wallet_credential_specifics.cvc()), -+ base::Time::UnixEpoch() + -+ base::Milliseconds(wallet_credential_specifics -+ .last_updated_time_unix_epoch_millis()) }); -+#endif - } - - VirtualCardUsageData VirtualCardUsageDataFromUsageSpecifics( diff --git a/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc b/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc index ea066e6b2c62..2d1ddf848021 100644 --- a/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc +++ b/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/common/autofill_payments_features.cc.orig 2023-10-13 13:20:35 UTC +--- components/autofill/core/common/autofill_payments_features.cc.orig 2023-11-04 07:08:51 UTC +++ components/autofill/core/common/autofill_payments_features.cc -@@ -281,7 +281,7 @@ BASE_FEATURE(kEnablePixPayments, +@@ -292,7 +292,7 @@ BASE_FEATURE(kEnablePixPayments, bool ShouldShowImprovedUserConsentForCreditCardSave() { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) // The new user consent UI is fully launched on MacOS, Windows and Linux. return true; diff --git a/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__util.cc b/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__util.cc index 029c681bcbab..4cc1038d08e9 100644 --- a/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__util.cc +++ b/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__util.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/common/autofill_util.cc.orig 2023-09-17 07:59:53 UTC +--- components/autofill/core/common/autofill_util.cc.orig 2023-11-04 07:08:51 UTC +++ components/autofill/core/common/autofill_util.cc -@@ -153,7 +153,7 @@ bool SanitizedFieldIsEmpty(const std::u16string& value +@@ -133,7 +133,7 @@ bool SanitizedFieldIsEmpty(const std::u16string& value bool ShouldAutoselectFirstSuggestionOnArrowDown() { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/ungoogled-chromium/files/patch-components_commerce__strings.grdp b/www/ungoogled-chromium/files/patch-components_commerce__strings.grdp index 3b840cd2953d..a6759af5596b 100644 --- a/www/ungoogled-chromium/files/patch-components_commerce__strings.grdp +++ b/www/ungoogled-chromium/files/patch-components_commerce__strings.grdp @@ -1,11 +1,11 @@ ---- components/commerce_strings.grdp.orig 2023-10-13 13:20:35 UTC +--- components/commerce_strings.grdp.orig 2023-11-04 07:08:51 UTC +++ components/commerce_strings.grdp -@@ -292,7 +292,7 @@ +@@ -304,7 +304,7 @@ Typical prices are based on stores across the web over the past 90 days. - + Browse mode, you can change to Forms mode to use the left/right arrow to review price changes on the graph diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__configurations.cc b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__configurations.cc index af4de8e1a961..3ebb8f5ffde3 100644 --- a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__configurations.cc +++ b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__configurations.cc @@ -1,21 +1,21 @@ ---- components/feature_engagement/public/feature_configurations.cc.orig 2023-10-13 13:20:35 UTC +--- components/feature_engagement/public/feature_configurations.cc.orig 2023-11-04 07:08:51 UTC +++ components/feature_engagement/public/feature_configurations.cc @@ -46,7 +46,7 @@ FeatureConfig CreateAlwaysTriggerConfig(const base::Fe absl::optional GetClientSideFeatureConfig( const base::Feature* feature) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (kIPHPasswordsAccountStorageFeature.name == feature->name) { absl::optional config = FeatureConfig(); config->valid = true; -@@ -1336,7 +1336,8 @@ absl::optional GetClientSideFeatureConf +@@ -1399,7 +1399,8 @@ absl::optional GetClientSideFeatureConf #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) if (kIPHAutofillExternalAccountProfileSuggestionFeature.name == feature->name) { diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.cc b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.cc index 715da67cfa0a..505a4391a27d 100644 --- a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.cc +++ b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.cc @@ -1,21 +1,20 @@ ---- components/feature_engagement/public/feature_constants.cc.orig 2023-10-13 13:20:35 UTC +--- components/feature_engagement/public/feature_constants.cc.orig 2023-11-04 07:08:51 UTC +++ components/feature_engagement/public/feature_constants.cc @@ -21,7 +21,7 @@ BASE_FEATURE(kUseClientConfigIPH, BASE_FEATURE(kIPHDummyFeature, "IPH_Dummy", base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - BASE_FEATURE(kIPHAutofillFeedbackNewBadgeFeature, - "IPH_AutofillFeedbackNewBadge", - base::FEATURE_DISABLED_BY_DEFAULT); -@@ -519,7 +519,8 @@ BASE_FEATURE(kIPHiOSPromoPasswordManagerWidgetFeature, + BASE_FEATURE(kIPHBatterySaverModeFeature, + "IPH_BatterySaverMode", + base::FEATURE_ENABLED_BY_DEFAULT); +@@ -539,7 +539,7 @@ constexpr base::FeatureParam kDefaultBrowserEligi + /*default_value=*/365}; #endif // BUILDFLAG(IS_IOS) - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ -+ BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) BASE_FEATURE(kIPHAutofillExternalAccountProfileSuggestionFeature, "IPH_AutofillExternalAccountProfileSuggestion", - base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.h b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.h index c6286280cea9..2a14dfd76bf3 100644 --- a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.h +++ b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.h @@ -1,21 +1,20 @@ ---- components/feature_engagement/public/feature_constants.h.orig 2023-10-13 13:20:35 UTC +--- components/feature_engagement/public/feature_constants.h.orig 2023-11-04 07:08:51 UTC +++ components/feature_engagement/public/feature_constants.h -@@ -23,7 +23,7 @@ BASE_DECLARE_FEATURE(kUseClientConfigIPH); +@@ -24,7 +24,7 @@ BASE_DECLARE_FEATURE(kUseClientConfigIPH); BASE_DECLARE_FEATURE(kIPHDummyFeature); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - BASE_DECLARE_FEATURE(kIPHAutofillFeedbackNewBadgeFeature); BASE_DECLARE_FEATURE(kIPHBatterySaverModeFeature); BASE_DECLARE_FEATURE(kIPHCompanionSidePanelFeature); -@@ -211,7 +211,8 @@ BASE_DECLARE_FEATURE(kIPHiOSPromoPasswordManagerWidget + BASE_DECLARE_FEATURE(kIPHCompanionSidePanelRegionSearchFeature); +@@ -226,7 +226,7 @@ extern const base::FeatureParam + kDefaultBrowserEligibilitySlidingWindowParam; #endif // BUILDFLAG(IS_IOS) - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ -+ BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) BASE_DECLARE_FEATURE(kIPHAutofillExternalAccountProfileSuggestionFeature); BASE_DECLARE_FEATURE(kIPHAutofillVirtualCardCVCSuggestionFeature); - BASE_DECLARE_FEATURE(kIPHAutofillVirtualCardSuggestionFeature); diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.cc b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.cc index 3a620247003a..b75766a36223 100644 --- a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.cc +++ b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.cc @@ -1,21 +1,20 @@ ---- components/feature_engagement/public/feature_list.cc.orig 2023-10-13 13:20:35 UTC +--- components/feature_engagement/public/feature_list.cc.orig 2023-11-04 07:08:51 UTC +++ components/feature_engagement/public/feature_list.cc -@@ -139,7 +139,7 @@ const base::Feature* const kAllFeatures[] = { - &kIPHiOSPromoPasswordManagerWidgetFeature, +@@ -143,7 +143,7 @@ const base::Feature* const kAllFeatures[] = { + &kIPHiOSChoiceScreenFeature, #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - &kIPHAutofillFeedbackNewBadgeFeature, &kIPHBatterySaverModeFeature, &kIPHCompanionSidePanelFeature, -@@ -186,7 +186,8 @@ const base::Feature* const kAllFeatures[] = { + &kIPHCompanionSidePanelRegionSearchFeature, +@@ -189,7 +189,7 @@ const base::Feature* const kAllFeatures[] = { + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ -+ BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) &kIPHAutofillExternalAccountProfileSuggestionFeature, &kIPHAutofillVirtualCardCVCSuggestionFeature, - &kIPHAutofillVirtualCardSuggestionFeature, diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.h b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.h index a5c0cd2939a9..43ccdebd8796 100644 --- a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.h +++ b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.h @@ -1,40 +1,38 @@ ---- components/feature_engagement/public/feature_list.h.orig 2023-10-13 13:20:35 UTC +--- components/feature_engagement/public/feature_list.h.orig 2023-11-04 07:08:51 UTC +++ components/feature_engagement/public/feature_list.h -@@ -259,7 +259,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSPromoPasswordManagerWidg +@@ -265,7 +265,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSChoiceScreenFeature, #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - DEFINE_VARIATION_PARAM(kIPHAutofillFeedbackNewBadgeFeature, - "IPH_AutofillFeedbackNewBadge"); DEFINE_VARIATION_PARAM(kIPHBatterySaverModeFeature, "IPH_BatterySaverMode"); -@@ -335,7 +335,8 @@ DEFINE_VARIATION_PARAM(kIPHBackNavigationMenuFeature, + DEFINE_VARIATION_PARAM(kIPHCompanionSidePanelFeature, "IPH_CompanionSidePanel"); + DEFINE_VARIATION_PARAM(kIPHCompanionSidePanelRegionSearchFeature, +@@ -340,7 +340,7 @@ DEFINE_VARIATION_PARAM(kIPHBackNavigationMenuFeature, + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ -+ BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) DEFINE_VARIATION_PARAM(kIPHAutofillExternalAccountProfileSuggestionFeature, "IPH_AutofillExternalAccountProfileSuggestion"); - DEFINE_VARIATION_PARAM(kIPHAutofillVirtualCardCVCSuggestionFeature, -@@ -541,7 +542,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation - VARIATION_ENTRY(kIPHiOSPromoPostRestoreDefaultBrowserFeature), +@@ -552,7 +552,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation VARIATION_ENTRY(kIPHiOSPromoPasswordManagerWidgetFeature), + VARIATION_ENTRY(kIPHiOSChoiceScreenFeature), #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - VARIATION_ENTRY(kIPHAutofillFeedbackNewBadgeFeature), VARIATION_ENTRY(kIPHBatterySaverModeFeature), VARIATION_ENTRY(kIPHCompanionSidePanelFeature), -@@ -589,7 +590,8 @@ constexpr flags_ui::FeatureEntry::FeatureVariation + VARIATION_ENTRY(kIPHCompanionSidePanelRegionSearchFeature), +@@ -599,7 +599,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ -+ BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) VARIATION_ENTRY(kIPHAutofillExternalAccountProfileSuggestionFeature), VARIATION_ENTRY(kIPHAutofillVirtualCardCVCSuggestionFeature), - VARIATION_ENTRY(kIPHAutofillVirtualCardSuggestionFeature), diff --git a/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan.cc b/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan.cc index ae96ca113a18..7ec400f40446 100644 --- a/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan.cc +++ b/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan.cc @@ -1,20 +1,11 @@ ---- components/gwp_asan/client/gwp_asan.cc.orig 2023-09-17 07:59:53 UTC +--- components/gwp_asan/client/gwp_asan.cc.orig 2023-11-04 07:08:51 UTC +++ components/gwp_asan/client/gwp_asan.cc -@@ -64,7 +64,7 @@ constexpr bool kCpuIs64Bit = +@@ -66,7 +66,7 @@ constexpr bool kCpuIs64Bit = // ProcessSamplingBoost is the multiplier to increase the // ProcessSamplingProbability in scenarios where we want to perform additional // testing (e.g., on canary/dev builds). -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) constexpr int kDefaultMaxAllocations = 50; constexpr int kDefaultMaxMetadata = 210; constexpr int kDefaultTotalPages = kCpuIs64Bit ? 2048 : kDefaultMaxMetadata * 2; -@@ -84,7 +84,7 @@ constexpr int kDefaultProcessSamplingBoost2 = 10; - // BUILDFLAG(IS_FUCHSIA) - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) - constexpr base::FeatureState kDefaultEnabled = base::FEATURE_ENABLED_BY_DEFAULT; - #else - constexpr base::FeatureState kDefaultEnabled = diff --git a/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan__features.cc b/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan__features.cc new file mode 100644 index 000000000000..86da65e7a2d1 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan__features.cc @@ -0,0 +1,11 @@ +--- components/gwp_asan/client/gwp_asan_features.cc.orig 2023-11-04 07:08:51 UTC ++++ components/gwp_asan/client/gwp_asan_features.cc +@@ -9,7 +9,7 @@ + namespace gwp_asan::internal { + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + constexpr base::FeatureState kDefaultEnabled = base::FEATURE_ENABLED_BY_DEFAULT; + #else + constexpr base::FeatureState kDefaultEnabled = diff --git a/www/ungoogled-chromium/files/patch-components_media__router_common_providers_cast_channel_cast__message__util.cc b/www/ungoogled-chromium/files/patch-components_media__router_common_providers_cast_channel_cast__message__util.cc index 661f5fd3269b..5c023de9c6ab 100644 --- a/www/ungoogled-chromium/files/patch-components_media__router_common_providers_cast_channel_cast__message__util.cc +++ b/www/ungoogled-chromium/files/patch-components_media__router_common_providers_cast_channel_cast__message__util.cc @@ -1,11 +1,11 @@ ---- components/media_router/common/providers/cast/channel/cast_message_util.cc.orig 2022-12-02 17:56:32 UTC +--- components/media_router/common/providers/cast/channel/cast_message_util.cc.orig 2023-11-04 07:08:51 UTC +++ components/media_router/common/providers/cast/channel/cast_message_util.cc -@@ -170,7 +170,7 @@ int GetVirtualConnectPlatformValue() { +@@ -169,7 +169,7 @@ int GetVirtualConnectPlatformValue() { return 4; #elif BUILDFLAG(IS_CHROMEOS_ASH) return 5; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) return 6; #else return 0; diff --git a/www/ungoogled-chromium/files/patch-components_miracle__parameter_common_public_miracle__parameter.h b/www/ungoogled-chromium/files/patch-components_miracle__parameter_common_public_miracle__parameter.h new file mode 100644 index 000000000000..7b8cff66cc02 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_miracle__parameter_common_public_miracle__parameter.h @@ -0,0 +1,12 @@ +--- components/miracle_parameter/common/public/miracle_parameter.h.orig 2023-11-04 07:08:51 UTC ++++ components/miracle_parameter/common/public/miracle_parameter.h +@@ -93,7 +93,8 @@ class MiracleParameter { + template <> + class MiracleParameter : public MiracleParameterBase { + public: +- constexpr MiracleParameter(const base::Feature* feature, ++ // XXXROBERT ++ MiracleParameter(const base::Feature* feature, + const char* param_name, + std::string default_value) + : MiracleParameterBase(feature, param_name, std::move(default_value)) {} diff --git a/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc b/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc index 593549106642..5eff2e034085 100644 --- a/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc +++ b/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc @@ -1,11 +1,11 @@ ---- components/network_session_configurator/browser/network_session_configurator.cc.orig 2023-09-17 07:59:53 UTC +--- components/network_session_configurator/browser/network_session_configurator.cc.orig 2023-11-04 07:08:51 UTC +++ components/network_session_configurator/browser/network_session_configurator.cc -@@ -793,7 +793,7 @@ net::URLRequestContextBuilder::HttpCacheParams::Type C +@@ -801,7 +801,7 @@ net::URLRequestContextBuilder::HttpCacheParams::Type C // backport, having it behave differently than in stable would be a bigger // problem. TODO: Does this work in later macOS releases? #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return net::URLRequestContextBuilder::HttpCacheParams::DISK_SIMPLE; #else return net::URLRequestContextBuilder::HttpCacheParams::DISK_BLOCKFILE; diff --git a/www/ungoogled-chromium/files/patch-components_optimization__guide_core_optimization__guide__util.cc b/www/ungoogled-chromium/files/patch-components_optimization__guide_core_optimization__guide__util.cc index 8a7d1b29f041..3be5659cefc9 100644 --- a/www/ungoogled-chromium/files/patch-components_optimization__guide_core_optimization__guide__util.cc +++ b/www/ungoogled-chromium/files/patch-components_optimization__guide_core_optimization__guide__util.cc @@ -1,11 +1,11 @@ ---- components/optimization_guide/core/optimization_guide_util.cc.orig 2022-10-29 17:50:56 UTC +--- components/optimization_guide/core/optimization_guide_util.cc.orig 2023-11-04 07:08:51 UTC +++ components/optimization_guide/core/optimization_guide_util.cc -@@ -27,7 +27,7 @@ optimization_guide::proto::Platform GetPlatform() { +@@ -33,7 +33,7 @@ optimization_guide::proto::Platform GetPlatform() { return optimization_guide::proto::PLATFORM_CHROMEOS; #elif BUILDFLAG(IS_ANDROID) return optimization_guide::proto::PLATFORM_ANDROID; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return optimization_guide::proto::PLATFORM_LINUX; #else return optimization_guide::proto::PLATFORM_UNKNOWN; diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.cc index eccf62bc24b5..59ecb2079014 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.cc +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.cc @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/features/password_features.cc.orig 2023-10-27 05:38:38 UTC +--- components/password_manager/core/browser/features/password_features.cc.orig 2023-11-04 07:08:51 UTC +++ components/password_manager/core/browser/features/password_features.cc -@@ -27,7 +27,7 @@ BASE_FEATURE(kBiometricTouchToFill, +@@ -20,7 +20,7 @@ BASE_FEATURE(kBiometricTouchToFill, // Delete undecryptable passwords from the store when Sync is active. BASE_FEATURE(kClearUndecryptablePasswordsOnSync, "ClearUndecryptablePasswordsInSync", -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_login__database__unittest.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_login__database__unittest.cc index 8c5946a11121..828cbf6eecab 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_login__database__unittest.cc +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_login__database__unittest.cc @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/login_database_unittest.cc.orig 2023-10-27 05:38:38 UTC +--- components/password_manager/core/browser/login_database_unittest.cc.orig 2023-11-04 07:08:51 UTC +++ components/password_manager/core/browser/login_database_unittest.cc -@@ -2120,7 +2120,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCurrent, +@@ -2100,7 +2100,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCurrent, LoginDatabaseMigrationTestBroken, testing::Values(1, 2, 3, 24)); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) class LoginDatabaseUndecryptableLoginsTest : public testing::Test { protected: LoginDatabaseUndecryptableLoginsTest() = default; diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_ui_passwords__grouper.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_ui_passwords__grouper.cc deleted file mode 100644 index bfc05bf6b972..000000000000 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_ui_passwords__grouper.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- components/password_manager/core/browser/ui/passwords_grouper.cc.orig 2023-09-17 07:59:53 UTC -+++ components/password_manager/core/browser/ui/passwords_grouper.cc -@@ -277,7 +277,11 @@ absl::optional PasswordsGrouper::Ge - const std::vector& passkeys = - map_group_id_to_credentials_[group_id_iterator->second].passkeys; - const auto passkey_it = -+#if (_LIBCPP_VERSION >= 160000) - std::ranges::find_if(passkeys, [&credential](const auto& passkey) { -+#else -+ base::ranges::find_if(passkeys, [&credential](const auto& passkey) { -+#endif - return credential.passkey_credential_id == passkey.credential_id(); - }); - if (passkey_it == passkeys.end()) { diff --git a/www/ungoogled-chromium/files/patch-components_performance__manager_public_features.h b/www/ungoogled-chromium/files/patch-components_performance__manager_public_features.h index b4f033874d9b..9fc2c363f39d 100644 --- a/www/ungoogled-chromium/files/patch-components_performance__manager_public_features.h +++ b/www/ungoogled-chromium/files/patch-components_performance__manager_public_features.h @@ -1,11 +1,11 @@ ---- components/performance_manager/public/features.h.orig 2023-05-05 12:12:41 UTC +--- components/performance_manager/public/features.h.orig 2023-11-04 07:08:51 UTC +++ components/performance_manager/public/features.h @@ -28,7 +28,7 @@ BASE_DECLARE_FEATURE(kRunOnDedicatedThreadPoolThread); #if !BUILDFLAG(IS_ANDROID) --#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define URGENT_DISCARDING_FROM_PERFORMANCE_MANAGER() false #else #define URGENT_DISCARDING_FROM_PERFORMANCE_MANAGER() true diff --git a/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc b/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc index 610bbe922c33..ef98bb6876fa 100644 --- a/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc +++ b/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc @@ -1,11 +1,11 @@ ---- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2023-06-05 19:39:05 UTC +--- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2023-11-04 07:08:51 UTC +++ components/policy/core/common/cloud/cloud_policy_client.cc -@@ -455,7 +455,7 @@ void CloudPolicyClient::FetchPolicy() { +@@ -507,7 +507,7 @@ void CloudPolicyClient::FetchPolicy(PolicyFetchReason fetch_request->set_invalidation_payload(invalidation_payload_); } } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Only set browser device identifier for CBCM Chrome cloud policy on // desktop. if (type_to_fetch.first == diff --git a/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc b/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc index 2cf7053bc088..ed012ba44afe 100644 --- a/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc +++ b/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc @@ -1,55 +1,55 @@ ---- components/policy/core/common/cloud/cloud_policy_util.cc.orig 2023-10-13 13:20:35 UTC +--- components/policy/core/common/cloud/cloud_policy_util.cc.orig 2023-11-04 07:08:51 UTC +++ components/policy/core/common/cloud/cloud_policy_util.cc @@ -20,7 +20,7 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include #include #include @@ -35,10 +35,15 @@ #import #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include // For HOST_NAME_MAX #endif +#if BUILDFLAG(IS_FREEBSD) +#include +#define HOST_NAME_MAX MAXHOSTNAMELEN +#endif + #include #include @@ -86,7 +91,7 @@ namespace em = enterprise_management; std::string GetMachineName() { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) char hostname[HOST_NAME_MAX]; if (gethostname(hostname, HOST_NAME_MAX) == 0) // Success. return hostname; -@@ -144,7 +149,7 @@ std::string GetMachineName() { +@@ -143,7 +148,7 @@ std::string GetMachineName() { std::string GetOSVersion() { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) return base::SysInfo::OperatingSystemVersion(); #elif BUILDFLAG(IS_WIN) base::win::OSInfo::VersionNumber version_number = -@@ -167,7 +172,7 @@ std::string GetOSArchitecture() { +@@ -166,7 +171,7 @@ std::string GetOSArchitecture() { } std::string GetOSUsername() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) struct passwd* creds = getpwuid(getuid()); if (!creds || !creds->pw_name) return std::string(); diff --git a/www/ungoogled-chromium/files/patch-components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc b/www/ungoogled-chromium/files/patch-components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc index 0e43ee5b0336..88b4f15f0671 100644 --- a/www/ungoogled-chromium/files/patch-components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc +++ b/www/ungoogled-chromium/files/patch-components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc @@ -1,11 +1,11 @@ ---- components/segmentation_platform/embedder/default_model/cross_device_user_segment.cc.orig 2023-09-17 07:59:53 UTC +--- components/segmentation_platform/embedder/default_model/cross_device_user_segment.cc.orig 2023-11-04 07:08:51 UTC +++ components/segmentation_platform/embedder/default_model/cross_device_user_segment.cc -@@ -179,7 +179,7 @@ void CrossDeviceUserSegment::ExecuteModelWithInput( +@@ -148,7 +148,7 @@ void CrossDeviceUserSegment::ExecuteModelWithInput( // Check for current device type and subtract it from the device count // calculation. #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) desktop_count -= 1; #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) if (ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET) { diff --git a/www/ungoogled-chromium/files/patch-components_services_screen__ai_screen__ai__library__wrapper.cc b/www/ungoogled-chromium/files/patch-components_services_screen__ai_screen__ai__library__wrapper.cc index c5041a1830a9..b7324ba3188a 100644 --- a/www/ungoogled-chromium/files/patch-components_services_screen__ai_screen__ai__library__wrapper.cc +++ b/www/ungoogled-chromium/files/patch-components_services_screen__ai_screen__ai__library__wrapper.cc @@ -1,29 +1,29 @@ ---- components/services/screen_ai/screen_ai_library_wrapper.cc.orig 2023-09-17 07:59:53 UTC +--- components/services/screen_ai/screen_ai_library_wrapper.cc.orig 2023-11-04 07:08:51 UTC +++ components/services/screen_ai/screen_ai_library_wrapper.cc -@@ -187,7 +187,7 @@ ScreenAILibraryWrapper::PerformOcr(const SkBitmap& ima +@@ -190,7 +190,7 @@ ScreenAILibraryWrapper::PerformOcr(const SkBitmap& ima // TODO(crbug.com/1443341): Remove this after fixing the crash issue on Linux // official. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) free_library_allocated_char_array_(library_buffer.release()); #endif -@@ -219,7 +219,7 @@ ScreenAILibraryWrapper::ExtractLayout(const SkBitmap& +@@ -222,7 +222,7 @@ ScreenAILibraryWrapper::ExtractLayout(const SkBitmap& // TODO(crbug.com/1443341): Remove this after fixing the crash issue on Linux // official. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) free_library_allocated_char_array_(library_buffer.release()); #endif -@@ -253,7 +253,7 @@ absl::optional> ScreenAILibraryWr +@@ -256,7 +256,7 @@ absl::optional> ScreenAILibraryWr // TODO(crbug.com/1443341): Remove this after fixing the crash issue on Linux // official. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) free_library_allocated_int32_array_(library_buffer.release()); #endif diff --git a/www/ungoogled-chromium/files/patch-components_storage__monitor_BUILD.gn b/www/ungoogled-chromium/files/patch-components_storage__monitor_BUILD.gn index 397269c656e4..54850afcb523 100644 --- a/www/ungoogled-chromium/files/patch-components_storage__monitor_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-components_storage__monitor_BUILD.gn @@ -1,20 +1,20 @@ ---- components/storage_monitor/BUILD.gn.orig 2022-12-02 17:56:32 UTC +--- components/storage_monitor/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ components/storage_monitor/BUILD.gn -@@ -74,7 +74,7 @@ static_library("storage_monitor") { +@@ -77,7 +77,7 @@ static_library("storage_monitor") { deps += [ "//services/device/public/mojom" ] } } else if (is_linux || is_chromeos_lacros) { - if (use_udev) { + if (use_udev && !is_bsd) { sources += [ "mtab_watcher_linux.cc", "mtab_watcher_linux.h", -@@ -178,7 +178,7 @@ source_set("unit_tests") { +@@ -184,7 +184,7 @@ source_set("unit_tests") { "storage_monitor_chromeos_unittest.cc", ] } - } else if (is_linux || is_chromeos_lacros) { + } else if ((is_linux || is_chromeos_lacros) && !is_bsd) { if (use_udev) { sources += [ "storage_monitor_linux_unittest.cc" ] } diff --git a/www/ungoogled-chromium/files/patch-components_supervised__user_core_browser_proto__fetcher.cc b/www/ungoogled-chromium/files/patch-components_supervised__user_core_browser_proto__fetcher.cc index 8c194ea35891..515e561211d0 100644 --- a/www/ungoogled-chromium/files/patch-components_supervised__user_core_browser_proto__fetcher.cc +++ b/www/ungoogled-chromium/files/patch-components_supervised__user_core_browser_proto__fetcher.cc @@ -1,39 +1,39 @@ ---- components/supervised_user/core/browser/proto_fetcher.cc.orig 2023-09-17 07:59:53 UTC +--- components/supervised_user/core/browser/proto_fetcher.cc.orig 2023-11-04 07:08:51 UTC +++ components/supervised_user/core/browser/proto_fetcher.cc -@@ -398,8 +398,11 @@ class RetryingFetcherImpl final : public DeferredFetch +@@ -525,8 +525,11 @@ class RetryingFetcherImpl final : public DeferredFetch // Not copyable. RetryingFetcherImpl(const RetryingFetcherImpl&) = delete; RetryingFetcherImpl& operator=(const RetryingFetcherImpl&) = delete; - +#if defined(__clang__) && (__clang_major__ >= 15) void Start(ProtoFetcher::Callback callback) override { +#else + void Start(typename ProtoFetcher::Callback callback) override { +#endif callback_ = std::move(callback); Retry(); } -@@ -435,7 +438,11 @@ class RetryingFetcherImpl final : public DeferredFetch +@@ -564,7 +567,11 @@ class RetryingFetcherImpl final : public DeferredFetch } // Client callback. +#if defined(__clang__) && (__clang_major__ >= 15) ProtoFetcher::Callback callback_; +#else + typename ProtoFetcher::Callback callback_; +#endif // Retry controls. base::OneShotTimer timer_; -@@ -578,7 +585,11 @@ ParallelFetchManager::ParallelFetch +@@ -707,7 +714,11 @@ ParallelFetchManager::ParallelFetch template void ParallelFetchManager::Fetch( const Request& request, +#if defined(__clang__) && (__clang_major__ >= 15) Fetcher::Callback callback) { +#else + typename Fetcher::Callback callback) { +#endif CHECK(callback) << "Use base::DoNothing() instead of empty callback."; KeyType key = requests_in_flight_.Add(MakeFetcher(request)); requests_in_flight_.Lookup(key)->Start( diff --git a/www/ungoogled-chromium/files/patch-components_user__education_common_product__messaging__controller.cc b/www/ungoogled-chromium/files/patch-components_user__education_common_product__messaging__controller.cc new file mode 100644 index 000000000000..7ae8348dc317 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_user__education_common_product__messaging__controller.cc @@ -0,0 +1,10 @@ +--- components/user_education/common/product_messaging_controller.cc.orig 2023-11-04 07:08:51 UTC ++++ components/user_education/common/product_messaging_controller.cc +@@ -6,6 +6,7 @@ + + #include + #include ++#include + + #include "base/containers/contains.h" + #include "base/functional/callback.h" diff --git a/www/ungoogled-chromium/files/patch-components_user__education_views_help__bubble__view.cc b/www/ungoogled-chromium/files/patch-components_user__education_views_help__bubble__view.cc index 6af24ab4932b..59dfaa62b82c 100644 --- a/www/ungoogled-chromium/files/patch-components_user__education_views_help__bubble__view.cc +++ b/www/ungoogled-chromium/files/patch-components_user__education_views_help__bubble__view.cc @@ -1,11 +1,11 @@ ---- components/user_education/views/help_bubble_view.cc.orig 2023-09-17 07:59:53 UTC +--- components/user_education/views/help_bubble_view.cc.orig 2023-11-04 07:08:51 UTC +++ components/user_education/views/help_bubble_view.cc -@@ -991,7 +991,7 @@ gfx::Rect HelpBubbleView::GetAnchorRect() const { +@@ -997,7 +997,7 @@ gfx::Rect HelpBubbleView::GetAnchorRect() const { void HelpBubbleView::OnBeforeBubbleWidgetInit(views::Widget::InitParams* params, views::Widget* widget) const { BubbleDialogDelegateView::OnBeforeBubbleWidgetInit(params, widget); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Help bubbles anchored to menus may be clipped to their anchors' bounds, // resulting in visual errors, unless they use accelerated rendering. See // crbug.com/1445770 for details. diff --git a/www/ungoogled-chromium/files/patch-components_variations_service_google__groups__updater__service.cc b/www/ungoogled-chromium/files/patch-components_variations_service_google__groups__updater__service.cc deleted file mode 100644 index 2825ac1bc355..000000000000 --- a/www/ungoogled-chromium/files/patch-components_variations_service_google__groups__updater__service.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- components/variations/service/google_groups_updater_service.cc.orig 2023-09-17 07:59:53 UTC -+++ components/variations/service/google_groups_updater_service.cc -@@ -15,7 +15,7 @@ - // information from per-profile data to local-state. - BASE_FEATURE(kVariationsGoogleGroupFiltering, - "VariationsGoogleGroupFiltering", --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT - #else - // TODO(b/286365351): launch on Android, iOS and ChromeOS. diff --git a/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc index 25b44007a7a2..8472e0a48b64 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc +++ b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc @@ -1,11 +1,11 @@ ---- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2023-10-13 13:20:35 UTC +--- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2023-11-04 07:08:51 UTC +++ components/viz/service/display_embedder/skia_output_surface_impl.cc -@@ -1485,7 +1485,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor - ->GetDeviceQueue() - ->GetVulkanPhysicalDevice(), - VK_IMAGE_TILING_OPTIMAL, ycbcr_info); --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) +@@ -1512,7 +1512,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor + ->GetDeviceQueue() + ->GetVulkanPhysicalDevice(), + VK_IMAGE_TILING_OPTIMAL, vk_format, yuv_color_space, ycbcr_info); +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Textures that were allocated _on linux_ with ycbcr info came from // VaapiVideoDecoder, which exports using DRM format modifiers. return GrBackendFormats::MakeVk(gr_ycbcr_info, diff --git a/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl__on__gpu.cc b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl__on__gpu.cc index fa9d04dfcb44..1fba711c311f 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl__on__gpu.cc +++ b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl__on__gpu.cc @@ -1,15 +1,15 @@ ---- components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.orig 2023-10-13 13:20:35 UTC +--- components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.orig 2023-11-04 07:08:51 UTC +++ components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc -@@ -1521,7 +1521,12 @@ void SkiaOutputSurfaceImplOnGpu::CopyOutputNV12( +@@ -1530,7 +1530,12 @@ void SkiaOutputSurfaceImplOnGpu::CopyOutputNV12( // Issue readbacks from the surfaces: for (size_t i = 0; i < CopyOutputResult::kNV12MaxPlanes; ++i) { +#if defined(__clang__) && (__clang_major__ >= 16) SkISize size(plane_surfaces[i]->width(), plane_surfaces[i]->height()); +#else + SkISize s = { plane_surfaces[i]->width(), plane_surfaces[i]->height() }; + SkISize size(s); +#endif SkImageInfo dst_info = SkImageInfo::Make( size, (i == 0) ? kAlpha_8_SkColorType : kR8G8_unorm_SkColorType, kUnpremul_SkAlphaType); diff --git a/www/ungoogled-chromium/files/patch-components_viz_service_display_skia__renderer.cc b/www/ungoogled-chromium/files/patch-components_viz_service_display_skia__renderer.cc index f7b8e0a567c4..1af9a5547977 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_display_skia__renderer.cc +++ b/www/ungoogled-chromium/files/patch-components_viz_service_display_skia__renderer.cc @@ -1,11 +1,11 @@ ---- components/viz/service/display/skia_renderer.cc.orig 2023-10-13 13:20:35 UTC +--- components/viz/service/display/skia_renderer.cc.orig 2023-11-04 07:08:51 UTC +++ components/viz/service/display/skia_renderer.cc -@@ -1218,7 +1218,7 @@ void SkiaRenderer::ClearFramebuffer() { +@@ -1219,7 +1219,7 @@ void SkiaRenderer::ClearFramebuffer() { if (current_frame()->current_render_pass->has_transparent_background) { ClearCanvas(SkColors::kTransparent); } else { -#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) +#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // On DEBUG builds, opaque render passes are cleared to blue // to easily see regions that were not drawn on the screen. // ClearCavas() call causes slight pixel difference, so linux-ref and diff --git a/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc b/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc index f2a593f468e8..a4267ef3f72a 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc +++ b/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc @@ -1,20 +1,20 @@ ---- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2023-10-13 13:20:35 UTC +--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2023-11-04 07:08:51 UTC +++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc @@ -110,7 +110,7 @@ RootCompositorFrameSinkImpl::Create( // 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) // For X11, we need notify client about swap completion after resizing, so the // client can use it for synchronize with X11 WM. output_surface->SetNeedsSwapSizeNotifications(true); -@@ -709,7 +709,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw +@@ -714,7 +714,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw display_client_->DidCompleteSwapWithSize(pixel_size); // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) if (display_client_ && pixel_size != last_swap_pixel_size_) { last_swap_pixel_size_ = pixel_size; display_client_->DidCompleteSwapWithNewSize(last_swap_pixel_size_); diff --git a/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h b/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h index 4b561591f8f4..a13d54327b82 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h +++ b/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h @@ -1,11 +1,11 @@ ---- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h.orig 2023-10-13 13:20:35 UTC +--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h.orig 2023-11-04 07:08:51 UTC +++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h -@@ -211,7 +211,7 @@ class VIZ_SERVICE_EXPORT RootCompositorFrameSinkImpl +@@ -212,7 +212,7 @@ class VIZ_SERVICE_EXPORT RootCompositorFrameSinkImpl // 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) gfx::Size last_swap_pixel_size_; #endif diff --git a/www/ungoogled-chromium/files/patch-components_webauthn_core_browser_passkey__sync__bridge.cc b/www/ungoogled-chromium/files/patch-components_webauthn_core_browser_passkey__sync__bridge.cc deleted file mode 100644 index 12eb51e37097..000000000000 --- a/www/ungoogled-chromium/files/patch-components_webauthn_core_browser_passkey__sync__bridge.cc +++ /dev/null @@ -1,26 +0,0 @@ ---- components/webauthn/core/browser/passkey_sync_bridge.cc.orig 2023-10-13 13:20:35 UTC -+++ components/webauthn/core/browser/passkey_sync_bridge.cc -@@ -258,7 +258,11 @@ PasskeySyncBridge::GetPasskeysForRelyingPartyId( - bool PasskeySyncBridge::DeletePasskey(const std::string& credential_id) { - // Find the credential with the given |credential_id|. - const auto passkey_it = -+#if (_LIBCPP_VERSION >= 160000) - std::ranges::find_if(data_, [&credential_id](const auto& passkey) { -+#else -+ base::ranges::find_if(data_, [&credential_id](const auto& passkey) { -+#endif - return passkey.second.credential_id() == credential_id; - }); - if (passkey_it == data_.end()) { -@@ -309,7 +313,11 @@ bool PasskeySyncBridge::UpdatePasskey(const std::strin - PasskeyChange change) { - // Find the credential with the given |credential_id|. - const auto passkey_it = -+#if (_LIBCPP_VERSION >= 160000) - std::ranges::find_if(data_, [&credential_id](const auto& passkey) { -+#else -+ base::ranges::find_if(data_, [&credential_id](const auto& passkey) { -+#endif - return passkey.second.credential_id() == credential_id; - }); - if (passkey_it == data_.end()) { diff --git a/www/ungoogled-chromium/files/patch-content_app_content__main.cc b/www/ungoogled-chromium/files/patch-content_app_content__main.cc index d22f9ee57f50..5fcb2bf7446f 100644 --- a/www/ungoogled-chromium/files/patch-content_app_content__main.cc +++ b/www/ungoogled-chromium/files/patch-content_app_content__main.cc @@ -1,11 +1,11 @@ ---- content/app/content_main.cc.orig 2023-03-10 11:01:21 UTC +--- content/app/content_main.cc.orig 2023-11-04 07:08:51 UTC +++ content/app/content_main.cc -@@ -205,7 +205,7 @@ RunContentProcess(ContentMainParams params, +@@ -206,7 +206,7 @@ RunContentProcess(ContentMainParams params, #endif base::EnableTerminationOnOutOfMemory(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The various desktop environments set this environment variable that // allows the dbus client library to connect directly to the bus. When this // variable is not set (test environments like xvfb-run), the dbus client diff --git a/www/ungoogled-chromium/files/patch-content_app_content__main__runner__impl.cc b/www/ungoogled-chromium/files/patch-content_app_content__main__runner__impl.cc index fe1bafb6994a..dfb3212bb0e3 100644 --- a/www/ungoogled-chromium/files/patch-content_app_content__main__runner__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_app_content__main__runner__impl.cc @@ -1,122 +1,122 @@ ---- content/app/content_main_runner_impl.cc.orig 2023-10-13 13:20:35 UTC +--- content/app/content_main_runner_impl.cc.orig 2023-11-04 07:08:51 UTC +++ content/app/content_main_runner_impl.cc -@@ -142,13 +142,13 @@ +@@ -144,13 +144,13 @@ #include "content/browser/posix_file_descriptor_info_impl.h" #include "content/public/common/content_descriptors.h" -#if !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) #include "content/public/common/zygote/zygote_fork_delegate_linux.h" #endif #endif // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/files/file_path_watcher_inotify.h" #include "base/native_library.h" #include "base/rand_util.h" -@@ -186,6 +186,10 @@ +@@ -188,6 +188,10 @@ #include "media/base/media_switches.h" #endif +#if BUILDFLAG(IS_BSD) +#include "base/system/sys_info.h" +#endif + #if BUILDFLAG(IS_ANDROID) #include "base/system/sys_info.h" #include "content/browser/android/battery_metrics.h" -@@ -372,7 +376,7 @@ void InitializeZygoteSandboxForBrowserProcess( +@@ -374,7 +378,7 @@ void InitializeZygoteSandboxForBrowserProcess( } #endif // BUILDFLAG(USE_ZYGOTE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if BUILDFLAG(ENABLE_PPAPI) // Loads the (native) libraries but does not initialize them (i.e., does not -@@ -410,7 +414,10 @@ void PreloadLibraryCdms() { +@@ -412,7 +416,10 @@ void PreloadLibraryCdms() { void PreSandboxInit() { // Ensure the /dev/urandom is opened. + // we use arc4random +#if !BUILDFLAG(IS_BSD) base::GetUrandomFD(); +#endif // May use sysinfo(), sched_getaffinity(), and open various /sys/ and /proc/ // files. -@@ -421,9 +428,16 @@ void PreSandboxInit() { +@@ -424,9 +431,16 @@ void PreSandboxInit() { // https://boringssl.9oo91esource.qjz9zk/boringssl/+/HEAD/SANDBOXING.md CRYPTO_pre_sandbox_init(); +#if BUILDFLAG(IS_BSD) + // "cache" the amount of physical memory before pledge(2) + base::SysInfo::AmountOfPhysicalMemoryMB(); +#endif + +#if !BUILDFLAG(IS_BSD) // Pre-read /proc/sys/fs/inotify/max_user_watches so it doesn't have to be // allowed by the sandbox. base::GetMaxNumberOfInotifyWatches(); +#endif #if BUILDFLAG(ENABLE_PPAPI) // Ensure access to the Pepper plugins before the sandbox is turned on. -@@ -830,11 +844,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -833,11 +847,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam kFieldTrialDescriptor + base::GlobalDescriptors::kBaseDescriptor); #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) g_fds->Set(kCrashDumpSignal, kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor); -#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || - // BUILDFLAG(IS_OPENBSD) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #endif // !BUILDFLAG(IS_WIN) -@@ -1029,8 +1042,20 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -1033,8 +1046,20 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam process_type == switches::kZygoteProcess) { PreSandboxInit(); } +#elif BUILDFLAG(IS_BSD) + PreSandboxInit(); #endif +#if BUILDFLAG(IS_BSD) + if (process_type.empty()) { + sandbox::policy::SandboxLinux::Options sandbox_options; + sandbox::policy::SandboxLinux::GetInstance()->InitializeSandbox( + sandbox::policy::SandboxTypeFromCommandLine( + *base::CommandLine::ForCurrentProcess()), + sandbox::policy::SandboxLinux::PreSandboxHook(), sandbox_options); + } +#endif + delegate_->SandboxInitialized(process_type); #if BUILDFLAG(USE_ZYGOTE) -@@ -1098,7 +1123,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1102,7 +1127,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { ->ReconfigureAfterFeatureListInit(process_type); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If dynamic Mojo Core is being used, ensure that it's loaded very early in // the child/zygote process, before any sandbox is initialized. The library // is not fully initialized with IPC support until a ChildProcess is later -@@ -1133,6 +1158,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1137,6 +1162,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { content_main_params_.reset(); RegisterMainThreadFactories(); + +#if BUILDFLAG(IS_BSD) + if (!process_type.empty()) + PreSandboxInit(); +#endif if (process_type.empty()) return RunBrowser(std::move(main_params), start_minimal_browser); diff --git a/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn b/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn index ebd93d428d4a..36627d735018 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn @@ -1,16 +1,16 @@ ---- content/browser/BUILD.gn.orig 2023-10-13 13:20:35 UTC +--- content/browser/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ content/browser/BUILD.gn -@@ -2461,6 +2461,13 @@ source_set("browser") { +@@ -2462,6 +2462,13 @@ source_set("browser") { deps += [ "//media/mojo/mojom/stable:stable_video_decoder" ] } + if (is_bsd) { + sources -= [ + "sandbox_ipc_linux.cc", + "sandbox_ipc_linux.h", + ] + } + if (is_chromeos) { sources += [ "handwriting/handwriting_recognition_service_impl_cros.cc", diff --git a/www/ungoogled-chromium/files/patch-content_browser_browser__main__loop.cc b/www/ungoogled-chromium/files/patch-content_browser_browser__main__loop.cc index c8629d2b7484..32d269de3527 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_browser__main__loop.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_browser__main__loop.cc @@ -1,37 +1,37 @@ ---- content/browser/browser_main_loop.cc.orig 2023-09-17 07:59:53 UTC +--- content/browser/browser_main_loop.cc.orig 2023-11-04 07:08:51 UTC +++ content/browser/browser_main_loop.cc -@@ -246,6 +246,12 @@ +@@ -247,6 +247,12 @@ #include "mojo/public/cpp/bindings/lib/test_random_mojo_delays.h" #endif +#if BUILDFLAG(IS_BSD) +#include "content/browser/sandbox_host_linux.h" +#include "content/public/common/zygote/sandbox_support_linux.h" +#include "sandbox/policy/sandbox.h" +#endif + // One of the linux specific headers defines this as a macro. #ifdef DestroyAll #undef DestroyAll -@@ -539,6 +545,12 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -540,6 +546,12 @@ int BrowserMainLoop::EarlyInitialization() { // by now since a thread to start the ServiceManager has been created // before the browser main loop starts. DCHECK(SandboxHostLinux::GetInstance()->IsInitialized()); +#elif BUILDFLAG(IS_BSD) + base::FileHandleMappingVector additional_remapped_fds; + base::LaunchOptions options; + SandboxHostLinux::GetInstance()->Init(); + const int sfd = SandboxHostLinux::GetInstance()->GetChildSocket(); + options.fds_to_remap.push_back(std::make_pair(sfd, GetSandboxFD())); #endif // GLib's spawning of new processes is buggy, so it's important that at this -@@ -576,7 +588,7 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -577,7 +589,7 @@ int BrowserMainLoop::EarlyInitialization() { base::PlatformThread::SetCurrentThreadType(base::ThreadType::kCompositing); #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // We use quite a few file descriptors for our IPC as well as disk the disk // cache, and the default limit on Apple is low (256), so bump it up. diff --git a/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper.h b/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper.h new file mode 100644 index 000000000000..183dd4023e0f --- /dev/null +++ b/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper.h @@ -0,0 +1,11 @@ +--- content/browser/child_process_launcher_helper.h.orig 2023-11-04 07:08:51 UTC ++++ content/browser/child_process_launcher_helper.h +@@ -262,7 +262,7 @@ class ChildProcessLauncherHelper + std::unique_ptr delegate_; + base::WeakPtr child_process_launcher_; + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // The priority of the process. The state is stored to avoid changing the + // setting repeatedly. + absl::optional priority_; diff --git a/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper__linux.cc b/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper__linux.cc index 2944177fa8b9..cfc3fa60ec67 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper__linux.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper__linux.cc @@ -1,125 +1,125 @@ ---- content/browser/child_process_launcher_helper_linux.cc.orig 2023-10-13 13:20:35 UTC +--- content/browser/child_process_launcher_helper_linux.cc.orig 2023-11-04 07:08:51 UTC +++ content/browser/child_process_launcher_helper_linux.cc @@ -21,7 +21,9 @@ #include "content/public/common/result_codes.h" #include "content/public/common/sandboxed_process_launcher_delegate.h" #include "content/public/common/zygote/sandbox_support_linux.h" +#if !BUILDFLAG(IS_BSD) #include "content/public/common/zygote/zygote_handle.h" +#endif #include "sandbox/policy/linux/sandbox_linux.h" namespace content { @@ -46,14 +48,20 @@ ChildProcessLauncherHelper::GetFilesToMap() { } bool ChildProcessLauncherHelper::IsUsingLaunchOptions() { +#if !BUILDFLAG(IS_BSD) return !GetZygoteForLaunch(); +#else + return true; +#endif } bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( PosixFileDescriptorInfo& files_to_register, base::LaunchOptions* options) { if (options) { +#if !BUILDFLAG(IS_BSD) DCHECK(!GetZygoteForLaunch()); +#endif // Convert FD mapping to FileHandleMappingVector options->fds_to_remap = files_to_register.GetMappingWithIDAdjustment( base::GlobalDescriptors::kBaseDescriptor); @@ -65,7 +73,9 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLaunche options->environment = delegate_->GetEnvironment(); } else { +#if !BUILDFLAG(IS_BSD) DCHECK(GetZygoteForLaunch()); +#endif // Environment variables could be supported in the future, but are not // currently supported when launching with the zygote. DCHECK(delegate_->GetEnvironment().empty()); @@ -82,6 +92,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr int* launch_result) { *is_synchronous_launch = true; Process process; +#if !BUILDFLAG(IS_BSD) ZygoteCommunication* zygote_handle = GetZygoteForLaunch(); if (zygote_handle) { // TODO(crbug.com/569191): If chrome supported multiple zygotes they could @@ -92,7 +103,6 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr GetProcessType()); *launch_result = LAUNCH_RESULT_SUCCESS; -#if !BUILDFLAG(IS_OPENBSD) if (handle) { // It could be a renderer process or an utility process. int oom_score = content::kMiscOomScore; @@ -101,15 +111,17 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr oom_score = content::kLowestRendererOomScore; ZygoteHostImpl::GetInstance()->AdjustRendererOOMScore(handle, oom_score); } -#endif process.process = base::Process(handle); process.zygote = zygote_handle; } else { +#endif process.process = base::LaunchProcess(*command_line(), *options); *launch_result = process.process.IsValid() ? LAUNCH_RESULT_SUCCESS : LAUNCH_RESULT_FAILURE; +#if !BUILDFLAG(IS_BSD) } +#endif #if BUILDFLAG(IS_CHROMEOS) if (GetProcessType() == switches::kRendererProcess) { @@ -131,10 +143,14 @@ ChildProcessTerminationInfo ChildProcessLauncherHelper const ChildProcessLauncherHelper::Process& process, bool known_dead) { ChildProcessTerminationInfo info; +#if !BUILDFLAG(IS_BSD) if (process.zygote) { info.status = process.zygote->GetTerminationStatus( process.process.Handle(), known_dead, &info.exit_code); } else if (known_dead) { +#else + if (known_dead) { +#endif info.status = base::GetKnownDeadTerminationStatus(process.process.Handle(), &info.exit_code); } else { @@ -160,13 +176,17 @@ void ChildProcessLauncherHelper::ForceNormalProcessTer DCHECK(CurrentlyOnProcessLauncherTaskRunner()); process.process.Terminate(RESULT_CODE_NORMAL_EXIT, false); // On POSIX, we must additionally reap the child. +#if !BUILDFLAG(IS_BSD) if (process.zygote) { // If the renderer was created via a zygote, we have to proxy the reaping // through the zygote process. process.zygote->EnsureProcessTerminated(process.process.Handle()); } else { +#endif base::EnsureProcessTerminated(std::move(process.process)); +#if !BUILDFLAG(IS_BSD) } +#endif } void ChildProcessLauncherHelper::SetProcessPriorityOnLauncherThread( -@@ -178,11 +198,13 @@ void ChildProcessLauncherHelper::SetProcessPriorityOnL +@@ -179,11 +199,13 @@ void ChildProcessLauncherHelper::SetProcessPriorityOnL } } +#if !BUILDFLAG(IS_BSD) ZygoteCommunication* ChildProcessLauncherHelper::GetZygoteForLaunch() { return base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoZygote) ? nullptr : delegate_->GetZygote(); } +#endif base::File OpenFileToShare(const base::FilePath& path, base::MemoryMappedFile::Region* region) { diff --git a/www/ungoogled-chromium/files/patch-content_browser_devtools_devtools__frontend__host__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_devtools_devtools__frontend__host__impl.cc new file mode 100644 index 000000000000..0e65b5668431 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-content_browser_devtools_devtools__frontend__host__impl.cc @@ -0,0 +1,38 @@ +--- content/browser/devtools/devtools_frontend_host_impl.cc.orig 2023-11-04 07:08:51 UTC ++++ content/browser/devtools/devtools_frontend_host_impl.cc +@@ -22,7 +22,7 @@ + #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" + #include "ui/base/webui/resource_path.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "components/crash/content/browser/error_reporting/javascript_error_report.h" // nogncheck + #include "components/crash/content/browser/error_reporting/js_error_report_processor.h" // nogncheck + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +@@ -37,7 +37,7 @@ const char kCompatibilityScriptSourceURL[] = + "\n//# " + "sourceURL=devtools://devtools/bundled/devtools_compatibility.js"; + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Remove the pieces of the URL we don't want to send back with the error + // reports. In particular, do not send query or fragments as those can have + // privacy-sensitive information in them. +@@ -107,7 +107,7 @@ DevToolsFrontendHostImpl::DevToolsFrontendHostImpl( + const HandleMessageCallback& handle_message_callback) + : web_contents_(WebContents::FromRenderFrameHost(frame_host)), + handle_message_callback_(handle_message_callback) { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + Observe(web_contents_); + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + mojo::AssociatedRemote frontend; +@@ -132,7 +132,7 @@ void DevToolsFrontendHostImpl::DispatchEmbedderMessage + handle_message_callback_.Run(std::move(message)); + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + void DevToolsFrontendHostImpl::OnDidAddMessageToConsole( + RenderFrameHost* source_frame, + blink::mojom::ConsoleMessageLevel log_level, diff --git a/www/ungoogled-chromium/files/patch-content_browser_devtools_devtools__frontend__host__impl.h b/www/ungoogled-chromium/files/patch-content_browser_devtools_devtools__frontend__host__impl.h new file mode 100644 index 000000000000..07af3b6176ed --- /dev/null +++ b/www/ungoogled-chromium/files/patch-content_browser_devtools_devtools__frontend__host__impl.h @@ -0,0 +1,11 @@ +--- content/browser/devtools/devtools_frontend_host_impl.h.orig 2023-11-04 07:08:51 UTC ++++ content/browser/devtools/devtools_frontend_host_impl.h +@@ -33,7 +33,7 @@ class DevToolsFrontendHostImpl : public DevToolsFronte + + void BadMessageReceived() override; + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + void OnDidAddMessageToConsole( + RenderFrameHost* source_frame, + blink::mojom::ConsoleMessageLevel log_level, diff --git a/www/ungoogled-chromium/files/patch-content_browser_download_save__package.cc b/www/ungoogled-chromium/files/patch-content_browser_download_save__package.cc index 5a7d669e2587..6066c249e6f5 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_download_save__package.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_download_save__package.cc @@ -1,16 +1,16 @@ ---- content/browser/download/save_package.cc.orig 2023-09-17 07:59:53 UTC +--- content/browser/download/save_package.cc.orig 2023-11-04 07:08:51 UTC +++ content/browser/download/save_package.cc -@@ -764,8 +764,13 @@ void SavePackage::Finish() { +@@ -769,8 +769,13 @@ void SavePackage::Finish() { if (download_) { std::vector files; for (auto& item : saved_success_items_) { +#if defined(__clang__) && (__clang_major__ >= 16) files.emplace_back(item.second->full_path(), item.second->url(), item.second->referrer().url); +#else + files.emplace_back(download::DownloadSaveItemData::ItemInfo{item.second->full_path(), item.second->url(), + item.second->referrer().url}); +#endif } download::DownloadSaveItemData::AttachItemData(download_, std::move(files)); } diff --git a/www/ungoogled-chromium/files/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc b/www/ungoogled-chromium/files/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc index 312881b50ca0..e0d9f313f207 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc @@ -1,11 +1,11 @@ ---- content/browser/file_system_access/file_system_access_local_path_watcher.cc.orig 2023-10-13 13:20:35 UTC +--- content/browser/file_system_access/file_system_access_local_path_watcher.cc.orig 2023-11-04 07:08:51 UTC +++ content/browser/file_system_access/file_system_access_local_path_watcher.cc -@@ -56,7 +56,7 @@ void FileSystemAccessLocalPathWatcher::Initialize( +@@ -63,7 +63,7 @@ void FileSystemAccessLocalPathWatcher::Initialize( base::FilePathWatcher::WatchOptions watch_options { .type = scope().IsRecursive() ? base::FilePathWatcher::Type::kRecursive : base::FilePathWatcher::Type::kNonRecursive, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Note: `report_modified_path` is also present on Android // and Fuchsia. Update this switch if support for watching // the local file system is added on those platforms. diff --git a/www/ungoogled-chromium/files/patch-content_browser_font__access_font__enumeration__data__source.cc b/www/ungoogled-chromium/files/patch-content_browser_font__access_font__enumeration__data__source.cc index 436cf61d2eca..15f57b8cd986 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_font__access_font__enumeration__data__source.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_font__access_font__enumeration__data__source.cc @@ -1,29 +1,29 @@ ---- content/browser/font_access/font_enumeration_data_source.cc.orig 2022-10-01 07:40:07 UTC +--- content/browser/font_access/font_enumeration_data_source.cc.orig 2023-11-04 07:08:51 UTC +++ content/browser/font_access/font_enumeration_data_source.cc @@ -16,7 +16,7 @@ #include "content/browser/font_access/font_enumeration_data_source_win.h" - #elif BUILDFLAG(IS_MAC) + #elif BUILDFLAG(IS_APPLE) #include "content/browser/font_access/font_enumeration_data_source_mac.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/browser/font_access/font_enumeration_data_source_linux.h" #endif // BUILDFLAG(IS_WIN) @@ -61,7 +61,7 @@ std::unique_ptr FontEnumera return std::make_unique(); - #elif BUILDFLAG(IS_MAC) + #elif BUILDFLAG(IS_APPLE) return std::make_unique(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return std::make_unique(); #else return std::make_unique(); @@ -76,7 +76,7 @@ bool FontEnumerationDataSource::IsOsSupported() { return true; - #elif BUILDFLAG(IS_MAC) + #elif BUILDFLAG(IS_APPLE) return true; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc index 97f0a71c9ed7..b9e001c8b7e6 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc @@ -1,11 +1,11 @@ ---- content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2023-10-13 13:20:35 UTC +--- content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2023-11-04 07:08:51 UTC +++ content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1780,7 +1780,7 @@ void GpuDataManagerImplPrivate::RecordCompositingMode( +@@ -1783,7 +1783,7 @@ void GpuDataManagerImplPrivate::RecordCompositingMode( UMA_HISTOGRAM_ENUMERATION("GPU.CompositingMode", compositing_mode); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool GpuDataManagerImplPrivate::IsGpuMemoryBufferNV12Supported() { return is_gpu_memory_buffer_NV12_supported_; } diff --git a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__process__host.cc b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__process__host.cc index b32dff08e6d8..615918da9d23 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__process__host.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__process__host.cc @@ -1,19 +1,19 @@ ---- content/browser/gpu/gpu_process_host.cc.orig 2023-09-17 07:59:53 UTC +--- content/browser/gpu/gpu_process_host.cc.orig 2023-11-04 07:08:51 UTC +++ content/browser/gpu/gpu_process_host.cc -@@ -254,6 +254,7 @@ static const char* const kSwitchNames[] = { +@@ -253,6 +253,7 @@ static const char* const kSwitchNames[] = { switches::kEnableBackgroundThreadPool, switches::kEnableGpuRasterization, switches::kEnableLogging, + switches::kDisableUnveil, switches::kDoubleBufferCompositing, switches::kHeadless, switches::kLoggingLevel, @@ -287,7 +288,7 @@ static const char* const kSwitchNames[] = { switches::kOzoneDumpFile, switches::kDisableBufferBWCompression, #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) switches::kX11Display, switches::kNoXshm, #endif diff --git a/www/ungoogled-chromium/files/patch-content_browser_interest__group_header__direct__from__seller__signals.cc b/www/ungoogled-chromium/files/patch-content_browser_interest__group_header__direct__from__seller__signals.cc index f47b69baf6fc..8d66a28779e3 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_interest__group_header__direct__from__seller__signals.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_interest__group_header__direct__from__seller__signals.cc @@ -1,14 +1,14 @@ ---- content/browser/interest_group/header_direct_from_seller_signals.cc.orig 2023-09-17 07:59:53 UTC +--- content/browser/interest_group/header_direct_from_seller_signals.cc.orig 2023-11-04 07:08:51 UTC +++ content/browser/interest_group/header_direct_from_seller_signals.cc -@@ -187,7 +187,11 @@ void OnJsonDecoded(std::unique_ptr= 16) HeaderDirectFromSellerSignals::HeaderDirectFromSellerSignals() = default; +#else +HeaderDirectFromSellerSignals::HeaderDirectFromSellerSignals() {} +#endif HeaderDirectFromSellerSignals::~HeaderDirectFromSellerSignals() = default; diff --git a/www/ungoogled-chromium/files/patch-content_browser_network__service__instance__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_network__service__instance__impl.cc index 378e6eb9a9d2..692d7ced7c2d 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_network__service__instance__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_network__service__instance__impl.cc @@ -1,29 +1,29 @@ ---- content/browser/network_service_instance_impl.cc.orig 2023-09-17 07:59:53 UTC +--- content/browser/network_service_instance_impl.cc.orig 2023-11-04 07:08:51 UTC +++ content/browser/network_service_instance_impl.cc -@@ -82,7 +82,7 @@ +@@ -81,7 +81,7 @@ #include "content/browser/network/network_service_process_tracker_win.h" #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/browser/system_dns_resolution/system_dns_resolver.h" #include "services/network/public/mojom/system_dns_resolution.mojom-forward.h" #endif -@@ -421,7 +421,7 @@ void CreateInProcessNetworkService( - #endif +@@ -373,7 +373,7 @@ void CreateInProcessNetworkService( + std::move(receiver))); } -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Runs a self-owned SystemDnsResolverMojoImpl. This is meant to run on a // high-priority thread pool. void RunSystemDnsResolverOnThreadPool( -@@ -488,7 +488,7 @@ network::mojom::NetworkServiceParamsPtr CreateNetworkS +@@ -440,7 +440,7 @@ network::mojom::NetworkServiceParamsPtr CreateNetworkS } #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (GetContentClient() ->browser() ->ShouldRunOutOfProcessSystemDnsResolution() && diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__frame__host__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__frame__host__impl.cc deleted file mode 100644 index 2513da711963..000000000000 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__frame__host__impl.cc +++ /dev/null @@ -1,40 +0,0 @@ ---- content/browser/renderer_host/render_frame_host_impl.cc.orig 2023-10-13 13:20:35 UTC -+++ content/browser/renderer_host/render_frame_host_impl.cc -@@ -8672,7 +8672,11 @@ void RenderFrameHostImpl::SendFencedFrameReportingBeac - for (const blink::FencedFrame::ReportingDestination& destination : - destinations) { - SendFencedFrameReportingBeaconInternal( -+#if defined(__clang__) && (__clang_major__ >= 16) - DestinationEnumEvent(event_type, event_data), destination, -+#else -+ DestinationEnumEvent(DestinationEnumEvent{event_type, event_data}), destination, -+#endif - /*from_renderer=*/true, attribution_reporting_runtime_features, - GetFrameTreeNodeId()); - } -@@ -8708,7 +8712,11 @@ void RenderFrameHostImpl::SendFencedFrameReportingBeac - } - - SendFencedFrameReportingBeaconInternal( -+#if defined(__clang__) && (__clang_major__ >= 16) - DestinationURLEvent(destination_url), -+#else -+ DestinationURLEvent(DestinationURLEvent{destination_url}), -+#endif - blink::FencedFrame::ReportingDestination::kBuyer, - /*from_renderer=*/true, attribution_reporting_runtime_features, - GetFrameTreeNodeId()); -@@ -8779,8 +8787,13 @@ void RenderFrameHostImpl::MaybeSendFencedFrameReportin - for (blink::FencedFrame::ReportingDestination destination : - info->destinations) { - initiator_rfh->SendFencedFrameReportingBeaconInternal( -+#if defined(__clang__) && (__clang_major__ >= 16) - DestinationEnumEvent(blink::kFencedFrameTopNavigationBeaconType, - info->data), -+#else -+ DestinationEnumEvent(DestinationEnumEvent{blink::kFencedFrameTopNavigationBeaconType, -+ info->data}), -+#endif - destination, - /*from_renderer=*/false, info->attribution_reporting_runtime_features, - GetFrameTreeNodeId(), navigation_request.GetNavigationId()); diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc index f7b17a6009bf..171ef9706704 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc @@ -1,55 +1,55 @@ ---- content/browser/renderer_host/render_process_host_impl.cc.orig 2023-10-13 13:20:35 UTC +--- content/browser/renderer_host/render_process_host_impl.cc.orig 2023-11-04 07:08:51 UTC +++ content/browser/renderer_host/render_process_host_impl.cc @@ -221,7 +221,7 @@ #include "third_party/blink/public/mojom/android_font_lookup/android_font_lookup.mojom.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include "components/services/font/public/mojom/font_service.mojom.h" // nogncheck @@ -952,7 +952,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = // to indicate failure and std::numeric_limits::max() to indicate // unlimited. size_t GetPlatformProcessLimit() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) struct rlimit limit; if (getrlimit(RLIMIT_NPROC, &limit) != 0) return kUnknownPlatformProcessLimit; @@ -1095,7 +1095,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (auto font_receiver = receiver.As()) { ConnectToFontService(std::move(font_receiver)); return; @@ -1184,7 +1184,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public std::unique_ptr binders_; mojo::Receiver receiver_{this}; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::Remote video_encode_accelerator_factory_remote_; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -3262,7 +3262,7 @@ void RenderProcessHostImpl::AppendRendererCommandLine( +@@ -3257,7 +3257,7 @@ void RenderProcessHostImpl::AppendRendererCommandLine( base::TimeTicks::UnixEpoch().since_origin().InMicroseconds())); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Append `kDisableVideoCaptureUseGpuMemoryBuffer` flag if there is no support // for NV12 GPU memory buffer. if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled() && -@@ -3322,6 +3322,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin +@@ -3317,6 +3317,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin switches::kDisableSpeechAPI, switches::kDisableThreadedCompositing, switches::kDisableTouchDragDrop, + switches::kDisableUnveil, + switches::kDisableUseSharedImagesForPepperVideo, switches::kDisableV8IdleTasks, switches::kDisableVideoCaptureUseGpuMemoryBuffer, - switches::kDisableWebGLImageChromium, diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.h b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.h index 262ebe3d82ce..dee03c8f2674 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.h +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.h @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/render_process_host_impl.h.orig 2023-10-13 13:20:35 UTC +--- content/browser/renderer_host/render_process_host_impl.h.orig 2023-11-04 07:08:51 UTC +++ content/browser/renderer_host/render_process_host_impl.h -@@ -540,7 +540,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -541,7 +541,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // Sets this RenderProcessHost to be guest only. For Testing only. void SetForGuestsOnlyForTesting(); -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) // Launch the zygote early in the browser startup. static void EarlyZygoteLaunch(); #endif // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc index 42a0f23bcf57..5b3fad481f6b 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc @@ -1,47 +1,47 @@ ---- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2023-10-13 13:20:35 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2023-11-04 07:08:51 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.cc @@ -121,7 +121,7 @@ #include "ui/gfx/gdi_util.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "content/browser/accessibility/browser_accessibility_auralinux.h" #include "ui/base/ime/linux/text_edit_command_auralinux.h" #include "ui/linux/linux_ui.h" -@@ -461,7 +461,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge +@@ -462,7 +462,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge return ToBrowserAccessibilityWin(manager->GetBrowserAccessibilityRoot()) ->GetCOM(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BrowserAccessibilityManager* manager = host()->GetOrCreateRootBrowserAccessibilityManager(); if (manager && manager->GetBrowserAccessibilityRoot()) -@@ -1720,7 +1720,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { +@@ -1721,7 +1721,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { return GetTextInputManager() && GetTextInputManager()->should_do_learning(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool RenderWidgetHostViewAura::SetCompositionFromExistingText( const gfx::Range& range, const std::vector& ui_ime_text_spans) { -@@ -2565,7 +2565,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { +@@ -2566,7 +2566,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { } bool RenderWidgetHostViewAura::NeedsMouseCapture() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) return NeedsInputGrab(); #else return false; -@@ -2748,7 +2748,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit +@@ -2749,7 +2749,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit if (!target_host) return; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* linux_ui = ui::LinuxUi::instance(); std::vector commands; if (!event.skip_if_unhandled && linux_ui && event.os_event && diff --git a/www/ungoogled-chromium/files/patch-content_browser_service__worker_service__worker__context__wrapper.cc b/www/ungoogled-chromium/files/patch-content_browser_service__worker_service__worker__context__wrapper.cc index e9ce31cdd313..c43c4fd9b2f2 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_service__worker_service__worker__context__wrapper.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_service__worker_service__worker__context__wrapper.cc @@ -1,15 +1,15 @@ ---- content/browser/service_worker/service_worker_context_wrapper.cc.orig 2023-10-13 13:20:35 UTC +--- content/browser/service_worker/service_worker_context_wrapper.cc.orig 2023-11-04 07:08:51 UTC +++ content/browser/service_worker/service_worker_context_wrapper.cc -@@ -1409,7 +1409,12 @@ void ServiceWorkerContextWrapper::MaybeProcessPendingW +@@ -1440,7 +1440,12 @@ void ServiceWorkerContextWrapper::MaybeProcessPendingW return; } +#if defined(__clang__) && (__clang_major__ >= 16) auto [document_url, key, callback] = std::move(*request); +#else + auto [d_u, key, callback] = std::move(*request); + auto document_url = d_u; +#endif DCHECK(document_url.is_valid()); TRACE_EVENT1("ServiceWorker", diff --git a/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.cc b/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.cc index b4cbf961f265..9d9a6932a806 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.cc @@ -1,56 +1,56 @@ ---- content/browser/utility_process_host.cc.orig 2023-10-13 13:20:35 UTC +--- content/browser/utility_process_host.cc.orig 2023-11-04 07:08:51 UTC +++ content/browser/utility_process_host.cc -@@ -59,7 +59,7 @@ +@@ -60,7 +60,7 @@ #include "content/browser/v8_snapshot_files.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/files/file_util.h" #include "base/files/scoped_file.h" #include "base/pickle.h" -@@ -69,7 +69,7 @@ +@@ -70,7 +70,7 @@ #include "media/capture/capture_switches.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "base/task/sequenced_task_runner.h" #include "components/viz/host/gpu_client.h" #include "media/capture/capture_switches.h" -@@ -80,7 +80,7 @@ namespace content { +@@ -81,7 +81,7 @@ namespace content { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::ScopedFD PassNetworkContextParentDirs( std::vector network_context_parent_dirs) { base::Pickle pickle; -@@ -129,7 +129,7 @@ UtilityProcessHost::UtilityProcessHost(std::unique_ptr +@@ -130,7 +130,7 @@ UtilityProcessHost::UtilityProcessHost(std::unique_ptr started_(false), name_(u"utility process"), file_data_(std::make_unique()), -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) gpu_client_(nullptr, base::OnTaskRunnerDeleter(nullptr)), #endif client_(std::move(client)) { -@@ -418,7 +418,7 @@ bool UtilityProcessHost::StartProcess() { +@@ -419,7 +419,7 @@ bool UtilityProcessHost::StartProcess() { file_data_->files_to_preload.merge(GetV8SnapshotFilesToPreload()); #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The network service should have access to the parent directories // necessary for its usage. if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork) { -@@ -429,7 +429,7 @@ bool UtilityProcessHost::StartProcess() { +@@ -430,7 +430,7 @@ bool UtilityProcessHost::StartProcess() { } #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Pass `kVideoCaptureUseGpuMemoryBuffer` flag to video capture service only // when the video capture use GPU memory buffer enabled and NV12 GPU memory // buffer supported. diff --git a/www/ungoogled-chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc b/www/ungoogled-chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc index 56f3115a45b5..93749c75cea8 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc @@ -1,29 +1,29 @@ ---- content/browser/web_contents/web_contents_view_aura.cc.orig 2023-10-13 13:20:35 UTC +--- content/browser/web_contents/web_contents_view_aura.cc.orig 2023-11-04 07:08:51 UTC +++ content/browser/web_contents/web_contents_view_aura.cc @@ -178,7 +178,7 @@ class WebDragSourceAura : public content::WebContentsO raw_ptr window_; }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Fill out the OSExchangeData with a file contents, synthesizing a name if // necessary. void PrepareDragForFileContents(const DropData& drop_data, -@@ -261,7 +261,7 @@ void PrepareDragData(const DropData& drop_data, +@@ -262,7 +262,7 @@ void PrepareDragData(const DropData& drop_data, if (!drop_data.download_metadata.empty()) PrepareDragForDownload(drop_data, provider, web_contents); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // We set the file contents before the URL because the URL also sets file // contents (to a .URL shortcut). We want to prefer file content data over // a shortcut so we add it first. -@@ -1340,7 +1340,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* +@@ -1380,7 +1380,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* // Linux window managers like to handle raise-on-click themselves. If we // raise-on-click manually, this may override user settings that prevent // focus-stealing. -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // It is possible for the web-contents to be destroyed while it is being // activated. Use a weak-ptr to track whether that happened or not. // More in https://crbug.com/1040725 diff --git a/www/ungoogled-chromium/files/patch-content_browser_webid_idp__network__request__manager.cc b/www/ungoogled-chromium/files/patch-content_browser_webid_idp__network__request__manager.cc deleted file mode 100644 index f9354ee0a4f2..000000000000 --- a/www/ungoogled-chromium/files/patch-content_browser_webid_idp__network__request__manager.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- content/browser/webid/idp_network_request_manager.cc.orig 2023-10-13 13:20:35 UTC -+++ content/browser/webid/idp_network_request_manager.cc -@@ -604,7 +604,11 @@ void OnTokenRequestParsed( - if (response_error) { - int error_code = response_error->FindInt(kErrorCodeKey).value_or(0); - GURL error_url = ExtractUrl(*response_error, kErrorUrlKey); -+#if defined(__clang__) && (__clang_major__ >= 16) - token_result.error = TokenError(error_code, error_url); -+#else -+ token_result.error = TokenError(TokenError{error_code, error_url}); -+#endif - } - } - diff --git a/www/ungoogled-chromium/files/patch-content_child_child__process.cc b/www/ungoogled-chromium/files/patch-content_child_child__process.cc index 174c177fc6c2..45b8cb41c63e 100644 --- a/www/ungoogled-chromium/files/patch-content_child_child__process.cc +++ b/www/ungoogled-chromium/files/patch-content_child_child__process.cc @@ -1,11 +1,11 @@ ---- content/child/child_process.cc.orig 2023-09-17 07:59:53 UTC +--- content/child/child_process.cc.orig 2023-11-04 07:08:51 UTC +++ content/child/child_process.cc -@@ -70,7 +70,7 @@ ChildProcess::ChildProcess(base::ThreadType io_thread_ +@@ -66,7 +66,7 @@ ChildProcess::ChildProcess(base::ThreadType io_thread_ + thread_pool_init_params) + : resetter_(&child_process, this, nullptr), io_thread_(std::make_unique()) { - const base::CommandLine& command_line = - *base::CommandLine::ForCurrentProcess(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + const base::CommandLine& command_line = + *base::CommandLine::ForCurrentProcess(); const bool is_embedded_in_browser_process = - !command_line.HasSwitch(switches::kProcessType); - if (IsMojoCoreSharedLibraryEnabled() && !is_embedded_in_browser_process) { diff --git a/www/ungoogled-chromium/files/patch-content_common_BUILD.gn b/www/ungoogled-chromium/files/patch-content_common_BUILD.gn index 5634c5fd3876..1f3f0249510b 100644 --- a/www/ungoogled-chromium/files/patch-content_common_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-content_common_BUILD.gn @@ -1,21 +1,21 @@ ---- content/common/BUILD.gn.orig 2023-10-13 13:20:35 UTC +--- content/common/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ content/common/BUILD.gn -@@ -435,6 +435,9 @@ if (is_linux || is_chromeos) { +@@ -441,6 +441,9 @@ if (is_linux || is_chromeos) { public = [ "set_process_title_linux.h" ] sources = [ "set_process_title_linux.cc" ] deps = [ "//base" ] + if (is_bsd) { + sources -= [ "set_process_title_linux.cc" ] + } } } -@@ -480,7 +483,7 @@ mojom("mojo_bindings") { +@@ -486,7 +489,7 @@ mojom("mojo_bindings") { if (enable_ipc_logging) { enabled_features += [ "ipc_logging" ] } - if (is_linux || is_chromeos) { + if (!is_bsd && (is_linux || is_chromeos)) { enabled_features += [ "supports_thread_types" ] } if (use_clang_profiling_inside_sandbox) { diff --git a/www/ungoogled-chromium/files/patch-content_common_features.cc b/www/ungoogled-chromium/files/patch-content_common_features.cc new file mode 100644 index 000000000000..3e501198592a --- /dev/null +++ b/www/ungoogled-chromium/files/patch-content_common_features.cc @@ -0,0 +1,20 @@ +--- content/common/features.cc.orig 2023-11-04 07:08:51 UTC ++++ content/common/features.cc +@@ -147,7 +147,7 @@ BASE_FEATURE(kEnableBackForwardCacheForScreenReader, + base::FEATURE_ENABLED_BY_DEFAULT); + + // Enables error reporting for JS errors inside DevTools frontend host +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + BASE_FEATURE(kEnableDevToolsJsErrorReporting, + "EnableDevToolsJsErrorReporting", + base::FEATURE_DISABLED_BY_DEFAULT); +@@ -219,7 +219,7 @@ BASE_FEATURE(kGpuInfoCollectionSeparatePrefetch, + // process and having browser process handle adjusting thread properties (nice + // value, c-group, latency sensitivity...) for renderers which have sandbox + // restrictions. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + BASE_FEATURE(kHandleRendererThreadTypeChangesInBrowser, + "HandleRendererThreadTypeChangesInBrowser", + base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-content_common_features.h b/www/ungoogled-chromium/files/patch-content_common_features.h new file mode 100644 index 000000000000..584cd8719726 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-content_common_features.h @@ -0,0 +1,20 @@ +--- content/common/features.h.orig 2023-11-04 07:08:51 UTC ++++ content/common/features.h +@@ -37,7 +37,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kDeviceMonitorMac) + CONTENT_EXPORT BASE_DECLARE_FEATURE(kDocumentPolicyNegotiation); + CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnumerateDevicesHideDeviceIDs); + CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnableBackForwardCacheForScreenReader); +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnableDevToolsJsErrorReporting); + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnsureAllowBindingsIsAlwaysForWebUI); +@@ -55,7 +55,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kForwardMemoryPres + #if BUILDFLAG(IS_WIN) + CONTENT_EXPORT BASE_DECLARE_FEATURE(kGpuInfoCollectionSeparatePrefetch); + #endif +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + CONTENT_EXPORT BASE_DECLARE_FEATURE(kHandleRendererThreadTypeChangesInBrowser); + #endif + CONTENT_EXPORT BASE_DECLARE_FEATURE(kHighPriorityBeforeUnload); diff --git a/www/ungoogled-chromium/files/patch-content_public_common_content__features.cc b/www/ungoogled-chromium/files/patch-content_public_common_content__features.cc index 6276da8532c2..7ae123b66cb4 100644 --- a/www/ungoogled-chromium/files/patch-content_public_common_content__features.cc +++ b/www/ungoogled-chromium/files/patch-content_public_common_content__features.cc @@ -1,50 +1,41 @@ ---- content/public/common/content_features.cc.orig 2023-10-13 13:20:35 UTC +--- content/public/common/content_features.cc.orig 2023-11-04 07:08:51 UTC +++ content/public/common/content_features.cc -@@ -53,7 +53,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, +@@ -40,7 +40,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, "AudioServiceOutOfProcess", // TODO(crbug.com/1052397): Remove !IS_CHROMEOS_LACROS once lacros starts being // built with OS_CHROMEOS instead of OS_LINUX. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) base::FEATURE_ENABLED_BY_DEFAULT #else -@@ -65,7 +65,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, +@@ -52,7 +52,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, // kAudioServiceOutOfProcess feature is enabled. BASE_FEATURE(kAudioServiceSandbox, "AudioServiceSandbox", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -553,7 +553,7 @@ BASE_FEATURE(kNetworkQualityEstimatorWebHoldback, - // (activated by kUserAgentClientHint) - BASE_FEATURE(kGreaseUACH, "GreaseUACH", base::FEATURE_ENABLED_BY_DEFAULT); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Supports proxying thread type changes of renderer processes to browser - // process and having browser process handle adjusting thread properties (nice - // value, c-group, latency sensitivity...) for renderers which have sandbox -@@ -1463,7 +1463,7 @@ BASE_FEATURE(kWebAssemblyTiering, +@@ -1131,7 +1131,7 @@ BASE_FEATURE(kWebAssemblyTiering, BASE_FEATURE(kWebAssemblyTrapHandler, "WebAssemblyTrapHandler", #if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC)) && \ + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) && \ defined(ARCH_CPU_X86_64)) || \ (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) base::FEATURE_ENABLED_BY_DEFAULT -@@ -1515,7 +1515,11 @@ BASE_FEATURE(kWebUICodeCache, +@@ -1172,7 +1172,11 @@ BASE_FEATURE(kWebUICodeCache, // Controls whether the WebUSB API is enabled: // https://wicg.github.io/webusb +#if BUILDFLAG(IS_BSD) +BASE_FEATURE(kWebUsb, "WebUSB", base::FEATURE_DISABLED_BY_DEFAULT); +#else BASE_FEATURE(kWebUsb, "WebUSB", base::FEATURE_ENABLED_BY_DEFAULT); +#endif // Controls whether the WebXR Device API is enabled. BASE_FEATURE(kWebXr, "WebXR", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-content_public_common_content__features.h b/www/ungoogled-chromium/files/patch-content_public_common_content__features.h deleted file mode 100644 index a93a04aa389d..000000000000 --- a/www/ungoogled-chromium/files/patch-content_public_common_content__features.h +++ /dev/null @@ -1,11 +0,0 @@ ---- content/public/common/content_features.h.orig 2023-10-13 13:20:35 UTC -+++ content/public/common/content_features.h -@@ -120,7 +120,7 @@ CONTENT_EXPORT extern const base::FeatureParam - kFledgeLimitNumAuctionsParam; - CONTENT_EXPORT BASE_DECLARE_FEATURE(kFractionalScrollOffsets); - CONTENT_EXPORT BASE_DECLARE_FEATURE(kGreaseUACH); --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - CONTENT_EXPORT BASE_DECLARE_FEATURE(kHandleRendererThreadTypeChangesInBrowser); - #endif - CONTENT_EXPORT BASE_DECLARE_FEATURE(kIdleDetection); diff --git a/www/ungoogled-chromium/files/patch-content_renderer_render__process__impl.cc b/www/ungoogled-chromium/files/patch-content_renderer_render__process__impl.cc index c773629ade3f..664dcb3e3015 100644 --- a/www/ungoogled-chromium/files/patch-content_renderer_render__process__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_renderer_render__process__impl.cc @@ -1,20 +1,20 @@ ---- content/renderer/render_process_impl.cc.orig 2023-08-18 10:26:52 UTC +--- content/renderer/render_process_impl.cc.orig 2023-11-04 07:08:51 UTC +++ content/renderer/render_process_impl.cc -@@ -45,7 +45,7 @@ +@@ -46,7 +46,7 @@ #if BUILDFLAG(IS_WIN) #include "base/win/win_util.h" #endif -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_64) #include "v8/include/v8-wasm-trap-handler-posix.h" #endif -@@ -211,7 +211,7 @@ RenderProcessImpl::RenderProcessImpl() +@@ -212,7 +212,7 @@ RenderProcessImpl::RenderProcessImpl() v8::V8::SetFlagsFromString(kSABPerContextFlag, sizeof(kSABPerContextFlag)); } -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_64) if (base::FeatureList::IsEnabled(features::kWebAssemblyTrapHandler)) { base::CommandLine* const command_line = base::CommandLine::ForCurrentProcess(); diff --git a/www/ungoogled-chromium/files/patch-content_renderer_render__thread__impl.cc b/www/ungoogled-chromium/files/patch-content_renderer_render__thread__impl.cc index 5a32cd02cf2b..03608b5daf7f 100644 --- a/www/ungoogled-chromium/files/patch-content_renderer_render__thread__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_renderer_render__thread__impl.cc @@ -1,38 +1,38 @@ ---- content/renderer/render_thread_impl.cc.orig 2023-10-13 13:20:35 UTC +--- content/renderer/render_thread_impl.cc.orig 2023-11-04 07:08:51 UTC +++ content/renderer/render_thread_impl.cc -@@ -204,6 +204,8 @@ +@@ -205,6 +205,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_BSD) +#include #else #include #endif -@@ -1054,7 +1056,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1016,7 +1018,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: kGpuStreamIdMedia, kGpuStreamPriorityMedia); const bool enable_video_decode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled(media::kVaapiVideoDecodeLinux) && #endif // BUILDFLAG(IS_LINUX) !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) && -@@ -1063,7 +1065,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1025,7 +1027,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: gpu::kGpuFeatureStatusEnabled); const bool enable_video_encode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled(media::kVaapiVideoEncodeLinux) && #else !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoEncode) && -@@ -1835,7 +1837,7 @@ std::unique_ptr RenderThreadImpl::Create +@@ -1799,7 +1801,7 @@ std::unique_ptr RenderThreadImpl::Create bool enable_video_encode_accelerator) { mojo::PendingRemote vea_provider; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(media::kUseOutOfProcessVideoEncoding)) { BindHostReceiver(vea_provider.InitWithNewPipeAndPassReceiver()); } else { diff --git a/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc b/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc index addbe80397ba..53853e151723 100644 --- a/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc @@ -1,45 +1,45 @@ ---- content/renderer/renderer_blink_platform_impl.cc.orig 2023-10-13 13:20:35 UTC +--- content/renderer/renderer_blink_platform_impl.cc.orig 2023-11-04 07:08:51 UTC +++ content/renderer/renderer_blink_platform_impl.cc -@@ -114,7 +114,7 @@ +@@ -113,7 +113,7 @@ #if BUILDFLAG(IS_MAC) #include "content/child/child_process_sandbox_support_impl_mac.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/child/child_process_sandbox_support_impl_linux.h" #endif -@@ -182,13 +182,13 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -181,13 +181,13 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( sudden_termination_disables_(0), is_locked_to_site_(false), main_thread_scheduler_(main_thread_scheduler) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sk_sp font_loader; #endif // RenderThread may not exist in some tests. if (RenderThreadImpl::current()) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::PendingRemote font_service; RenderThreadImpl::current()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); -@@ -197,7 +197,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -196,7 +196,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( #endif } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (sandboxEnabled()) { #if BUILDFLAG(IS_MAC) sandbox_support_ = std::make_unique(); -@@ -255,7 +255,7 @@ void RendererBlinkPlatformImpl::SetThreadType(base::Pl +@@ -254,7 +254,7 @@ void RendererBlinkPlatformImpl::SetThreadType(base::Pl #endif blink::WebSandboxSupport* RendererBlinkPlatformImpl::GetSandboxSupport() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return sandbox_support_.get(); #else // These platforms do not require sandbox support. diff --git a/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.h b/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.h index 09ac788895fa..4854b74fc422 100644 --- a/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.h +++ b/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.h @@ -1,11 +1,11 @@ ---- content/renderer/renderer_blink_platform_impl.h.orig 2023-08-18 10:26:52 UTC +--- content/renderer/renderer_blink_platform_impl.h.orig 2023-11-04 07:08:51 UTC +++ content/renderer/renderer_blink_platform_impl.h -@@ -234,7 +234,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi +@@ -235,7 +235,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi void Collect3DContextInformation(blink::Platform::GraphicsInfo* gl_info, const gpu::GPUInfo& gpu_info) const; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) std::unique_ptr sandbox_support_; #endif diff --git a/www/ungoogled-chromium/files/patch-content_shell_BUILD.gn b/www/ungoogled-chromium/files/patch-content_shell_BUILD.gn index d4aaf1d46b89..a4c070ffa0e1 100644 --- a/www/ungoogled-chromium/files/patch-content_shell_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-content_shell_BUILD.gn @@ -1,11 +1,11 @@ ---- content/shell/BUILD.gn.orig 2023-10-13 13:20:35 UTC +--- content/shell/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ content/shell/BUILD.gn -@@ -1024,7 +1024,7 @@ group("content_shell_crash_test") { +@@ -1025,7 +1025,7 @@ group("content_shell_crash_test") { if (is_win) { data_deps += [ "//build/win:copy_cdb_to_output" ] } - if (is_posix) { + if (is_posix && !is_bsd) { data_deps += [ "//third_party/breakpad:dump_syms", "//third_party/breakpad:minidump_stackwalk", diff --git a/www/ungoogled-chromium/files/patch-content_test_BUILD.gn b/www/ungoogled-chromium/files/patch-content_test_BUILD.gn index e018d1067471..f06b689d18e9 100644 --- a/www/ungoogled-chromium/files/patch-content_test_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-content_test_BUILD.gn @@ -1,20 +1,20 @@ ---- content/test/BUILD.gn.orig 2023-10-13 13:20:35 UTC +--- content/test/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ content/test/BUILD.gn -@@ -2226,7 +2226,7 @@ static_library("run_all_unittests") { +@@ -2237,7 +2237,7 @@ static_library("run_all_unittests") { ":test_support", "//base/test:test_support", ] - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { deps += [ "//content/common:set_process_title_linux" ] } } -@@ -3302,7 +3302,7 @@ test("content_unittests") { +@@ -3322,7 +3322,7 @@ test("content_unittests") { deps += [ "//third_party/boringssl" ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "../common/set_process_title_linux_unittest.cc" ] deps += [ "//content/common:set_process_title_linux" ] } diff --git a/www/ungoogled-chromium/files/patch-content_utility_services.cc b/www/ungoogled-chromium/files/patch-content_utility_services.cc index e7b1a0862761..7de2e83d6ea5 100644 --- a/www/ungoogled-chromium/files/patch-content_utility_services.cc +++ b/www/ungoogled-chromium/files/patch-content_utility_services.cc @@ -1,81 +1,81 @@ ---- content/utility/services.cc.orig 2023-09-17 07:59:53 UTC +--- content/utility/services.cc.orig 2023-11-04 07:08:51 UTC +++ content/utility/services.cc -@@ -64,7 +64,7 @@ +@@ -67,7 +67,7 @@ extern sandbox::TargetServices* g_utility_target_services; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "media/mojo/services/mojo_video_encode_accelerator_provider_factory.h" #include "sandbox/linux/services/libc_interceptor.h" #include "sandbox/policy/mojom/sandbox.mojom.h" -@@ -87,7 +87,7 @@ extern sandbox::TargetServices* g_utility_target_servi +@@ -90,7 +90,7 @@ extern sandbox::TargetServices* g_utility_target_servi #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) #include "media/mojo/services/stable_video_decoder_factory_process_service.h" // nogncheck #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && -@@ -109,7 +109,7 @@ extern sandbox::TargetServices* g_utility_target_servi +@@ -106,7 +106,7 @@ extern sandbox::TargetServices* g_utility_target_servi #include "ui/accessibility/accessibility_features.h" #endif // BUILDFLAG(ENABLE_ACCESSIBILITY_SERVICE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "media/capture/capture_switches.h" #include "services/viz/public/cpp/gpu/gpu.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -@@ -226,7 +226,7 @@ auto RunAudio(mojo::PendingReceiver receiver) { auto service = std::make_unique( std::move(receiver), base::SingleThreadTaskRunner::GetCurrentDefault()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) { mojo::PendingRemote remote_gpu; content::UtilityThread::Get()->BindHostReceiver( -@@ -340,7 +340,7 @@ auto RunOOPArcVideoAcceleratorFactoryService( +@@ -344,7 +344,7 @@ auto RunOOPArcVideoAcceleratorFactoryService( #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) auto RunStableVideoDecoderFactoryProcessService( mojo::PendingReceiver< -@@ -351,7 +351,7 @@ auto RunStableVideoDecoderFactoryProcessService( +@@ -355,7 +355,7 @@ auto RunStableVideoDecoderFactoryProcessService( #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && // (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) auto RunVideoEncodeAcceleratorProviderFactory( mojo::PendingReceiver receiver) { -@@ -415,13 +415,13 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -418,13 +418,13 @@ void RegisterMainThreadServices(mojo::ServiceFactory& #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) services.Add(RunStableVideoDecoderFactoryProcessService); #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && // (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) services.Add(RunVideoEncodeAcceleratorProviderFactory); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-device_fido_get__assertion__request__handler.cc b/www/ungoogled-chromium/files/patch-device_fido_get__assertion__request__handler.cc deleted file mode 100644 index 4134fa6143a5..000000000000 --- a/www/ungoogled-chromium/files/patch-device_fido_get__assertion__request__handler.cc +++ /dev/null @@ -1,26 +0,0 @@ ---- device/fido/get_assertion_request_handler.cc.orig 2023-10-13 13:20:35 UTC -+++ device/fido/get_assertion_request_handler.cc -@@ -370,7 +370,11 @@ bool AllowListOnlyHybridOrInternal(const CtapGetAssert - - bool AllowListIncludedTransport(const CtapGetAssertionRequest& request, - FidoTransportProtocol transport) { -+#if (_LIBCPP_VERSION >= 160000) - return std::ranges::any_of( -+#else -+ return base::ranges::any_of( -+#endif - request.allow_list, - [transport](const PublicKeyCredentialDescriptor& cred) { - return cred.transports.empty() || -@@ -441,7 +445,11 @@ void GetAssertionRequestHandler::PreselectAccount( - PublicKeyCredentialDescriptor credential) { - DCHECK(!preselected_credential_); - DCHECK(request_.allow_list.empty() || -+#if (_LIBCPP_VERSION >= 160000) - std::ranges::any_of( -+#else -+ base::ranges::any_of( -+#endif - request_.allow_list, - [&credential](const PublicKeyCredentialDescriptor& desc) { - return desc.id == credential.id; diff --git a/www/ungoogled-chromium/files/patch-device_gamepad_BUILD.gn b/www/ungoogled-chromium/files/patch-device_gamepad_BUILD.gn index 1757d1107a3a..0669e506fbb1 100644 --- a/www/ungoogled-chromium/files/patch-device_gamepad_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-device_gamepad_BUILD.gn @@ -1,11 +1,11 @@ ---- device/gamepad/BUILD.gn.orig 2022-12-02 17:56:32 UTC +--- device/gamepad/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ device/gamepad/BUILD.gn -@@ -98,7 +98,7 @@ component("gamepad") { +@@ -99,7 +99,7 @@ component("gamepad") { "hid_writer_linux.cc", "hid_writer_linux.h", ] - if (use_udev) { + if (use_udev && !is_bsd) { sources += [ "gamepad_device_linux.cc", "gamepad_device_linux.h", diff --git a/www/ungoogled-chromium/files/patch-extensions_shell_app_shell__main__delegate.cc b/www/ungoogled-chromium/files/patch-extensions_shell_app_shell__main__delegate.cc index 3ca08f32f364..e6742c2362ed 100644 --- a/www/ungoogled-chromium/files/patch-extensions_shell_app_shell__main__delegate.cc +++ b/www/ungoogled-chromium/files/patch-extensions_shell_app_shell__main__delegate.cc @@ -1,20 +1,20 @@ ---- extensions/shell/app/shell_main_delegate.cc.orig 2022-10-01 07:40:07 UTC +--- extensions/shell/app/shell_main_delegate.cc.orig 2023-11-04 07:08:51 UTC +++ extensions/shell/app/shell_main_delegate.cc -@@ -42,7 +42,7 @@ - +@@ -43,7 +43,7 @@ #if BUILDFLAG(IS_WIN) #include "base/base_paths_win.h" + #include "base/process/process_info.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/nix/xdg_util.h" #elif BUILDFLAG(IS_MAC) #include "base/base_paths_mac.h" -@@ -61,7 +61,7 @@ base::FilePath GetDataPath() { +@@ -62,7 +62,7 @@ base::FilePath GetDataPath() { return cmd_line->GetSwitchValuePath(switches::kContentShellDataPath); base::FilePath data_dir; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::unique_ptr env(base::Environment::Create()); data_dir = base::nix::GetXDGDirectory( env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir); diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc index 0cb01ac4ce23..6c7407be3496 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/dawn_context_provider.cc.orig 2023-10-13 13:20:35 UTC +--- gpu/command_buffer/service/dawn_context_provider.cc.orig 2023-11-04 07:08:51 UTC +++ gpu/command_buffer/service/dawn_context_provider.cc -@@ -145,7 +145,7 @@ wgpu::BackendType DawnContextProvider::GetDefaultBacke +@@ -151,7 +151,7 @@ wgpu::BackendType DawnContextProvider::GetDefaultBacke return base::FeatureList::IsEnabled(features::kSkiaGraphiteDawnUseD3D12) ? wgpu::BackendType::D3D12 : wgpu::BackendType::D3D11; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return wgpu::BackendType::Vulkan; #elif BUILDFLAG(IS_APPLE) return wgpu::BackendType::Metal; diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc index 857ee48bbd3c..1ba866a97535 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/gles2_cmd_decoder.cc.orig 2023-09-17 07:59:53 UTC +--- gpu/command_buffer/service/gles2_cmd_decoder.cc.orig 2023-11-04 07:08:51 UTC +++ gpu/command_buffer/service/gles2_cmd_decoder.cc -@@ -2980,7 +2980,7 @@ GLES2Decoder* GLES2Decoder::Create( +@@ -2986,7 +2986,7 @@ GLES2Decoder* GLES2Decoder::Create( } // Allow linux to run fuzzers. -#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return new GLES2DecoderImpl(client, command_buffer_service, outputter, group); #else LOG(FATAL) << "Validating command decoder is not supported."; diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__context__state.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__context__state.cc new file mode 100644 index 000000000000..f4c9a421be45 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__context__state.cc @@ -0,0 +1,32 @@ +--- gpu/command_buffer/service/shared_context_state.cc.orig 2023-11-04 07:08:51 UTC ++++ gpu/command_buffer/service/shared_context_state.cc +@@ -4,6 +4,7 @@ + + #include "gpu/command_buffer/service/shared_context_state.h" + ++#include "base/immediate_crash.h" + #include "base/observer_list.h" + #include "base/strings/stringprintf.h" + #include "base/system/sys_info.h" +@@ -101,6 +102,13 @@ void SharedContextState::compileError(const char* shad + << "------------------------\n" + << shader << "\nErrors:\n" + << errors; ++ ++ // Increase shader cache shm count and crash the GPU process so that the ++ // browser process would clear the cache. ++ GpuProcessShmCount::ScopedIncrement increment( ++ use_shader_cache_shm_count_.get()); ++ ++ base::ImmediateCrash(); + } + } + +@@ -305,6 +313,7 @@ bool SharedContextState::InitializeGanesh( + gl::ProgressReporter* progress_reporter) { + progress_reporter_ = progress_reporter; + gr_shader_cache_ = cache; ++ use_shader_cache_shm_count_ = use_shader_cache_shm_count; + + size_t max_resource_cache_bytes; + size_t glyph_cache_max_texture_bytes; diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__context__state.h b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__context__state.h new file mode 100644 index 000000000000..536a1dc76127 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__context__state.h @@ -0,0 +1,11 @@ +--- gpu/command_buffer/service/shared_context_state.h.orig 2023-11-04 07:08:51 UTC ++++ gpu/command_buffer/service/shared_context_state.h +@@ -392,6 +392,8 @@ class GPU_GLES2_EXPORT SharedContextState + std::vector scratch_deserialization_buffer_; + raw_ptr gr_shader_cache_ = + nullptr; ++ raw_ptr use_shader_cache_shm_count_ = ++ nullptr; + + // |need_context_state_reset| is set whenever Skia may have altered the + // driver's GL state. diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc index 7c3fea889ff4..fac12b99ffb1 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc @@ -1,20 +1,20 @@ ---- gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig 2023-10-13 13:20:35 UTC +--- gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig 2023-11-04 07:08:51 UTC +++ gpu/command_buffer/service/shared_image/external_vk_image_backing.cc @@ -47,7 +47,7 @@ #include "ui/gl/gl_version_info.h" #include "ui/gl/scoped_binders.h" -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) #include "gpu/command_buffer/service/shared_image/external_vk_image_dawn_representation.h" #endif -@@ -673,7 +673,7 @@ std::unique_ptr ExternalVkIma +@@ -679,7 +679,7 @@ std::unique_ptr ExternalVkIma const wgpu::Device& wgpuDevice, wgpu::BackendType backend_type, std::vector view_formats) { -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) auto wgpu_format = ToDawnFormat(format()); if (wgpu_format == wgpu::TextureFormat::Undefined) { diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc index b2cc7765a1eb..bf59491df6c3 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc @@ -1,20 +1,20 @@ ---- gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc.orig 2023-10-13 13:20:35 UTC +--- gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc.orig 2023-11-04 07:08:51 UTC +++ gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc -@@ -89,7 +89,7 @@ base::flat_map CreateImag +@@ -99,7 +99,7 @@ base::flat_map CreateImag } // namespace constexpr uint32_t kSupportedUsage = -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) SHARED_IMAGE_USAGE_WEBGPU | SHARED_IMAGE_USAGE_WEBGPU_SWAP_CHAIN_TEXTURE | SHARED_IMAGE_USAGE_WEBGPU_STORAGE_TEXTURE | #endif -@@ -258,7 +258,7 @@ bool ExternalVkImageBackingFactory::IsSupported( +@@ -268,7 +268,7 @@ bool ExternalVkImageBackingFactory::IsSupported( return false; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (format.IsLegacyMultiplanar()) { // ExternalVkImageBacking doesn't work properly with external sampler // multi-planar formats on Linux, see https://crbug.com/1394888. diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc index 985b81af374c..51f09937ca9c 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc.orig 2023-09-17 07:59:53 UTC +--- gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc.orig 2023-11-04 07:08:51 UTC +++ gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc -@@ -211,7 +211,7 @@ bool WrappedSkImageBacking::Initialize(const std::stri +@@ -212,7 +212,7 @@ bool WrappedSkImageBacking::Initialize(const std::stri constexpr GrRenderable is_renderable = GrRenderable::kYes; constexpr GrProtected is_protected = GrProtected::kNo; -#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) +#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // Blue for single-planar and magenta-ish for multi-planar. SkColor4f fallback_color = format().is_single_plane() ? SkColors::kBlue : SkColors::kWhite; diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc index 649c9924cd23..5c1b342a3b20 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc @@ -1,20 +1,20 @@ ---- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2023-10-13 13:20:35 UTC +--- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2023-11-04 07:08:51 UTC +++ gpu/command_buffer/service/webgpu_decoder_impl.cc -@@ -1194,7 +1194,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( +@@ -1193,7 +1193,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( force_fallback_adapter = true; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!shared_context_state_->GrContextIsVulkan() && !shared_context_state_->IsGraphiteDawnVulkan() && use_webgpu_adapter_ != WebGPUAdapterName::kOpenGLES) { -@@ -1849,7 +1849,7 @@ WebGPUDecoderImpl::AssociateMailboxDawn( +@@ -1848,7 +1848,7 @@ WebGPUDecoderImpl::AssociateMailboxDawn( } #if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_APPLE) && \ - !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX) + !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) if (usage & wgpu::TextureUsage::StorageBinding) { LOG(ERROR) << "AssociateMailbox: wgpu::TextureUsage::StorageBinding is NOT " "supported yet on this platform."; diff --git a/www/ungoogled-chromium/files/patch-gpu_config_gpu__control__list.cc b/www/ungoogled-chromium/files/patch-gpu_config_gpu__control__list.cc index 804f7a423601..7d6087e62dea 100644 --- a/www/ungoogled-chromium/files/patch-gpu_config_gpu__control__list.cc +++ b/www/ungoogled-chromium/files/patch-gpu_config_gpu__control__list.cc @@ -1,20 +1,20 @@ ---- gpu/config/gpu_control_list.cc.orig 2023-08-18 10:26:52 UTC +--- gpu/config/gpu_control_list.cc.orig 2023-11-04 07:08:51 UTC +++ gpu/config/gpu_control_list.cc @@ -276,7 +276,7 @@ bool GpuControlList::More::GLVersionInfoMismatch( GpuControlList::GLType GpuControlList::More::GetDefaultGLType() { #if BUILDFLAG(IS_CHROMEOS) return kGLTypeGL; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kGLTypeGL; #elif BUILDFLAG(IS_MAC) return kGLTypeGL; -@@ -817,7 +817,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { +@@ -820,7 +820,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { return kOsAndroid; #elif BUILDFLAG(IS_FUCHSIA) return kOsFuchsia; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kOsLinux; #elif BUILDFLAG(IS_MAC) return kOsMacosx; diff --git a/www/ungoogled-chromium/files/patch-gpu_config_gpu__finch__features.cc b/www/ungoogled-chromium/files/patch-gpu_config_gpu__finch__features.cc index 6fa5a7bf513c..897e33753c74 100644 --- a/www/ungoogled-chromium/files/patch-gpu_config_gpu__finch__features.cc +++ b/www/ungoogled-chromium/files/patch-gpu_config_gpu__finch__features.cc @@ -1,21 +1,21 @@ ---- gpu/config/gpu_finch_features.cc.orig 2023-09-17 07:59:53 UTC +--- gpu/config/gpu_finch_features.cc.orig 2023-11-04 07:08:51 UTC +++ gpu/config/gpu_finch_features.cc -@@ -58,7 +58,7 @@ bool IsDeviceBlocked(const char* field, const std::str +@@ -63,7 +63,7 @@ bool IsDeviceBlocked(const char* field, const std::str BASE_FEATURE(kUseGles2ForOopR, "UseGles2ForOopR", #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_DISABLED_BY_DEFAULT #else base::FEATURE_ENABLED_BY_DEFAULT -@@ -142,7 +142,8 @@ BASE_FEATURE(kAggressiveSkiaGpuResourcePurge, +@@ -147,7 +147,8 @@ BASE_FEATURE(kAggressiveSkiaGpuResourcePurge, BASE_FEATURE(kDefaultEnableGpuRasterization, "DefaultEnableGpuRasterization", #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ + BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__init.cc b/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__init.cc index e1698cea2adb..0310cae9bedf 100644 --- a/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__init.cc +++ b/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__init.cc @@ -1,74 +1,74 @@ ---- gpu/ipc/service/gpu_init.cc.orig 2023-09-17 07:59:53 UTC +--- gpu/ipc/service/gpu_init.cc.orig 2023-11-04 07:08:51 UTC +++ gpu/ipc/service/gpu_init.cc @@ -357,7 +357,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL enable_watchdog = false; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool gpu_sandbox_start_early = gpu_preferences_.gpu_sandbox_start_early; #else // !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) // For some reasons MacOSX's VideoToolbox might crash when called after @@ -394,7 +394,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } bool attempted_startsandbox = false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Chrome OS ARM Mali, GPU driver userspace creates threads when // initializing a GL context, so start the sandbox early. // TODO(zmo): Need to collect OS version before this. @@ -451,7 +451,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The ContentSandboxHelper is currently the only one implementation of // GpuSandboxHelper and it has no dependency. Except on Linux where // VaapiWrapper checks the GL implementation to determine which display @@ -533,7 +533,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL command_line, gpu_feature_info_, gpu_preferences_.disable_software_rasterizer, false); if (gl_use_swiftshader_) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) VLOG(1) << "Quit GPU process launch to fallback to SwiftShader cleanly " << "on Linux"; return false; @@ -686,7 +686,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL InitializePlatformOverlaySettings(&gpu_info_, gpu_feature_info_); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Driver may create a compatibility profile context when collect graphics // information on Linux platform. Try to collect graphics information // based on core profile context after disabling platform extensions. -@@ -740,7 +740,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -741,7 +741,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } } } -#if BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE)) if (!gl_disabled && !gl_use_swiftshader_ && std::getenv("RUNNING_UNDER_RR")) { // https://rr-project.org/ is a Linux-only record-and-replay debugger that -@@ -894,7 +894,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -895,7 +895,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c } bool gl_disabled = gl::GetGLImplementation() == gl::kGLImplementationDisabled; -#if BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE)) if (!gl_disabled && !gl_use_swiftshader_ && std::getenv("RUNNING_UNDER_RR")) { // https://rr-project.org/ is a Linux-only record-and-replay debugger that -@@ -964,7 +964,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -965,7 +965,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Driver may create a compatibility profile context when collect graphics // information on Linux platform. Try to collect graphics information // based on core profile context after disabling platform extensions. diff --git a/www/ungoogled-chromium/files/patch-gpu_vulkan_generate__bindings.py b/www/ungoogled-chromium/files/patch-gpu_vulkan_generate__bindings.py index 544795e0c5a1..39466880659c 100644 --- a/www/ungoogled-chromium/files/patch-gpu_vulkan_generate__bindings.py +++ b/www/ungoogled-chromium/files/patch-gpu_vulkan_generate__bindings.py @@ -1,11 +1,11 @@ ---- gpu/vulkan/generate_bindings.py.orig 2023-09-17 07:59:53 UTC +--- gpu/vulkan/generate_bindings.py.orig 2023-11-04 07:08:51 UTC +++ gpu/vulkan/generate_bindings.py -@@ -260,7 +260,7 @@ VULKAN_DEVICE_FUNCTIONS = [ +@@ -270,7 +270,7 @@ VULKAN_DEVICE_FUNCTIONS = [ ] }, { - 'ifdef': 'BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)', + 'ifdef': 'BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)', 'extension': 'VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME', 'functions': [ 'vkGetImageDrmFormatModifierPropertiesEXT', diff --git a/www/ungoogled-chromium/files/patch-gpu_vulkan_semaphore__handle.cc b/www/ungoogled-chromium/files/patch-gpu_vulkan_semaphore__handle.cc index 6557d9823fe3..79b28e2d25d0 100644 --- a/www/ungoogled-chromium/files/patch-gpu_vulkan_semaphore__handle.cc +++ b/www/ungoogled-chromium/files/patch-gpu_vulkan_semaphore__handle.cc @@ -1,20 +1,20 @@ ---- gpu/vulkan/semaphore_handle.cc.orig 2023-10-13 13:20:35 UTC +--- gpu/vulkan/semaphore_handle.cc.orig 2023-11-04 07:08:51 UTC +++ gpu/vulkan/semaphore_handle.cc @@ -39,7 +39,7 @@ SemaphoreHandle::SemaphoreHandle(gfx::GpuFenceHandle f // https://fuchsia.dev/reference/fidl/fuchsia.ui.scenic. Init(VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA, - std::move(fence_handle.owned_event)); + fence_handle.Release()); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) Init(VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR, - std::move(fence_handle.owned_fd)); + fence_handle.Release()); #elif BUILDFLAG(IS_POSIX) @@ -64,7 +64,7 @@ gfx::GpuFenceHandle SemaphoreHandle::ToGpuFenceHandle( // VkSemaphore, which can then be used to submit present work, see // https://fuchsia.dev/reference/fidl/fuchsia.ui.scenic. - fence_handle.owned_event = TakeHandle(); + fence_handle.Adopt(TakeHandle()); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) if (type_ == VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR) { - fence_handle.owned_fd = TakeHandle(); + fence_handle.Adopt(TakeHandle()); } else { diff --git a/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.cc b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.cc index 707c19dc8f0e..194afa826aa6 100644 --- a/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.cc +++ b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.cc @@ -1,20 +1,20 @@ ---- gpu/vulkan/vulkan_function_pointers.cc.orig 2023-09-17 07:59:53 UTC +--- gpu/vulkan/vulkan_function_pointers.cc.orig 2023-11-04 07:08:51 UTC +++ gpu/vulkan/vulkan_function_pointers.cc -@@ -1161,7 +1161,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer +@@ -1241,7 +1241,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (gfx::HasExtension(enabled_extensions, VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME)) { vkGetImageDrmFormatModifierPropertiesEXT = -@@ -1350,7 +1350,7 @@ void VulkanFunctionPointers::ResetForTesting() { +@@ -1440,7 +1440,7 @@ void VulkanFunctionPointers::ResetForTesting() { vkGetSwapchainImagesKHR = nullptr; vkQueuePresentKHR = nullptr; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) vkGetImageDrmFormatModifierPropertiesEXT = nullptr; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) } diff --git a/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.h b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.h index 0ce3b0bb6ed2..942d2368c52e 100644 --- a/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.h +++ b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.h @@ -1,27 +1,27 @@ ---- gpu/vulkan/vulkan_function_pointers.h.orig 2023-09-17 07:59:53 UTC +--- gpu/vulkan/vulkan_function_pointers.h.orig 2023-11-04 07:08:51 UTC +++ gpu/vulkan/vulkan_function_pointers.h -@@ -311,7 +311,7 @@ struct COMPONENT_EXPORT(VULKAN) VulkanFunctionPointers +@@ -321,7 +321,7 @@ struct COMPONENT_EXPORT(VULKAN) VulkanFunctionPointers VulkanFunction vkGetSwapchainImagesKHR; VulkanFunction vkQueuePresentKHR; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) VulkanFunction vkGetImageDrmFormatModifierPropertiesEXT; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -1235,7 +1235,7 @@ ALWAYS_INLINE VkResult vkQueuePresentKHR(VkQueue queue +@@ -1324,7 +1324,7 @@ ALWAYS_INLINE VkResult vkQueuePresentKHR(VkQueue queue pPresentInfo); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ALWAYS_INLINE VkResult vkGetImageDrmFormatModifierPropertiesEXT( VkDevice device, VkImage image, -@@ -1245,4 +1245,4 @@ ALWAYS_INLINE VkResult vkGetImageDrmFormatModifierProp +@@ -1334,4 +1334,4 @@ ALWAYS_INLINE VkResult vkGetImageDrmFormatModifierProp } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#endif // GPU_VULKAN_VULKAN_FUNCTION_POINTERS_H_ \ No newline at end of file +#endif // GPU_VULKAN_VULKAN_FUNCTION_POINTERS_H_ diff --git a/www/ungoogled-chromium/files/patch-media_audio_BUILD.gn b/www/ungoogled-chromium/files/patch-media_audio_BUILD.gn index ca01a90d1d3b..63618bd95e2f 100644 --- a/www/ungoogled-chromium/files/patch-media_audio_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-media_audio_BUILD.gn @@ -1,24 +1,24 @@ ---- media/audio/BUILD.gn.orig 2023-09-17 07:59:53 UTC +--- media/audio/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ media/audio/BUILD.gn -@@ -279,9 +279,20 @@ source_set("audio") { +@@ -286,9 +286,20 @@ source_set("audio") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !use_sndio) { sources += [ "linux/audio_manager_linux.cc" ] } + + if (use_sndio) { + libs += [ "sndio" ] + sources += [ + "sndio/audio_manager_sndio.cc", + "sndio/sndio_input.cc", + "sndio/sndio_input.h", + "sndio/sndio_output.cc", + "sndio/sndio_output.h" + ] + } if (use_alsa) { libs += [ "asound" ] diff --git a/www/ungoogled-chromium/files/patch-media_base_media__switches.cc b/www/ungoogled-chromium/files/patch-media_base_media__switches.cc index 3f16ce02fb96..59cc03ed875d 100644 --- a/www/ungoogled-chromium/files/patch-media_base_media__switches.cc +++ b/www/ungoogled-chromium/files/patch-media_base_media__switches.cc @@ -1,65 +1,65 @@ ---- media/base/media_switches.cc.orig 2023-10-13 13:20:35 UTC +--- media/base/media_switches.cc.orig 2023-11-04 07:08:51 UTC +++ media/base/media_switches.cc @@ -17,7 +17,7 @@ #include "ui/gl/gl_features.h" #include "ui/gl/gl_utils.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/cpu.h" #endif -@@ -673,7 +673,7 @@ BASE_FEATURE(kFallbackAfterDecodeError, +@@ -694,7 +694,7 @@ BASE_FEATURE(kFallbackAfterDecodeError, // Show toolbar button that opens dialog for controlling media sessions. BASE_FEATURE(kGlobalMediaControls, "GlobalMediaControls", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -696,7 +696,7 @@ BASE_FEATURE(kGlobalMediaControlsCrOSUpdatedUI, +@@ -717,7 +717,7 @@ BASE_FEATURE(kGlobalMediaControlsCrOSUpdatedUI, // If enabled, users can request Media Remoting without fullscreen-in-tab. BASE_FEATURE(kMediaRemotingWithoutFullscreen, "MediaRemotingWithoutFullscreen", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -708,7 +708,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen, +@@ -729,7 +729,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen, BASE_FEATURE(kGlobalMediaControlsPictureInPicture, "GlobalMediaControlsPictureInPicture", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -752,7 +752,7 @@ BASE_FEATURE(kUnifiedAutoplay, +@@ -773,7 +773,7 @@ BASE_FEATURE(kUnifiedAutoplay, "UnifiedAutoplay", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enable vaapi video decoding on linux. This is already enabled by default on // chromeos, but needs an experiment on linux. BASE_FEATURE(kVaapiVideoDecodeLinux, -@@ -832,7 +832,7 @@ BASE_FEATURE(kVaapiVp9kSVCHWEncoding, - "VaapiVp9kSVCHWEncoding", - base::FEATURE_ENABLED_BY_DEFAULT); +@@ -857,7 +857,7 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding, + "VaapiVp9SModeHWEncoding", + base::FEATURE_DISABLED_BY_DEFAULT); #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables the new V4L2StatefulVideoDecoder instead of V4L2VideoDecoder. BASE_FEATURE(kV4L2FlatStatelessVideoDecoder, "V4L2FlatStatelessVideoDecoder", -@@ -1348,7 +1348,7 @@ const base::Feature MEDIA_EXPORT kUseOutOfProcessVideo +@@ -1392,7 +1392,7 @@ const base::Feature MEDIA_EXPORT kUseOutOfProcessVideo }; #endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Spawn utility processes to perform hardware encode acceleration instead of // using the GPU process. const base::Feature MEDIA_EXPORT kUseOutOfProcessVideoEncoding{ diff --git a/www/ungoogled-chromium/files/patch-media_base_media__switches.h b/www/ungoogled-chromium/files/patch-media_base_media__switches.h index 67826ad878de..5a52a65fc1c0 100644 --- a/www/ungoogled-chromium/files/patch-media_base_media__switches.h +++ b/www/ungoogled-chromium/files/patch-media_base_media__switches.h @@ -1,29 +1,29 @@ ---- media/base/media_switches.h.orig 2023-10-13 13:20:35 UTC +--- media/base/media_switches.h.orig 2023-11-04 07:08:51 UTC +++ media/base/media_switches.h -@@ -305,7 +305,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseElementInsteadOf +@@ -319,7 +319,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseElementInsteadOf MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseFakeDeviceForMediaStream); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseMediaHistoryStore); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseR16Texture); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinux); MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinuxGL); MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoEncodeLinux); -@@ -323,7 +323,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiH264TemporalLa - MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLayerHWEncoding); +@@ -338,7 +338,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLay MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9kSVCHWEncoding); + MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9SModeHWEncoding); #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatelessVideoDecoder); MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatefulVideoDecoder); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -443,7 +443,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kExposeOutOfProcessV +@@ -458,7 +458,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kExposeOutOfProcessV MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoDecoding); #endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoEncoding); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-media_base_video__frame.cc b/www/ungoogled-chromium/files/patch-media_base_video__frame.cc index 30ddf93e675e..6a615018885f 100644 --- a/www/ungoogled-chromium/files/patch-media_base_video__frame.cc +++ b/www/ungoogled-chromium/files/patch-media_base_video__frame.cc @@ -1,74 +1,74 @@ ---- media/base/video_frame.cc.orig 2023-10-13 13:20:35 UTC +--- media/base/video_frame.cc.orig 2023-11-04 07:08:51 UTC +++ media/base/video_frame.cc @@ -80,7 +80,7 @@ std::string VideoFrame::StorageTypeToString( return "OWNED_MEMORY"; case VideoFrame::STORAGE_SHMEM: return "SHMEM"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case VideoFrame::STORAGE_DMABUFS: return "DMABUFS"; #endif @@ -95,7 +95,7 @@ std::string VideoFrame::StorageTypeToString( // static bool VideoFrame::IsStorageTypeMappable(VideoFrame::StorageType storage_type) { return -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // This is not strictly needed but makes explicit that, at VideoFrame // level, DmaBufs are not mappable from userspace. storage_type != VideoFrame::STORAGE_DMABUFS && @@ -306,7 +306,7 @@ static absl::optional GetDefaultLayo return VideoFrameLayout::CreateWithPlanes(format, coded_size, planes); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // This class allows us to embed a vector into a scoped_refptr, and // thus to have several VideoFrames share the same set of DMABUF FDs. class VideoFrame::DmabufHolder -@@ -635,7 +635,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM +@@ -636,7 +636,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM for (size_t i = 0; i < num_planes; ++i) planes[i].stride = gpu_memory_buffer->stride(i); uint64_t modifier = gfx::NativePixmapHandle::kNoModifier; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (gpu_memory_buffer->GetType() == gfx::NATIVE_PIXMAP) { const auto gmb_handle = gpu_memory_buffer->CloneHandle(); if (gmb_handle.is_null() || -@@ -681,7 +681,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM +@@ -682,7 +682,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM return frame; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // static scoped_refptr VideoFrame::WrapExternalDmabufs( const VideoFrameLayout& layout, -@@ -902,7 +902,7 @@ scoped_refptr VideoFrame::WrapVideoFrame( +@@ -903,7 +903,7 @@ scoped_refptr VideoFrame::WrapVideoFrame( } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) DCHECK(frame->dmabuf_fds_); // If there are any |dmabuf_fds_| plugged in, we should refer them too. wrapping_frame->dmabuf_fds_ = frame->dmabuf_fds_; -@@ -1310,7 +1310,7 @@ const gpu::MailboxHolder& VideoFrame::mailbox_holder( +@@ -1311,7 +1311,7 @@ const gpu::MailboxHolder& VideoFrame::mailbox_holder( : mailbox_holders_[texture_index]; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const std::vector& VideoFrame::DmabufFds() const { DCHECK_EQ(storage_type_, STORAGE_DMABUFS); -@@ -1423,7 +1423,7 @@ VideoFrame::VideoFrame(const VideoFrameLayout& layout, +@@ -1424,7 +1424,7 @@ VideoFrame::VideoFrame(const VideoFrameLayout& layout, storage_type_(storage_type), visible_rect_(Intersection(visible_rect, gfx::Rect(layout.coded_size()))), natural_size_(natural_size), -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) dmabuf_fds_(base::MakeRefCounted()), #endif timestamp_(timestamp), diff --git a/www/ungoogled-chromium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc b/www/ungoogled-chromium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc index 99c6ea4d61ab..50cd194d1544 100644 --- a/www/ungoogled-chromium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc +++ b/www/ungoogled-chromium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc @@ -1,156 +1,156 @@ ---- media/capture/video/linux/v4l2_capture_delegate.cc.orig 2023-10-13 13:20:35 UTC +--- media/capture/video/linux/v4l2_capture_delegate.cc.orig 2023-11-04 07:08:51 UTC +++ media/capture/video/linux/v4l2_capture_delegate.cc -@@ -4,8 +4,10 @@ - +@@ -5,8 +5,10 @@ #include "media/capture/video/linux/v4l2_capture_delegate.h" + #include +#if !BUILDFLAG(IS_BSD) #include #include +#endif #include - #include #include + #include @@ -26,17 +28,19 @@ #include "media/capture/video/blob_utils.h" #include "media/capture/video/linux/video_capture_device_linux.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "media/capture/capture_switches.h" #include "media/capture/video/linux/v4l2_capture_delegate_gpu_helper.h" #endif // BUILDFLAG(IS_LINUX) using media::mojom::MeteringMode; +#if !BUILDFLAG(IS_BSD) #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) // 16 bit depth, Realsense F200. #define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') #endif +#endif // TODO(aleksandar.stojiljkovic): Wrap this with kernel version check once the // format is introduced to kernel. @@ -46,6 +50,14 @@ using media::mojom::MeteringMode; #define V4L2_PIX_FMT_INVZ v4l2_fourcc('I', 'N', 'V', 'Z') #endif +#ifndef V4L2_COLORSPACE_OPRGB +#define V4L2_COLORSPACE_OPRGB V4L2_COLORSPACE_ADOBERGB +#endif + +#ifndef V4L2_XFER_FUNC_OPRGB +#define V4L2_XFER_FUNC_OPRGB V4L2_XFER_FUNC_ADOBERGB +#endif + namespace media { namespace { @@ -260,7 +272,7 @@ bool V4L2CaptureDelegate::IsBlockedControl(int control // static bool V4L2CaptureDelegate::IsControllableControl( int control_id, - const base::RepeatingCallback& do_ioctl) { + const base::RepeatingCallback& do_ioctl) { const int special_control_id = GetControllingSpecialControl(control_id); if (!special_control_id) { // The control is not controlled by a special control thus the control is @@ -316,7 +328,7 @@ V4L2CaptureDelegate::V4L2CaptureDelegate( is_capturing_(false), timeout_count_(0), rotation_(rotation) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) use_gpu_buffer_ = switches::IsVideoCaptureUseGpuMemoryBufferEnabled(); #endif // BUILDFLAG(IS_LINUX) } @@ -443,7 +455,7 @@ void V4L2CaptureDelegate::AllocateAndStart( client_->OnStarted(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (use_gpu_buffer_) { v4l2_gpu_helper_ = std::make_unique( std::move(gmb_support_test_)); @@ -793,7 +805,7 @@ void V4L2CaptureDelegate::SetGPUEnvironmentForTesting( V4L2CaptureDelegate::~V4L2CaptureDelegate() = default; -bool V4L2CaptureDelegate::RunIoctl(int request, void* argp) { +bool V4L2CaptureDelegate::RunIoctl(unsigned int request, void* argp) { int num_retries = 0; for (; DoIoctl(request, argp) < 0 && num_retries < kMaxIOCtrlRetries; ++num_retries) { @@ -803,7 +815,7 @@ bool V4L2CaptureDelegate::RunIoctl(int request, void* return num_retries != kMaxIOCtrlRetries; } -int V4L2CaptureDelegate::DoIoctl(int request, void* argp) { +int V4L2CaptureDelegate::DoIoctl(unsigned int request, void* argp) { return HANDLE_EINTR(v4l2_->ioctl(device_fd_.get(), request, argp)); } @@ -814,6 +826,7 @@ bool V4L2CaptureDelegate::IsControllableControl(int co } void V4L2CaptureDelegate::ReplaceControlEventSubscriptions() { +#if !BUILDFLAG(IS_BSD) constexpr uint32_t kControlIds[] = {V4L2_CID_AUTO_EXPOSURE_BIAS, V4L2_CID_AUTO_WHITE_BALANCE, V4L2_CID_BRIGHTNESS, @@ -841,6 +854,7 @@ void V4L2CaptureDelegate::ReplaceControlEventSubscript << ", {type = V4L2_EVENT_CTRL, id = " << control_id << "}"; } } +#endif } mojom::RangePtr V4L2CaptureDelegate::RetrieveUserControlRange(int control_id) { @@ -1021,7 +1035,11 @@ void V4L2CaptureDelegate::DoCapture() { pollfd device_pfd = {}; device_pfd.fd = device_fd_.get(); +#if !BUILDFLAG(IS_BSD) device_pfd.events = POLLIN | POLLPRI; +#else + device_pfd.events = POLLIN; +#endif const int result = HANDLE_EINTR(v4l2_->poll(&device_pfd, 1, kCaptureTimeoutMs)); @@ -1059,6 +1077,7 @@ void V4L2CaptureDelegate::DoCapture() { timeout_count_ = 0; } +#if !BUILDFLAG(IS_BSD) // Dequeue events if the driver has filled in some. if (device_pfd.revents & POLLPRI) { bool controls_changed = false; @@ -1093,6 +1112,7 @@ void V4L2CaptureDelegate::DoCapture() { client_->OnCaptureConfigurationChanged(); } } +#endif // Deenqueue, send and reenqueue a buffer if the driver has filled one in. if (device_pfd.revents & POLLIN) { @@ -1146,7 +1166,7 @@ void V4L2CaptureDelegate::DoCapture() { // workable on Linux. // See http://crbug.com/959919. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (use_gpu_buffer_) { v4l2_gpu_helper_->OnIncomingCapturedData( client_.get(), buffer_tracker->start(), @@ -1219,7 +1239,7 @@ void V4L2CaptureDelegate::SetErrorState(VideoCaptureEr client_->OnError(error, from_here, reason); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gfx::ColorSpace V4L2CaptureDelegate::BuildColorSpaceFromv4l2() { v4l2_colorspace v4l2_primary = (v4l2_colorspace)video_fmt_.fmt.pix.colorspace; v4l2_quantization v4l2_range = diff --git a/www/ungoogled-chromium/files/patch-media_gpu_buffer__validation.cc b/www/ungoogled-chromium/files/patch-media_gpu_buffer__validation.cc index 26c5fe14fc16..3ab8ed306107 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_buffer__validation.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_buffer__validation.cc @@ -1,29 +1,29 @@ ---- media/gpu/buffer_validation.cc.orig 2023-06-05 19:39:05 UTC +--- media/gpu/buffer_validation.cc.orig 2023-11-04 07:08:51 UTC +++ media/gpu/buffer_validation.cc @@ -15,7 +15,7 @@ #include "ui/gfx/geometry/size.h" #include "ui/gfx/gpu_memory_buffer.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -23,7 +23,7 @@ namespace media { bool GetFileSize(const int fd, size_t* size) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (fd < 0) { VLOG(1) << "Invalid file descriptor"; return false; -@@ -76,7 +76,7 @@ bool VerifyGpuMemoryBufferHandle( +@@ -77,7 +77,7 @@ bool VerifyGpuMemoryBufferHandle( VLOG(1) << "Unsupported: " << pixel_format; return false; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const size_t num_planes = media::VideoFrame::NumPlanes(pixel_format); if (num_planes != gmb_handle.native_pixmap_handle.planes.size() || num_planes == 0) { diff --git a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc new file mode 100644 index 000000000000..8ac777ee5f7f --- /dev/null +++ b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc @@ -0,0 +1,11 @@ +--- media/gpu/chromeos/mailbox_video_frame_converter.cc.orig 2023-11-04 07:08:51 UTC ++++ media/gpu/chromeos/mailbox_video_frame_converter.cc +@@ -59,7 +59,7 @@ viz::SharedImageFormat GetSharedImageFormat(gfx::Buffe + << static_cast(buffer_format); + NOTREACHED_NORETURN(); + } +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // If format is true multiplanar format, we prefer external sampler on + // ChromeOS and Linux. + if (format.is_multi_plane()) { diff --git a/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc b/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc index 9c6bfca5870b..896887e8d04e 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc @@ -1,56 +1,47 @@ ---- media/gpu/vaapi/vaapi_wrapper.cc.orig 2023-10-13 13:20:35 UTC +--- media/gpu/vaapi/vaapi_wrapper.cc.orig 2023-11-04 07:08:51 UTC +++ media/gpu/vaapi/vaapi_wrapper.cc -@@ -70,7 +70,7 @@ +@@ -82,7 +82,7 @@ extern "C" { using media_gpu_vaapi::kModuleVa_prot; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/files/file_util.h" #include "base/strings/string_split.h" #endif -@@ -1441,7 +1441,7 @@ bool IsVBREncodingSupported(VAProfile va_profile) { +@@ -1506,7 +1506,7 @@ bool IsVBREncodingSupported(VAProfile va_profile) { return VASupportedProfiles::Get().IsProfileSupported(mode, va_profile); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Some VA-API drivers (vdpau-va-driver) will crash if used with VA/DRM on // NVIDIA GPUs. This function checks if such drivers are present. bool IsBrokenNvidiaVaapiDriverPresent() { -@@ -1502,7 +1502,7 @@ void VADisplayStateSingleton::PreSandboxInitialization +@@ -1567,7 +1567,7 @@ void VADisplayStateSingleton::PreSandboxInitialization VADisplayStateSingleton& va_display_state = GetInstance(); base::AutoLock lock(va_display_state.lock_); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::string va_driver_name; auto env = base::Environment::Create(); if (env->GetVar("LIBVA_DRIVER_NAME", &va_driver_name) && -@@ -1539,7 +1539,7 @@ void VADisplayStateSingleton::PreSandboxInitialization +@@ -1604,7 +1604,7 @@ void VADisplayStateSingleton::PreSandboxInitialization if (base::EqualsCaseInsensitiveASCII(version_name, "vgem")) { continue; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Skip NVIDIA GPUs if the VA-API driver used for them is known for crashing // with VA/DRM. if (is_nvidia_va_drm_broken && -@@ -1572,7 +1572,7 @@ VADisplayStateHandle VADisplayStateSingleton::GetHandl +@@ -1637,7 +1637,7 @@ VADisplayStateHandle VADisplayStateSingleton::GetHandl return {}; } -#if BUILDFLAG(IS_OZONE) && BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_OZONE) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) // TODO(crbug.com/1116701): add vaapi support for other Ozone platforms on // Linux. See comment in OzonePlatform::PlatformProperties::supports_vaapi // for more details. This will also require revisiting everything that's -@@ -2403,7 +2403,7 @@ scoped_refptr VaapiWrapper::CreateVASurface - return nullptr; - } - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // TODO(crbug.com/1326754): enable use DRIME_PRIME_2 API on Linux with the - // iHD driver. - const bool use_drm_prime_2 = false; diff --git a/www/ungoogled-chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc b/www/ungoogled-chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc index 2d75a82caf1e..414326c81986 100644 --- a/www/ungoogled-chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc +++ b/www/ungoogled-chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc @@ -1,29 +1,29 @@ ---- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2023-10-13 13:20:35 UTC +--- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2023-11-04 07:08:51 UTC +++ media/video/gpu_memory_buffer_video_frame_pool.cc -@@ -727,7 +727,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa +@@ -773,7 +773,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa } bool is_software_backed_video_frame = !video_frame->HasTextures(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) is_software_backed_video_frame &= !video_frame->HasDmaBufs(); #endif -@@ -1199,7 +1199,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo +@@ -1223,7 +1223,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) is_webgpu_compatible = (gpu_memory_buffer != nullptr); if (is_webgpu_compatible) { is_webgpu_compatible &= -@@ -1218,7 +1218,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo +@@ -1242,7 +1242,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo gpu::SHARED_IMAGE_USAGE_DISPLAY_READ | gpu::SHARED_IMAGE_USAGE_SCANOUT; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1241537): Always add the flag once the // OzoneImageBacking is by default turned on. if (base::CommandLine::ForCurrentProcess()->HasSwitch( diff --git a/www/ungoogled-chromium/files/patch-mojo_public_c_system_thunks.cc b/www/ungoogled-chromium/files/patch-mojo_public_c_system_thunks.cc index e55a982865a3..707e39658eb1 100644 --- a/www/ungoogled-chromium/files/patch-mojo_public_c_system_thunks.cc +++ b/www/ungoogled-chromium/files/patch-mojo_public_c_system_thunks.cc @@ -1,38 +1,38 @@ ---- mojo/public/c/system/thunks.cc.orig 2022-12-02 17:56:32 UTC +--- mojo/public/c/system/thunks.cc.orig 2023-11-04 07:08:51 UTC +++ mojo/public/c/system/thunks.cc -@@ -23,7 +23,7 @@ +@@ -24,7 +24,7 @@ #include "mojo/public/c/system/message_pipe.h" #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "base/environment.h" #include "base/files/file_path.h" #include "base/scoped_native_library.h" -@@ -72,7 +72,7 @@ class CoreLibraryInitializer { +@@ -73,7 +73,7 @@ class CoreLibraryInitializer { MojoResult LoadLibrary(base::FilePath library_path) { #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) if (library_ && library_->is_valid()) return MOJO_RESULT_OK; -@@ -86,7 +86,7 @@ class CoreLibraryInitializer { +@@ -87,7 +87,7 @@ class CoreLibraryInitializer { if (library_path.empty()) { // Default to looking for the library in the current working directory. -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const base::FilePath::CharType kDefaultLibraryPathValue[] = FILE_PATH_LITERAL("./libmojo_core.so"); #elif BUILDFLAG(IS_FUCHSIA) -@@ -142,7 +142,7 @@ class CoreLibraryInitializer { +@@ -143,7 +143,7 @@ class CoreLibraryInitializer { private: #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) absl::optional library_; #endif }; diff --git a/www/ungoogled-chromium/files/patch-net_BUILD.gn b/www/ungoogled-chromium/files/patch-net_BUILD.gn index 5afcff197dda..a720dd59132b 100644 --- a/www/ungoogled-chromium/files/patch-net_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-net_BUILD.gn @@ -1,78 +1,78 @@ ---- net/BUILD.gn.orig 2023-10-13 13:20:35 UTC +--- net/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ net/BUILD.gn @@ -122,7 +122,7 @@ net_configs = [ "//build/config/compiler:wexit_time_destructors", ] -if (is_linux || is_chromeos) { +if ((is_linux || is_chromeos) && !is_bsd) { net_configs += [ "//build/config/linux:libresolv" ] } -@@ -1246,6 +1246,19 @@ component("net") { +@@ -1244,6 +1244,19 @@ component("net") { deps += [ "//third_party/xdg_shared_mime_info" ] } + if (is_bsd) { + sources -= [ + "base/address_map_cache_linux.cc", + "base/address_map_cache_linux.h", + "base/address_map_linux.cc", + "base/address_map_linux.h", + "base/address_tracker_linux.cc", + "base/address_tracker_linux.h", + "base/network_change_notifier_linux.cc", + "base/network_interfaces_linux.cc", + ] + } + if (is_mac) { sources += [ "base/network_notification_thread_mac.cc", -@@ -1401,7 +1414,7 @@ component("net") { +@@ -1400,7 +1413,7 @@ component("net") { } # Use getifaddrs() on POSIX platforms, except Linux. - if (is_posix && !is_linux && !is_chromeos) { + if ((is_posix && !is_linux && !is_chromeos) || is_bsd) { sources += [ "base/network_interfaces_getifaddrs.cc", "base/network_interfaces_getifaddrs.h", -@@ -2896,7 +2909,7 @@ test("net_unittests") { +@@ -2893,7 +2906,7 @@ test("net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "base/address_tracker_linux_unittest.cc", "base/network_interfaces_linux_unittest.cc", -@@ -2964,6 +2977,10 @@ test("net_unittests") { +@@ -2965,6 +2978,10 @@ test("net_unittests") { "//url:buildflags", ] + if (is_bsd) { + deps += [ "//sandbox/policy" ] + } + if (enable_websockets) { deps += [ "//net/server:tests" ] } @@ -3046,7 +3063,7 @@ test("net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "tools/quic/quic_simple_server_test.cc" ] } @@ -3181,7 +3198,7 @@ test("net_unittests") { } # Use getifaddrs() on POSIX platforms, except Linux. - if (is_posix && !is_linux && !is_chromeos) { + if (is_posix && !is_linux && !is_chromeos && !is_bsd) { sources += [ "base/network_interfaces_getifaddrs_unittest.cc" ] } diff --git a/www/ungoogled-chromium/files/patch-net_base_features.cc b/www/ungoogled-chromium/files/patch-net_base_features.cc index 3d360d487df6..adfeba5868bf 100644 --- a/www/ungoogled-chromium/files/patch-net_base_features.cc +++ b/www/ungoogled-chromium/files/patch-net_base_features.cc @@ -1,11 +1,11 @@ ---- net/base/features.cc.orig 2023-09-17 07:59:53 UTC +--- net/base/features.cc.orig 2023-11-04 07:08:51 UTC +++ net/base/features.cc -@@ -179,7 +179,7 @@ BASE_FEATURE(kCertDualVerificationTrialFeature, +@@ -171,7 +171,7 @@ BASE_FEATURE(kSameSiteDefaultChecksMethodRigorously, #if BUILDFLAG(CHROME_ROOT_STORE_OPTIONAL) BASE_FEATURE(kChromeRootStoreUsed, "ChromeRootStoreUsed", -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc__unittest.cc b/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc__unittest.cc index f5c1e1364dea..904b57c1fb63 100644 --- a/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc__unittest.cc +++ b/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc__unittest.cc @@ -1,20 +1,20 @@ ---- net/cert/cert_verify_proc_unittest.cc.orig 2023-08-18 10:26:52 UTC +--- net/cert/cert_verify_proc_unittest.cc.orig 2023-11-04 07:08:51 UTC +++ net/cert/cert_verify_proc_unittest.cc -@@ -215,7 +215,7 @@ scoped_refptr CreateCertVerifyProc( +@@ -213,7 +213,7 @@ scoped_refptr CreateCertVerifyProc( case CERT_VERIFY_PROC_IOS: return base::MakeRefCounted(std::move(crl_set)); #endif -#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case CERT_VERIFY_PROC_BUILTIN: return CreateCertVerifyProcBuiltin(std::move(cert_net_fetcher), std::move(crl_set), -@@ -244,7 +244,7 @@ constexpr CertVerifyProcType kAllCertVerifiers[] = { +@@ -242,7 +242,7 @@ constexpr CertVerifyProcType kAllCertVerifiers[] = { CERT_VERIFY_PROC_ANDROID, #elif BUILDFLAG(IS_IOS) CERT_VERIFY_PROC_IOS, -#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) CERT_VERIFY_PROC_BUILTIN, #endif #if BUILDFLAG(CHROME_ROOT_STORE_SUPPORTED) diff --git a/www/ungoogled-chromium/files/patch-net_cert_pki_general__names.h b/www/ungoogled-chromium/files/patch-net_cert_pki_general__names.h index 15206e0fcc1c..438450760ea8 100644 --- a/www/ungoogled-chromium/files/patch-net_cert_pki_general__names.h +++ b/www/ungoogled-chromium/files/patch-net_cert_pki_general__names.h @@ -1,10 +1,10 @@ ---- net/cert/pki/general_names.h.orig 2023-10-13 13:20:35 UTC +--- net/cert/pki/general_names.h.orig 2023-11-04 07:08:51 UTC +++ net/cert/pki/general_names.h -@@ -7,6 +7,7 @@ - +@@ -8,6 +8,7 @@ #include + #include #include +#include #include "net/base/net_export.h" #include "net/cert/pki/cert_error_id.h" diff --git a/www/ungoogled-chromium/files/patch-net_dns_host__resolver__cache.cc b/www/ungoogled-chromium/files/patch-net_dns_host__resolver__cache.cc deleted file mode 100644 index 6d933a689058..000000000000 --- a/www/ungoogled-chromium/files/patch-net_dns_host__resolver__cache.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- net/dns/host_resolver_cache.cc.orig 2023-09-17 07:59:53 UTC -+++ net/dns/host_resolver_cache.cc -@@ -161,7 +161,11 @@ void HostResolverCache::Set( - - std::string domain_name = result->domain_name(); - entries_.emplace( -+#if defined(__clang__) && (__clang_major__ >= 16) - Key(std::move(domain_name), network_anonymization_key), -+#else -+ Key({std::move(domain_name), network_anonymization_key}), -+#endif - Entry(std::move(result), source, secure, staleness_generation_)); - - if (entries_.size() > max_entries_) { diff --git a/www/ungoogled-chromium/files/patch-net_dns_public_BUILD.gn b/www/ungoogled-chromium/files/patch-net_dns_public_BUILD.gn index dc480ab2a93b..20ec36316f49 100644 --- a/www/ungoogled-chromium/files/patch-net_dns_public_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-net_dns_public_BUILD.gn @@ -1,11 +1,11 @@ ---- net/dns/public/BUILD.gn.orig 2022-10-29 17:50:56 UTC +--- net/dns/public/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ net/dns/public/BUILD.gn -@@ -76,7 +76,7 @@ source_set("tests") { +@@ -77,7 +77,7 @@ source_set("tests") { "doh_provider_entry_unittest.cc", ] - if (is_posix && !is_android) { + if (is_posix && !is_android && !is_bsd) { sources += [ "resolv_reader_unittest.cc" ] } diff --git a/www/ungoogled-chromium/files/patch-net_third__party_quiche_BUILD.gn b/www/ungoogled-chromium/files/patch-net_third__party_quiche_BUILD.gn index ac6b6c078435..8343348d714a 100644 --- a/www/ungoogled-chromium/files/patch-net_third__party_quiche_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-net_third__party_quiche_BUILD.gn @@ -1,11 +1,11 @@ ---- net/third_party/quiche/BUILD.gn.orig 2022-12-02 17:56:32 UTC +--- net/third_party/quiche/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ net/third_party/quiche/BUILD.gn -@@ -28,7 +28,7 @@ import("//build/config/chromeos/ui_mode.gni") +@@ -29,7 +29,7 @@ import("//net/third_party/quiche/src/build/source_list import("//testing/libfuzzer/fuzzer_test.gni") import("//third_party/protobuf/proto_library.gni") -build_epoll_based_tools = is_linux || is_chromeos +build_epoll_based_tools = (is_linux && !is_bsd) || is_chromeos config("quiche_internal_config") { cflags = [] diff --git a/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__comparision__tool.cc b/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__comparision__tool.cc index 4a88afd68296..5f3cc8b7932c 100644 --- a/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__comparision__tool.cc +++ b/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__comparision__tool.cc @@ -1,29 +1,29 @@ ---- net/tools/cert_verify_tool/cert_verify_comparision_tool.cc.orig 2023-06-05 19:39:05 UTC +--- net/tools/cert_verify_tool/cert_verify_comparision_tool.cc.orig 2023-11-04 07:08:51 UTC +++ net/tools/cert_verify_tool/cert_verify_comparision_tool.cc -@@ -35,7 +35,7 @@ +@@ -34,7 +34,7 @@ #include "net/url_request/url_request_context_builder.h" #include "net/url_request/url_request_context_getter.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "net/proxy_resolution/proxy_config.h" #include "net/proxy_resolution/proxy_config_service_fixed.h" #endif -@@ -55,7 +55,7 @@ void SetUpOnNetworkThread( +@@ -54,7 +54,7 @@ void SetUpOnNetworkThread( base::WaitableEvent* initialization_complete_event) { net::URLRequestContextBuilder url_request_context_builder; url_request_context_builder.set_user_agent(GetUserAgent()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux, use a fixed ProxyConfigService, since the default one // depends on glib. // -@@ -126,7 +126,7 @@ class CertVerifyImpl { +@@ -125,7 +125,7 @@ class CertVerifyImpl { std::unique_ptr CreateCertVerifyImplFromName( base::StringPiece impl_name, scoped_refptr cert_net_fetcher) { -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY)) if (impl_name == "platform") { return std::make_unique( diff --git a/www/ungoogled-chromium/files/patch-printing_mojom_printing__context__mojom__traits.cc b/www/ungoogled-chromium/files/patch-printing_mojom_printing__context__mojom__traits.cc index b99ac019c58e..ae21ff42a942 100644 --- a/www/ungoogled-chromium/files/patch-printing_mojom_printing__context__mojom__traits.cc +++ b/www/ungoogled-chromium/files/patch-printing_mojom_printing__context__mojom__traits.cc @@ -1,29 +1,29 @@ ---- printing/mojom/printing_context_mojom_traits.cc.orig 2023-10-13 13:20:35 UTC +--- printing/mojom/printing_context_mojom_traits.cc.orig 2023-11-04 07:08:51 UTC +++ printing/mojom/printing_context_mojom_traits.cc @@ -19,7 +19,7 @@ #include "base/numerics/safe_conversions.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "mojo/public/mojom/base/values.mojom.h" #endif @@ -161,7 +161,7 @@ bool StructTraits< } out->set_pages_per_sheet(data.pages_per_sheet()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) DCHECK(out->advanced_settings().empty()); if (!data.ReadAdvancedSettings(&out->advanced_settings())) return false; -@@ -239,7 +239,7 @@ bool StructTraits< +@@ -238,7 +238,7 @@ bool StructTraits< + if (system_print_dialog_data.size() != dictionary_entries) { return false; } - -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // The dictionary must contain three strings. - base::Value* value = system_print_dialog_data.Find( + const base::Value* value = system_print_dialog_data.Find( printing::kLinuxSystemPrintDialogDataPrinter); diff --git a/www/ungoogled-chromium/files/patch-remoting_host_client__session.cc b/www/ungoogled-chromium/files/patch-remoting_host_client__session.cc new file mode 100644 index 000000000000..efc9a595baee --- /dev/null +++ b/www/ungoogled-chromium/files/patch-remoting_host_client__session.cc @@ -0,0 +1,11 @@ +--- remoting/host/client_session.cc.orig 2023-11-04 07:08:51 UTC ++++ remoting/host/client_session.cc +@@ -157,7 +157,7 @@ void ClientSession::NotifyClientResolution( + if (desktop_environment_options_.enable_curtaining()) { + dpi_vector.set(resolution.x_dpi(), resolution.y_dpi()); + } +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + dpi_vector.set(resolution.x_dpi(), resolution.y_dpi()); + #endif + diff --git a/www/ungoogled-chromium/files/patch-services_cert__verifier_cert__verifier__creation.cc b/www/ungoogled-chromium/files/patch-services_cert__verifier_cert__verifier__creation.cc index d0df337ca615..b9bb6a8b0eb0 100644 --- a/www/ungoogled-chromium/files/patch-services_cert__verifier_cert__verifier__creation.cc +++ b/www/ungoogled-chromium/files/patch-services_cert__verifier_cert__verifier__creation.cc @@ -1,28 +1,28 @@ ---- services/cert_verifier/cert_verifier_creation.cc.orig 2023-08-18 10:26:52 UTC +--- services/cert_verifier/cert_verifier_creation.cc.orig 2023-11-04 07:08:51 UTC +++ services/cert_verifier/cert_verifier_creation.cc @@ -13,7 +13,7 @@ #include "net/cert/multi_threaded_cert_verifier.h" #include "net/net_buildflags.h" -#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "net/cert/cert_verify_proc_builtin.h" #include "net/cert/internal/system_trust_store.h" #endif -@@ -112,7 +112,7 @@ class CertVerifyProcFactoryImpl : public net::CertVeri +@@ -108,7 +108,7 @@ class CertVerifyProcFactoryImpl : public net::CertVeri user_slot_restriction_ ? crypto::ScopedPK11Slot(PK11_ReferenceSlot( user_slot_restriction_.get())) : nullptr)); -#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return net::CreateCertVerifyProcBuiltin(std::move(cert_net_fetcher), std::move(crl_set), net::CreateSslSystemTrustStore()); -@@ -212,6 +212,7 @@ std::unique_ptr Cr +@@ -174,6 +174,7 @@ class CertVerifyProcFactoryImpl : public net::CertVeri bool IsUsingCertNetFetcher() { #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || \ + BUILDFLAG(IS_BSD) || \ - BUILDFLAG(TRIAL_COMPARISON_CERT_VERIFIER_SUPPORTED) || \ BUILDFLAG(CHROME_ROOT_STORE_SUPPORTED) return true; + #else diff --git a/www/ungoogled-chromium/files/patch-services_device_BUILD.gn b/www/ungoogled-chromium/files/patch-services_device_BUILD.gn index dd24c65f7064..eb91afd9270d 100644 --- a/www/ungoogled-chromium/files/patch-services_device_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-services_device_BUILD.gn @@ -1,11 +1,11 @@ ---- services/device/BUILD.gn.orig 2022-12-02 17:56:32 UTC +--- services/device/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ services/device/BUILD.gn -@@ -16,7 +16,7 @@ if (is_android) { +@@ -13,7 +13,7 @@ if (is_android) { } is_serial_enabled_platform = - is_win || ((is_linux || is_chromeos) && use_udev) || is_mac + is_win || ((!is_bsd && is_linux || is_chromeos) && use_udev) || is_mac source_set("lib") { # This should be visible only to embedders of the Device Service, and the diff --git a/www/ungoogled-chromium/files/patch-services_device_public_cpp_generic__sensor_sensor__reading.h b/www/ungoogled-chromium/files/patch-services_device_public_cpp_generic__sensor_sensor__reading.h index b3a9ffc5e01a..3f1e818fb39d 100644 --- a/www/ungoogled-chromium/files/patch-services_device_public_cpp_generic__sensor_sensor__reading.h +++ b/www/ungoogled-chromium/files/patch-services_device_public_cpp_generic__sensor_sensor__reading.h @@ -1,11 +1,11 @@ ---- services/device/public/cpp/generic_sensor/sensor_reading.h.orig 2023-10-13 13:20:35 UTC +--- services/device/public/cpp/generic_sensor/sensor_reading.h.orig 2023-11-04 07:08:51 UTC +++ services/device/public/cpp/generic_sensor/sensor_reading.h -@@ -5,6 +5,8 @@ - #ifndef SERVICES_DEVICE_PUBLIC_CPP_GENERIC_SENSOR_SENSOR_READING_H_ - #define SERVICES_DEVICE_PUBLIC_CPP_GENERIC_SENSOR_SENSOR_READING_H_ +@@ -8,6 +8,8 @@ + #include + #include +#include + #include namespace device { diff --git a/www/ungoogled-chromium/files/patch-services_device_usb_BUILD.gn b/www/ungoogled-chromium/files/patch-services_device_usb_BUILD.gn index d7469b4c51b0..bf0f26b44369 100644 --- a/www/ungoogled-chromium/files/patch-services_device_usb_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-services_device_usb_BUILD.gn @@ -1,52 +1,52 @@ ---- services/device/usb/BUILD.gn.orig 2023-09-17 07:59:53 UTC +--- services/device/usb/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ services/device/usb/BUILD.gn -@@ -89,15 +89,17 @@ static_library("usb") { +@@ -90,15 +90,17 @@ static_library("usb") { deps += [ "//third_party/re2" ] } - if (is_mac) { - sources += [ - "usb_device_handle_mac.cc", - "usb_device_handle_mac.h", - "usb_device_mac.cc", - "usb_device_mac.h", - "usb_service_mac.cc", - "usb_service_mac.h", - ] + if (is_mac || is_openbsd) { + if (is_mac) { + sources += [ + "usb_device_handle_mac.cc", + "usb_device_handle_mac.h", + "usb_device_mac.cc", + "usb_device_mac.h", + "usb_service_mac.cc", + "usb_service_mac.h", + ] + } # These sources and deps are required for libusb. # TODO(https://crbug.com/1096743) Remove these sources. -@@ -121,6 +123,13 @@ static_library("usb") { +@@ -122,6 +124,13 @@ static_library("usb") { deps += [ "//third_party/libusb" ] } + if (is_freebsd) { + sources += [ + "usb_service_fake.cc", + "usb_service_fake.h", + ] + } + if (is_linux || is_chromeos) { sources += [ "usb_device_linux.cc", -@@ -138,7 +147,7 @@ static_library("usb") { +@@ -139,7 +148,7 @@ static_library("usb") { deps += [ "//device/udev_linux" ] } - if (is_android || is_chromeos || is_linux) { + if (is_android || is_chromeos || is_linux && !is_bsd) { sources += [ "usb_device_handle_usbfs.cc", "usb_device_handle_usbfs.h", diff --git a/www/ungoogled-chromium/files/patch-services_network_BUILD.gn b/www/ungoogled-chromium/files/patch-services_network_BUILD.gn index d81adfc1d056..23d3fc68e3a1 100644 --- a/www/ungoogled-chromium/files/patch-services_network_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-services_network_BUILD.gn @@ -1,10 +1,10 @@ ---- services/network/BUILD.gn.orig 2023-10-13 13:20:35 UTC +--- services/network/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ services/network/BUILD.gn -@@ -392,7 +392,6 @@ if (is_linux || is_chromeos) { +@@ -391,7 +391,6 @@ if (is_linux || is_chromeos) { ] deps = [ "//base:base", - "//sandbox/linux:sandbox_services", "//sandbox/policy:policy", ] } diff --git a/www/ungoogled-chromium/files/patch-services_network_network__context.cc b/www/ungoogled-chromium/files/patch-services_network_network__context.cc index 3fbc9ff7c7cf..7233b57f5c72 100644 --- a/www/ungoogled-chromium/files/patch-services_network_network__context.cc +++ b/www/ungoogled-chromium/files/patch-services_network_network__context.cc @@ -1,20 +1,20 @@ ---- services/network/network_context.cc.orig 2023-10-13 13:20:35 UTC +--- services/network/network_context.cc.orig 2023-11-04 07:08:51 UTC +++ services/network/network_context.cc -@@ -447,7 +447,7 @@ NetworkContext::NetworkContextHttpAuthPreferences:: +@@ -446,7 +446,7 @@ NetworkContext::NetworkContextHttpAuthPreferences:: NetworkContext::NetworkContextHttpAuthPreferences:: ~NetworkContextHttpAuthPreferences() = default; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool NetworkContext::NetworkContextHttpAuthPreferences::AllowGssapiLibraryLoad() const { if (network_service_) { -@@ -2301,7 +2301,7 @@ void NetworkContext::OnHttpAuthDynamicParamsChanged( +@@ -2364,7 +2364,7 @@ void NetworkContext::OnHttpAuthDynamicParamsChanged( http_auth_dynamic_network_service_params->android_negotiate_account_type); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) http_auth_merged_preferences_.set_allow_gssapi_library_load( http_auth_dynamic_network_service_params->allow_gssapi_library_load); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-services_network_network__context.h b/www/ungoogled-chromium/files/patch-services_network_network__context.h index a735eeb2b286..34b1e7850ef8 100644 --- a/www/ungoogled-chromium/files/patch-services_network_network__context.h +++ b/www/ungoogled-chromium/files/patch-services_network_network__context.h @@ -1,11 +1,11 @@ ---- services/network/network_context.h.orig 2023-10-13 13:20:35 UTC +--- services/network/network_context.h.orig 2023-11-04 07:08:51 UTC +++ services/network/network_context.h -@@ -667,7 +667,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -675,7 +675,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext public: explicit NetworkContextHttpAuthPreferences(NetworkService* network_service); ~NetworkContextHttpAuthPreferences() override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool AllowGssapiLibraryLoad() const override; #endif // BUILDFLAG(IS_LINUX) private: diff --git a/www/ungoogled-chromium/files/patch-services_network_public_cpp_BUILD.gn b/www/ungoogled-chromium/files/patch-services_network_public_cpp_BUILD.gn index d92b36f8faf4..2260c73cf9f6 100644 --- a/www/ungoogled-chromium/files/patch-services_network_public_cpp_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-services_network_public_cpp_BUILD.gn @@ -1,11 +1,11 @@ ---- services/network/public/cpp/BUILD.gn.orig 2023-09-17 07:59:53 UTC +--- services/network/public/cpp/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ services/network/public/cpp/BUILD.gn -@@ -475,7 +475,7 @@ component("cpp_base") { +@@ -471,7 +471,7 @@ component("cpp_base") { sources += [ "transferable_directory_fuchsia.cc" ] } - if (is_linux) { + if (is_linux && !is_bsd) { sources += [ "network_interface_change_listener_mojom_traits.cc", "network_interface_change_listener_mojom_traits.h", diff --git a/www/ungoogled-chromium/files/patch-services_network_public_cpp_features.cc b/www/ungoogled-chromium/files/patch-services_network_public_cpp_features.cc index de4d5d0b1dbe..1f21f629cb8f 100644 --- a/www/ungoogled-chromium/files/patch-services_network_public_cpp_features.cc +++ b/www/ungoogled-chromium/files/patch-services_network_public_cpp_features.cc @@ -1,11 +1,11 @@ ---- services/network/public/cpp/features.cc.orig 2023-10-13 13:20:35 UTC +--- services/network/public/cpp/features.cc.orig 2023-11-04 07:08:51 UTC +++ services/network/public/cpp/features.cc -@@ -378,7 +378,7 @@ BASE_FEATURE(kPrivateNetworkAccessPermissionPrompt, +@@ -371,7 +371,7 @@ BASE_FEATURE(kPrivateNetworkAccessPermissionPrompt, // that can be adequately sandboxed. BASE_FEATURE(kOutOfProcessSystemDnsResolution, "OutOfProcessSystemDnsResolution", -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/ungoogled-chromium/files/patch-services_network_public_mojom_BUILD.gn b/www/ungoogled-chromium/files/patch-services_network_public_mojom_BUILD.gn index cb88803049aa..b2907ddb58a8 100644 --- a/www/ungoogled-chromium/files/patch-services_network_public_mojom_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-services_network_public_mojom_BUILD.gn @@ -1,25 +1,25 @@ ---- services/network/public/mojom/BUILD.gn.orig 2023-09-17 07:59:53 UTC +--- services/network/public/mojom/BUILD.gn.orig 2023-11-04 07:08:51 UTC +++ services/network/public/mojom/BUILD.gn @@ -515,11 +515,11 @@ mojom("url_loader_base") { } enabled_features = [] - if (is_android || is_chromeos || is_linux) { + if (!is_bsd && (is_android || is_chromeos || is_linux)) { enabled_features += [ "network_change_notifier_in_browser" ] } - if (is_linux) { + if (is_linux && !is_bsd) { # TODO(crbug.com/1431866): Remove this once is_linux in the mojom IDL does # not include lacros. enabled_features += [ "use_network_interface_change_listener" ] -@@ -1435,7 +1435,7 @@ mojom("mojom") { +@@ -1431,7 +1431,7 @@ mojom("mojom") { } } - if (is_linux) { + if (is_linux && !is_bsd) { # TODO(crbug.com/1431866): Remove this once is_linux in the mojom IDL does # not include lacros. enabled_features += [ "use_network_interface_change_listener" ] diff --git a/www/ungoogled-chromium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc b/www/ungoogled-chromium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc index af888565f2f7..6e0f83e3e41f 100644 --- a/www/ungoogled-chromium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc +++ b/www/ungoogled-chromium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc @@ -1,78 +1,65 @@ ---- third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig 2023-09-17 07:59:53 UTC +--- third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig 2023-11-04 07:08:51 UTC +++ third_party/abseil-cpp/absl/base/internal/sysinfo.cc -@@ -30,10 +30,14 @@ +@@ -30,7 +30,7 @@ #include #endif -#if defined(__APPLE__) || defined(__FreeBSD__) +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) #include #endif -+#if defined(__FreeBSD__) -+#include -+#endif -+ - #if defined(__myriad2__) - #include - #endif -@@ -186,6 +190,7 @@ static double GetNominalCPUFrequency() { +@@ -194,6 +194,7 @@ static double GetNominalCPUFrequency() { #else +#if !defined(__OpenBSD__) && !defined(__FreeBSD__) // Helper function for reading a long from a file. Returns true if successful // and the memory location pointed to by value is set to the value read. static bool ReadLongFromFile(const char *file, long *value) { -@@ -218,6 +223,7 @@ static bool ReadLongFromFile(const char *file, long *v +@@ -226,6 +227,7 @@ static bool ReadLongFromFile(const char *file, long *v } return ret; } +#endif #if defined(ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY) -@@ -317,9 +323,11 @@ static double GetNominalCPUFrequency() { +@@ -325,9 +327,11 @@ static double GetNominalCPUFrequency() { // a new mode (turbo mode). Essentially, those frequencies cannot // always be relied upon. The same reasons apply to /proc/cpuinfo as // well. +#if !defined(__OpenBSD__) && !defined(__FreeBSD__) // pledge violation if (ReadLongFromFile("/sys/devices/system/cpu/cpu0/tsc_freq_khz", &freq)) { return freq * 1e3; // Value is kHz. } +#endif #if defined(ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY) // On these platforms, the TSC frequency is the nominal CPU -@@ -338,10 +346,12 @@ static double GetNominalCPUFrequency() { +@@ -346,10 +350,12 @@ static double GetNominalCPUFrequency() { // If CPU scaling is in effect, we want to use the *maximum* // frequency, not whatever CPU speed some random processor happens // to be using now. +#if !defined(__OpenBSD__) && !defined(__FreeBSD__) // pledge violation if (ReadLongFromFile("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq", &freq)) { return freq * 1e3; // Value is kHz. } +#endif return 1.0; #endif // !ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY -@@ -439,6 +449,18 @@ pid_t GetTID() { +@@ -459,6 +465,12 @@ pid_t GetTID() { static_assert(sizeof(pid_t) == sizeof(thread), "In NaCL int expected to be the same size as a pointer"); return reinterpret_cast(thread); +} + +#elif defined(__OpenBSD__) + +pid_t GetTID() { + return getthrid(); -+} -+ -+#elif defined(__FreeBSD__) -+ -+pid_t GetTID() { -+ return pthread_getthreadid_np(); } #else diff --git a/www/ungoogled-chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp b/www/ungoogled-chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp index 7ee4726af43a..f56b6fac7628 100644 --- a/www/ungoogled-chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp +++ b/www/ungoogled-chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp @@ -1,47 +1,47 @@ ---- third_party/angle/src/libANGLE/Display.cpp.orig 2023-10-13 13:20:35 UTC +--- third_party/angle/src/libANGLE/Display.cpp.orig 2023-11-04 07:08:51 UTC +++ third_party/angle/src/libANGLE/Display.cpp @@ -60,7 +60,7 @@ # include "libANGLE/renderer/gl/cgl/DisplayCGL.h" # elif ANGLE_ENABLE_EAGL # include "libANGLE/renderer/gl/eagl/DisplayEAGL.h" -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # include "libANGLE/renderer/gl/egl/DisplayEGL.h" # if defined(ANGLE_USE_X11) # include "libANGLE/renderer/gl/glx/DisplayGLX.h" -@@ -411,7 +411,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -408,7 +408,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di impl = new rx::DisplayEAGL(state); break; -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_GBM) if (platformType == 0) { -@@ -457,7 +457,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -454,7 +454,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di #if defined(ANGLE_ENABLE_OPENGL) # if defined(ANGLE_PLATFORM_WINDOWS) impl = new rx::DisplayWGL(state); -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_GBM) if (platformType == 0) { -@@ -508,7 +508,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -505,7 +505,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di impl = rx::CreateVulkanWin32Display(state); } break; -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_GBM) if (platformType == EGL_PLATFORM_GBM_KHR && rx::IsVulkanGbmDisplayAvailable()) { -@@ -2148,7 +2148,7 @@ static ClientExtensions GenerateClientExtensions() +@@ -2106,7 +2106,7 @@ static ClientExtensions GenerateClientExtensions() extensions.x11Visual = true; #endif -#if defined(ANGLE_PLATFORM_LINUX) +#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) extensions.platformANGLEDeviceTypeEGLANGLE = true; #endif diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_public_platform_platform.h b/www/ungoogled-chromium/files/patch-third__party_blink_public_platform_platform.h index 98452e004b5a..d1fbba07d061 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_public_platform_platform.h +++ b/www/ungoogled-chromium/files/patch-third__party_blink_public_platform_platform.h @@ -1,11 +1,11 @@ ---- third_party/blink/public/platform/platform.h.orig 2023-09-17 07:59:53 UTC +--- third_party/blink/public/platform/platform.h.orig 2023-11-04 07:08:51 UTC +++ third_party/blink/public/platform/platform.h -@@ -338,7 +338,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -344,7 +344,7 @@ class BLINK_PLATFORM_EXPORT Platform { return nullptr; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // This is called after the thread is created, so the embedder // can initiate an IPC to change its thread type (on Linux we can't // increase the nice value, so we need to ask the browser process). This diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_editing_editing__behavior.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_editing_editing__behavior.cc index eca71bf613c1..5118d4554e1d 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_editing_editing__behavior.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_editing_editing__behavior.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/core/editing/editing_behavior.cc.orig 2023-04-08 11:38:38 UTC +--- third_party/blink/renderer/core/editing/editing_behavior.cc.orig 2023-11-04 07:08:51 UTC +++ third_party/blink/renderer/core/editing/editing_behavior.cc -@@ -284,7 +284,7 @@ bool EditingBehavior::ShouldInsertCharacter(const Keyb +@@ -279,7 +279,7 @@ bool EditingBehavior::ShouldInsertCharacter(const Keyb // unexpected behaviour if (ch < ' ') return false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // According to XKB map no keyboard combinations with ctrl key are mapped to // printable characters, however we need the filter as the DomKey/text could // contain printable characters. diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc index ca8c995cdf98..d776b4c86469 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2023-10-13 13:20:35 UTC +--- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2023-11-04 07:08:51 UTC +++ third_party/blink/renderer/core/exported/web_view_impl.cc @@ -421,7 +421,7 @@ SkFontHinting RendererPreferencesToSkiaHinting( const blink::RendererPreferences& prefs) { // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) if (!prefs.should_antialias_text) { // When anti-aliasing is off, GTK maps all non-zero hinting settings to // 'Normal' hinting so we do the same. Otherwise, folks who have 'Slight' -@@ -3323,7 +3323,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs +@@ -3327,7 +3327,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs renderer_preferences_.use_subpixel_positioning); // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) && \ !BUILDFLAG(IS_ANDROID) if (!renderer_preferences_.system_font_family_name.empty()) { WebFontRenderStyle::SetSystemFontFamily(blink::WebString::FromUTF8( diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc index 580dc0004534..54389507a927 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2023-09-17 07:59:53 UTC +--- third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2023-11-04 07:08:51 UTC +++ third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -6456,7 +6456,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { +@@ -6461,7 +6461,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { } #if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // TODO(crbug.com/1090246): Fix these tests on Fuchsia and re-enable. // TODO(crbug.com/1317375): Build these tests on all platforms. #define MAYBE_SelectRangeStaysHorizontallyAlignedWhenMoved \ -@@ -6865,7 +6865,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc +@@ -6870,7 +6870,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc TEST_F(CompositedSelectionBoundsTest, LargeSelectionNoScroll) { RunTest("composited_selection_bounds_large_selection_noscroll.html"); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if !BUILDFLAG(IS_ANDROID) TEST_F(CompositedSelectionBoundsTest, Input) { web_view_helper_.GetWebView()->GetSettings()->SetDefaultFontSize(16); diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc index 4b984b9e892f..a83a8218ef78 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/core/inspector/inspector_memory_agent.cc.orig 2023-06-05 19:39:05 UTC +--- third_party/blink/renderer/core/inspector/inspector_memory_agent.cc.orig 2023-11-04 07:08:51 UTC +++ third_party/blink/renderer/core/inspector/inspector_memory_agent.cc -@@ -189,7 +189,7 @@ InspectorMemoryAgent::GetSamplingProfileById(uint32_t +@@ -190,7 +190,7 @@ InspectorMemoryAgent::GetSamplingProfileById(uint32_t Vector InspectorMemoryAgent::Symbolize( - const WebVector& addresses) { + const WebVector& addresses) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // TODO(alph): Move symbolization to the client. - Vector addresses_to_symbolize; - for (size_t i = 0; i < addresses.size(); i++) { + Vector addresses_to_symbolize; + for (const void* address : addresses) { diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_ng_layout__ng__view.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_ng_layout__ng__view.cc index aaba1ebcf926..3c77fedb6433 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_ng_layout__ng__view.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_ng_layout__ng__view.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/layout/ng/layout_ng_view.cc.orig 2023-09-17 07:59:53 UTC +--- third_party/blink/renderer/core/layout/ng/layout_ng_view.cc.orig 2023-11-04 07:08:51 UTC +++ third_party/blink/renderer/core/layout/ng/layout_ng_view.cc @@ -15,7 +15,7 @@ #include "third_party/blink/renderer/core/svg/svg_document_extensions.h" #include "ui/display/screen_info.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/platform/fonts/font_cache.h" #endif -@@ -53,7 +53,7 @@ void LayoutNGView::UpdateLayout() { +@@ -51,7 +51,7 @@ void LayoutNGView::UpdateLayout() { fragmentation_context_.Clear(); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The font code in FontPlatformData does not have a direct connection to the // document, the frame or anything from which we could retrieve the device // scale factor. After using zoom for DSF, the GraphicsContext does only ever diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc index 4506fbe577e0..10000722e80c 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/core/paint/paint_layer.cc.orig 2023-10-13 13:20:35 UTC +--- third_party/blink/renderer/core/paint/paint_layer.cc.orig 2023-11-04 07:08:51 UTC +++ third_party/blink/renderer/core/paint/paint_layer.cc -@@ -118,7 +118,7 @@ namespace blink { +@@ -120,7 +120,7 @@ namespace blink { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) struct SameSizeAsPaintLayer : GarbageCollected, DisplayItemClient { // The bit fields may fit into the machine word of DisplayItemClient which // has only 8-bit data. diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc index a1110e6efc26..b7465f75f783 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc.orig 2023-10-13 13:20:35 UTC +--- third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc.orig 2023-11-04 07:08:51 UTC +++ third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc -@@ -155,7 +155,7 @@ bool ScrollbarThemeAura::SupportsDragSnapBack() const +@@ -157,7 +157,7 @@ bool ScrollbarThemeAura::SupportsDragSnapBack() const // is true for at least GTK and QT apps). // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) return false; #else return true; -@@ -355,7 +355,7 @@ bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scr +@@ -357,7 +357,7 @@ bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scr const WebMouseEvent& event) { // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) if (event.button == WebPointerProperties::Button::kMiddle) return true; #endif diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc index f8af04ed264b..085cc3dc15d8 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc.orig 2023-09-17 07:59:53 UTC +--- third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc.orig 2023-11-04 07:08:51 UTC +++ third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc -@@ -191,7 +191,7 @@ class SharedXnnpackContext : public ThreadSafeRefCount +@@ -195,7 +195,7 @@ class SharedXnnpackContext : public ThreadSafeRefCount ~SharedXnnpackContext() { base::AutoLock auto_lock(SharedXnnpackContextLock()); -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // For Linux and ChromeOS, cpuinfo needs to parse /proc/cpuinfo to // initialize in pre sandbox stage. Calling xnn_deinitialize() here will // deinitialize cpuinfo within sandbox and cannot access /proc/cpuinfo diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc index ed02ac584dd6..2b95a0456df8 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc.orig 2023-07-21 09:49:17 UTC +--- third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc.orig 2023-11-04 07:08:51 UTC +++ third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc -@@ -297,7 +297,7 @@ TEST_F(WebRtcAudioRendererTest, DISABLED_VerifySinkPar +@@ -298,7 +298,7 @@ TEST_F(WebRtcAudioRendererTest, DISABLED_VerifySinkPar SetupRenderer(kDefaultOutputDeviceId); renderer_proxy_->Start(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) static const int kExpectedBufferSize = kHardwareSampleRate / 100; #elif BUILDFLAG(IS_ANDROID) static const int kExpectedBufferSize = 2 * kHardwareSampleRate / 100; diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc index d5364d40eb9d..1c7018445f2e 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2023-10-13 13:20:35 UTC +--- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2023-11-04 07:08:51 UTC +++ third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -6319,7 +6319,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid +@@ -6328,7 +6328,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid constexpr bool kAllowZeroCopyImages = true; #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1175907): Only TexImage2D seems to work with the GPU path on // Android M -- appears to work fine on R, but to avoid regressions in