diff --git a/www/ungoogled-chromium/Makefile b/www/ungoogled-chromium/Makefile index 0545d5db3e1a..7a7274440402 100644 --- a/www/ungoogled-chromium/Makefile +++ b/www/ungoogled-chromium/Makefile @@ -1,382 +1,383 @@ PORTNAME= ungoogled-chromium -PORTVERSION= 109.0.5414.119 +PORTVERSION= 110.0.5481.77 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-atk \ libatspi.so:accessibility/at-spi2-core \ libspeechd.so:accessibility/speech-dispatcher \ libsnappy.so:archivers/snappy \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ + 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 \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libfontconfig.so:x11-fonts/fontconfig \ libwayland-client.so:graphics/wayland \ libxkbcommon.so:x11/libxkbcommon \ libxshmfence.so:x11/libxshmfence RUN_DEPENDS= xdg-open:devel/xdg-utils \ noto-basic>0:x11-fonts/noto-basic USES= bison compiler:c++17-lang cpe desktop-file-utils gl gnome iconv jpeg \ localbase:ldflags ninja perl5 pkgconfig python:3.7+,build 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+= 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_gnome_keyring=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_system_libwayland=true \ - use_system_wayland_scanner=true \ use_udev=false \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" # sync with flags.gni GN_ARGS+= build_with_tflite_lib=false \ chrome_pgo_phase=0 \ clang_use_chrome_plugins=false \ disable_fieldtrial_testing_config=true \ enable_backup_ref_ptr_support=false \ enable_hangout_services_extension=false \ enable_js_type_check=false \ enable_mdns=false \ enable_mse_mpeg2ts_stream_parser=true \ enable_nacl=false \ enable_reading_list=false \ enable_remoting=false \ enable_reporting=false \ enable_service_discovery=false \ exclude_unwind_tables=true \ google_api_key="" \ google_default_client_id="" \ google_default_client_secret="" \ safe_browsing_mode=0 \ treat_warnings_as_errors=false \ use_official_google_api_keys=false \ use_unofficial_version_number=false # TODO: investigate building with these options: # use_system_minigbm GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles SUB_FILES= ungoogled-chromium.desktop ungoogled-chromium SUB_LIST+= COMMENT="${COMMENT}" OPTIONS_DEFINE= CODECS CUPS DEBUG DRIVER KERBEROS LTO TEST OPTIONS_DEFAULT= CODECS CUPS DRIVER KERBEROS SNDIO OPTIONS_EXCLUDE_aarch64=LTO OPTIONS_GROUP= AUDIO OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO OPTIONS_RADIO= KERBEROS OPTIONS_RADIO_KERBEROS= HEIMDAL HEIMDAL_BASE MIT OPTIONS_SUB= yes CODECS_DESC= Compile and enable patented codecs like H.264 DRIVER_DESC= Install chromedriver HEIMDAL_BASE_DESC= Heimdal Kerberos (base) HEIMDAL_DESC= Heimdal Kerberos (security/heimdal) MIT_DESC= MIT Kerberos (security/krb5) ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \ alsa-lib>=1.1.1_1:audio/alsa-lib ALSA_VARS= GN_ARGS+=use_alsa=true ALSA_VARS_OFF= GN_ARGS+=use_alsa=false CODECS_VARS= GN_ARGS+=ffmpeg_branding="Chrome" \ GN_ARGS+=proprietary_codecs=true CODECS_VARS_OFF= GN_ARGS+=ffmpeg_branding="Chromium" \ GN_ARGS+=proprietary_codecs=false CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_VARS= GN_ARGS+=use_cups=true CUPS_VARS_OFF= GN_ARGS+=use_cups=false DEBUG_BUILD_DEPENDS= esbuild:devel/esbuild DEBUG_VARS= BUILDTYPE=Debug \ GN_ARGS+=is_debug=true \ GN_ARGS+=is_component_build=false \ GN_ARGS+=symbol_level=1 \ GN_BOOTSTRAP_FLAGS+=--debug \ WANTSPACE="21 GB" DEBUG_VARS_OFF= BUILDTYPE=Release \ GN_ARGS+=blink_symbol_level=0 \ GN_ARGS+=is_debug=false \ GN_ARGS+=is_official_build=true \ GN_ARGS+=symbol_level=0 \ WANTSPACE="14 GB" DRIVER_MAKE_ARGS= chromedriver HEIMDAL_LIB_DEPENDS= libkrb.so.26:security/heimdal KERBEROS_VARS= GN_ARGS+=use_kerberos=true KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false LTO_VARS= GN_ARGS+=use_thin_lto=true \ GN_ARGS+=thin_lto_enable_optimizations=true \ WANTSPACE="14 GB" LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false MIT_LIB_DEPENDS= libkrb.so.3:security/krb5 PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false # With SNDIO=on we exclude audio_manager_linux from the build (see # media/audio/BUILD.gn) and use audio_manager_openbsd which does not # support falling back to ALSA or PulseAudio. SNDIO_PREVENTS= ALSA PULSEAUDIO SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_VARS= GN_ARGS+=use_sndio=true SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false .include "Makefile.tests" TEST_DISTFILES= chromium-${DISTVERSION}-testdata${EXTRACT_SUFX} \ test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz:external TEST_ALL_TARGET= ${TEST_TARGETS} .include .include .if ${OSREL} == "12.3" IGNORE= does not compile, libc++ too old .endif .if ${PORT_OPTIONS:MHEIMDAL_BASE} && !exists(/usr/lib/libkrb5.so) IGNORE= you have selected HEIMDAL_BASE but do not have Heimdal installed in base .endif .if ${COMPILER_VERSION} != 130 LLVM_DEFAULT= 13 BUILD_DEPENDS+= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} BINARY_ALIAS+= cpp=${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT} \ cc=${LOCALBASE}/bin/clang${LLVM_DEFAULT} \ c++=${LOCALBASE}/bin/clang++${LLVM_DEFAULT} \ ar=${LOCALBASE}/bin/llvm-ar${LLVM_DEFAULT} \ nm=${LOCALBASE}/bin/llvm-nm${LLVM_DEFAULT} \ ld=${LOCALBASE}/bin/ld.lld${LLVM_DEFAULT} .else BINARY_ALIAS+= ar=/usr/bin/llvm-ar \ nm=/usr/bin/llvm-nm .endif # swiftshader/lib/{libEGL.so,libGLESv2.so} is x86 only .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " .else PLIST_SUB+= NOT_AARCH64="" .endif # Allow relocations against read-only segments (override lld default) LDFLAGS_i386= -Wl,-znotext # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include WRKSRC= ${WRKDIR}/chromium-${DISTVERSION} pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "To build Ungoogled Chromium, you should have around 2GB of memory" @${ECHO_MSG} "and around ${WANTSPACE} of free disk space." @${ECHO_MSG} post-extract-TEST-on: @${MKDIR} ${WRKSRC}/third_party/test_fonts/test_fonts @${MV} ${WRKDIR}/test_fonts ${WRKSRC}/third_party/test_fonts/ pre-patch: cd ${WRKDIR}/ungoogled-chromium-${UGVERSION} && ${PYTHON_CMD} \ utils/prune_binaries.py ${WRKSRC} pruning.list cd ${WRKDIR}/ungoogled-chromium-${UGVERSION} && PATCH_BIN=gpatch \ ${PYTHON_CMD} utils/patches.py apply ${WRKSRC} patches cd ${WRKDIR}/ungoogled-chromium-${UGVERSION} && ${PYTHON_CMD} \ utils/domain_substitution.py apply -r domain_regex.list -f \ domain_substitution.list -c ${WRKSRC}/domsubcache.tar.gz ${WRKSRC} pre-configure: # We used to remove bundled libraries to be sure that chromium uses # system libraries and not shipped ones. # cd ${WRKSRC} && ${PYTHON_CMD} \ #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved] cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ ./build/linux/unbundle/replace_gn_files.py --system-libraries \ flac fontconfig freetype harfbuzz-ng icu libdrm libevent libpng \ libusb libwebp libxml libxslt openh264 opus snappy || ${FALSE} # Chromium uses an unreleased version of FFmpeg, so configure it .for brand in Chrome Chromium ${CP} -R \ ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/linux/ \ ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/freebsd .endfor do-configure: # GN generator bootstrapping and generating ninja files cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \ READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn \ gen --args='${GN_ARGS}' out/${BUILDTYPE} # Setup nodejs dependency @${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin/node # Setup buildtools/freebsd @${MKDIR} ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/buildtools/linux64/clang-format ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/out/${BUILDTYPE}/gn ${WRKSRC}/buildtools/freebsd ${LN} -sf /usr/bin/strip ${WRKSRC}/buildtools/freebsd/strip do-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_MAN} ${WRKSRC}/chrome/app/resources/manpage.1.in \ ${STAGEDIR}${MANPREFIX}/man/man1/ungoogled-chromium.1 @${SED} -i "" -e 's,\@\@PACKAGE\@\@,chromium,g;s,\@\@MENUNAME\@\@,Chromium Web Browser,g' \ ${STAGEDIR}${MANPREFIX}/man/man1/ungoogled-chromium.1 ${CP} ${WRKSRC}/chrome/app/theme/chromium/product_logo_22_mono.png ${WRKSRC}/chrome/app/theme/chromium/product_logo_22.png .for s in 22 24 48 64 128 256 @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps ${INSTALL_DATA} ${WRKSRC}/chrome/app/theme/chromium/product_logo_${s}.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/ungoogled-chromium.png .endfor ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.png ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.pak ${STAGEDIR}${DATADIR} .for d in protoc mksnapshot ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor .for d in snapshot_blob.bin v8_context_snapshot.bin ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chrome \ ${STAGEDIR}${DATADIR}/ungoogled-chromium cd ${WRKSRC}/out/${BUILDTYPE} && \ ${COPYTREE_SHARE} "locales resources" ${STAGEDIR}${DATADIR} @${MKDIR} ${STAGEDIR}${DESKTOPDIR} ${INSTALL_DATA} ${WRKDIR}/ungoogled-chromium.desktop \ ${STAGEDIR}${DESKTOPDIR} ${INSTALL_SCRIPT} ${WRKDIR}/ungoogled-chromium ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/chrome/tools/build/linux/chrome-wrapper \ ${STAGEDIR}${DATADIR} # ANGLE, EGL, Vk .for f in libEGL.so libGLESv2.so libVkICD_mock_icd.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvulkan.so.1 \ ${STAGEDIR}${DATADIR}/libvulkan.so .if ${BUILDTYPE} == Debug ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libVkLayer_khronos_validation.so ${STAGEDIR}${DATADIR} .endif # SwiftShader .if ${ARCH} != aarch64 ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvk_swiftshader.so ${STAGEDIR}${DATADIR} .endif post-install-DEBUG-on: ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/*.so \ ${STAGEDIR}${DATADIR} ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/character_data_generator \ ${STAGEDIR}${DATADIR} post-install-DRIVER-on: ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver \ ${STAGEDIR}${PREFIX}/bin/ungoogled-chromedriver do-test-TEST-on: .for t in ${TEST_TARGETS} cd ${WRKSRC}/out/${BUILDTYPE} && ${SETENV} LC_ALL=en_US.UTF-8 \ ./${t} --gtest_filter=-${EXCLUDE_${t}:ts:} || ${TRUE} .endfor .include diff --git a/www/ungoogled-chromium/distinfo b/www/ungoogled-chromium/distinfo index 438b278cd563..fce742cd2f00 100644 --- a/www/ungoogled-chromium/distinfo +++ b/www/ungoogled-chromium/distinfo @@ -1,9 +1,9 @@ -TIMESTAMP = 1674739343 -SHA256 (chromium-109.0.5414.119.tar.xz) = cbcdef5ee71acb53790ded3adef86871812b46e9f208dce8ec3f8ab04958be2d -SIZE (chromium-109.0.5414.119.tar.xz) = 1747968612 -SHA256 (ungoogled-chromium-109.0.5414.119-1.tar.gz) = e10fe46f3f4b7058c278ab86c6795cc2b68459bcb7ced5efad3355ab5c2f5de1 -SIZE (ungoogled-chromium-109.0.5414.119-1.tar.gz) = 671793 -SHA256 (chromium-109.0.5414.119-testdata.tar.xz) = 8781e0dde6b4ec48a2863cf14911d6d6e645b949134c9743e38e9522b889704f -SIZE (chromium-109.0.5414.119-testdata.tar.xz) = 264800856 +TIMESTAMP = 1676106046 +SHA256 (chromium-110.0.5481.77.tar.xz) = e348ab2dc4311083e729d714a81e95dd9db108ff71437dde451c97ac939881ce +SIZE (chromium-110.0.5481.77.tar.xz) = 1703346520 +SHA256 (ungoogled-chromium-110.0.5481.77-1.tar.gz) = 6620119d0b683b989da771885dd186185cc3b8e37e1b4cf143004f340446cbae +SIZE (ungoogled-chromium-110.0.5481.77-1.tar.gz) = 671991 +SHA256 (chromium-110.0.5481.77-testdata.tar.xz) = a66d415305285c71cefb26a276903abba1de94327424982745719c7b13cb9a64 +SIZE (chromium-110.0.5481.77-testdata.tar.xz) = 263374384 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 ee31e08c4ec4..6528678063ad 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-01-13 08:56:02 UTC +--- BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ BUILD.gn @@ -60,7 +60,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) @@ -90,7 +90,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", -@@ -434,7 +433,7 @@ group("gn_all") { +@@ -425,7 +424,7 @@ group("gn_all") { ] } - if (is_linux || is_chromeos || is_android) { + if ((is_linux && !is_bsd) || is_chromeos || is_android) { deps += [ "//third_party/breakpad:breakpad_unittests", "//third_party/breakpad:core-2-minidump", -@@ -629,6 +628,15 @@ group("gn_all") { - deps += [ "//gpu/tools/compositor_model_bench" ] +@@ -616,6 +615,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:crash_inspector", -@@ -677,7 +685,7 @@ group("gn_all") { +@@ -664,7 +672,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)" ] } -@@ -1107,7 +1115,7 @@ if (!is_ios) { +@@ -1086,7 +1094,7 @@ if (!is_ios) { ] } - 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) { # WPT Webdriver tests runner # chrome/test/chromedriver/test/run_webdriver_tests.py script_test("webdriver_wpt_tests") { -@@ -1203,7 +1211,7 @@ if (!is_ios) { +@@ -1182,7 +1190,7 @@ if (!is_ios) { data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ] } - if (!is_win && !is_android) { + if (!is_win && !is_android && !is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } -@@ -1212,7 +1220,7 @@ if (!is_ios) { +@@ -1191,7 +1199,7 @@ if (!is_ios) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } - if (is_linux || is_chromeos) { + if ((is_linux && !is_bsd) || is_chromeos) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } -@@ -1652,7 +1660,7 @@ group("chromium_builder_perf") { +@@ -1656,7 +1664,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 e5e53824e65e..d6b9c663f0ab 100644 --- a/www/ungoogled-chromium/files/patch-base_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-base_BUILD.gn @@ -1,165 +1,163 @@ ---- base/BUILD.gn.orig 2023-01-13 08:56:02 UTC +--- base/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ base/BUILD.gn -@@ -167,7 +167,7 @@ buildflag_header("ios_cronet_buildflags") { +@@ -162,7 +162,7 @@ buildflag_header("ios_cronet_buildflags") { flags = [ "CRONET_BUILD=$is_cronet_build" ] } -enable_message_pump_epoll = is_linux || is_chromeos || is_android +enable_message_pump_epoll = (is_linux || is_chromeos || is_android) && !is_bsd buildflag_header("message_pump_buildflags") { header = "message_pump_buildflags.h" header_dir = "base/message_loop" -@@ -1059,7 +1059,7 @@ mixed_component("base") { +@@ -1052,7 +1052,7 @@ component("base") { "timer/hi_res_timer_manager_posix.cc", ] - if (!is_nacl && !is_apple) { + if (!is_nacl && !is_apple && !is_bsd) { sources += [ "profiler/stack_base_address_posix.cc", "profiler/stack_base_address_posix.h", -@@ -1070,6 +1070,14 @@ mixed_component("base") { +@@ -1063,6 +1063,14 @@ component("base") { "profiler/thread_delegate_posix.h", ] } + + if (is_bsd) { + sources += [ + "profiler/stack_base_address_posix.cc", + "profiler/stack_base_address_posix.h", + "profiler/stack_sampler_posix.cc", + ] + } } if (is_win) { -@@ -1569,11 +1577,23 @@ mixed_component("base") { +@@ -1550,11 +1558,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) { sources += [ "allocator/partition_allocator/shim/allocator_shim.cc", -@@ -1601,7 +1621,7 @@ mixed_component("base") { +@@ -1582,7 +1602,7 @@ component("base") { ] configs += [ "//base/allocator:mac_no_default_new_delete_symbols" ] } - if (is_chromeos || is_linux) { + if (is_chromeos || (is_linux && !is_bsd)) { sources += [ "allocator/partition_allocator/shim/allocator_shim_override_cpp_symbols.h", "allocator/partition_allocator/shim/allocator_shim_override_glibc_weak_symbols.h", -@@ -1655,7 +1675,7 @@ mixed_component("base") { +@@ -1623,7 +1643,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" ] } -@@ -2238,6 +2258,41 @@ mixed_component("base") { +@@ -2211,6 +2231,39 @@ component("base") { } } + if (is_bsd) { + sources -= [ + "files/file_path_watcher_inotify.cc", + "files/scoped_file_linux.cc", -+ "process/memory_linux.cc", + "process/process_linux.cc", + "system/sys_info_linux.cc", + "process/process_iterator_linux.cc", + "process/process_metrics_linux.cc", + "process/process_handle_linux.cc" + ] + sources += [ -+ "process/memory_stubs.cc", + "files/file_path_watcher_kqueue.cc", + "files/file_path_watcher_kqueue.h", + "files/file_path_watcher_bsd.cc", + ] + } + + if (is_openbsd) { + sources += [ + "process/process_handle_openbsd.cc", + "process/process_iterator_openbsd.cc", + "process/process_metrics_openbsd.cc", + "system/sys_info_openbsd.cc", + ] + } else if (is_freebsd) { + sources += [ + "process/process_handle_freebsd.cc", + "process/process_iterator_freebsd.cc", + "process/process_metrics_freebsd.cc", + "system/sys_info_freebsd.cc", + ] + } + # iOS if (is_ios) { sources -= [ -@@ -2335,7 +2390,7 @@ mixed_component("base") { +@@ -2306,7 +2359,7 @@ component("base") { } if (dep_libevent) { - deps += [ "//third_party/libevent" ] + public_deps += [ "//third_party/libevent" ] } if (use_libevent) { -@@ -3605,7 +3660,7 @@ test("base_unittests") { +@@ -3560,7 +3613,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", -@@ -3651,7 +3706,7 @@ test("base_unittests") { +@@ -3606,7 +3659,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", -@@ -3662,7 +3717,7 @@ test("base_unittests") { +@@ -3617,7 +3670,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" ] } -@@ -3869,7 +3924,7 @@ test("base_unittests") { +@@ -3827,7 +3880,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 new file mode 100644 index 000000000000..d1f54c7aafeb --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_allocator_dispatcher_tls.h @@ -0,0 +1,11 @@ +--- base/allocator/dispatcher/tls.h.orig 2023-02-11 09:11:04 UTC ++++ base/allocator/dispatcher/tls.h +@@ -51,7 +51,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_page__allocator__internals__posix.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h index b0c909acd0d3..f7b336ccc04e 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h @@ -1,16 +1,16 @@ ---- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2023-01-13 08:56:02 UTC +--- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2023-02-11 09:11:04 UTC +++ base/allocator/partition_allocator/page_allocator_internals_posix.h -@@ -370,8 +370,12 @@ bool TryRecommitSystemPagesInternal( - +@@ -371,8 +371,12 @@ bool TryRecommitSystemPagesInternal( void DiscardSystemPagesInternal(uintptr_t address, size_t length) { + #if !BUILDFLAG(IS_NACL) void* ptr = reinterpret_cast(address); -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) +#if BUILDFLAG(IS_BSD) + int ret = madvise(ptr, length, MADV_FREE); +#else int ret = madvise(ptr, length, MADV_FREE_REUSABLE); +#endif if (ret) { // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED. ret = madvise(ptr, length, MADV_DONTNEED); diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__address__space.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__address__space.cc index f46ce1d8ba77..e8725e5a81e6 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__address__space.cc +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__address__space.cc @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/partition_address_space.cc.orig 2023-01-13 08:56:02 UTC +--- base/allocator/partition_allocator/partition_address_space.cc.orig 2023-02-11 09:11:04 UTC +++ base/allocator/partition_allocator/partition_address_space.cc -@@ -432,7 +432,7 @@ void PartitionAddressSpace::UninitPkeyPoolForTesting() +@@ -440,7 +440,7 @@ void PartitionAddressSpace::UninitPkeyPoolForTesting() } #endif -#if BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) PageCharacteristics page_characteristics; diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni index 644a6489382c..451ea599b978 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-01-13 08:56:02 UTC +--- base/allocator/partition_allocator/partition_alloc.gni.orig 2023-02-11 09:11:04 UTC +++ base/allocator/partition_allocator/partition_alloc.gni -@@ -121,7 +121,7 @@ assert( - "Missing dangling pointer checks feature for its performance experiment") +@@ -200,7 +200,7 @@ assert(!use_asan_unowned_ptr || is_asan, + "AsanUnownedPtr requires AddressSanitizer") declare_args() { - enable_pkeys = is_linux && target_cpu == "x64" + enable_pkeys = (is_linux && !is_bsd) && target_cpu == "x64" } 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__config.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h index f1b2c3aabaea..80614a440ee2 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h @@ -1,29 +1,29 @@ ---- base/allocator/partition_allocator/partition_alloc_config.h.orig 2023-01-13 08:56:02 UTC +--- base/allocator/partition_allocator/partition_alloc_config.h.orig 2023-02-11 09:11:04 UTC +++ base/allocator/partition_allocator/partition_alloc_config.h @@ -84,7 +84,7 @@ static_assert(sizeof(void*) != 8, ""); // POSIX is not only UNIX, e.g. macOS and other OSes. We do use Linux-specific // features such as futex(2). -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #define PA_HAS_LINUX_KERNEL #endif -@@ -216,7 +216,7 @@ constexpr bool kUseLazyCommit = false; +@@ -220,7 +220,7 @@ constexpr bool kUseLazyCommit = false; // On these platforms, lock all the partitions before fork(), and unlock after. // This may be required on more platforms in the future. -#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #define PA_HAS_ATFORK_HANDLER #endif -@@ -257,7 +257,7 @@ constexpr bool kUseLazyCommit = false; +@@ -264,7 +264,7 @@ constexpr bool kUseLazyCommit = false; // // Also enabled on ARM64 macOS, as the 16kiB pages on this platform lead to // larger slot spans. -#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) +#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_BSD) #define PA_PREFER_SMALLER_SLOT_SPANS - #endif // BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) + #endif 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 347a18740695..2e3cb75a345d 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,20 +1,20 @@ ---- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2023-01-13 08:56:02 UTC +--- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2023-02-11 09:11:04 UTC +++ base/allocator/partition_allocator/partition_alloc_constants.h @@ -91,7 +91,7 @@ PartitionPageShift() { return 18; // 256 KiB } #elif (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ - (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR PA_ALWAYS_INLINE size_t PartitionPageShift() { return PageAllocationGranularityShift() + 2; -@@ -274,7 +274,7 @@ constexpr size_t kNumPools = 3; - // Special-case Android and iOS, which incur test failures with larger - // pools. Regardless, allocating >8GiB with malloc() on these platforms is - // unrealistic as of 2022. --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) -+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) +@@ -278,7 +278,7 @@ constexpr size_t kNumPools = 3; + // When pointer compression is enabled, we cannot use large pools (at most + // 8GB for each of the glued pools). + #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || \ +- defined(PA_POINTER_COMPRESSION) ++ defined(PA_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_debug_stack__trace__posix.cc b/www/ungoogled-chromium/files/patch-base_debug_stack__trace__posix.cc index 14f00b0d241f..64a90bdb77b6 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,38 +1,38 @@ ---- base/debug/stack_trace_posix.cc.orig 2022-10-29 17:50:56 UTC +--- base/debug/stack_trace_posix.cc.orig 2023-02-11 09:11:04 UTC +++ base/debug/stack_trace_posix.cc @@ -39,7 +39,7 @@ #include #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/debug/proc_maps_linux.h" #endif -@@ -699,6 +699,9 @@ class SandboxSymbolizeHelper { +@@ -714,6 +714,9 @@ class SandboxSymbolizeHelper { // for the modules that are loaded in the current process. // Returns true on success. bool CacheMemoryRegions() { +#if BUILDFLAG(IS_BSD) + return false; +#else // Reads /proc/self/maps. std::string contents; if (!ReadProcMaps(&contents)) { -@@ -716,6 +719,7 @@ class SandboxSymbolizeHelper { +@@ -731,6 +734,7 @@ class SandboxSymbolizeHelper { is_initialized_ = true; return true; +#endif } // Opens all object files and caches their file descriptors. -@@ -872,7 +876,7 @@ size_t CollectStackTrace(void** trace, size_t count) { +@@ -887,7 +891,7 @@ size_t CollectStackTrace(void** trace, size_t count) { // If we do not have unwind tables, then try tracing using frame pointers. return base::debug::TraceStackFramePointers(const_cast(trace), count, 0); -#elif !defined(__UCLIBC__) && !defined(_AIX) +#elif !defined(__UCLIBC__) && !defined(_AIX) && !BUILDFLAG(IS_BSD) // Though the backtrace API man page does not list any possible negative // return values, we take no chance. return base::saturated_cast( diff --git a/www/ungoogled-chromium/files/patch-base_files_file__path__watcher.h b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher.h new file mode 100644 index 000000000000..39142906151a --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher.h @@ -0,0 +1,11 @@ +--- base/files/file_path_watcher.h.orig 2023-02-11 09:11:04 UTC ++++ base/files/file_path_watcher.h +@@ -59,7 +59,7 @@ class BASE_EXPORT FilePathWatcher { + Type type = Type::kNonRecursive; + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + // The callback will return the full path to a changed file instead of + // the watched path supplied as |path| when Watch is called. + // So the full path can be different from the watched path when a folder is diff --git a/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc index 0da5585ec8dc..ad2e7803bf75 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 2022-10-01 07:40:07 UTC +--- base/files/file_path_watcher_unittest.cc.orig 2023-02-11 09:11:04 UTC +++ base/files/file_path_watcher_unittest.cc -@@ -498,7 +498,7 @@ TEST_F(FilePathWatcherTest, MAYBE_WatchDirectory) { +@@ -521,7 +521,7 @@ TEST_F(FilePathWatcherTest, MAYBE_WatchDirectory) { VLOG(1) << "Waiting for file1 creation"; - ASSERT_TRUE(WaitForEvents()); + ASSERT_TRUE(WaitForEvent()); -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) // Mac implementation does not detect files modified in a directory. ASSERT_TRUE(WriteFile(file1, "content v2")); VLOG(1) << "Waiting for file1 modification"; -@@ -1118,7 +1118,7 @@ enum Permission { +@@ -1345,7 +1345,7 @@ enum Permission { Execute }; -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) bool ChangeFilePermissions(const FilePath& path, Permission perm, bool allow) { struct stat stat_buf; -@@ -1149,7 +1149,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi +@@ -1376,7 +1376,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi } #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) // Linux implementation of FilePathWatcher doesn't catch attribute changes. // http://crbug.com/78043 // Windows implementation of FilePathWatcher catches attribute changes that diff --git a/www/ungoogled-chromium/files/patch-base_functional_unretained__traits.h b/www/ungoogled-chromium/files/patch-base_functional_unretained__traits.h new file mode 100644 index 000000000000..e0916fa7404d --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_functional_unretained__traits.h @@ -0,0 +1,11 @@ +--- base/functional/unretained_traits.h.orig 2023-02-11 09:11:04 UTC ++++ base/functional/unretained_traits.h +@@ -130,7 +130,7 @@ struct TypeSupportsUnretained { + // official builds, and then in non-test code as well. + #if !defined(UNIT_TEST) && !defined(OFFICIAL_BUILD) + #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ +- defined(FORCE_UNRETAINED_COMPLETENESS_CHECKS_FOR_TESTS) ++ || BUILDFLAGS(IS_BSD) || defined(FORCE_UNRETAINED_COMPLETENESS_CHECKS_FOR_TESTS) + static_assert(IsCompleteTypeV || + IsIncompleteTypeSafeForUnretained>, + "T must be fully defined."); diff --git a/www/ungoogled-chromium/files/patch-base_i18n_icu__util.cc b/www/ungoogled-chromium/files/patch-base_i18n_icu__util.cc index 602edeaabf1e..db886638c86e 100644 --- a/www/ungoogled-chromium/files/patch-base_i18n_icu__util.cc +++ b/www/ungoogled-chromium/files/patch-base_i18n_icu__util.cc @@ -1,20 +1,20 @@ ---- base/i18n/icu_util.cc.orig 2022-12-02 17:56:32 UTC +--- base/i18n/icu_util.cc.orig 2023-02-11 09:11:04 UTC +++ base/i18n/icu_util.cc -@@ -52,7 +52,7 @@ +@@ -51,7 +51,7 @@ #include "third_party/icu/source/common/unicode/unistr.h" #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) #include "third_party/icu/source/i18n/unicode/timezone.h" #endif -@@ -343,7 +343,7 @@ void InitializeIcuTimeZone() { +@@ -340,7 +340,7 @@ void InitializeIcuTimeZone() { FuchsiaIntlProfileWatcher::GetPrimaryTimeZoneIdForIcuInitialization(); icu::TimeZone::adoptDefault( icu::TimeZone::createTimeZone(icu::UnicodeString::fromUTF8(zone_id))); -#elif BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) +#elif BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD) // To respond to the time zone change properly, the default time zone // cache in ICU has to be populated on starting up. // See TimeZoneMonitorLinux::NotifyClientsFromImpl(). diff --git a/www/ungoogled-chromium/files/patch-base_logging__unittest.cc b/www/ungoogled-chromium/files/patch-base_logging__unittest.cc index e4e536b7f81e..5264a5d646fe 100644 --- a/www/ungoogled-chromium/files/patch-base_logging__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_logging__unittest.cc @@ -1,31 +1,31 @@ ---- base/logging_unittest.cc.orig 2022-10-01 07:40:07 UTC +--- base/logging_unittest.cc.orig 2023-02-11 09:11:04 UTC +++ base/logging_unittest.cc @@ -32,7 +32,7 @@ #include "base/posix/eintr_wrapper.h" #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) #include #endif -@@ -574,14 +574,18 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo +@@ -575,14 +575,18 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo // need the arch-specific boilerplate below, which is inspired by breakpad. // At the same time, on OSX, ucontext.h is deprecated but si_addr works fine. uintptr_t crash_addr = 0; -#if BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FREEBSD) crash_addr = reinterpret_cast(info->si_addr); #else // OS_* ucontext_t* context = reinterpret_cast(context_ptr); #if defined(ARCH_CPU_X86) crash_addr = static_cast(context->uc_mcontext.gregs[REG_EIP]); #elif defined(ARCH_CPU_X86_64) +#if BUILDFLAG(IS_OPENBSD) + crash_addr = static_cast(context->sc_rip); +#else crash_addr = static_cast(context->uc_mcontext.gregs[REG_RIP]); +#endif #elif defined(ARCH_CPU_ARMEL) crash_addr = static_cast(context->uc_mcontext.arm_pc); #elif defined(ARCH_CPU_ARM64) diff --git a/www/ungoogled-chromium/files/patch-base_memory_platform__shared__memory__region__posix.cc b/www/ungoogled-chromium/files/patch-base_memory_platform__shared__memory__region__posix.cc index ac7afdc29e95..07a3fb4b75dd 100644 --- a/www/ungoogled-chromium/files/patch-base_memory_platform__shared__memory__region__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_memory_platform__shared__memory__region__posix.cc @@ -1,29 +1,29 @@ ---- base/memory/platform_shared_memory_region_posix.cc.orig 2022-10-01 07:40:07 UTC +--- base/memory/platform_shared_memory_region_posix.cc.orig 2023-02-11 09:11:04 UTC +++ base/memory/platform_shared_memory_region_posix.cc @@ -55,7 +55,7 @@ bool CheckFDAccessMode(int fd, int expected_mode) { } // namespace -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // static ScopedFD PlatformSharedMemoryRegion::ExecutableRegion::CreateFD(size_t size) { PlatformSharedMemoryRegion region = -@@ -171,7 +171,7 @@ bool PlatformSharedMemoryRegion::ConvertToUnsafe() { +@@ -168,7 +168,7 @@ bool PlatformSharedMemoryRegion::ConvertToUnsafe() { // static PlatformSharedMemoryRegion PlatformSharedMemoryRegion::Create(Mode mode, size_t size -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) , bool executable #endif -@@ -200,7 +200,7 @@ PlatformSharedMemoryRegion PlatformSharedMemoryRegion: +@@ -197,7 +197,7 @@ PlatformSharedMemoryRegion PlatformSharedMemoryRegion: // flag. FilePath directory; if (!GetShmemTempDir( -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) executable, #else false /* executable */, diff --git a/www/ungoogled-chromium/files/patch-base_process_memory.cc b/www/ungoogled-chromium/files/patch-base_process_memory.cc deleted file mode 100644 index 9d57b68e0962..000000000000 --- a/www/ungoogled-chromium/files/patch-base_process_memory.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/process/memory.cc.orig 2023-01-13 08:56:02 UTC -+++ base/process/memory.cc -@@ -28,7 +28,7 @@ namespace base { - // Defined in memory_mac.mm for macOS + use_partition_alloc_as_malloc=false. - // In case of use_partition_alloc_as_malloc=true, no need to route the call to - // the system default calloc of macOS. --#if !BUILDFLAG(IS_APPLE) || BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) -+#if (!BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)) || BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) - - bool UncheckedCalloc(size_t num_items, size_t size, void** result) { - const size_t alloc_size = num_items * size; diff --git a/www/ungoogled-chromium/files/patch-base_process_memory__linux.cc b/www/ungoogled-chromium/files/patch-base_process_memory__linux.cc new file mode 100644 index 000000000000..2df2a75c31ae --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_process_memory__linux.cc @@ -0,0 +1,44 @@ +--- base/process/memory_linux.cc.orig 2023-02-11 09:11:04 UTC ++++ base/process/memory_linux.cc +@@ -20,6 +20,7 @@ + + namespace base { + ++#if !BUILDFLAG(IS_BSD) + namespace { + + void ReleaseReservationOrTerminate() { +@@ -29,12 +30,14 @@ void ReleaseReservationOrTerminate() { + } + + } // namespace ++#endif + + void EnableTerminationOnHeapCorruption() { + // On Linux, there nothing to do AFAIK. + } + + void EnableTerminationOnOutOfMemory() { ++#if !BUILDFLAG(IS_BSD) + // Set the new-out of memory handler. + std::set_new_handler(&ReleaseReservationOrTerminate); + // If we're using glibc's allocator, the above functions will override +@@ -43,8 +46,10 @@ void EnableTerminationOnOutOfMemory() { + #if BUILDFLAG(USE_ALLOCATOR_SHIM) + allocator_shim::SetCallNewHandlerOnMallocFailure(true); + #endif ++#endif + } + ++#if !BUILDFLAG(IS_BSD) + // ScopedAllowBlocking() has private constructor and it can only be used in + // friend classes/functions. Declaring a class is easier in this situation to + // avoid adding more dependency to thread_restrictions.h because of the +@@ -104,6 +109,7 @@ bool AdjustOOMScoreHelper::AdjustOOMScore(ProcessId pr + bool AdjustOOMScore(ProcessId process, int score) { + return AdjustOOMScoreHelper::AdjustOOMScore(process, score); + } ++#endif + + bool UncheckedMalloc(size_t size, void** result) { + #if BUILDFLAG(USE_ALLOCATOR_SHIM) diff --git a/www/ungoogled-chromium/files/patch-base_profiler_sampling__profiler__thread__token.cc b/www/ungoogled-chromium/files/patch-base_profiler_sampling__profiler__thread__token.cc index a2b8fb5f8428..f59002f90fd0 100644 --- a/www/ungoogled-chromium/files/patch-base_profiler_sampling__profiler__thread__token.cc +++ b/www/ungoogled-chromium/files/patch-base_profiler_sampling__profiler__thread__token.cc @@ -1,20 +1,20 @@ ---- base/profiler/sampling_profiler_thread_token.cc.orig 2022-10-29 17:50:56 UTC +--- base/profiler/sampling_profiler_thread_token.cc.orig 2023-02-11 09:11:04 UTC +++ base/profiler/sampling_profiler_thread_token.cc @@ -6,7 +6,7 @@ #include "build/build_config.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include "base/profiler/stack_base_address_posix.h" -@@ -19,7 +19,7 @@ SamplingProfilerThreadToken GetSamplingProfilerCurrent +@@ -18,7 +18,7 @@ SamplingProfilerThreadToken GetSamplingProfilerCurrent PlatformThreadId id = PlatformThread::CurrentId(); #if BUILDFLAG(IS_ANDROID) return {id, pthread_self()}; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) absl::optional maybe_stack_base = GetThreadStackBaseAddress(id, pthread_self()); - // GetThreadStackBaseAddress should only return nullopt on Android, so + return {id, maybe_stack_base}; diff --git a/www/ungoogled-chromium/files/patch-base_profiler_sampling__profiler__thread__token.h b/www/ungoogled-chromium/files/patch-base_profiler_sampling__profiler__thread__token.h index 276a0bc34fb0..a39fe8f28213 100644 --- a/www/ungoogled-chromium/files/patch-base_profiler_sampling__profiler__thread__token.h +++ b/www/ungoogled-chromium/files/patch-base_profiler_sampling__profiler__thread__token.h @@ -1,20 +1,20 @@ ---- base/profiler/sampling_profiler_thread_token.h.orig 2022-10-29 17:50:56 UTC +--- base/profiler/sampling_profiler_thread_token.h.orig 2023-02-11 09:11:04 UTC +++ base/profiler/sampling_profiler_thread_token.h -@@ -11,7 +11,7 @@ +@@ -12,7 +12,7 @@ #if BUILDFLAG(IS_ANDROID) #include -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #endif -@@ -25,7 +25,7 @@ struct SamplingProfilerThreadToken { +@@ -26,7 +26,7 @@ struct SamplingProfilerThreadToken { PlatformThreadId id; #if BUILDFLAG(IS_ANDROID) pthread_t pthread_id; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Due to the sandbox, we can only retrieve the stack base address for the // current thread. We must grab it during // GetSamplingProfilerCurrentThreadToken() and not try to get it later. diff --git a/www/ungoogled-chromium/files/patch-base_profiler_stack__base__address__posix.cc b/www/ungoogled-chromium/files/patch-base_profiler_stack__base__address__posix.cc index 95431d60c17a..0c2a3062495e 100644 --- a/www/ungoogled-chromium/files/patch-base_profiler_stack__base__address__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_profiler_stack__base__address__posix.cc @@ -1,44 +1,50 @@ ---- base/profiler/stack_base_address_posix.cc.orig 2022-10-29 17:50:56 UTC +--- base/profiler/stack_base_address_posix.cc.orig 2023-02-11 09:11:04 UTC +++ base/profiler/stack_base_address_posix.cc -@@ -15,6 +15,10 @@ +@@ -17,6 +17,10 @@ #include "base/files/scoped_file.h" #endif +#if BUILDFLAG(IS_BSD) +#include +#endif + #if BUILDFLAG(IS_CHROMEOS) extern "C" void* __libc_stack_end; #endif -@@ -42,15 +46,30 @@ absl::optional GetAndroidMainThreadStackBas - #endif +@@ -45,7 +49,21 @@ absl::optional GetAndroidMainThreadStackBas + #if !BUILDFLAG(IS_LINUX) uintptr_t GetThreadStackBaseAddressImpl(pthread_t pthread_id) { +#if BUILDFLAG(IS_OPENBSD) + stack_t ss; + void *address; + size_t size; + if (pthread_stackseg_np(pthread_id, &ss) != 0) + return 0; + size = ss.ss_size; + address = (void*)((size_t) ss.ss_sp - ss.ss_size); +#else pthread_attr_t attr; +#if BUILDFLAG(IS_FREEBSD) ++ int result; + pthread_attr_init(&attr); + pthread_attr_get_np(pthread_id, &attr); +#else - // This will crash on ChromeOS & Linux if we are in the sandbox and pthread_id - // refers to a different thread, due to the use of sched_getaffinity(). - pthread_getattr_np(pthread_id, &attr); - // See crbug.com/617730 for limitations of this approach on Linux. + // pthread_getattr_np will crash on ChromeOS & Linux if we are in the sandbox + // and pthread_id refers to a different thread, due to the use of + // sched_getaffinity(). +@@ -58,12 +76,14 @@ uintptr_t GetThreadStackBaseAddressImpl(pthread_t pthr + << logging::SystemErrorCodeToString(result); + // See crbug.com/617730 for limitations of this approach on Linux-like + // systems. +#endif void* address; size_t size; - pthread_attr_getstack(&attr, &address, &size); + result = pthread_attr_getstack(&attr, &address, &size); + CHECK_EQ(result, 0) << "pthread_attr_getstack returned " + << logging::SystemErrorCodeToString(result); pthread_attr_destroy(&attr); +#endif const uintptr_t base_address = reinterpret_cast(address) + size; return base_address; } diff --git a/www/ungoogled-chromium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc b/www/ungoogled-chromium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc index dd4cc7494787..06bf26e62c2c 100644 --- a/www/ungoogled-chromium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc +++ b/www/ungoogled-chromium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc @@ -1,11 +1,11 @@ ---- base/profiler/stack_sampling_profiler_test_util.cc.orig 2022-10-01 07:40:07 UTC +--- base/profiler/stack_sampling_profiler_test_util.cc.orig 2023-02-11 09:11:04 UTC +++ base/profiler/stack_sampling_profiler_test_util.cc -@@ -39,7 +39,7 @@ +@@ -33,7 +33,7 @@ // Fortunately, it provides _alloca, which functions identically. #include #define alloca _alloca -#else +#elif !BUILDFLAG(IS_BSD) #include #endif diff --git a/www/ungoogled-chromium/files/patch-base_system_sys__info.cc b/www/ungoogled-chromium/files/patch-base_system_sys__info.cc index ad267c047e73..47fd5bb0646a 100644 --- a/www/ungoogled-chromium/files/patch-base_system_sys__info.cc +++ b/www/ungoogled-chromium/files/patch-base_system_sys__info.cc @@ -1,11 +1,11 @@ ---- base/system/sys_info.cc.orig 2022-10-01 07:40:07 UTC +--- base/system/sys_info.cc.orig 2023-02-11 09:11:04 UTC +++ base/system/sys_info.cc -@@ -101,7 +101,7 @@ std::string SysInfo::HardwareModelName() { +@@ -107,7 +107,7 @@ std::string SysInfo::HardwareModelName() { #endif void SysInfo::GetHardwareInfo(base::OnceCallback callback) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) constexpr base::TaskTraits kTraits = {base::MayBlock()}; #else constexpr base::TaskTraits kTraits = {}; diff --git a/www/ungoogled-chromium/files/patch-base_system_sys__info.h b/www/ungoogled-chromium/files/patch-base_system_sys__info.h index 3775da000137..2650a8f2d8d5 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 2022-12-02 17:56:32 UTC +--- base/system/sys_info.h.orig 2023-02-11 09:11:04 UTC +++ base/system/sys_info.h -@@ -233,6 +233,8 @@ class BASE_EXPORT SysInfo { +@@ -246,6 +246,8 @@ class BASE_EXPORT SysInfo { static void SetIsCpuSecurityMitigationsEnabled(bool is_enabled); #endif + static uint64_t MaxSharedMemorySize(); + private: FRIEND_TEST_ALL_PREFIXES(SysInfoTest, AmountOfAvailablePhysicalMemory); FRIEND_TEST_ALL_PREFIXES(debug::SystemMetricsTest, ParseMeminfo); -@@ -243,7 +245,7 @@ class BASE_EXPORT SysInfo { +@@ -257,7 +259,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__posix.cc b/www/ungoogled-chromium/files/patch-base_system_sys__info__posix.cc index 53492ff1ab04..21bec8f72379 100644 --- a/www/ungoogled-chromium/files/patch-base_system_sys__info__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_system_sys__info__posix.cc @@ -1,26 +1,26 @@ ---- base/system/sys_info_posix.cc.orig 2023-01-13 08:56:02 UTC +--- base/system/sys_info_posix.cc.orig 2023-02-11 09:11:04 UTC +++ base/system/sys_info_posix.cc -@@ -154,12 +154,12 @@ int NumberOfProcessors() { +@@ -159,12 +159,12 @@ int NumberOfProcessors() { } // namespace internal -#if !BUILDFLAG(IS_OPENBSD) +#if !BUILDFLAG(IS_BSD) int SysInfo::NumberOfProcessors() { static int number_of_processors = internal::NumberOfProcessors(); return number_of_processors; } -#endif // !BUILDFLAG(IS_OPENBSD) +#endif // !BUILDFLAG(IS_BSD) // static uint64_t SysInfo::AmountOfVirtualMemory() { -@@ -249,6 +249,8 @@ std::string SysInfo::OperatingSystemArchitecture() { +@@ -254,6 +254,8 @@ std::string SysInfo::OperatingSystemArchitecture() { arch = "x86"; } else if (arch == "amd64") { arch = "x86_64"; + } else if (arch == "arm64") { + arch = "aarch64"; } else if (std::string(info.sysname) == "AIX") { arch = "ppc64"; } diff --git a/www/ungoogled-chromium/files/patch-base_system_sys__info__unittest.cc b/www/ungoogled-chromium/files/patch-base_system_sys__info__unittest.cc index 95cc977693b1..81c69c4e45a4 100644 --- a/www/ungoogled-chromium/files/patch-base_system_sys__info__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_system_sys__info__unittest.cc @@ -1,20 +1,20 @@ ---- base/system/sys_info_unittest.cc.orig 2022-12-02 17:56:32 UTC +--- base/system/sys_info_unittest.cc.orig 2023-02-11 09:11:04 UTC +++ base/system/sys_info_unittest.cc -@@ -255,12 +255,16 @@ TEST_F(SysInfoTest, GetHardwareInfo) { +@@ -259,12 +259,16 @@ TEST_F(SysInfoTest, GetHardwareInfo) { EXPECT_TRUE(IsStringUTF8(hardware_info->model)); bool empty_result_expected = #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) false; #else true; #endif EXPECT_EQ(hardware_info->manufacturer.empty(), empty_result_expected); +#if BUILDFLAG(IS_BSD) + empty_result_expected = true; +#endif EXPECT_EQ(hardware_info->model.empty(), empty_result_expected); } diff --git a/www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc b/www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc index 2f759b3c7488..4225adf1a4d5 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-01-13 08:56:02 UTC +--- base/test/launcher/test_launcher.cc.orig 2023-02-11 09:11:04 UTC +++ base/test/launcher/test_launcher.cc -@@ -67,6 +67,7 @@ +@@ -66,6 +66,7 @@ #include "third_party/libxml/chromium/libxml_utils.h" #if BUILDFLAG(IS_POSIX) +#include #include #include "base/files/file_descriptor_watcher_posix.h" diff --git a/www/ungoogled-chromium/files/patch-base_threading_platform__thread.h b/www/ungoogled-chromium/files/patch-base_threading_platform__thread.h deleted file mode 100644 index 969c9339f278..000000000000 --- a/www/ungoogled-chromium/files/patch-base_threading_platform__thread.h +++ /dev/null @@ -1,11 +0,0 @@ ---- base/threading/platform_thread.h.orig 2022-10-01 07:40:07 UTC -+++ base/threading/platform_thread.h -@@ -253,7 +253,7 @@ class BASE_EXPORT PlatformThread { - // Returns a realtime period provided by `delegate`. - static TimeDelta GetRealtimePeriod(Delegate* delegate); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Toggles a specific thread's type at runtime. This can be used to - // change the priority of a thread in a different process and will fail - // if the calling process does not have proper permissions. The diff --git a/www/ungoogled-chromium/files/patch-base_threading_platform__thread__linux.cc b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__linux.cc index a837b6d17329..32ad247c0560 100644 --- a/www/ungoogled-chromium/files/patch-base_threading_platform__thread__linux.cc +++ b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__linux.cc @@ -1,77 +1,84 @@ ---- base/threading/platform_thread_linux.cc.orig 2022-12-02 17:56:32 UTC +--- base/threading/platform_thread_linux.cc.orig 2023-02-11 09:11:04 UTC +++ base/threading/platform_thread_linux.cc -@@ -29,7 +29,9 @@ +@@ -30,7 +30,9 @@ #if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) #include +#if !BUILDFLAG(IS_BSD) #include +#endif #include #include #include -@@ -134,7 +136,7 @@ long sched_setattr(pid_t pid, +@@ -139,7 +141,7 @@ long sched_setattr(pid_t pid, #endif // !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) #endif // BUILDFLAG(IS_CHROMEOS) -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) const FilePath::CharType kCgroupDirectory[] = FILE_PATH_LITERAL("/sys/fs/cgroup"); -@@ -306,7 +308,7 @@ void SetThreadCgroupsForThreadType(PlatformThreadId th +@@ -313,7 +315,7 @@ void SetThreadCgroupsForThreadType(PlatformThreadId th namespace internal { namespace { -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) const struct sched_param kRealTimePrio = {8}; #endif } // namespace -@@ -332,7 +334,7 @@ const ThreadTypeToNiceValuePair kThreadTypeToNiceValue +@@ -340,7 +342,7 @@ const ThreadTypeToNiceValuePair kThreadTypeToNiceValue }; bool CanSetThreadTypeToRealtimeAudio() { -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) // A non-zero soft-limit on RLIMIT_RTPRIO is required to be allowed to invoke // pthread_setschedparam in SetCurrentThreadTypeForPlatform(). struct rlimit rlim; -@@ -344,7 +346,7 @@ bool CanSetThreadTypeToRealtimeAudio() { +@@ -352,7 +354,7 @@ bool CanSetThreadTypeToRealtimeAudio() { bool SetCurrentThreadTypeForPlatform(ThreadType thread_type, MessagePumpType pump_type_hint) { -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) - // For legacy schedtune interface - SetThreadCgroupsForThreadType(PlatformThread::CurrentId(), thread_type); + const PlatformThreadId tid = PlatformThread::CurrentId(); -@@ -363,7 +365,7 @@ bool SetCurrentThreadTypeForPlatform(ThreadType thread + if (g_thread_type_delegate && +@@ -378,7 +380,7 @@ bool SetCurrentThreadTypeForPlatform(ThreadType thread absl::optional GetCurrentThreadPriorityForPlatformForTest() { -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) int maybe_sched_rr = 0; struct sched_param maybe_realtime_prio = {0}; if (pthread_getschedparam(pthread_self(), &maybe_sched_rr, -@@ -382,7 +384,7 @@ GetCurrentThreadPriorityForPlatformForTest() { +@@ -397,7 +399,7 @@ GetCurrentThreadPriorityForPlatformForTest() { void PlatformThread::SetName(const std::string& name) { ThreadIdNameManager::GetInstance()->SetName(name); -#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) && !BUILDFLAG(IS_BSD) // On linux we can get the thread names to show up in the debugger by setting // the process name for the LWP. We don't want to do this for the main // thread because that would rename the process, causing tools like killall -@@ -412,8 +414,10 @@ void PlatformThread::SetThreadType(ProcessId process_i - // priority. - CHECK_NE(thread_id, process_id); +@@ -417,7 +419,7 @@ void PlatformThread::SetName(const std::string& name) + #endif // !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) + } -+#if !BUILDFLAG(IS_BSD) - // For legacy schedtune interface - SetThreadCgroupsForThreadType(thread_id, thread_type); -+#endif +-#if !BUILDFLAG(IS_NACL) ++#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) + // static + void PlatformThread::SetThreadTypeDelegate(ThreadTypeDelegate* delegate) { + // A component cannot override a delegate set by another component, thus +@@ -428,7 +430,7 @@ void PlatformThread::SetThreadTypeDelegate(ThreadTypeD + } + #endif - #if BUILDFLAG(IS_CHROMEOS) - // For upstream uclamp interface. We try both legacy (schedtune, as done +-#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) ++#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) && !BUILDFLAG(IS_BSD) + // static + void PlatformThread::SetThreadType(ProcessId process_id, + PlatformThreadId thread_id, 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 41b9473bc480..6d4cbd30480e 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-01-13 08:56:02 UTC +--- base/threading/platform_thread_unittest.cc.orig 2023-02-11 09:11:04 UTC +++ base/threading/platform_thread_unittest.cc @@ -31,7 +31,7 @@ #include "base/time/time.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include #include -@@ -417,7 +417,7 @@ TEST(PlatformThreadTest, +@@ -422,7 +422,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; -@@ -684,12 +684,16 @@ INSTANTIATE_TEST_SUITE_P( +@@ -696,12 +696,16 @@ INSTANTIATE_TEST_SUITE_P( #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) namespace { bool IsTidCacheCorrect() { +#if BUILDFLAG(IS_BSD) + return PlatformThread::CurrentId() == reinterpret_cast(pthread_self()); +#else return PlatformThread::CurrentId() == syscall(__NR_gettid); +#endif } void* CheckTidCacheCorrectWrapper(void*) { diff --git a/www/ungoogled-chromium/files/patch-base_trace__event_malloc__dump__provider.cc b/www/ungoogled-chromium/files/patch-base_trace__event_malloc__dump__provider.cc index 6c3ac7b188a4..0ccbb2266162 100644 --- a/www/ungoogled-chromium/files/patch-base_trace__event_malloc__dump__provider.cc +++ b/www/ungoogled-chromium/files/patch-base_trace__event_malloc__dump__provider.cc @@ -1,30 +1,30 @@ ---- base/trace_event/malloc_dump_provider.cc.orig 2022-10-29 17:50:56 UTC +--- base/trace_event/malloc_dump_provider.cc.orig 2023-02-11 09:11:04 UTC +++ base/trace_event/malloc_dump_provider.cc -@@ -24,6 +24,8 @@ +@@ -25,6 +25,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif defined(OS_BSD) +#include #else #include #endif -@@ -186,7 +188,7 @@ void ReportAppleAllocStats(size_t* total_virtual_size, +@@ -187,7 +189,7 @@ void ReportAppleAllocStats(size_t* total_virtual_size, #if (BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \ (!BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_WIN) && \ - !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_FUCHSIA)) + !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD)) void ReportMallinfoStats(ProcessMemoryDump* pmd, size_t* total_virtual_size, size_t* resident_size, -@@ -357,6 +359,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump +@@ -358,6 +360,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump &allocated_objects_count); #elif BUILDFLAG(IS_FUCHSIA) // TODO(fuchsia): Port, see https://crbug.com/706592. +#elif defined(OS_BSD) + total_virtual_size = 0; + allocated_objects_size = 0; #else ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size, &allocated_objects_size, &allocated_objects_count); diff --git a/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn b/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn index d1926c6abe86..593af52dc231 100644 --- a/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn @@ -1,131 +1,131 @@ ---- build/config/compiler/BUILD.gn.orig 2023-01-13 08:56:02 UTC +--- build/config/compiler/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ build/config/compiler/BUILD.gn @@ -224,13 +224,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 --------------------------------------------------------------------- @@ -454,6 +457,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ if (use_gold) { @@ -529,7 +536,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 += [ -@@ -808,7 +815,7 @@ config("compiler") { +@@ -813,7 +820,7 @@ config("compiler") { # lldb doesn't have the needed changes yet. # * Fuchsia isn't supported as zxdb doesn't support simple template names yet. # TODO(crbug.com/1379070): Remove if the upstream default ever changes. - if (is_clang && !is_nacl && !is_win && !is_apple && !is_fuchsia) { + if (is_clang && !is_nacl && !is_win && !is_apple && !is_fuchsia && !is_bsd) { cflags_cc += [ "-gsimple-template-names" ] } -@@ -958,7 +965,7 @@ config("compiler_cpu_abi") { +@@ -973,7 +980,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" ] -@@ -973,7 +980,7 @@ config("compiler_cpu_abi") { +@@ -988,7 +995,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" ] -@@ -1307,7 +1314,7 @@ config("compiler_deterministic") { +@@ -1322,7 +1329,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", -@@ -1359,7 +1366,7 @@ config("compiler_deterministic") { +@@ -1374,7 +1381,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", -@@ -1600,7 +1607,7 @@ config("default_warnings") { +@@ -1615,7 +1622,7 @@ config("default_warnings") { "-Wno-ignored-pragma-optimize", ] - if (!is_nacl) { + if (!is_nacl && !is_bsd) { cflags += [ # TODO(crbug.com/1343975) Evaluate and possibly enable. "-Wno-deprecated-builtins", -@@ -1779,7 +1786,7 @@ config("no_chromium_code") { +@@ -1794,7 +1801,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", -@@ -2301,7 +2308,7 @@ config("afdo_optimize_size") { +@@ -2302,7 +2309,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. -@@ -2317,7 +2324,7 @@ config("afdo") { +@@ -2318,7 +2325,7 @@ config("afdo") { cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ] inputs = [ _clang_sample_profile ] } - } else if (auto_profile_path != "" && is_a_target_toolchain) { + } else if (auto_profile_path != "" && is_a_target_toolchain && !is_bsd) { cflags = [ "-fauto-profile=${auto_profile_path}" ] inputs = [ auto_profile_path ] } -@@ -2464,7 +2471,8 @@ config("symbols") { +@@ -2472,7 +2479,8 @@ config("symbols") { configs += [ "//build/config:compress_debug_sections" ] } - if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") { + if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos" && + !is_bsd) { if (is_apple) { # TODO(https://crbug.com/1050118): Investigate missing debug info on mac. # Make sure we don't use constructor homing on mac. diff --git a/www/ungoogled-chromium/files/patch-build_config_rust.gni b/www/ungoogled-chromium/files/patch-build_config_rust.gni index 0c1aad6f4204..c81da9cffb05 100644 --- a/www/ungoogled-chromium/files/patch-build_config_rust.gni +++ b/www/ungoogled-chromium/files/patch-build_config_rust.gni @@ -1,11 +1,11 @@ ---- build/config/rust.gni.orig 2022-10-01 07:40:07 UTC +--- build/config/rust.gni.orig 2023-02-11 09:11:04 UTC +++ build/config/rust.gni -@@ -124,7 +124,7 @@ if (enable_rust) { +@@ -128,7 +128,7 @@ if (enable_rust) { rust_sysroot = "//third_party/rust-toolchain" use_unverified_rust_toolchain = false } else { - if (host_os != "linux") { + if (host_os != "linux" && host_os != "openbsd" && host_os != "freebsd") { assert(false, "Attempt to use Android Rust toolchain on an unsupported platform") } diff --git a/www/ungoogled-chromium/files/patch-build_linux_unbundle_openh264.gn b/www/ungoogled-chromium/files/patch-build_linux_unbundle_openh264.gn deleted file mode 100644 index ce49d35c24aa..000000000000 --- a/www/ungoogled-chromium/files/patch-build_linux_unbundle_openh264.gn +++ /dev/null @@ -1,21 +0,0 @@ ---- build/linux/unbundle/openh264.gn.orig 2023-01-13 08:56:02 UTC -+++ build/linux/unbundle/openh264.gn -@@ -2,6 +2,7 @@ - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. - -+import("//build/buildflag_header.gni") - import("//build/config/linux/pkg_config.gni") - import("//build/shim_headers.gni") - -@@ -33,4 +34,10 @@ source_set("processing") { - source_set("encoder") { - deps = [ ":openh264_shim" ] - public_configs = [ ":config" ] -+} -+ -+buildflag_header("buildflags") { -+ header = "buildflags.h" -+ header_dir = "third_party/openh264" -+ flags = [ "OPENH264_API_WELS=1" ] - } diff --git a/www/ungoogled-chromium/files/patch-build_linux_unbundle_replace__gn__files.py b/www/ungoogled-chromium/files/patch-build_linux_unbundle_replace__gn__files.py index 8cea9aed65c9..95dd8efda0f0 100644 --- a/www/ungoogled-chromium/files/patch-build_linux_unbundle_replace__gn__files.py +++ b/www/ungoogled-chromium/files/patch-build_linux_unbundle_replace__gn__files.py @@ -1,10 +1,10 @@ ---- build/linux/unbundle/replace_gn_files.py.orig 2022-12-02 17:56:32 UTC +--- build/linux/unbundle/replace_gn_files.py.orig 2023-02-11 09:11:04 UTC +++ build/linux/unbundle/replace_gn_files.py -@@ -53,6 +53,7 @@ REPLACEMENTS = { +@@ -54,6 +54,7 @@ REPLACEMENTS = { + 'libevent': 'third_party/libevent/BUILD.gn', 'libjpeg': 'third_party/libjpeg.gni', - 'libjxl' : 'third_party/libjxl/BUILD.gn', 'libpng': 'third_party/libpng/BUILD.gn', + 'libusb': 'third_party/libusb/BUILD.gn', 'libvpx': 'third_party/libvpx/BUILD.gn', 'libwebp': 'third_party/libwebp/BUILD.gn', 'libxml': 'third_party/libxml/BUILD.gn', diff --git a/www/ungoogled-chromium/files/patch-build_toolchain_gcc__toolchain.gni b/www/ungoogled-chromium/files/patch-build_toolchain_gcc__toolchain.gni index 6901142d91d9..30b2705b7e26 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-01-13 08:56:02 UTC +--- build/toolchain/gcc_toolchain.gni.orig 2023-02-11 09:11:04 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). # -@@ -799,22 +806,12 @@ template("gcc_toolchain") { +@@ -803,22 +810,12 @@ template("gcc_toolchain") { # use_gold too. template("clang_toolchain") { gcc_toolchain(target_name) { - _path = "$clang_base_path/bin" - _is_path_absolute = get_path_info(_path, "abspath") == _path - - # Preserve absolute paths for tools like distcc. - if (_is_path_absolute && filter_include([ _path ], [ "//*" ]) == []) { - prefix = _path - } else { - prefix = rebase_path(_path, root_build_dir) - } - - cc = "${prefix}/clang" - cxx = "${prefix}/clang++" + cc = "cc" + cxx = "c++" ld = cxx - readelf = "${prefix}/llvm-readelf" - ar = "${prefix}/llvm-ar" - nm = "${prefix}/llvm-nm" + readelf = "readelf" + ar = "ar" + nm = "nm" forward_variables_from(invoker, [ diff --git a/www/ungoogled-chromium/files/patch-cc_BUILD.gn b/www/ungoogled-chromium/files/patch-cc_BUILD.gn index 384dd64a84ab..eda293d19710 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-01-13 08:56:02 UTC +--- cc/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ cc/BUILD.gn -@@ -666,7 +666,7 @@ cc_test_static_library("test_support") { +@@ -665,7 +665,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" ] } } -@@ -893,7 +893,6 @@ cc_test("cc_unittests") { +@@ -892,7 +892,6 @@ cc_test("cc_unittests") { data = [ "//components/viz/test/data/" ] data_deps = [ "//testing/buildbot/filters:cc_unittests_filters", - "//third_party/mesa_headers", ] if (is_android && enable_chrome_android_internal) { diff --git a/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc index 23c36a2b967d..91483ba1066f 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,121 +1,121 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/app/chrome_main_delegate.cc -@@ -136,7 +136,7 @@ +@@ -138,7 +138,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 -@@ -180,16 +180,16 @@ +@@ -182,16 +182,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 -@@ -348,7 +348,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -351,7 +351,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 -@@ -433,7 +433,7 @@ bool HandleVersionSwitches(const base::CommandLine& co +@@ -436,7 +436,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) || -@@ -540,7 +540,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -550,7 +550,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. -@@ -629,7 +629,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat +@@ -639,7 +639,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Record the startup process creation time on supported platforms. On Android // this is recorded in ChromeMainDelegateAndroid. startup_metric_utils::RecordStartupProcessCreationTime( -@@ -911,6 +911,8 @@ void ChromeMainDelegate::CommonEarlyInitialization() { +@@ -927,6 +927,8 @@ void ChromeMainDelegate::CommonEarlyInitialization() { // not always enabled on ChromeOS. #if BUILDFLAG(IS_CHROMEOS) bool enable_gwp_asan = crash_reporter::IsCrashpadEnabled(); +#elif BUILDFLAG(IS_BSD) + bool enable_gwp_asan = false; #else bool enable_gwp_asan = true; #endif -@@ -971,7 +973,7 @@ void ChromeMainDelegate::CommonEarlyInitialization() { +@@ -987,7 +989,7 @@ void ChromeMainDelegate::CommonEarlyInitialization() { base::internal::TimerBase::InitializeFeatures(); base::InitializeCpuReductionExperiment(); base::sequence_manager::internal::SequenceManagerImpl::InitializeFeatures(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) base::MessagePumpLibevent::InitializeFeatures(); #elif BUILDFLAG(IS_MAC) base::PlatformThread::InitFeaturesPostFieldTrial(); -@@ -1080,7 +1082,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1119,7 +1121,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 -@@ -1110,7 +1112,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1149,7 +1151,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 -@@ -1492,7 +1494,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1531,7 +1533,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)) { -@@ -1572,7 +1574,7 @@ absl::variant Chrome +@@ -1611,7 +1613,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_generated__resources.grd b/www/ungoogled-chromium/files/patch-chrome_app_generated__resources.grd index 426641718504..932cc75b32fb 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_generated__resources.grd +++ b/www/ungoogled-chromium/files/patch-chrome_app_generated__resources.grd @@ -1,74 +1,74 @@ ---- chrome/app/generated_resources.grd.orig 2023-01-13 08:56:02 UTC +--- chrome/app/generated_resources.grd.orig 2023-02-11 09:11:04 UTC +++ chrome/app/generated_resources.grd @@ -2,7 +2,7 @@ -@@ -3090,7 +3090,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -3122,7 +3122,7 @@ are declared in tools/grit/grit_rule.gni. - + Device Credentials -@@ -4820,7 +4820,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -4868,7 +4868,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 -@@ -5493,7 +5493,7 @@ Keep your key file in a safe place. You will need it t +@@ -5529,7 +5529,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. -@@ -5521,7 +5521,7 @@ Keep your key file in a safe place. You will need it t +@@ -5575,7 +5575,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. -@@ -9168,7 +9168,7 @@ Check your passwords anytime in - + Use system title bar and borders -@@ -10501,7 +10501,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -10620,7 +10620,7 @@ Please help our engineers fix this problem. Tell us wh Set as default - + Minimize -@@ -12597,7 +12597,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -12735,7 +12735,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_settings__strings.grdp b/www/ungoogled-chromium/files/patch-chrome_app_settings__strings.grdp index 1c10422231e8..01bbfd03d823 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_settings__strings.grdp +++ b/www/ungoogled-chromium/files/patch-chrome_app_settings__strings.grdp @@ -1,20 +1,20 @@ ---- chrome/app/settings_strings.grdp.orig 2023-01-13 08:56:02 UTC +--- chrome/app/settings_strings.grdp.orig 2023-02-11 09:11:04 UTC +++ chrome/app/settings_strings.grdp -@@ -151,7 +151,7 @@ +@@ -154,7 +154,7 @@ Theme - + GTK -@@ -171,7 +171,7 @@ +@@ -174,7 +174,7 @@ Use Classic - + Reset to default diff --git a/www/ungoogled-chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd b/www/ungoogled-chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd index 6e72c0c1edcd..ab2790c1099c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd +++ b/www/ungoogled-chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd @@ -1,29 +1,29 @@ ---- chrome/app/theme/chrome_unscaled_resources.grd.orig 2022-10-29 17:50:56 UTC +--- chrome/app/theme/chrome_unscaled_resources.grd.orig 2023-02-11 09:11:04 UTC +++ chrome/app/theme/chrome_unscaled_resources.grd -@@ -19,7 +19,7 @@ - - +@@ -16,7 +16,7 @@ + + + +- ++ + + + +@@ -61,7 +61,7 @@ + + - + -@@ -36,7 +36,7 @@ +@@ -75,7 +75,7 @@ - + - + - - -@@ -78,7 +78,7 @@ - - - -- -+ - - - + + diff --git a/www/ungoogled-chromium/files/patch-chrome_app_theme_theme__resources.grd b/www/ungoogled-chromium/files/patch-chrome_app_theme_theme__resources.grd index c4bfad4e4a32..89a46b9c1520 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_theme_theme__resources.grd +++ b/www/ungoogled-chromium/files/patch-chrome_app_theme_theme__resources.grd @@ -1,47 +1,59 @@ ---- chrome/app/theme/theme_resources.grd.orig 2022-12-02 17:56:32 UTC +--- chrome/app/theme/theme_resources.grd.orig 2023-02-11 09:11:04 UTC +++ chrome/app/theme/theme_resources.grd -@@ -135,7 +135,7 @@ +@@ -135,14 +135,14 @@ - + - - -@@ -152,7 +152,7 @@ - - + + + + - + - - -@@ -176,7 +176,7 @@ - - + + +@@ -150,7 +150,7 @@ + + - + -@@ -186,7 +186,7 @@ - - +@@ -162,7 +162,7 @@ -- -+ + - - -@@ -195,7 +195,7 @@ - - +- ++ + + + +@@ -171,10 +171,10 @@ + + + +- ++ + + +- ++ + + + +@@ -183,7 +183,7 @@ + + + +- ++ -- -+ + - - diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc b/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc index 3604676b5127..e0720a33506e 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc @@ -1,119 +1,117 @@ ---- chrome/browser/about_flags.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/about_flags.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/about_flags.cc -@@ -218,7 +218,7 @@ - #include "ui/native_theme/native_theme_features.h" +@@ -219,7 +219,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 -@@ -294,7 +294,7 @@ +@@ -295,7 +295,7 @@ #include "chrome/browser/supervised_user/supervised_user_features/supervised_user_features.h" // nogncheck #endif // ENABLE_SUPERVISED_USERS -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "ui/ozone/buildflags.h" #include "ui/ozone/public/ozone_switches.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) @@ -402,7 +402,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, -@@ -1395,7 +1395,7 @@ const FeatureEntry::FeatureVariation kTabGroupsSaveVar - }; +@@ -1318,7 +1318,7 @@ const FeatureEntry::FeatureVariation kLocalWebApproval + #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 FeatureEntry::FeatureParam kOmniboxDocumentProviderServerScoring[] = { - {"DocumentUseServerScore", "true"}, - {"DocumentUseClientScore", "false"}, -@@ -4817,7 +4817,7 @@ const FeatureEntry kFeatureEntries[] = { + const FeatureEntry::FeatureParam + kOmniboxDocumentProviderCapLowQualitySuggestionsTo1[] = { + {"DocumentProviderMaxLowQualitySuggestions", "1"}, +@@ -4486,13 +4486,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)}, -@@ -4830,7 +4830,7 @@ const FeatureEntry kFeatureEntries[] = { - password_manager::features::kForceInitialSyncWhenDecryptionFails)}, #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"skip-undecryptable-passwords", flag_descriptions::kSkipUndecryptablePasswordsName, flag_descriptions::kSkipUndecryptablePasswordsDescription, -@@ -5097,7 +5097,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4759,7 +4759,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(feed::kDiscoFeedEndpoint)}, #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)}, -@@ -5706,7 +5706,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5338,7 +5338,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-experimental-keyword-mode", flag_descriptions::kOmniboxExperimentalKeywordModeName, flag_descriptions::kOmniboxExperimentalKeywordModeDescription, kOsDesktop, -@@ -6342,7 +6342,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5976,7 +5976,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kPointerLockOptionsDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kPointerLockOptions)}, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"enable-async-dns", flag_descriptions::kAsyncDnsName, flag_descriptions::kAsyncDnsDescription, kOsWin | kOsLinux, FEATURE_VALUE_TYPE(features::kAsyncDns)}, -@@ -7344,7 +7344,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6976,7 +6976,7 @@ const FeatureEntry kFeatureEntries[] = { #endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"global-media-controls-modern-ui", flag_descriptions::kGlobalMediaControlsModernUIName, flag_descriptions::kGlobalMediaControlsModernUIDescription, -@@ -8181,7 +8181,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7744,7 +7744,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)}, -@@ -8446,7 +8446,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8002,7 +8002,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, -@@ -9063,7 +9063,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8561,7 +8561,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) {"document-picture-in-picture-api", flag_descriptions::kDocumentPictureInPictureApiName, flag_descriptions::kDocumentPictureInPictureApiDescription, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc index b766fd2d6fec..3e4b046868fe 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 2022-12-02 17:56:32 UTC +--- chrome/browser/browser_process_impl.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/browser_process_impl.cc @@ -214,7 +214,7 @@ #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/error_reporting/chrome_js_error_report_processor.h" // nogncheck #endif -@@ -1165,7 +1165,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { +@@ -1188,7 +1188,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 -@@ -1405,7 +1405,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1428,7 +1428,7 @@ void BrowserProcessImpl::Unpin() { // Mac is currently not supported. // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) bool BrowserProcessImpl::IsRunningInBackground() const { // Check if browser is in the background. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.h b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.h index 4fcc540153fd..2915d1375c9c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.h @@ -1,11 +1,11 @@ ---- chrome/browser/browser_process_impl.h.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/browser_process_impl.h.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/browser_process_impl.h -@@ -359,7 +359,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -360,7 +360,7 @@ class BrowserProcessImpl : public BrowserProcess, // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) base::RepeatingTimer autoupdate_timer_; // Gets called by autoupdate timer to see if browser needs restart and can be diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc index fa4137624c14..5129be9e4228 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,71 +1,71 @@ ---- chrome/browser/chrome_browser_interface_binders.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -113,13 +113,13 @@ +@@ -114,13 +114,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 -@@ -191,7 +191,7 @@ +@@ -192,7 +192,7 @@ #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/discards/discards.mojom.h" #include "chrome/browser/ui/webui/discards/discards_ui.h" #include "chrome/browser/ui/webui/discards/site_data.mojom.h" -@@ -809,7 +809,7 @@ void PopulateChromeFrameBinders( +@@ -812,7 +812,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)); -@@ -817,7 +817,7 @@ void PopulateChromeFrameBinders( +@@ -820,7 +820,7 @@ void PopulateChromeFrameBinders( #endif #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(blink::features::kDesktopPWAsSubApps) && !render_frame_host->GetParentOrOuterDocument()) { // The service binder will reject non-primary main frames, but we still need -@@ -882,14 +882,14 @@ void PopulateChromeWebUIFrameBinders( +@@ -885,14 +885,14 @@ void PopulateChromeWebUIFrameBinders( SegmentationInternalsUI>(map); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< connectors_internals::mojom::PageHandler, enterprise_connectors::ConnectorsInternalsUI>(map); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< app_management::mojom::PageHandlerFactory, WebAppSettingsUI>(map); #endif -@@ -1289,7 +1289,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1303,7 +1303,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 ad94c3349eb3..c4a2caa6dce8 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,43 +1,43 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/chrome_browser_main.cc @@ -240,11 +240,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 @@ -279,7 +279,7 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h" #include "chrome/browser/metrics/desktop_session_duration/touch_mode_stats_tracker.h" #include "chrome/browser/profiles/profile_activity_metrics_recorder.h" -@@ -987,7 +987,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -988,7 +988,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 . -@@ -1035,7 +1035,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1044,7 +1044,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) metrics::DesktopSessionDurationTracker::Initialize(); ProfileActivityMetricsRecorder::Initialize(); TouchModeStatsTracker::Initialize( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc index 9eebe27a27e9..9bd66f592226 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,145 +1,145 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -394,7 +394,7 @@ +@@ -400,7 +400,7 @@ #include "components/user_manager/user_manager.h" #include "services/service_manager/public/mojom/interface_provider_spec.mojom.h" #include "storage/browser/file_system/external_mount_points.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/chrome_browser_main_linux.h" #elif BUILDFLAG(IS_ANDROID) #include "base/android/application_status_listener.h" -@@ -479,12 +479,12 @@ +@@ -485,12 +485,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 -@@ -493,13 +493,13 @@ +@@ -499,13 +499,13 @@ #include "components/crash/content/browser/crash_handler_host_linux.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/chrome_browser_main_extra_parts_enterprise.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) -@@ -528,11 +528,11 @@ +@@ -534,11 +534,11 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/chrome_browser_main_extra_parts_linux.h" #elif BUILDFLAG(IS_OZONE) #include "chrome/browser/chrome_browser_main_extra_parts_ozone.h" -@@ -1598,7 +1598,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1624,7 +1624,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) -@@ -1637,7 +1637,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1663,7 +1663,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 -@@ -1658,7 +1658,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1684,7 +1684,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()); -@@ -1677,7 +1677,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1703,7 +1703,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>()); -@@ -2483,6 +2483,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2526,6 +2526,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()) { -@@ -2878,7 +2880,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2909,7 +2911,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)) { -@@ -4328,7 +4330,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -4392,7 +4394,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, -@@ -4843,14 +4845,14 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -4907,14 +4909,14 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati &throttles); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) MaybeAddThrottle( WebAppSettingsNavigationThrottle::MaybeCreateThrottleFor(handle), &throttles); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) MaybeAddThrottle(enterprise_connectors::DeviceTrustNavigationThrottle:: MaybeCreateThrottleFor(handle), &throttles); -@@ -4877,7 +4879,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -4941,7 +4943,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); 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 faa6ec868df4..365f44d12cb5 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-01-13 08:56:02 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -442,7 +442,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -441,7 +441,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_chrome__content__settings__utils.cc b/www/ungoogled-chromium/files/patch-chrome_browser_content__settings_chrome__content__settings__utils.cc deleted file mode 100644 index b98f8c715b01..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_content__settings_chrome__content__settings__utils.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/content_settings/chrome_content_settings_utils.cc.orig 2022-12-02 17:56:32 UTC -+++ chrome/browser/content_settings/chrome_content_settings_utils.cc -@@ -44,7 +44,7 @@ void UpdateLocationBarUiForWebContents(content::WebCon - location_bar->UpdateContentSettingsIcons(); - - // TODO(https://crbug.com/1346734): Enable this on all platforms. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // The document PiP window does not have a location bar, but has some content - // setting views that need to be updated too. - if (browser->is_type_picture_in_picture()) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_dev__ui__browser__resources.grd b/www/ungoogled-chromium/files/patch-chrome_browser_dev__ui__browser__resources.grd index d192fc515736..af2da2329232 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_dev__ui__browser__resources.grd +++ b/www/ungoogled-chromium/files/patch-chrome_browser_dev__ui__browser__resources.grd @@ -1,11 +1,11 @@ ---- chrome/browser/dev_ui_browser_resources.grd.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/dev_ui_browser_resources.grd.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/dev_ui_browser_resources.grd -@@ -36,7 +36,7 @@ This file specifies browser resources for developer-fa +@@ -33,7 +33,7 @@ This file specifies browser resources for developer-fa - + diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc index badeb48cadae..e3db5adde465 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc @@ -1,20 +1,20 @@ ---- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1547,7 +1547,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1548,7 +1548,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferreredForFile( const base::FilePath& path) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) { return !download_prefs_->ShouldOpenPdfInSystemReader(); } -@@ -1613,7 +1613,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow +@@ -1614,7 +1614,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow content::CheckDownloadAllowedCallback check_download_allowed_cb) { DCHECK_CURRENTLY_ON(BrowserThread::UI); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Don't download pdf if it is a file URL, as that might cause an infinite // download loop if Chrome is not the system pdf viewer. if (url.SchemeIsFile() && download_prefs_->ShouldOpenPdfInSystemReader()) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__file__picker.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__file__picker.cc index dca82c5be246..1bdd4835b529 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__file__picker.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__file__picker.cc @@ -1,20 +1,20 @@ ---- chrome/browser/download/download_file_picker.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/download/download_file_picker.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/download/download_file_picker.cc @@ -17,7 +17,7 @@ #include "content/public/browser/download_manager.h" #include "content/public/browser/web_contents.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_window.h" #include "ui/aura/window.h" -@@ -86,7 +86,7 @@ DownloadFilePicker::DownloadFilePicker(download::Downl +@@ -82,7 +82,7 @@ DownloadFilePicker::DownloadFilePicker(download::Downl // dialog in Linux (See SelectFileImpl() in select_file_dialog_linux_gtk.cc). // and windows.Here we make owning_window host to browser current active // window if it is null. https://crbug.com/1301898 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (!owning_window || !owning_window->GetHost()) { owning_window = BrowserList::GetInstance() ->GetLastActive() diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc index 7547124d2b9e..cec0e3753ec9 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-01-13 08:56:02 UTC +--- chrome/browser/download/download_item_model.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/download/download_item_model.cc -@@ -784,7 +784,7 @@ bool DownloadItemModel::IsCommandChecked( +@@ -798,7 +798,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(); -@@ -827,7 +827,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand +@@ -841,7 +841,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand base::UmaHistogramBoolean("Download.SetAlwaysOpenTo", !is_checked); 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); -@@ -1141,7 +1141,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe +@@ -1164,7 +1164,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_enterprise_connectors_connectors__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc new file mode 100644 index 000000000000..21f80cfe1160 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc @@ -0,0 +1,11 @@ +--- chrome/browser/enterprise/connectors/connectors_service.cc.orig 2023-02-11 09:11:04 UTC ++++ chrome/browser/enterprise/connectors/connectors_service.cc +@@ -484,7 +484,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_browser__crash__event__router.h b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.h index 6bb503252a8c..87ee69d7d52b 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.h @@ -1,29 +1,29 @@ ---- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.h.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.h.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.h @@ -9,7 +9,7 @@ #include "chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.h" #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" -#if !BUILDFLAG(IS_FUCHSIA) +#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) #include "third_party/crashpad/crashpad/client/crash_report_database.h" #endif // !BUILDFLAG(IS_FUCHSIA) namespace enterprise_connectors { -@@ -27,7 +27,7 @@ class BrowserCrashEventRouter - BrowserCrashEventRouter& operator=(const BrowserCrashEventRouter&) = delete; +@@ -31,7 +31,7 @@ class BrowserCrashEventRouter + BrowserCrashEventRouter& operator=(BrowserCrashEventRouter&&) = delete; ~BrowserCrashEventRouter() override; -#if !BUILDFLAG(IS_FUCHSIA) +#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) void OnCloudReportingLaunched( enterprise_reporting::ReportScheduler* report_scheduler) override; void UploadToReportingServer( -@@ -42,7 +42,7 @@ class BrowserCrashEventRouter +@@ -46,7 +46,7 @@ class BrowserCrashEventRouter raw_ptr controller_ = nullptr; -#if !BUILDFLAG(IS_FUCHSIA) +#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) // ReportCrashes() checks the enterprise policy settings, retrieves crash // reports from the crashpad local database and sends reports that have not // been sent to the reporting server. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn index 4e3147a3081c..27e4a283fd3f 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-01-13 08:56:02 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1326,6 +1326,10 @@ static_library("extensions") { +@@ -1322,6 +1322,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_browser__context__keyed__service__factories.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc similarity index 69% rename from www/ungoogled-chromium/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc rename to www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc index 9c6917813337..20972bebbba1 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_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/browser_context_keyed_service_factories.cc.orig 2022-10-01 07:40:07 UTC -+++ chrome/browser/extensions/browser_context_keyed_service_factories.cc -@@ -53,7 +53,7 @@ +--- chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc.orig 2023-02-11 09:11:04 UTC ++++ chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc +@@ -40,7 +40,7 @@ + #include "extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.h" #include "extensions/browser/api/networking_private/networking_private_delegate_factory.h" - #include "ppapi/buildflags/buildflags.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h" #endif -@@ -121,7 +121,7 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() +@@ -91,7 +91,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_image__writer__private_removable__storage__provider.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc index 5325bc4ea864..6015defdc6ca 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig 2022-10-29 17:50:56 UTC +--- chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc @@ -20,6 +20,7 @@ static base::LazyInstancePostTask( + base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, @@ -33,6 +34,9 @@ void RemovableStorageProvider::GetAllDevices(DeviceLis base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}, base::BindOnce(&RemovableStorageProvider::PopulateDeviceList), std::move(callback)); +#else + NOTIMPLEMENTED(); +#endif } // static diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_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 91f217496421..89f16349d16f 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-01-13 08:56:02 UTC +--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc -@@ -533,7 +533,7 @@ void PasswordsPrivateDelegateImpl::OsReauthCall( +@@ -518,7 +518,7 @@ void PasswordsPrivateDelegateImpl::OsReauthCall( } 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 8506f11c8f8f..b70f951b2212 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 2022-12-02 17:56:32 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -189,7 +189,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -184,7 +184,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kUseCustomChromeFrame] = settings_api::PrefType::PREF_TYPE_BOOLEAN; #endif -@@ -201,7 +201,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -196,7 +196,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::kUsesSystemThemeDeprecated] = settings_api::PrefType::PREF_TYPE_BOOLEAN; (*s_allowlist)[::prefs::kSystemTheme] = diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc index 7a13988c7420..6f477aa5b0a3 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/external_provider_impl.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/extensions/external_provider_impl.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/extensions/external_provider_impl.cc -@@ -826,7 +826,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -825,7 +825,7 @@ void ExternalProviderImpl::CreateExternalProviders( if (!profile->GetPrefs()->GetBoolean(pref_names::kBlockExternalExtensions)) { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) provider_list->push_back(std::make_unique( service, base::MakeRefCounted( -@@ -854,7 +854,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -853,7 +853,7 @@ void ExternalProviderImpl::CreateExternalProviders( bundled_extension_creation_flags)); // Define a per-user source of external extensions. -#if BUILDFLAG(IS_MAC) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if BUILDFLAG(IS_MAC) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ BUILDFLAG(CHROMIUM_BRANDING)) provider_list->push_back(std::make_unique( service, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc b/www/ungoogled-chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc index 4b71ce34d129..604d509e8446 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-01-13 08:56:02 UTC +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -250,7 +250,7 @@ const struct { - {base::DIR_HOME, FILE_PATH_LITERAL("Library/Mobile Documents"), +@@ -253,7 +253,7 @@ const struct { + {base::DIR_HOME, FILE_PATH_LITERAL("Library/CloudStorage"), kDontBlockChildren}, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // On Linux also block access to devices via /dev, as well as security - // sensitive data in /sys and /proc. + // 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 93706c07b384..c6dac75ff9d0 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc @@ -1,65 +1,56 @@ ---- chrome/browser/flag_descriptions.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/flag_descriptions.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/flag_descriptions.cc -@@ -6421,7 +6421,7 @@ const char kSearchWebInSidePanelDescription[] = +@@ -6343,7 +6343,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."; -@@ -6430,7 +6430,7 @@ const char kQuickCommandsDescription[] = +@@ -6352,7 +6352,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."; -@@ -6444,7 +6444,7 @@ const char kWebShareDescription[] = +@@ -6373,7 +6373,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"; -@@ -6464,7 +6464,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti +@@ -6393,7 +6393,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti "Bluetooth"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const char kForcePasswordInitialSyncWhenDecryptionFailsName[] = - "Force initial sync to clean local undecryptable passwords during startup"; - const char kForcePasswordInitialSyncWhenDecryptionFailsDescription[] = -@@ -6472,7 +6472,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail - "storage and requests initial sync."; - #endif // BUILDFLAG(IS_LINUX) - -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const char kSkipUndecryptablePasswordsName[] = "Skip undecryptable passwords to use the available decryptable " "passwords."; -@@ -6481,7 +6481,7 @@ const char kSkipUndecryptablePasswordsDescription[] = - "there are undecryptable ones."; +@@ -6407,7 +6407,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) -@@ -6581,7 +6581,7 @@ const char kElasticOverscrollDescription[] = +@@ -6500,7 +6500,7 @@ const char kElasticOverscrollDescription[] = #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kUIDebugToolsName[] = "Debugging tools for UI"; const char kUIDebugToolsDescription[] = "Enables additional keyboard shortcuts to help debugging."; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h index 424053f645ac..46a2e5e4a301 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h @@ -1,51 +1,62 @@ ---- chrome/browser/flag_descriptions.h.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/flag_descriptions.h.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/flag_descriptions.h -@@ -3696,7 +3696,7 @@ extern const char kSearchWebInSidePanelDescription[]; +@@ -3660,14 +3660,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[]; -@@ -3713,7 +3713,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa + #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) +@@ -3677,7 +3677,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[]; -@@ -3726,18 +3726,18 @@ extern const char kForcePasswordInitialSyncWhenDecrypt - extern const char kForcePasswordInitialSyncWhenDecryptionFailsDescription[]; +@@ -3687,7 +3687,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[]; + +@@ -3695,13 +3695,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) || -@@ -3812,7 +3812,7 @@ extern const char kElasticOverscrollDescription[]; +@@ -3776,7 +3776,7 @@ extern const char kElasticOverscrollDescription[]; #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kUIDebugToolsName[]; extern const char kUIDebugToolsDescription[]; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc index 6afca51d3c32..7a23ff1710c5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc @@ -1,33 +1,33 @@ ---- chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/media/webrtc/webrtc_logging_controller.cc -@@ -24,10 +24,10 @@ +@@ -23,10 +23,10 @@ #include "content/public/browser/browser_context.h" #include "content/public/browser/render_process_host.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/public/browser/child_process_security_policy.h" #include "storage/browser/file_system/isolated_context.h" -#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) using webrtc_event_logging::WebRtcEventLogManager; -@@ -281,7 +281,7 @@ void WebRtcLoggingController::StartEventLogging( +@@ -277,7 +277,7 @@ void WebRtcLoggingController::StartEventLogging( web_app_id, callback); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void WebRtcLoggingController::GetLogsDirectory( LogsDirectoryCallback callback, LogsDirectoryErrorCallback error_callback) { -@@ -327,7 +327,7 @@ void WebRtcLoggingController::GrantLogsDirectoryAccess +@@ -322,7 +322,7 @@ void WebRtcLoggingController::GrantLogsDirectoryAccess FROM_HERE, base::BindOnce(std::move(callback), file_system.id(), registered_name)); } -#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void WebRtcLoggingController::OnRtpPacket( std::unique_ptr packet_header, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc index cc016acf3e74..1d607b0399bd 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,47 +1,47 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -176,7 +176,7 @@ +@@ -175,7 +175,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 -@@ -735,7 +735,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -738,7 +738,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 -@@ -814,7 +814,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -819,7 +819,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()); -@@ -909,7 +909,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -914,7 +914,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) -@@ -1094,7 +1094,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1105,7 +1105,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) // This creates the DesktopProfileSessionDurationsServices if it didn't exist // already. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc index 2aa60230877f..054b1db37160 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc @@ -1,11 +1,11 @@ ---- chrome/browser/metrics/perf/cpu_identity.cc.orig 2022-12-02 17:56:32 UTC +--- chrome/browser/metrics/perf/cpu_identity.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/metrics/perf/cpu_identity.cc -@@ -109,7 +109,7 @@ CPUIdentity GetCPUIdentity() { +@@ -141,7 +141,7 @@ CPUIdentity GetCPUIdentity() { result.release = #if BUILDFLAG(IS_CHROMEOS_ASH) base::SysInfo::KernelVersion(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::SysInfo::OperatingSystemVersion(); #else #error "Unsupported configuration" diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.cc index 8d6b4c43a399..396a7835466a 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,38 +1,38 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2023-02-11 09:11:04 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 "ui/base/l10n/l10n_util.h" -@@ -174,7 +174,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut +@@ -177,7 +177,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) -@@ -452,7 +452,7 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -455,7 +455,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) -@@ -524,7 +524,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -527,7 +527,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterBooleanPref(prefs::kKerberosEnabled, false); #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kAuthNegotiateDelegateByKdcPolicy, false); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc index 41d9b18fc551..da463666c8bd 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc @@ -1,11 +1,11 @@ ---- chrome/browser/password_manager/password_reuse_manager_factory.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/password_manager/password_reuse_manager_factory.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/password_manager/password_reuse_manager_factory.cc -@@ -92,7 +92,7 @@ KeyedService* PasswordReuseManagerFactory::BuildServic +@@ -101,7 +101,7 @@ KeyedService* PasswordReuseManagerFactory::BuildServic // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) std::unique_ptr notifier = std::make_unique( IdentityManagerFactory::GetForProfile(profile)); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_platform__util__linux.cc b/www/ungoogled-chromium/files/patch-chrome_browser_platform__util__linux.cc index 80fab6b84cb5..33d4c0e190e8 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_platform__util__linux.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_platform__util__linux.cc @@ -1,12 +1,12 @@ ---- chrome/browser/platform_util_linux.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/platform_util_linux.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/platform_util_linux.cc -@@ -295,7 +295,9 @@ void RunCommand(const std::string& command, +@@ -296,7 +296,9 @@ void RunCommand(const std::string& command, base::LaunchOptions options; options.current_directory = working_directory; +#if !defined(OS_BSD) options.allow_new_privs = true; +#endif // xdg-open can fall back on mailcap which eventually might plumb through // to a command that needs a terminal. Set the environment variable telling // it that we definitely don't have a terminal available and that it should diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc b/www/ungoogled-chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc index 85259f1d457c..edf06417fba3 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc @@ -1,38 +1,38 @@ ---- chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc -@@ -47,7 +47,7 @@ +@@ -48,7 +48,7 @@ #include "chrome/browser/policy/browser_dm_token_storage_mac.h" #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/browser_dm_token_storage_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -56,7 +56,7 @@ +@@ -57,7 +57,7 @@ #include "chrome/install_static/install_util.h" #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/device_trust_features.h" #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/device_trust_key_manager_impl.h" #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/key_rotation_launcher.h" -@@ -89,7 +89,7 @@ void ChromeBrowserCloudManagementControllerDesktop:: +@@ -90,7 +90,7 @@ void ChromeBrowserCloudManagementControllerDesktop:: #if BUILDFLAG(IS_MAC) storage_delegate = std::make_unique(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) storage_delegate = std::make_unique(); #elif BUILDFLAG(IS_WIN) storage_delegate = std::make_unique(); -@@ -244,7 +244,7 @@ ChromeBrowserCloudManagementControllerDesktop::CreateC +@@ -245,7 +245,7 @@ ChromeBrowserCloudManagementControllerDesktop::CreateC std::unique_ptr ChromeBrowserCloudManagementControllerDesktop::CreateDeviceTrustKeyManager() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (enterprise_connectors::IsDeviceTrustConnectorFeatureEnabled()) { auto key_rotation_launcher = enterprise_connectors::KeyRotationLauncher::Create( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc index b2da7da0b509..41b0a967f83e 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,146 +1,156 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -191,12 +191,12 @@ +@@ -198,13 +198,13 @@ #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 "components/device_signals/core/browser/pref_names.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/web_applications/policy/web_app_settings_policy_handler.h" #endif -@@ -701,14 +701,14 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -717,14 +717,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 }, -@@ -1332,7 +1332,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1354,7 +1354,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kGSSAPILibraryName, prefs::kGSSAPILibraryName, base::Value::Type::STRING }, -@@ -1402,18 +1402,18 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1424,18 +1424,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 }, -@@ -1426,7 +1426,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1448,7 +1448,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 }, -@@ -1533,7 +1533,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1552,7 +1552,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 }, -@@ -1620,7 +1620,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1639,7 +1639,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) { key::kAuthNegotiateDelegateByKdcPolicy, prefs::kAuthNegotiateDelegateByKdcPolicy, base::Value::Type::BOOLEAN }, -@@ -1667,7 +1667,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1686,7 +1686,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(ENABLE_EXTENSIONS) && (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) \ - || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA)) + || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)) { key::kChromeAppsEnabled, extensions::pref_names::kChromeAppsEnabled, base::Value::Type::BOOLEAN }, -@@ -1727,7 +1727,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1746,7 +1746,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { key::kPrefixedStorageInfoEnabled, storage::kPrefixedStorageInfoEnabled, base::Value::Type::BOOLEAN }, -#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_BSD) || BUILDFLAG(IS_CHROMEOS_ASH) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) { key::kHighEfficiencyModeEnabled, performance_manager::user_tuning::prefs::kHighEfficiencyModeEnabled, base::Value::Type::BOOLEAN }, -@@ -2018,7 +2018,7 @@ std::unique_ptr BuildH +@@ -1981,7 +1981,7 @@ std::unique_ptr BuildH + SimpleSchemaValidatingPolicyHandler::RECOMMENDED_PROHIBITED, + SimpleSchemaValidatingPolicyHandler::MANDATORY_ALLOWED)); + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + handlers->AddHandler( + std::make_unique()); + handlers->AddHandler( +@@ -2058,7 +2058,7 @@ std::unique_ptr BuildH key::kBrowsingDataLifetime, browsing_data::prefs::kBrowsingDataLifetime, chrome_schema)); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique()); handlers->AddHandler(std::make_unique()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -@@ -2373,7 +2373,7 @@ std::unique_ptr BuildH - chrome_schema)); - +@@ -2416,7 +2416,7 @@ std::unique_ptr BuildH + extensions::pref_names::kManifestV2Availability, /*min=*/0, /*max=*/3, + /*clamp=*/false)); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) handlers->AddHandler( std::make_unique(chrome_schema)); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -2386,7 +2386,7 @@ std::unique_ptr BuildH +@@ -2429,7 +2429,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( -@@ -2394,7 +2394,7 @@ std::unique_ptr BuildH +@@ -2437,7 +2437,7 @@ std::unique_ptr BuildH #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) #endif // BUILDFLAG(ENABLE_SPELLCHECK) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique( key::kAllowSystemNotifications, prefs::kAllowSystemNotifications, base::Value::Type::BOOLEAN)); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_prefs_browser__prefs.cc b/www/ungoogled-chromium/files/patch-chrome_browser_prefs_browser__prefs.cc index cf6421476ce3..5a9b811a6386 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,69 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -446,14 +446,14 @@ +@@ -452,14 +452,14 @@ #include "components/os_crypt/os_crypt.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/web_applications/url_handler_prefs.h" #include "components/device_signals/core/browser/pref_names.h" #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/browser_switcher/browser_switcher_prefs.h" #endif -@@ -486,7 +486,7 @@ +@@ -492,7 +492,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 -@@ -1005,7 +1005,7 @@ void RegisterProfilePrefsForMigration( +@@ -1030,7 +1030,7 @@ void RegisterProfilePrefsForMigration( registry->RegisterIntegerPref(kProfileAvatarTutorialShown, 0); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Deprecated 08/2022. registry->RegisterBooleanPref(prefs::kUsesSystemThemeDeprecated, false); #endif -@@ -1255,7 +1255,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) +@@ -1288,7 +1288,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) web_app::url_handler_prefs::RegisterLocalStatePrefs(registry); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -1579,11 +1579,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -1620,11 +1620,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync safe_browsing::PostCleanupSettingsResetter::RegisterProfilePrefs(registry); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) device_signals::RegisterProfilePrefs(registry); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -#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); #endif -@@ -1967,7 +1967,7 @@ void MigrateObsoleteProfilePrefs(Profile* profile) { +@@ -2008,7 +2008,7 @@ void MigrateObsoleteProfilePrefs(Profile* profile) { profile_prefs->ClearPref(kProfileAvatarTutorialShown); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Added 08/2022. if (profile_prefs->HasPrefPath(prefs::kUsesSystemThemeDeprecated)) { auto migrated_theme = diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc index e3e68d08fb48..dfe118657cab 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc @@ -1,29 +1,29 @@ ---- chrome/browser/printing/print_backend_service_manager.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/printing/print_backend_service_manager.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/printing/print_backend_service_manager.cc -@@ -493,7 +493,7 @@ absl::optional PrintBackendServiceManager::R +@@ -513,7 +513,7 @@ absl::optional PrintBackendServiceManager::R query_clients_.insert(client_id); break; case ClientType::kQueryWithUi: -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) if (!query_with_ui_clients_.empty()) return absl::nullopt; #endif -@@ -729,7 +729,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate +@@ -751,7 +751,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate break; case ClientType::kQueryWithUi: -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // No need to update if there were other query with UI clients. if (query_with_ui_clients_.size() > 1) return absl::nullopt; -@@ -786,7 +786,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate +@@ -808,7 +808,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate return kNoClientsRegisteredResetOnIdleTimeout; case ClientType::kQueryWithUi: -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // No need to update if there were other query with UI clients. if (!query_with_ui_clients_.empty()) return absl::nullopt; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__job__worker.cc b/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__job__worker.cc index 85a446451d8a..d6d8205b0de5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__job__worker.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__job__worker.cc @@ -1,11 +1,11 @@ ---- chrome/browser/printing/print_job_worker.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/printing/print_job_worker.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/printing/print_job_worker.cc -@@ -206,7 +206,7 @@ void PrintJobWorker::SetSettings(base::Value::Dict new +@@ -205,7 +205,7 @@ void PrintJobWorker::SetSettings(base::Value::Dict new crash_key = std::make_unique( print_backend->GetPrinterDriverInfo(printer_name)); --#if BUILDFLAG(IS_LINUX) && defined(USE_CUPS) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(USE_CUPS) +-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && 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_process__singleton__posix.cc b/www/ungoogled-chromium/files/patch-chrome_browser_process__singleton__posix.cc index eefe28c1247a..3bb3cdc9b0bc 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_process__singleton__posix.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_process__singleton__posix.cc @@ -1,20 +1,20 @@ ---- chrome/browser/process_singleton_posix.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/process_singleton_posix.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/process_singleton_posix.cc -@@ -97,7 +97,7 @@ +@@ -96,7 +96,7 @@ #include "net/base/network_interfaces.h" #include "ui/base/l10n/l10n_util.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/process_singleton_dialog_linux.h" #endif -@@ -351,7 +351,7 @@ bool DisplayProfileInUseError(const base::FilePath& lo +@@ -350,7 +350,7 @@ bool DisplayProfileInUseError(const base::FilePath& lo if (g_disable_prompt) return g_user_opted_unlock_in_use_profile; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::u16string relaunch_button_text = l10n_util::GetStringUTF16(IDS_PROFILE_IN_USE_LINUX_RELAUNCH); return ShowProcessSingletonDialog(error, relaunch_button_text); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc index 0329f665789c..160db60f90ca 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,25 +1,25 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -261,7 +261,7 @@ +@@ -260,7 +260,7 @@ #include "chrome/browser/ui/cocoa/screentime/screentime_features.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/idle_service_factory.h" #endif -@@ -448,11 +448,11 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -444,11 +444,11 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) metrics::DesktopProfileSessionDurationsServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_idle::IdleServiceFactory::GetInstance(); #endif ModelTypeStoreServiceFactory::GetInstance(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc index dbdf83a8e97c..823864e0c117 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc @@ -1,31 +1,31 @@ ---- chrome/browser/profiles/profile_impl.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/profiles/profile_impl.cc -@@ -256,6 +256,10 @@ +@@ -255,6 +255,10 @@ #include "chrome/browser/spellchecker/spellcheck_service.h" #endif +#if BUILDFLAG(IS_OPENBSD) +#include "sandbox/policy/openbsd/sandbox_openbsd.h" +#endif + using bookmarks::BookmarkModel; using content::BrowserThread; using content::DownloadManagerDelegate; -@@ -833,7 +837,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) +@@ -848,7 +852,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) } base::FilePath ProfileImpl::last_selected_directory() { +#if BUILDFLAG(IS_OPENBSD) + // If unveil(2) is used, force the file dialog directory to something we + // know is available. + auto* sandbox = sandbox::policy::SandboxLinux::GetInstance(); + if (sandbox->unveil_initialized()) + return GetPrefs()->GetFilePath(prefs::kDownloadDefaultDirectory); + else + return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); +#else return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); +#endif } void ProfileImpl::set_last_selected_directory(const base::FilePath& path) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_resources_sandbox__internals_sandbox__internals.ts b/www/ungoogled-chromium/files/patch-chrome_browser_resources_sandbox__internals_sandbox__internals.ts index 0ae3c35837bd..f526fb2373ea 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_resources_sandbox__internals_sandbox__internals.ts +++ b/www/ungoogled-chromium/files/patch-chrome_browser_resources_sandbox__internals_sandbox__internals.ts @@ -1,29 +1,29 @@ ---- chrome/browser/resources/sandbox_internals/sandbox_internals.ts.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/resources/sandbox_internals/sandbox_internals.ts.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/resources/sandbox_internals/sandbox_internals.ts @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// +// import './strings.m.js'; - import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js'; + import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; @@ -121,7 +121,7 @@ function androidHandler() { } // -// +// /** * Adds a status row that reports either Yes or No. @@ -182,7 +182,7 @@ document.addEventListener('DOMContentLoaded', () => { // androidHandler(); // - // + // linuxHandler(); // }); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_route.ts b/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_route.ts index 7054c53e944a..6a103d8bca1a 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 2022-12-02 17:56:32 UTC +--- chrome/browser/resources/settings/route.ts.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/resources/settings/route.ts -@@ -202,7 +202,7 @@ function createBrowserSettingsRoutes(): Partial + // r.CAPTIONS = r.ACCESSIBILITY.createChild('/captions'); // diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_resources_signin_sync__confirmation_sync__confirmation__app.html b/www/ungoogled-chromium/files/patch-chrome_browser_resources_signin_sync__confirmation_sync__confirmation__app.html index 0e45c05a916d..98174fe23568 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_resources_signin_sync__confirmation_sync__confirmation__app.html +++ b/www/ungoogled-chromium/files/patch-chrome_browser_resources_signin_sync__confirmation_sync__confirmation__app.html @@ -1,38 +1,38 @@ ---- chrome/browser/resources/signin/sync_confirmation/sync_confirmation_app.html.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/resources/signin/sync_confirmation/sync_confirmation_app.html.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/resources/signin/sync_confirmation/sync_confirmation_app.html -@@ -395,7 +395,7 @@ +@@ -443,7 +443,7 @@ consent-confirmation autofocus> $i18n{syncConfirmationConfirmLabel} - + $i18n{syncConfirmationSettingsLabel} -@@ -405,7 +405,7 @@ +@@ -453,7 +453,7 @@ disabled="[[anyButtonClicked_]]"> $i18n{syncConfirmationUndoLabel} - + $i18n{syncConfirmationSettingsLabel} -@@ -448,7 +448,7 @@ +@@ -496,7 +496,7 @@ consent-confirmation> $i18n{syncConfirmationConfirmLabel} - + $i18n{syncConfirmationSettingsLabel} -@@ -458,7 +458,7 @@ +@@ -506,7 +506,7 @@ disabled="[[anyButtonClicked_]]"> $i18n{syncConfirmationUndoLabel} - + $i18n{syncConfirmationSettingsLabel} diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc index 21df59785f9b..702b58abb80c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc @@ -1,11 +1,11 @@ ---- chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc -@@ -709,7 +709,7 @@ void IncidentReportingService::OnEnvironmentDataCollec +@@ -707,7 +707,7 @@ void IncidentReportingService::OnEnvironmentDataCollec // Process::Current().CreationTime() is missing on some platforms. #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::TimeDelta uptime = first_incident_time_ - base::Process::Current().CreationTime(); environment_data->mutable_process()->set_uptime_msec(uptime.InMilliseconds()); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc index f1a648c4483d..299d4d9871e2 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc @@ -1,11 +1,38 @@ ---- chrome/browser/sync/chrome_sync_client.cc.orig 2022-12-02 17:56:32 UTC +--- chrome/browser/sync/chrome_sync_client.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/sync/chrome_sync_client.cc -@@ -445,7 +445,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy +@@ -127,7 +127,7 @@ + #endif // BUILDFLAG(IS_ANDROID) + + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_keyed_service.h" + #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h" + #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || +@@ -448,7 +448,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy + #endif // !BUILDFLAG(IS_ANDROID) + + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + if (features::kTabGroupsSaveSyncIntegration.Get()) { + controllers.push_back(std::make_unique( + syncer::SAVED_TAB_GROUP, +@@ -461,7 +461,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy // Chrome prefers OS provided spell checkers where they exist. So only sync the // custom dictionary on platforms that typically don't provide one. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Dictionary sync is enabled by default. if (GetPrefService()->GetBoolean(spellcheck::prefs::kSpellCheckEnable)) { controllers.push_back( +@@ -627,7 +627,7 @@ ChromeSyncClient::GetControllerDelegateForModelType(sy + ->GetControllerDelegate(); + } + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + case syncer::SAVED_TAB_GROUP: { + DCHECK(features::kTabGroupsSaveSyncIntegration.Get()); + return SavedTabGroupServiceFactory::GetForProfile(profile_) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_sync_sync__service__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_sync_sync__service__factory.cc new file mode 100644 index 000000000000..da5cb22987cb --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_sync_sync__service__factory.cc @@ -0,0 +1,29 @@ +--- chrome/browser/sync/sync_service_factory.cc.orig 2023-02-11 09:11:04 UTC ++++ chrome/browser/sync/sync_service_factory.cc +@@ -74,7 +74,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) +@@ -115,7 +115,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(); +@@ -251,7 +251,7 @@ SyncServiceFactory::SyncServiceFactory() + DependsOn(ThemeServiceFactory::GetInstance()); + #endif // !BUILDFLAG(IS_ANDROID) + #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_task__manager_sampling_task__group__sampler.cc b/www/ungoogled-chromium/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc index 311062d8512c..3921a0a8b76f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc @@ -1,47 +1,47 @@ ---- chrome/browser/task_manager/sampling/task_group_sampler.cc.orig 2022-10-29 17:50:56 UTC +--- chrome/browser/task_manager/sampling/task_group_sampler.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/task_manager/sampling/task_group_sampler.cc -@@ -45,7 +45,7 @@ TaskGroupSampler::TaskGroupSampler( +@@ -44,7 +44,7 @@ TaskGroupSampler::TaskGroupSampler( const OnCpuRefreshCallback& on_cpu_refresh, const OnSwappedMemRefreshCallback& on_swapped_mem_refresh, const OnIdleWakeupsCallback& on_idle_wakeups, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const OnOpenFdCountCallback& on_open_fd_count, #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) const OnProcessPriorityCallback& on_process_priority) -@@ -55,7 +55,7 @@ TaskGroupSampler::TaskGroupSampler( +@@ -54,7 +54,7 @@ TaskGroupSampler::TaskGroupSampler( on_cpu_refresh_callback_(on_cpu_refresh), on_swapped_mem_refresh_callback_(on_swapped_mem_refresh), on_idle_wakeups_callback_(on_idle_wakeups), -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) on_open_fd_count_callback_(on_open_fd_count), #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) on_process_priority_callback_(on_process_priority) { -@@ -87,7 +87,7 @@ void TaskGroupSampler::Refresh(int64_t refresh_flags) +@@ -84,7 +84,7 @@ void TaskGroupSampler::Refresh(int64_t refresh_flags) base::BindOnce(on_swapped_mem_refresh_callback_)); } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (TaskManagerObserver::IsResourceRefreshEnabled(REFRESH_TYPE_IDLE_WAKEUPS, refresh_flags)) { - base::PostTaskAndReplyWithResult( -@@ -97,7 +97,7 @@ void TaskGroupSampler::Refresh(int64_t refresh_flags) + blocking_pool_runner_->PostTaskAndReplyWithResult( +@@ -94,7 +94,7 @@ void TaskGroupSampler::Refresh(int64_t refresh_flags) } #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (TaskManagerObserver::IsResourceRefreshEnabled(REFRESH_TYPE_FD_COUNT, refresh_flags)) { - base::PostTaskAndReplyWithResult( -@@ -147,7 +147,7 @@ int TaskGroupSampler::RefreshIdleWakeupsPerSecond() { + blocking_pool_runner_->PostTaskAndReplyWithResult( +@@ -143,7 +143,7 @@ int TaskGroupSampler::RefreshIdleWakeupsPerSecond() { return process_metrics_->GetIdleWakeupsPerSecond(); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) int TaskGroupSampler::RefreshOpenFdCount() { DCHECK_CALLED_ON_VALID_SEQUENCE(worker_pool_sequenced_checker_); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service.cc index 10064ced790d..24bd55d20bce 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 2022-10-29 17:50:56 UTC +--- chrome/browser/themes/theme_service.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/themes/theme_service.cc -@@ -72,7 +72,7 @@ +@@ -71,7 +71,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 -@@ -314,7 +314,7 @@ CustomThemeSupplier* ThemeService::GetThemeSupplier() +@@ -313,7 +313,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_browser__command__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__command__controller.cc index 477368be542a..7bea583ca936 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,38 +1,38 @@ ---- chrome/browser/ui/browser_command_controller.cc.orig 2022-12-02 17:56:32 UTC +--- chrome/browser/ui/browser_command_controller.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/browser_command_controller.cc -@@ -97,7 +97,7 @@ +@@ -98,7 +98,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 -@@ -282,7 +282,7 @@ bool BrowserCommandController::IsReservedCommandOrKey( +@@ -283,7 +283,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(); -@@ -527,7 +527,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -528,7 +528,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; -@@ -1094,7 +1094,7 @@ void BrowserCommandController::InitCommandState() { +@@ -1074,7 +1074,7 @@ 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); 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 526fa88d9d53..d035cdcdafdd 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 2022-12-02 17:56:32 UTC +--- chrome/browser/ui/chrome_pages.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/chrome_pages.cc -@@ -68,7 +68,7 @@ +@@ -67,7 +67,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 -@@ -596,7 +596,7 @@ void ShowBrowserSigninOrSettings(Browser* browser, +@@ -597,7 +597,7 @@ void ShowBrowserSigninOrSettings(Browser* browser, #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) void ShowWebAppSettings(Browser* browser, const std::string& app_id, web_app::AppSettingsPageEntryPoint entry_point) { 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 e12962f283d3..61d35fbdbf50 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 2022-10-29 17:50:56 UTC +--- chrome/browser/ui/chrome_pages.h.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/chrome_pages.h -@@ -30,7 +30,7 @@ enum class ConsentLevel; +@@ -33,7 +33,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 -@@ -218,7 +218,7 @@ void ShowBrowserSigninOrSettings(Browser* browser, +@@ -222,7 +222,7 @@ void ShowBrowserSigninOrSettings(Browser* browser, #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_signin__view__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_signin__view__controller.cc index a96bcb1d4c98..7ce24a2c9bfc 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_signin__view__controller.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_signin__view__controller.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/signin_view_controller.cc.orig 2022-10-29 17:50:56 UTC +--- chrome/browser/ui/signin_view_controller.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/signin_view_controller.cc -@@ -273,7 +273,7 @@ void SigninViewController::ShowModalEnterpriseConfirma +@@ -275,7 +275,7 @@ void SigninViewController::ShowModalEnterpriseConfirma SkColor profile_color, signin::SigninChoiceCallback callback) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) CloseModalSignin(); dialog_ = std::make_unique( SigninViewControllerDelegate::CreateEnterpriseConfirmationDelegate( 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 d188e97643bd..10d10de0bd11 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 2022-12-02 17:56:32 UTC +--- chrome/browser/ui/startup/bad_flags_prompt.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/startup/bad_flags_prompt.cc -@@ -92,7 +92,7 @@ static const char* kBadFlags[] = { +@@ -93,7 +93,7 @@ static const char* 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 02c566acbabb..2a42ff6d4855 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,29 +1,29 @@ ---- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/startup/startup_browser_creator.cc @@ -132,7 +132,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/ui/startup/web_app_info_recorder_utils.h" #endif -@@ -1011,7 +1011,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1006,7 +1006,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) && -@@ -1203,7 +1203,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1198,7 +1198,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_startup_startup__browser__creator__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc index 7339dd1960e4..d87cff2eefc4 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/startup/startup_browser_creator_impl.cc -@@ -257,7 +257,7 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser( +@@ -259,7 +259,7 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser( // at the state of the MessageLoop. Browser::CreateParams params = Browser::CreateParams(profile_, false); params.creation_source = Browser::CreationSource::kStartupCreator; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) params.startup_id = command_line_->GetSwitchValueASCII("desktop-startup-id"); #endif 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 5023110d9797..d1fc9735b74d 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,36 +1,26 @@ ---- chrome/browser/ui/tab_helpers.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/ui/tab_helpers.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/tab_helpers.cc -@@ -206,7 +206,7 @@ +@@ -203,7 +203,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/autofill_assistant/common_dependencies_chrome.h" - #include "chrome/browser/autofill_assistant/platform_dependencies_desktop.h" #include "chrome/browser/ui/blocked_content/framebust_block_tab_helper.h" -@@ -531,13 +531,13 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con - + #include "chrome/browser/ui/browser_finder.h" + #include "chrome/browser/ui/hats/hats_helper.h" +@@ -521,12 +521,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) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) ++ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) metrics::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) || -@@ -560,7 +560,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con - #endif - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (base::FeatureList::IsEnabled( - autofill_assistant::features::kAutofillAssistantDesktop)) { - autofill_assistant::CreateForWebContents( + base::FeatureList::IsEnabled(features::kTrustSafetySentimentSurvey)) { 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 4081b9bcef56..bebcced9509c 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-01-13 08:56:02 UTC +--- chrome/browser/ui/views/accelerator_table.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/views/accelerator_table.cc -@@ -61,11 +61,11 @@ const AcceleratorMapping kAcceleratorMap[] = { +@@ -64,11 +64,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}, -@@ -93,7 +93,7 @@ const AcceleratorMapping kAcceleratorMap[] = { +@@ -96,7 +96,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}, -@@ -138,7 +138,7 @@ const AcceleratorMapping kAcceleratorMap[] = { +@@ -141,7 +141,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}, -@@ -237,7 +237,7 @@ const AcceleratorMapping kAcceleratorMap[] = { - {ui::VKEY_SPACE, ui::EF_CONTROL_DOWN, IDC_TOGGLE_QUICK_COMMANDS}, +@@ -241,7 +241,7 @@ const AcceleratorMapping kAcceleratorMap[] = { #endif // !BUILDFLAG(IS_CHROMEOS) #endif // !BUILDFLAG(IS_MAC) --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #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_RUN_SCREEN_AI_VISUAL_ANNOTATIONS}, #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_bubble__anchor__util__views.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_bubble__anchor__util__views.cc deleted file mode 100644 index 3beb389880d6..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_bubble__anchor__util__views.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/ui/views/bubble_anchor_util_views.cc.orig 2022-12-02 17:56:32 UTC -+++ chrome/browser/ui/views/bubble_anchor_util_views.cc -@@ -39,7 +39,7 @@ AnchorConfiguration GetPageInfoAnchorConfiguration(Bro - views::BubbleBorder::TOP_LEFT}; - - // TODO(https://crbug.com/1346734): Enable this on all platforms. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (anchor == kLocationBar && browser_view->GetIsPictureInPictureType()) { - auto* frame_view = static_cast( - browser_view->frame()->GetFrameView()); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h index 073c09667ddc..f8f3cf440509 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h @@ -1,16 +1,16 @@ ---- chrome/browser/ui/views/chrome_views_delegate.h.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/ui/views/chrome_views_delegate.h.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/views/chrome_views_delegate.h -@@ -51,11 +51,11 @@ class ChromeViewsDelegate : public views::ViewsDelegat +@@ -54,11 +54,11 @@ class ChromeViewsDelegate : public views::ViewsDelegat base::OnceClosure callback) override; // 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) bool WindowManagerProvidesTitleBar(bool maximized) override; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gfx::ImageSkia* GetDefaultWindowIcon() const override; #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc index 174c0abe1560..3b10f662e5bf 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/views/frame/browser_non_client_frame_view_factory_views.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/ui/views/frame/browser_non_client_frame_view_factory_views.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/views/frame/browser_non_client_frame_view_factory_views.cc @@ -16,7 +16,7 @@ #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/views/frame/browser_frame_view_layout_linux.h" #include "chrome/browser/ui/views/frame/browser_frame_view_layout_linux_native.h" #include "chrome/browser/ui/views/frame/browser_frame_view_linux_native.h" @@ -33,7 +33,7 @@ namespace { std::unique_ptr CreateOpaqueBrowserFrameView( BrowserFrame* frame, BrowserView* browser_view) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* profile = browser_view->browser()->profile(); auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(profile); auto* theme_service_factory = ThemeServiceFactory::GetForProfile(profile); -@@ -73,7 +73,7 @@ std::unique_ptr CreateBrows - BrowserFrame* frame, - BrowserView* browser_view) { - // TODO(https://crbug.com/1346734): Enable it on all platforms. --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) +@@ -75,7 +75,7 @@ std::unique_ptr CreateBrows if (browser_view->browser()->is_type_picture_in_picture()) { auto view = std::make_unique(frame, browser_view); +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + auto* profile = browser_view->browser()->profile(); + auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(profile); + auto* theme_service_factory = ThemeServiceFactory::GetForProfile(profile); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc index b3e0302009cc..487dd178dec9 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-01-13 08:56:02 UTC +--- chrome/browser/ui/views/frame/browser_view.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -2108,7 +2108,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra +@@ -2120,7 +2120,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra // CrOS cleanup is done. // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) contents_web_view_->SetFastResize(is_dragging); if (!is_dragging) { // When tab dragging is ended, we need to make sure the web contents get diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc index 0faf54f1353d..8023f6ce82fa 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,56 +1,92 @@ ---- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc -@@ -32,7 +32,7 @@ +@@ -36,7 +36,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 +@@ -57,7 +57,7 @@ constexpr int kBackToTabImageSize = 16; + // The height of the controls bar at the top of the window. + constexpr int kTopControlsHeight = 30; -@@ -256,7 +256,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( - for (ContentSettingImageView* view : content_setting_views_) - view->SetIconColor(color_provider->GetColor(kColorOmniboxResultsIcon)); +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Frame border when window shadow is not drawn. + constexpr int kFrameBorderThickness = 4; + #endif +@@ -131,7 +131,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) - // If the top bar background is already drawn by window_frame_provider_, skip - // drawing it again below. - if (window_frame_provider_) { -@@ -292,7 +292,7 @@ void PictureInPictureBrowserFrameView::AddedToWidget() - BrowserNonClientFrameView::AddedToWidget(); + // 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()) { +@@ -226,7 +226,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow + }, + base::Unretained(this)))); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + frame_background_ = std::make_unique(); + #endif + +@@ -343,7 +343,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( + for (ContentSettingImageView* view : content_setting_views_) + view->SetIconColor(color_provider->GetColor(kColorOmniboxResultsIcon)); + +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + // On Linux the top bar background will be drawn in OnPaint(). + controls_container_view_->SetBackground(views::CreateSolidBackground( + SkColorSetA(color_provider->GetColor(kColorPipWindowControlsBackground), +@@ -376,7 +376,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(); -@@ -494,7 +494,7 @@ void PictureInPictureBrowserFrameView::OnMouseEvent(ui +@@ -547,7 +547,7 @@ void PictureInPictureBrowserFrameView::OnWidgetDestroy /////////////////////////////////////////////////////////////////////////////// // 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_) { - // Draw the PiP window frame borders and shadows, including the top bar - // background. -@@ -562,7 +562,7 @@ void PictureInPictureBrowserFrameView::UpdateTopBarVie +@@ -630,7 +630,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(); -@@ -582,7 +582,7 @@ int PictureInPictureBrowserFrameView::GetTopAreaHeight +@@ -651,7 +651,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor + } + + gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return FrameBorderInsets(); + #else + return gfx::Insets(kResizeBorder); +@@ -662,7 +662,7 @@ int PictureInPictureBrowserFrameView::GetTopAreaHeight return FrameBorderInsets().top() + kTopControlsHeight; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void PictureInPictureBrowserFrameView::SetWindowFrameProvider( ui::WindowFrameProvider* window_frame_provider) { - window_frame_provider_ = 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 2e8856479bc6..60957e947308 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,38 +1,38 @@ ---- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h @@ -20,7 +20,7 @@ #include "ui/views/layout/box_layout_view.h" #include "ui/views/widget/widget_observer.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/window_frame_provider.h" #endif -@@ -67,7 +67,7 @@ class PictureInPictureBrowserFrameView - void OnThemeChanged() override; +@@ -75,7 +75,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; -@@ -145,7 +145,7 @@ class PictureInPictureBrowserFrameView - // Returns the height of the top bar area, including the window top border. - int GetTopAreaHeight() const; +@@ -157,7 +157,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); -@@ -177,7 +177,7 @@ class PictureInPictureBrowserFrameView +@@ -194,7 +194,7 @@ class PictureInPictureBrowserFrameView widget_observation_{this}; bool mouse_inside_window_ = false; -#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_hung__renderer__view.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_hung__renderer__view.cc index 6cd0dad3a315..53c5bc754d29 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_hung__renderer__view.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_hung__renderer__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/hung_renderer_view.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/ui/views/hung_renderer_view.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/views/hung_renderer_view.cc -@@ -401,7 +401,7 @@ void HungRendererDialogView::ForceCrashHungRenderer() +@@ -404,7 +404,7 @@ void HungRendererDialogView::ForceCrashHungRenderer() content::RenderProcessHost* rph = hung_pages_table_model_->GetRenderWidgetHost()->GetProcess(); if (rph) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // A generic |CrashDumpHungChildProcess()| is not implemented for Linux. // Instead we send an explicit IPC to crash on the renderer's IO thread. rph->ForceCrash(); 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 c243ad511057..5375cf95c1ee 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,29 @@ ---- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig 2022-10-29 17:50:56 UTC +--- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc @@ -50,7 +50,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 @@ -170,7 +170,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( -@@ -456,7 +456,7 @@ SigninViewControllerDelegate::CreateProfileCustomizati +@@ -447,7 +447,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_tabs_tab__drag__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc index 1b62391d070e..4f45e0664ec6 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-01-13 08:56:02 UTC +--- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/views/tabs/tab_drag_controller.cc @@ -82,7 +82,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 @@ -254,7 +254,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)) { @@ -506,7 +506,7 @@ void TabDragController::Init(TabDragContext* source_co // synchronous on desktop Linux, so use that. // - Chrome OS // Releasing capture on Ash cancels gestures so avoid it. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) can_release_capture_ = false; #endif start_point_in_screen_ = gfx::Point(source_view_offset, mouse_offset.y()); -@@ -1106,7 +1106,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon +@@ -1107,7 +1107,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. -@@ -2097,7 +2097,7 @@ void TabDragController::CompleteDrag() { +@@ -2101,7 +2101,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 -@@ -2488,7 +2488,7 @@ TabDragController::Liveness TabDragController::GetLoca +@@ -2495,7 +2495,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_webui_app__home_app__home__page__handler.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc new file mode 100644 index 000000000000..b3e79e1f9dea --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc @@ -0,0 +1,20 @@ +--- chrome/browser/ui/webui/app_home/app_home_page_handler.cc.orig 2023-02-11 09:11:04 UTC ++++ chrome/browser/ui/webui/app_home/app_home_page_handler.cc +@@ -144,7 +144,7 @@ void AppHomePageHandler::InstallOsHooks(const web_app: + web_app->CanUserUninstallWebApp(); + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +- (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) ++ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS)) + options.os_hooks[web_app::OsHookType::kUrlHandlers] = true; + #else + options.os_hooks[web_app::OsHookType::kUrlHandlers] = false; +@@ -276,7 +276,7 @@ void AppHomePageHandler::FillExtensionInfoList( + 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_chrome__web__ui__controller__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc index 9d12e6c31473..733ca6e86291 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-01-13 08:56:02 UTC +--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -319,7 +319,7 @@ +@@ -324,7 +324,7 @@ #include "chrome/browser/ui/webui/app_launcher_page_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 -@@ -345,17 +345,17 @@ +@@ -350,17 +350,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 -@@ -716,7 +716,7 @@ bool IsAboutUI(const GURL& url) { +@@ -721,7 +721,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) -@@ -1024,7 +1024,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -1012,7 +1012,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we 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 -@@ -1085,7 +1085,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -1073,7 +1073,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) -@@ -1145,27 +1145,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -1137,27 +1137,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_ntp_app__launcher__handler.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_ntp_app__launcher__handler.cc index a231b748a781..e3ad8a7c5056 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,20 +1,20 @@ ---- chrome/browser/ui/webui/ntp/app_launcher_handler.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/ui/webui/ntp/app_launcher_handler.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/webui/ntp/app_launcher_handler.cc -@@ -326,7 +326,7 @@ base::Value::Dict AppLauncherHandler::CreateExtensionI +@@ -323,7 +323,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 -@@ -1444,7 +1444,7 @@ void AppLauncherHandler::InstallOsHooks(const web_app: +@@ -1455,7 +1455,7 @@ void AppLauncherHandler::InstallOsHooks(const web_app: options.os_hooks[web_app::OsHookType::kUninstallationViaOsSettings] = web_app->CanUserUninstallWebApp(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) options.os_hooks[web_app::OsHookType::kUrlHandlers] = true; #else 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 93870339577e..cbaf2e740a3b 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,56 +1,56 @@ ---- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc @@ -121,7 +121,7 @@ #include "chrome/browser/ui/webui/settings/chromeos/constants/routes.mojom.h" #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) #include "ui/display/screen.h" #endif @@ -142,7 +142,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 @@ -228,7 +228,7 @@ void AddCommonStrings(content::WebUIDataSource* html_s #endif html_source->AddBoolean("isChildAccount", profile->IsChild()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool allow_qt_theme = base::FeatureList::IsEnabled(ui::kAllowQt); #else bool allow_qt_theme = false; -@@ -381,7 +381,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -377,7 +377,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}, -@@ -391,7 +391,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -387,7 +387,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht #else {"resetToDefaultTheme", IDS_SETTINGS_RESET_TO_DEFAULT_THEME}, #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, #endif #if BUILDFLAG(IS_MAC) -@@ -415,7 +415,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -411,7 +411,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) bool show_custom_chrome_frame = ui::OzonePlatform::GetInstance() ->GetPlatformRuntimeProperties() .supports_server_side_window_decorations; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extensions_extension__status__utils.cc b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extensions_extension__status__utils.cc index 497bfc9928f6..71b511151b50 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extensions_extension__status__utils.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extensions_extension__status__utils.cc @@ -1,20 +1,20 @@ ---- chrome/browser/web_applications/extensions/extension_status_utils.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/web_applications/extensions/extension_status_utils.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/web_applications/extensions/extension_status_utils.cc @@ -26,7 +26,7 @@ namespace { const char* g_preinstalled_app_for_testing = nullptr; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - const char kMobilityPrintExtensionId[] = "alhngdkjgnedakdlnamimgfihgkmenbh"; + const char kMobilityPrintAndDirectPrintIoExtensionIds[] = + "alhngdkjgnedakdlnamimgfihgkmenbh,gnddkmpjjjcimefninepfmmddpgaaado"; - BASE_FEATURE(kChromeAppsDeprecationExcludeForceInstalls, -@@ -108,7 +108,7 @@ bool ClearExternalExtensionUninstalled(content::Browse +@@ -110,7 +110,7 @@ bool ClearExternalExtensionUninstalled(content::Browse } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) bool IsExtensionUnsupportedDeprecatedApp(content::BrowserContext* context, const std::string& extension_id) { if (!base::FeatureList::IsEnabled(features::kChromeAppsDeprecation)) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc index d22cbae906bb..8073b66385e4 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc @@ -1,47 +1,47 @@ ---- chrome/browser/web_applications/os_integration/web_app_shortcut.cc.orig 2022-10-29 17:50:56 UTC +--- chrome/browser/web_applications/os_integration/web_app_shortcut.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/web_applications/os_integration/web_app_shortcut.cc -@@ -54,7 +54,7 @@ namespace { +@@ -58,7 +58,7 @@ namespace { #if BUILDFLAG(IS_MAC) const int kDesiredIconSizesForShortcut[] = {16, 32, 128, 256, 512}; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Linux supports icons of any size. FreeDesktop Icon Theme Specification states // that "Minimally you should install a 48x48 icon in the hicolor theme." const int kDesiredIconSizesForShortcut[] = {16, 32, 48, 128, 256, 512}; -@@ -207,7 +207,7 @@ ShortcutOverrideForTesting::ShortcutOverrideForTesting +@@ -212,7 +212,7 @@ ShortcutOverrideForTesting::ShortcutOverrideForTesting #elif BUILDFLAG(IS_MAC) bool success = chrome_apps_folder.CreateUniqueTempDirUnderPath(base_path); DCHECK(success); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool success = desktop.CreateUniqueTempDirUnderPath(base_path); DCHECK(success); success = startup.CreateUniqueTempDirUnderPath(base_path); -@@ -226,7 +226,7 @@ ShortcutOverrideForTesting::ShortcutOverrideForTesting +@@ -231,7 +231,7 @@ ShortcutOverrideForTesting::ShortcutOverrideForTesting #elif BUILDFLAG(IS_MAC) bool success = chrome_apps_folder.CreateUniqueTempDir(); DCHECK(success); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool success = desktop.CreateUniqueTempDir(); DCHECK(success); success = startup.CreateUniqueTempDir(); -@@ -234,7 +234,7 @@ ShortcutOverrideForTesting::ShortcutOverrideForTesting +@@ -239,7 +239,7 @@ ShortcutOverrideForTesting::ShortcutOverrideForTesting #endif } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto callback = base::BindRepeating([](base::FilePath filename, std::string xdg_command, std::string file_contents) { -@@ -267,7 +267,7 @@ ShortcutOverrideForTesting::~ShortcutOverrideForTestin +@@ -272,7 +272,7 @@ ShortcutOverrideForTesting::~ShortcutOverrideForTestin } } } -#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_os__integration_web__app__shortcut.h b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h index 30229afad8e2..1319006416ba 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,38 +1,38 @@ ---- chrome/browser/web_applications/os_integration/web_app_shortcut.h.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/web_applications/os_integration/web_app_shortcut.h.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/web_applications/os_integration/web_app_shortcut.h -@@ -21,7 +21,7 @@ +@@ -23,7 +23,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) -@@ -39,7 +39,7 @@ class ImageSkia; +@@ -41,7 +41,7 @@ class ImageSkia; namespace web_app { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) struct LinuxFileRegistration { std::string xdg_command; std::string file_contents; -@@ -89,7 +89,7 @@ struct ShortcutOverrideForTesting +@@ -91,7 +91,7 @@ struct ShortcutOverrideForTesting #elif BUILDFLAG(IS_MAC) 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; std::vector linux_file_registration; -@@ -136,7 +136,7 @@ struct ShortcutInfo { +@@ -144,7 +144,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_os__integration_web__app__shortcut__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut__manager.cc index 7d28410d589d..db714e2900ff 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut__manager.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/os_integration/web_app_shortcut_manager.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/web_applications/os_integration/web_app_shortcut_manager.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/web_applications/os_integration/web_app_shortcut_manager.cc -@@ -449,7 +449,7 @@ std::unique_ptr WebAppShortcutManager::B +@@ -453,7 +453,7 @@ std::unique_ptr WebAppShortcutManager::B } } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const std::vector& shortcuts_menu_item_infos = app->shortcuts_menu_item_infos(); DCHECK_LE(shortcuts_menu_item_infos.size(), kMaxApplicationDockMenuItems); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__provider.cc b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__provider.cc index a88d1b12c34d..c5bda3c37cdd 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__provider.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__provider.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/web_app_provider.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/web_applications/web_app_provider.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/web_applications/web_app_provider.cc -@@ -283,7 +283,7 @@ void WebAppProvider::CreateSubsystems(Profile* profile +@@ -295,7 +295,7 @@ void WebAppProvider::CreateSubsystems(Profile* profile protocol_handler_manager.get()); std::unique_ptr url_handler_manager; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) url_handler_manager = std::make_unique(profile); #endif 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 a72f481f751a..9dc48b4edb9f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc @@ -1,11 +1,11 @@ ---- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/browser/webauthn/chrome_authenticator_request_delegate.cc -@@ -679,7 +679,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureCabl +@@ -691,7 +691,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureCabl g_observer->ConfiguringCable(request_type); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // No caBLEv1 on Linux. It tends to crash bluez. if (base::Contains(pairings_from_extension, device::CableDiscoveryData::Version::V1, diff --git a/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc b/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc index 94b620aae674..6b7281ee233a 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc @@ -1,65 +1,65 @@ ---- chrome/common/chrome_features.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/common/chrome_features.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/common/chrome_features.cc -@@ -108,7 +108,7 @@ BASE_FEATURE(kAsyncDns, +@@ -96,7 +96,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, -@@ -126,7 +126,7 @@ BASE_FEATURE(kAutofillPasswordSurvey, +@@ -114,7 +114,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. -@@ -310,7 +310,7 @@ BASE_FEATURE(kDesktopPWAsEnforceWebAppSettingsPolicy, +@@ -303,7 +303,7 @@ BASE_FEATURE(kDesktopPWAsEnforceWebAppSettingsPolicy, // Enables or disables Desktop PWAs to be auto-started on OS login. 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) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -334,7 +334,7 @@ BASE_FEATURE(kDesktopPWAsWebBundles, +@@ -327,7 +327,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. -@@ -369,7 +369,7 @@ const base::FeatureParam kDnsOverHttpsFallbackPa +@@ -365,7 +365,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 -@@ -745,7 +745,7 @@ BASE_FEATURE(kUpdateHistoryEntryPointsInIncognito, +@@ -743,7 +743,7 @@ BASE_FEATURE(kUpdateHistoryEntryPointsInIncognito, "UpdateHistoryEntryPointsInIncognito", base::FEATURE_ENABLED_BY_DEFAULT); -#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); -@@ -758,7 +758,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit +@@ -756,7 +756,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 f6f2987dc6d0..a6e2e34f24f5 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 2022-12-02 17:56:32 UTC +--- chrome/common/chrome_features.h.orig 2023-02-11 09:11:04 UTC +++ chrome/common/chrome_features.h -@@ -81,13 +81,13 @@ BASE_DECLARE_FEATURE(kAppShimNewCloseBehavior); +@@ -73,13 +73,13 @@ BASE_DECLARE_FEATURE(kAppShimNewCloseBehavior); 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) -@@ -189,7 +189,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings); +@@ -186,7 +186,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); -@@ -432,7 +432,7 @@ BASE_DECLARE_FEATURE(kKAnonymityServiceOHTTPRequests); +@@ -429,7 +429,7 @@ BASE_DECLARE_FEATURE(kKAnonymityServiceOHTTPRequests); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kUpdateHistoryEntryPointsInIncognito); -#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; -@@ -440,7 +440,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -437,7 +437,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam kLinuxLowMemoryMonitorCriticalLevel; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kListWebAppsSwitch); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.cc b/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.cc index 11a0cf5b285f..3f727ac3cc34 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-01-13 08:56:02 UTC +--- chrome/common/chrome_switches.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/common/chrome_switches.cc -@@ -839,14 +839,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- +@@ -854,14 +854,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 140457b156b5..101685a5fb71 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-01-13 08:56:02 UTC +--- chrome/common/chrome_switches.h.orig 2023-02-11 09:11:04 UTC +++ chrome/common/chrome_switches.h -@@ -263,12 +263,12 @@ extern const char kAllowNaClSocketAPI[]; +@@ -265,12 +265,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[]; #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_common_media_cdm__host__file__path.cc b/www/ungoogled-chromium/files/patch-chrome_common_media_cdm__host__file__path.cc index c1aad8b0c32a..957b903b6c79 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_media_cdm__host__file__path.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_media_cdm__host__file__path.cc @@ -1,11 +1,11 @@ ---- chrome/common/media/cdm_host_file_path.cc.orig 2022-10-29 17:50:56 UTC +--- chrome/common/media/cdm_host_file_path.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/common/media/cdm_host_file_path.cc -@@ -91,7 +91,7 @@ void AddCdmHostFilePaths( +@@ -90,7 +90,7 @@ void AddCdmHostFilePaths( cdm_host_file_paths->emplace_back(chrome_framework_path, chrome_framework_sig_path); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath chrome_exe_dir; if (!base::PathService::Get(base::DIR_EXE, &chrome_exe_dir)) diff --git a/www/ungoogled-chromium/files/patch-chrome_common_pref__names.cc b/www/ungoogled-chromium/files/patch-chrome_common_pref__names.cc index a61a39c5432c..221c9e2afad3 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_pref__names.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_pref__names.cc @@ -1,56 +1,56 @@ ---- chrome/common/pref_names.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/common/pref_names.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/common/pref_names.cc @@ -1268,7 +1268,7 @@ const char kUseAshProxy[] = "lacros.proxy.use_ash_prox // 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. const char kUsesSystemThemeDeprecated[] = "extensions.theme.use_system"; const char kSystemTheme[] = "extensions.theme.system_theme"; @@ -1382,7 +1382,7 @@ const char kShowUpdatePromotionInfoBar[] = // 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) // 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). const char kUseCustomChromeFrame[] = "browser.custom_chrome_frame"; -@@ -1893,7 +1893,7 @@ const char kDownloadDirUpgraded[] = "download.director +@@ -1897,7 +1897,7 @@ const char kDownloadDirUpgraded[] = "download.director const 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) const char kOpenPdfDownloadInSystemReader[] = "download.open_pdf_in_system_reader"; #endif -@@ -2197,7 +2197,7 @@ const char kWebAppsPreferences[] = "web_apps.web_app_i +@@ -2207,7 +2207,7 @@ const char kWebAppsPreferences[] = "web_apps.web_app_i // its isolation requirements. const char kWebAppsIsolationState[] = "web_apps.isolation_state"; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) // Dictionary that maps origins to web apps that can act as URL handlers. const char kWebAppsUrlHandlerInfo[] = "web_apps.url_handler_info"; -@@ -2297,7 +2297,7 @@ const char kAmbientAuthenticationInPrivateModesEnabled +@@ -2307,7 +2307,7 @@ const char kAmbientAuthenticationInPrivateModesEnabled // requests. const 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. const char kAuthNegotiateDelegateByKdcPolicy[] = -@@ -3300,7 +3300,7 @@ const char kBlockAutoplayEnabled[] = "media.block_auto +@@ -3336,7 +3336,7 @@ const char kBlockAutoplayEnabled[] = "media.block_auto const 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. const char kAllowSystemNotifications[] = "system_notifications.allowed"; 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 5e3a135f32e5..49c4f0573fd5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h @@ -1,56 +1,56 @@ ---- chrome/common/pref_names.h.orig 2023-01-13 08:56:02 UTC +--- chrome/common/pref_names.h.orig 2023-02-11 09:11:04 UTC +++ chrome/common/pref_names.h @@ -398,7 +398,7 @@ extern const char kUseAshProxy[]; #endif // BUILDFLAG(IS_CHROMEOS_LACROS) // 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) // TODO(https://crbug.com/1317782): Remove in M110. extern const char kUsesSystemThemeDeprecated[]; extern const char kSystemTheme[]; @@ -425,7 +425,7 @@ extern const char kShowUpdatePromotionInfoBar[]; #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) extern const char kUseCustomChromeFrame[]; #endif #if BUILDFLAG(ENABLE_PLUGINS) -@@ -616,7 +616,7 @@ extern const char kDownloadAllowedURLsForOpenByPolicy[ +@@ -617,7 +617,7 @@ extern const char kDownloadAllowedURLsForOpenByPolicy[ extern const char kDownloadDirUpgraded[]; extern const char kDownloadLastCompleteTime[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kOpenPdfDownloadInSystemReader[]; #endif #if BUILDFLAG(IS_ANDROID) -@@ -728,7 +728,7 @@ extern const char kWebAppsUninstalledDefaultChromeApps +@@ -731,7 +731,7 @@ extern const char kWebAppsUninstalledDefaultChromeApps extern const char kWebAppsPreferences[]; extern const char kWebAppsIsolationState[]; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) extern const char kWebAppsUrlHandlerInfo[]; #endif -@@ -859,7 +859,7 @@ extern const char kGloballyScopeHTTPAuthCacheEnabled[] +@@ -862,7 +862,7 @@ extern const char kGloballyScopeHTTPAuthCacheEnabled[] extern const char kAmbientAuthenticationInPrivateModesEnabled[]; extern const char kBasicAuthOverHttpEnabled[]; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kAuthNegotiateDelegateByKdcPolicy[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -@@ -1128,7 +1128,7 @@ extern const char kBlockAutoplayEnabled[]; +@@ -1139,7 +1139,7 @@ extern const char kBlockAutoplayEnabled[]; #endif extern const char kSandboxExternalProtocolBlocked[]; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kAllowSystemNotifications[]; #endif 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 d375740abcdc..cbe411f5e3dc 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 2022-12-02 17:56:32 UTC +--- chrome/common/url_constants.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/common/url_constants.cc -@@ -498,7 +498,7 @@ const char kPhoneHubPermissionLearnMoreURL[] = +@@ -501,7 +501,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 3c1456d32d89..4eb9ac4165e4 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 2022-12-02 17:56:32 UTC +--- chrome/common/url_constants.h.orig 2023-02-11 09:11:04 UTC +++ chrome/common/url_constants.h -@@ -471,7 +471,7 @@ extern const char kOutdatedPluginLearnMoreURL[]; +@@ -476,7 +476,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 fafe719bac88..716380b6aef5 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-01-13 08:56:02 UTC +--- chrome/common/webui_url_constants.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/common/webui_url_constants.cc -@@ -487,18 +487,18 @@ const char kOsUIScanningAppURL[] = "os://scanning"; +@@ -490,18 +490,18 @@ const char kOsUIScanningAppURL[] = "os://scanning"; 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 -@@ -513,14 +513,14 @@ const char kChromeUILinuxProxyConfigHost[] = "linux-pr +@@ -516,14 +516,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[] = -@@ -537,7 +537,7 @@ const char kChromeUIProfilePickerUrl[] = "chrome://pro +@@ -540,7 +540,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"; -@@ -613,7 +613,7 @@ const char kPrivacySandboxSubPagePath[] = "/privacySan +@@ -616,7 +616,7 @@ const char kPrivacySandboxSubPagePath[] = "/privacySan #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 -@@ -827,7 +827,7 @@ const char* const kChromeDebugURLs[] = { +@@ -831,7 +831,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 8f339f3ca9ad..b5956c02d6f4 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.h @@ -1,57 +1,57 @@ ---- chrome/common/webui_url_constants.h.orig 2023-01-13 08:56:02 UTC +--- chrome/common/webui_url_constants.h.orig 2023-02-11 09:11:04 UTC +++ chrome/common/webui_url_constants.h -@@ -414,24 +414,24 @@ extern const char kOsUIScanningAppURL[]; +@@ -416,24 +416,24 @@ extern const char kOsUIScanningAppURL[]; 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 -@@ -446,14 +446,14 @@ extern const char kChromeUILinuxProxyConfigHost[]; +@@ -448,14 +448,14 @@ extern const char kChromeUILinuxProxyConfigHost[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) extern const char kChromeUISandboxHost[]; #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) extern const char kChromeUIBrowserSwitchHost[]; extern const char kChromeUIBrowserSwitchURL[]; extern const char kChromeUIEnterpriseProfileWelcomeHost[]; -@@ -467,7 +467,7 @@ extern const char kChromeUIProfilePickerUrl[]; +@@ -469,7 +469,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 d1ded891b871..5619fc0a4e34 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,38 +1,38 @@ ---- chrome/services/printing/print_backend_service_impl.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/services/printing/print_backend_service_impl.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/services/printing/print_backend_service_impl.cc -@@ -41,7 +41,7 @@ +@@ -42,7 +42,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" -@@ -68,7 +68,7 @@ namespace printing { +@@ -69,7 +69,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. -@@ -437,7 +437,7 @@ void PrintBackendServiceImpl::Init(const std::string& +@@ -485,7 +485,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`. -@@ -620,7 +620,7 @@ void PrintBackendServiceImpl::UpdatePrintSettings( +@@ -672,7 +672,7 @@ void PrintBackendServiceImpl::UpdatePrintSettings( crash_keys_ = std::make_unique( print_backend_->GetPrinterDriverInfo(*printer_name)); --#if BUILDFLAG(IS_LINUX) && defined(USE_CUPS) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(USE_CUPS) +-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_CUPS) // Try to fill in advanced settings based upon basic info options. PrinterBasicInfo basic_info; if (print_backend_->GetPrinterBasicInfo(*printer_name, &basic_info) == diff --git a/www/ungoogled-chromium/files/patch-chrome_test_BUILD.gn b/www/ungoogled-chromium/files/patch-chrome_test_BUILD.gn index e31f65fb294f..ff2df71e8ff4 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-01-13 08:56:02 UTC +--- chrome/test/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ chrome/test/BUILD.gn -@@ -10139,7 +10139,7 @@ test("chrome_app_unittests") { +@@ -10217,7 +10217,7 @@ test("chrome_app_unittests") { "//components/heap_profiling/in_process", "//components/safe_browsing:buildflags", ] - if (!is_fuchsia) { + if (!is_fuchsia && !is_bsd) { deps += [ "//third_party/breakpad:client" ] } if (enable_gwp_asan) { diff --git a/www/ungoogled-chromium/files/patch-chrome_test_chromedriver_chrome__launcher.cc b/www/ungoogled-chromium/files/patch-chrome_test_chromedriver_chrome__launcher.cc index f8a58eebc7cc..0c37f2f67786 100644 --- a/www/ungoogled-chromium/files/patch-chrome_test_chromedriver_chrome__launcher.cc +++ b/www/ungoogled-chromium/files/patch-chrome_test_chromedriver_chrome__launcher.cc @@ -1,10 +1,10 @@ ---- chrome/test/chromedriver/chrome_launcher.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/test/chromedriver/chrome_launcher.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/test/chromedriver/chrome_launcher.cc -@@ -65,6 +65,7 @@ +@@ -64,6 +64,7 @@ #include #include #include +#include #include #elif BUILDFLAG(IS_WIN) #include "chrome/test/chromedriver/keycode_text_conversion.h" diff --git a/www/ungoogled-chromium/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc b/www/ungoogled-chromium/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc index 45b5391abb81..7a9eb3b7c989 100644 --- a/www/ungoogled-chromium/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc +++ b/www/ungoogled-chromium/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc @@ -1,20 +1,20 @@ ---- chrome/test/chromedriver/chrome/chrome_finder.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/test/chromedriver/chrome/chrome_finder.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/test/chromedriver/chrome/chrome_finder.cc -@@ -53,7 +53,7 @@ void GetApplicationDirs(std::vector* l +@@ -57,7 +57,7 @@ void GetApplicationDirs(std::vector* l installation_locations[i].Append(L"Chromium\\Application")); } } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void GetApplicationDirs(std::vector* locations) { // TODO: Respect users' PATH variables. // Until then, we use an approximation of the most common defaults. -@@ -138,7 +138,7 @@ bool FindChrome(base::FilePath* browser_exe) { +@@ -142,7 +142,7 @@ bool FindChrome(base::FilePath* browser_exe) { base::FilePath browser_exes_array[] = { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) base::FilePath(chrome::kBrowserProcessExecutablePath), -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath("google-chrome"), base::FilePath(chrome::kBrowserProcessExecutablePath), base::FilePath("chromium"), diff --git a/www/ungoogled-chromium/files/patch-chrome_test_interaction_interaction__test__util__browser.cc b/www/ungoogled-chromium/files/patch-chrome_test_interaction_interaction__test__util__browser.cc index b30f6687c366..5d9a783395a0 100644 --- a/www/ungoogled-chromium/files/patch-chrome_test_interaction_interaction__test__util__browser.cc +++ b/www/ungoogled-chromium/files/patch-chrome_test_interaction_interaction__test__util__browser.cc @@ -1,11 +1,11 @@ ---- chrome/test/interaction/interaction_test_util_browser.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/test/interaction/interaction_test_util_browser.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/test/interaction/interaction_test_util_browser.cc -@@ -26,7 +26,7 @@ +@@ -31,7 +31,7 @@ #include "ui/base/interaction/interaction_test_util_mac.h" #endif -#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) #define SUPPORTS_PIXEL_TESTS 1 #include "chrome/browser/ui/test/test_browser_ui.h" #else diff --git a/www/ungoogled-chromium/files/patch-chrome_updater_app_app__install.cc b/www/ungoogled-chromium/files/patch-chrome_updater_app_app__install.cc deleted file mode 100644 index 2c9a9fb25f85..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_updater_app_app__install.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/updater/app/app_install.cc.orig 2023-01-13 08:56:02 UTC -+++ chrome/updater/app/app_install.cc -@@ -214,7 +214,7 @@ void AppInstall::WakeCandidate() { - update_service_internal, base::WrapRefCounted(this))); - } - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // TODO(crbug.com/1276114) - implement. - void AppInstall::WakeCandidateDone() { - NOTIMPLEMENTED(); diff --git a/www/ungoogled-chromium/files/patch-chrome_updater_app_app__uninstall.cc b/www/ungoogled-chromium/files/patch-chrome_updater_app_app__uninstall.cc deleted file mode 100644 index d65915c56048..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_updater_app_app__uninstall.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/updater/app/app_uninstall.cc.orig 2022-10-01 07:40:07 UTC -+++ chrome/updater/app/app_uninstall.cc -@@ -32,7 +32,7 @@ - #include "chrome/updater/win/setup/uninstall.h" - #elif BUILDFLAG(IS_MAC) - #include "chrome/updater/mac/setup/setup.h" --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "chrome/updater/linux/setup/setup.h" - #endif - diff --git a/www/ungoogled-chromium/files/patch-chrome_updater_configurator.cc b/www/ungoogled-chromium/files/patch-chrome_updater_configurator.cc new file mode 100644 index 000000000000..b66ecbdcf690 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_updater_configurator.cc @@ -0,0 +1,11 @@ +--- chrome/updater/configurator.cc.orig 2023-02-11 09:11:04 UTC ++++ chrome/updater/configurator.cc +@@ -57,7 +57,7 @@ Configurator::Configurator(scoped_refptr + base::MakeRefCounted()), + patch_factory_( + base::MakeRefCounted()) { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // On Linux creating the NetworkFetcherFactory requires performing blocking IO + // to load an external library. This should be done when the configurator is + // created. diff --git a/www/ungoogled-chromium/files/patch-chrome_updater_installer.cc b/www/ungoogled-chromium/files/patch-chrome_updater_installer.cc deleted file mode 100644 index 0a5f60eca35c..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_updater_installer.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/updater/installer.cc.orig 2023-01-13 08:56:02 UTC -+++ chrome/updater/installer.cc -@@ -252,7 +252,7 @@ absl::optional Installer::GetCurrentIn - return path->AppendASCII(pv_.GetString()); - } - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - - AppInstallerResult RunApplicationInstaller( - const AppInfo& /*app_info*/, diff --git a/www/ungoogled-chromium/files/patch-chrome_updater_ipc_ipc__names.h b/www/ungoogled-chromium/files/patch-chrome_updater_ipc_ipc__names.h new file mode 100644 index 000000000000..f36b03b59c75 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_updater_ipc_ipc__names.h @@ -0,0 +1,11 @@ +--- chrome/updater/ipc/ipc_names.h.orig 2023-02-11 09:11:04 UTC ++++ chrome/updater/ipc/ipc_names.h +@@ -13,7 +13,7 @@ namespace updater { + mojo::NamedPlatformChannel::ServerName GetUpdateServiceInternalServerName( + UpdaterScope scope); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + mojo::NamedPlatformChannel::ServerName GetUpdateServiceServerName( + UpdaterScope scope); + #endif // BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-chrome_updater_updater.cc b/www/ungoogled-chromium/files/patch-chrome_updater_updater.cc index 3ab99ed15c7c..fd77c536224f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_updater_updater.cc +++ b/www/ungoogled-chromium/files/patch-chrome_updater_updater.cc @@ -1,20 +1,11 @@ ---- chrome/updater/updater.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/updater/updater.cc.orig 2023-02-11 09:11:04 UTC +++ chrome/updater/updater.cc -@@ -44,7 +44,7 @@ - #include "chrome/updater/win/win_util.h" +@@ -49,7 +49,7 @@ + #include "chrome/updater/util/win_util.h" #elif BUILDFLAG(IS_MAC) #include "chrome/updater/app/server/mac/server.h" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/updater/app/server/linux/server.h" - #include "chrome/updater/linux/ipc_support.h" #endif -@@ -137,7 +137,7 @@ int HandleUpdaterCommands(UpdaterScope updater_scope, - CHECK(false) << "--crash-me was used."; - } --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // As long as this object is alive, all Mojo API surface relevant to IPC - // connections is usable, and message pipes which span a process boundary will - // continue to function. diff --git a/www/ungoogled-chromium/files/patch-chrome_updater_util.cc b/www/ungoogled-chromium/files/patch-chrome_updater_util.cc deleted file mode 100644 index f4ef684a5e3d..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_updater_util.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/updater/util.cc.orig 2023-01-13 08:56:02 UTC -+++ chrome/updater/util.cc -@@ -36,7 +36,7 @@ - #include "third_party/abseil-cpp/absl/types/optional.h" - #include "url/gurl.h" - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "chrome/updater/linux/linux_util.h" - #elif BUILDFLAG(IS_MAC) - #import "chrome/updater/mac/mac_util.h" -@@ -119,7 +119,7 @@ absl::optional GetBaseDataDirectory(Up - app_data_dir = GetApplicationDataDirectory(scope); - #elif BUILDFLAG(IS_MAC) - app_data_dir = GetApplicationSupportDirectory(scope); --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - app_data_dir = GetApplicationDataDirectory(scope); - #endif - if (!app_data_dir) { diff --git a/www/ungoogled-chromium/files/patch-chrome_updater_util_posix__util.cc b/www/ungoogled-chromium/files/patch-chrome_updater_util_posix__util.cc new file mode 100644 index 000000000000..cedb19118fb5 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_updater_util_posix__util.cc @@ -0,0 +1,20 @@ +--- chrome/updater/util/posix_util.cc.orig 2023-02-11 09:11:04 UTC ++++ chrome/updater/util/posix_util.cc +@@ -10,7 +10,7 @@ + #include "chrome/updater/updater_branding.h" + #include "chrome/updater/util/util.h" + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/updater/util/linux_util.h" + #endif + +@@ -42,7 +42,7 @@ base::FilePath GetUpdaterFolderName() { + + absl::optional GetBaseInstallDirectory(UpdaterScope scope) { + absl::optional path; +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + path = GetApplicationDataDirectory(scope); + #elif BUILDFLAG(IS_MAC) + path = GetLibraryFolderPath(scope); diff --git a/www/ungoogled-chromium/files/patch-chrome_utility_services.cc b/www/ungoogled-chromium/files/patch-chrome_utility_services.cc index 28c42c2f3d12..e5f64074c838 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 2022-10-01 07:40:07 UTC +--- chrome/utility/services.cc.orig 2023-02-11 09:11:04 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) @@ -84,7 +84,7 @@ #include "chrome/services/file_util/file_util_service.h" // nogncheck #endif -#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) +#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) #include "chrome/services/file_util/document_analysis_service.h" // nogncheck #endif @@ -218,7 +218,7 @@ auto RunMacNotificationService( } #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) { -@@ -287,7 +287,7 @@ auto RunCupsIppParser( +@@ -285,7 +285,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)); -@@ -471,7 +471,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -465,7 +465,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) -@@ -487,7 +487,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -481,7 +481,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__browser__main__parts.cc b/www/ungoogled-chromium/files/patch-chromecast_browser_cast__browser__main__parts.cc index eb0b15685242..14e0771a8456 100644 --- a/www/ungoogled-chromium/files/patch-chromecast_browser_cast__browser__main__parts.cc +++ b/www/ungoogled-chromium/files/patch-chromecast_browser_cast__browser__main__parts.cc @@ -1,38 +1,38 @@ ---- chromecast/browser/cast_browser_main_parts.cc.orig 2022-10-01 07:40:07 UTC +--- chromecast/browser/cast_browser_main_parts.cc.orig 2023-02-11 09:11:04 UTC +++ chromecast/browser/cast_browser_main_parts.cc @@ -90,7 +90,7 @@ #include "ui/base/ui_base_switches.h" #include "ui/gl/gl_switches.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include #include -@@ -265,7 +265,7 @@ class CastViewsDelegate : public views::ViewsDelegate +@@ -263,7 +263,7 @@ class CastViewsDelegate : public views::ViewsDelegate #endif // defined(USE_AURA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath GetApplicationFontsDir() { std::unique_ptr env(base::Environment::Create()); -@@ -311,7 +311,7 @@ const DefaultCommandLineSwitch kDefaultSwitches[] = { +@@ -309,7 +309,7 @@ const DefaultCommandLineSwitch kDefaultSwitches[] = { {cc::switches::kDisableThreadedAnimation, ""}, #endif // BUILDFLAG(IS_ANDROID) #endif // BUILDFLAG(IS_CAST_AUDIO_ONLY) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if defined(ARCH_CPU_X86_FAMILY) // This is needed for now to enable the x11 Ozone platform to work with // current Linux/NVidia OpenGL drivers. -@@ -482,7 +482,7 @@ void CastBrowserMainParts::ToolkitInitialized() { +@@ -480,7 +480,7 @@ void CastBrowserMainParts::ToolkitInitialized() { views_delegate_ = std::make_unique(); #endif // defined(USE_AURA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath dir_font = GetApplicationFontsDir(); const FcChar8* dir_font_char8 = reinterpret_cast(dir_font.value().data()); 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 2dec4f3e2194..28e1284b5180 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-01-13 08:56:02 UTC +--- chromecast/browser/cast_content_browser_client.cc.orig 2023-02-11 09:11:04 UTC +++ chromecast/browser/cast_content_browser_client.cc -@@ -433,7 +433,7 @@ void CastContentBrowserClient::AppendExtraCommandLineS +@@ -434,7 +434,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__assistant_browser_client__context.cc b/www/ungoogled-chromium/files/patch-components_autofill__assistant_browser_client__context.cc deleted file mode 100644 index ffcbe3fbcdc5..000000000000 --- a/www/ungoogled-chromium/files/patch-components_autofill__assistant_browser_client__context.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- components/autofill_assistant/browser/client_context.cc.orig 2023-01-13 08:56:02 UTC -+++ components/autofill_assistant/browser/client_context.cc -@@ -109,7 +109,7 @@ ClientContextProto::PlatformType ClientContext::GetPla - #if BUILDFLAG(IS_ANDROID) - return ClientContextProto::PLATFORM_TYPE_ANDROID; - #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - return ClientContextProto::PLATFORM_TYPE_DESKTOP; - #else - return ClientContextProto::PLATFORM_TYPE_UNDEFINED; diff --git a/www/ungoogled-chromium/files/patch-components_autofill__assistant_browser_client__context__unittest.cc b/www/ungoogled-chromium/files/patch-components_autofill__assistant_browser_client__context__unittest.cc deleted file mode 100644 index bf4611f8d012..000000000000 --- a/www/ungoogled-chromium/files/patch-components_autofill__assistant_browser_client__context__unittest.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- components/autofill_assistant/browser/client_context_unittest.cc.orig 2023-01-13 08:56:02 UTC -+++ components/autofill_assistant/browser/client_context_unittest.cc -@@ -75,7 +75,7 @@ TEST_F(ClientContextTest, Initialize) { - ClientContextProto::PLATFORM_TYPE_ANDROID); - #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) - EXPECT_THAT(actual_client_context.platform_type(), - ClientContextProto::PLATFORM_TYPE_DESKTOP); - #endif -@@ -256,7 +256,7 @@ TEST(GetPlatformType, ReturnsCorrectPlatform) { - ClientContextProto::PLATFORM_TYPE_ANDROID); - #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) - EXPECT_THAT(ClientContext::GetPlatformType(), - ClientContextProto::PLATFORM_TYPE_DESKTOP); - #endif diff --git a/www/ungoogled-chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc b/www/ungoogled-chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc index b4a22bf314bb..6ebeed082ee9 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-01-13 08:56:02 UTC +--- components/autofill/core/browser/personal_data_manager.cc.orig 2023-02-11 09:11:04 UTC +++ components/autofill/core/browser/personal_data_manager.cc -@@ -2079,7 +2079,8 @@ bool PersonalDataManager::ShouldShowCardsFromAccountOp +@@ -2148,7 +2148,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. if (!sync_service_ || sync_service_->IsSyncFeatureEnabled() || 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 f4e4bb72b621..4698f6355156 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 2022-12-02 17:56:32 UTC +--- components/autofill/core/common/autofill_payments_features.cc.orig 2023-02-11 09:11:04 UTC +++ components/autofill/core/common/autofill_payments_features.cc -@@ -267,7 +267,7 @@ const base::FeatureParam +@@ -247,7 +247,7 @@ const base::FeatureParam 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_components__chromium__strings.grd b/www/ungoogled-chromium/files/patch-components_components__chromium__strings.grd index 0f5aedc522b6..f10ceeb1e37b 100644 --- a/www/ungoogled-chromium/files/patch-components_components__chromium__strings.grd +++ b/www/ungoogled-chromium/files/patch-components_components__chromium__strings.grd @@ -1,11 +1,11 @@ ---- components/components_chromium_strings.grd.orig 2022-10-01 07:40:07 UTC +--- components/components_chromium_strings.grd.orig 2023-02-11 09:11:04 UTC +++ components/components_chromium_strings.grd -@@ -223,7 +223,7 @@ +@@ -220,7 +220,7 @@ - + Go to the Chromium menu > diff --git a/www/ungoogled-chromium/files/patch-components_components__google__chrome__strings.grd b/www/ungoogled-chromium/files/patch-components_components__google__chrome__strings.grd index db47c3f0e614..03b782b8f147 100644 --- a/www/ungoogled-chromium/files/patch-components_components__google__chrome__strings.grd +++ b/www/ungoogled-chromium/files/patch-components_components__google__chrome__strings.grd @@ -1,11 +1,11 @@ ---- components/components_google_chrome_strings.grd.orig 2022-10-01 07:40:07 UTC +--- components/components_google_chrome_strings.grd.orig 2023-02-11 09:11:04 UTC +++ components/components_google_chrome_strings.grd -@@ -230,7 +230,7 @@ +@@ -220,7 +220,7 @@ - + Go to the Chrome menu > 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 4b53da072199..f3185f5d1352 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,21 @@ ---- components/feature_engagement/public/feature_constants.cc.orig 2023-01-13 08:56:02 UTC +--- components/feature_engagement/public/feature_constants.cc.orig 2023-02-11 09:11:04 UTC +++ components/feature_engagement/public/feature_constants.cc @@ -24,7 +24,7 @@ BASE_FEATURE(kUseClientConfigIPH, BASE_FEATURE(kIPHDummyFeature, "IPH_Dummy", base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) BASE_FEATURE(kIPHBatterySaverModeFeature, "IPH_BatterySaverMode", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -424,7 +424,8 @@ BASE_FEATURE(kIPHOverflowMenuTipFeature, +@@ -424,7 +424,8 @@ BASE_FEATURE(kIPHPriceNotificationsWhileBrowsingFeatur #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) BASE_FEATURE(kIPHAutofillVirtualCardSuggestionFeature, "IPH_AutofillVirtualCardSuggestion", 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 30bebfa6a8d0..102986fb66e4 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,21 @@ ---- components/feature_engagement/public/feature_constants.h.orig 2023-01-13 08:56:02 UTC +--- components/feature_engagement/public/feature_constants.h.orig 2023-02-11 09:11:04 UTC +++ components/feature_engagement/public/feature_constants.h @@ -32,7 +32,7 @@ BASE_DECLARE_FEATURE(kIPHDummyFeature); BASE_DECLARE_FEATURE(kEnableIPH); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kIPHBatterySaverModeFeature); BASE_DECLARE_FEATURE(kIPHDesktopSharedHighlightingFeature); BASE_DECLARE_FEATURE(kIPHDesktopTabGroupsNewGroupFeature); -@@ -185,7 +185,8 @@ BASE_DECLARE_FEATURE(kIPHOverflowMenuTipFeature); +@@ -185,7 +185,8 @@ BASE_DECLARE_FEATURE(kIPHPriceNotificationsWhileBrowsi #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kIPHAutofillVirtualCardSuggestionFeature); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || 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 d1d2d9eb1ca6..b6c43d854c00 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,21 @@ ---- components/feature_engagement/public/feature_list.cc.orig 2023-01-13 08:56:02 UTC +--- components/feature_engagement/public/feature_list.cc.orig 2023-02-11 09:11:04 UTC +++ components/feature_engagement/public/feature_list.cc @@ -122,7 +122,7 @@ const base::Feature* const kAllFeatures[] = { - &kIPHOverflowMenuTipFeature, + &kIPHPriceNotificationsWhileBrowsingFeature, #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) &kIPHBatterySaverModeFeature, &kIPHDesktopTabGroupsNewGroupFeature, &kIPHExtensionsMenuFeature, @@ -154,7 +154,8 @@ const base::Feature* const kAllFeatures[] = { // 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) &kIPHAutofillVirtualCardSuggestionFeature, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || 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 40e2074ae936..b9010045da06 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,40 @@ ---- components/feature_engagement/public/feature_list.h.orig 2023-01-13 08:56:02 UTC +--- components/feature_engagement/public/feature_list.h.orig 2023-02-11 09:11:04 UTC +++ components/feature_engagement/public/feature_list.h -@@ -222,7 +222,7 @@ DEFINE_VARIATION_PARAM(kIPHOverflowMenuTipFeature, "IP +@@ -223,7 +223,7 @@ DEFINE_VARIATION_PARAM(kIPHPriceNotificationsWhileBrow #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) DEFINE_VARIATION_PARAM(kIPHBatterySaverModeFeature, "IPH_BatterySaverMode"); DEFINE_VARIATION_PARAM(kIPHDesktopTabGroupsNewGroupFeature, "IPH_DesktopTabGroupsNewGroup"); -@@ -268,7 +268,8 @@ DEFINE_VARIATION_PARAM(kIPHPriceTrackingInSidePanelFea +@@ -269,7 +269,8 @@ DEFINE_VARIATION_PARAM(kIPHPriceTrackingInSidePanelFea // 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) DEFINE_VARIATION_PARAM(kIPHAutofillVirtualCardSuggestionFeature, "IPH_AutofillVirtualCardSuggestion"); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || -@@ -375,7 +376,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation - VARIATION_ENTRY(kIPHFollowWhileBrowsingFeature), +@@ -377,7 +378,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation VARIATION_ENTRY(kIPHOverflowMenuTipFeature), + VARIATION_ENTRY(kIPHPriceNotificationsWhileBrowsingFeature), #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) VARIATION_ENTRY(kIPHBatterySaverModeFeature), VARIATION_ENTRY(kIPHDesktopTabGroupsNewGroupFeature), VARIATION_ENTRY(kIPHExtensionsMenuFeature), -@@ -408,7 +409,8 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -410,7 +411,8 @@ constexpr flags_ui::FeatureEntry::FeatureVariation // 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) VARIATION_ENTRY(kIPHAutofillVirtualCardSuggestionFeature), #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || diff --git a/www/ungoogled-chromium/files/patch-components_feed_core_v2_proto__util.cc b/www/ungoogled-chromium/files/patch-components_feed_core_v2_proto__util.cc index e96b8092f96a..078508d3d41a 100644 --- a/www/ungoogled-chromium/files/patch-components_feed_core_v2_proto__util.cc +++ b/www/ungoogled-chromium/files/patch-components_feed_core_v2_proto__util.cc @@ -1,24 +1,24 @@ ---- components/feed/core/v2/proto_util.cc.orig 2022-10-01 07:40:07 UTC +--- components/feed/core/v2/proto_util.cc.orig 2023-02-11 09:11:04 UTC +++ components/feed/core/v2/proto_util.cc -@@ -90,8 +90,8 @@ feedwire::Version GetPlatformVersionMessage() { +@@ -91,8 +91,8 @@ feedwire::Version GetPlatformVersionMessage() { int32_t major, minor, revision; base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &revision); - result.set_major(major); - result.set_minor(minor); + result.set_gmajor(major); + result.set_gminor(minor); result.set_revision(revision); #if BUILDFLAG(IS_ANDROID) result.set_api_version(base::android::BuildInfo::GetInstance()->sdk_int()); -@@ -106,8 +106,8 @@ feedwire::Version GetAppVersionMessage(const ChromeInf +@@ -107,8 +107,8 @@ feedwire::Version GetAppVersionMessage(const ChromeInf // Chrome's version is in the format: MAJOR,MINOR,BUILD,PATCH. const std::vector& numbers = chrome_info.version.components(); if (numbers.size() > 3) { - result.set_major(static_cast(numbers[0])); - result.set_minor(static_cast(numbers[1])); + result.set_gmajor(static_cast(numbers[0])); + result.set_gminor(static_cast(numbers[1])); result.set_build(static_cast(numbers[2])); result.set_revision(static_cast(numbers[3])); } diff --git a/www/ungoogled-chromium/files/patch-components_named__mojo__ipc__server_connection__info.h b/www/ungoogled-chromium/files/patch-components_named__mojo__ipc__server_connection__info.h new file mode 100644 index 000000000000..7de13f3b92d3 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_named__mojo__ipc__server_connection__info.h @@ -0,0 +1,20 @@ +--- components/named_mojo_ipc_server/connection_info.h.orig 2023-02-11 09:11:04 UTC ++++ components/named_mojo_ipc_server/connection_info.h +@@ -13,7 +13,7 @@ + #include "base/win/scoped_handle.h" + #elif BUILDFLAG(IS_MAC) + #include +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include + #endif + +@@ -32,7 +32,7 @@ struct ConnectionInfo { + absl::optional impersonation_token{}; + #elif BUILDFLAG(IS_MAC) + audit_token_t audit_token{}; +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + ucred credentials{}; + #endif + }; diff --git a/www/ungoogled-chromium/files/patch-components_named__mojo__ipc__server_named__mojo__ipc__server__client__util.cc b/www/ungoogled-chromium/files/patch-components_named__mojo__ipc__server_named__mojo__ipc__server__client__util.cc new file mode 100644 index 000000000000..aa84ad10b848 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_named__mojo__ipc__server_named__mojo__ipc__server__client__util.cc @@ -0,0 +1,11 @@ +--- components/named_mojo_ipc_server/named_mojo_ipc_server_client_util.cc.orig 2023-02-11 09:11:04 UTC ++++ components/named_mojo_ipc_server/named_mojo_ipc_server_client_util.cc +@@ -22,7 +22,7 @@ namespace named_mojo_ipc_server { + // static + mojo::PlatformChannelEndpoint ConnectToServer( + const mojo::NamedPlatformChannel::ServerName& server_name) { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + return mojo::NamedPlatformChannel::ConnectToServer(server_name); + #elif BUILDFLAG(IS_MAC) + mojo::PlatformChannelEndpoint endpoint = diff --git a/www/ungoogled-chromium/files/patch-components_neterror_resources_neterror.js b/www/ungoogled-chromium/files/patch-components_neterror_resources_neterror.js index 4e7118206988..58705c0a3222 100644 --- a/www/ungoogled-chromium/files/patch-components_neterror_resources_neterror.js +++ b/www/ungoogled-chromium/files/patch-components_neterror_resources_neterror.js @@ -1,11 +1,11 @@ ---- components/neterror/resources/neterror.js.orig 2022-10-01 07:40:07 UTC +--- components/neterror/resources/neterror.js.orig 2023-02-11 09:11:04 UTC +++ components/neterror/resources/neterror.js -@@ -130,7 +130,7 @@ function detailsButtonClick() { +@@ -137,7 +137,7 @@ function detailsButtonClick() { let primaryControlOnLeft = true; // clang-format off -// +// // clang-format on primaryControlOnLeft = false; // diff --git a/www/ungoogled-chromium/files/patch-components_paint__preview_browser_paint__preview__client.cc b/www/ungoogled-chromium/files/patch-components_paint__preview_browser_paint__preview__client.cc index 1c42b7b14c94..417c5b0fea73 100644 --- a/www/ungoogled-chromium/files/patch-components_paint__preview_browser_paint__preview__client.cc +++ b/www/ungoogled-chromium/files/patch-components_paint__preview_browser_paint__preview__client.cc @@ -1,13 +1,13 @@ ---- components/paint_preview/browser/paint_preview_client.cc.orig 2022-10-29 17:50:56 UTC +--- components/paint_preview/browser/paint_preview_client.cc.orig 2023-02-11 09:11:04 UTC +++ components/paint_preview/browser/paint_preview_client.cc -@@ -307,8 +307,8 @@ void PaintPreviewClient::CapturePaintPreview( +@@ -308,8 +308,8 @@ void PaintPreviewClient::CapturePaintPreview( metadata->set_url(url.spec()); metadata->set_version(kPaintPreviewVersion); auto* chromeVersion = metadata->mutable_chrome_version(); - chromeVersion->set_major(CHROME_VERSION_MAJOR); - chromeVersion->set_minor(CHROME_VERSION_MINOR); + chromeVersion->set_gmajor(CHROME_VERSION_MAJOR); + chromeVersion->set_gminor(CHROME_VERSION_MINOR); chromeVersion->set_build(CHROME_VERSION_BUILD); chromeVersion->set_patch(CHROME_VERSION_PATCH); document_data.callback = std::move(callback); diff --git a/www/ungoogled-chromium/files/patch-components_paint__preview_player_player__compositor__delegate.cc b/www/ungoogled-chromium/files/patch-components_paint__preview_player_player__compositor__delegate.cc index fe792ef11614..e8dc53d4f8b4 100644 --- a/www/ungoogled-chromium/files/patch-components_paint__preview_player_player__compositor__delegate.cc +++ b/www/ungoogled-chromium/files/patch-components_paint__preview_player_player__compositor__delegate.cc @@ -1,13 +1,13 @@ ---- components/paint_preview/player/player_compositor_delegate.cc.orig 2022-10-01 07:40:07 UTC +--- components/paint_preview/player/player_compositor_delegate.cc.orig 2023-02-11 09:11:04 UTC +++ components/paint_preview/player/player_compositor_delegate.cc -@@ -444,8 +444,8 @@ void PlayerCompositorDelegate::ValidateProtoAndLoadAXT +@@ -445,8 +445,8 @@ void PlayerCompositorDelegate::ValidateProtoAndLoadAXT // use the AXTreeUpdate. auto chrome_version = capture_result_->proto.metadata().chrome_version(); if (capture_result_->proto.metadata().has_chrome_version() && - chrome_version.major() == CHROME_VERSION_MAJOR && - chrome_version.minor() == CHROME_VERSION_MINOR && + chrome_version.gmajor() == CHROME_VERSION_MAJOR && + chrome_version.gminor() == CHROME_VERSION_MINOR && chrome_version.build() == CHROME_VERSION_BUILD && chrome_version.patch() == CHROME_VERSION_PATCH) { paint_preview_service_->GetFileMixin()->GetAXTreeUpdate( diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_login__database.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_login__database.cc index 741c7f81a8ee..bc07e9684df4 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_login__database.cc +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_login__database.cc @@ -1,29 +1,29 @@ ---- components/password_manager/core/browser/login_database.cc.orig 2022-12-02 17:56:32 UTC +--- components/password_manager/core/browser/login_database.cc.orig 2023-02-11 09:11:04 UTC +++ components/password_manager/core/browser/login_database.cc -@@ -732,7 +732,7 @@ std::string GeneratePlaceholders(size_t count) { +@@ -728,7 +728,7 @@ std::string GeneratePlaceholders(size_t count) { return result; } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Fills |form| with necessary data required to be removed from the database // and returns it. PasswordForm GetFormForRemoval(sql::Statement& statement) { -@@ -749,7 +749,7 @@ PasswordForm GetFormForRemoval(sql::Statement& stateme +@@ -745,7 +745,7 @@ PasswordForm GetFormForRemoval(sql::Statement& stateme // Whether we should try to return the decryptable passwords while the // encryption service fails for some passwords. bool ShouldReturnPartialPasswords() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled(features::kSkipUndecryptablePasswords); #else return false; -@@ -1578,7 +1578,7 @@ bool LoginDatabase::DeleteAndRecreateDatabaseFile() { +@@ -1559,7 +1559,7 @@ bool LoginDatabase::DeleteAndRecreateDatabaseFile() { } DatabaseCleanupResult LoginDatabase::DeleteUndecryptableLogins() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) TRACE_EVENT0("passwords", "LoginDatabase::DeleteUndecryptableLogins"); // If the Keychain in MacOS or the real secret key in Linux is unavailable, // don't delete any logins. 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 4b8bde776a0e..9aa87cda7a03 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,29 +1,29 @@ ---- components/password_manager/core/browser/login_database_unittest.cc.orig 2023-01-13 08:56:02 UTC +--- components/password_manager/core/browser/login_database_unittest.cc.orig 2023-02-11 09:11:04 UTC +++ components/password_manager/core/browser/login_database_unittest.cc -@@ -2092,7 +2092,7 @@ TEST_F(LoginDatabaseUndecryptableLoginsTest, DeleteUnd +@@ -2109,7 +2109,7 @@ TEST_F(LoginDatabaseUndecryptableLoginsTest, DeleteUnd base::HistogramTester histogram_tester; ASSERT_TRUE(db.Init()); -#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) +#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD) // Make sure that we can't get any logins when database is corrupted. // Disabling the checks in chromecast because encryption is unavailable. std::vector> result; -@@ -2118,7 +2118,7 @@ TEST_F(LoginDatabaseUndecryptableLoginsTest, DeleteUnd +@@ -2136,7 +2136,7 @@ TEST_F(LoginDatabaseUndecryptableLoginsTest, DeleteUnd #endif // Check histograms. -#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) +#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD) histogram_tester.ExpectUniqueSample( "PasswordManager.DeleteUndecryptableLoginsReturnValue", metrics_util::DeleteCorruptedPasswordsResult::kSuccessPasswordsDeleted, -@@ -2161,7 +2161,7 @@ TEST_F(LoginDatabaseUndecryptableLoginsTest, KeychainL +@@ -2179,7 +2179,7 @@ TEST_F(LoginDatabaseUndecryptableLoginsTest, KeychainL } #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Test getting auto sign in logins when there are undecryptable ones TEST_F(LoginDatabaseUndecryptableLoginsTest, GetAutoSignInLogins) { - PrimaryKeyToFormMap key_to_form_map; + std::vector> forms; diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc index d39ed5f67696..1ec1e31a76c5 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc @@ -1,20 +1,20 @@ ---- components/password_manager/core/browser/sync/password_sync_bridge.cc.orig 2023-01-13 08:56:02 UTC +--- components/password_manager/core/browser/sync/password_sync_bridge.cc.orig 2023-02-11 09:11:04 UTC +++ components/password_manager/core/browser/sync/password_sync_bridge.cc @@ -185,7 +185,7 @@ bool IsCredentialPhished(const sync_pb::PasswordSpecif // merge. bool ShouldRecoverPasswordsDuringMerge() { - // Delete the local undecryptable copy when this is MacOS only. + // Delete the local undecryptable copy when this is MacOS or Linux only. -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return true; #else return false; @@ -193,7 +193,7 @@ bool ShouldRecoverPasswordsDuringMerge() { } bool ShouldCleanSyncMetadataDuringStartupWhenDecryptionFails() { --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return ShouldRecoverPasswordsDuringMerge() && base::FeatureList::IsEnabled( features::kForceInitialSyncWhenDecryptionFails); diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__features.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__features.cc index 9a1bfbabd5e3..c98720959d47 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__features.cc +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__features.cc @@ -1,20 +1,29 @@ ---- components/password_manager/core/common/password_manager_features.cc.orig 2023-01-13 08:56:02 UTC +--- components/password_manager/core/common/password_manager_features.cc.orig 2023-02-11 09:11:04 UTC +++ components/password_manager/core/common/password_manager_features.cc -@@ -86,7 +86,7 @@ BASE_FEATURE(kFillOnAccountSelect, +@@ -80,7 +80,7 @@ BASE_FEATURE(kFillOnAccountSelect, "fill-on-account-select", base::FEATURE_DISABLED_BY_DEFAULT); --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // When enabled, initial sync will be forced during startup if the password // store has encryption service failures. BASE_FEATURE(kForceInitialSyncWhenDecryptionFails, -@@ -235,7 +235,7 @@ BASE_FEATURE(kPasswordStrengthIndicator, +@@ -152,7 +152,7 @@ BASE_FEATURE(kPasswordChangeWellKnown, + // Controls the ability to import passwords from Chrome's settings page. + BASE_FEATURE(kPasswordImport, + "PasswordImport", +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT); + #else + base::FEATURE_DISABLED_BY_DEFAULT); +@@ -195,7 +195,7 @@ BASE_FEATURE(kPasswordStrengthIndicator, "PasswordStrengthIndicator", base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Displays at least the decryptable and never saved logins in the password // manager BASE_FEATURE(kSkipUndecryptablePasswords, diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__features.h b/www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__features.h index b4d96ef6daf4..79f1c7ef04a5 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__features.h +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__features.h @@ -1,20 +1,20 @@ ---- components/password_manager/core/common/password_manager_features.h.orig 2023-01-13 08:56:02 UTC +--- components/password_manager/core/common/password_manager_features.h.orig 2023-02-11 09:11:04 UTC +++ components/password_manager/core/common/password_manager_features.h -@@ -37,7 +37,7 @@ BASE_DECLARE_FEATURE(kEnablePasswordGenerationForClear +@@ -36,7 +36,7 @@ BASE_DECLARE_FEATURE(kEnablePasswordGenerationForClear BASE_DECLARE_FEATURE(kEnablePasswordManagerWithinFencedFrame); BASE_DECLARE_FEATURE(kFillingAcrossAffiliatedWebsites); BASE_DECLARE_FEATURE(kFillOnAccountSelect); --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kForceInitialSyncWhenDecryptionFails); #endif BASE_DECLARE_FEATURE(kInferConfirmationPasswordField); -@@ -68,7 +68,7 @@ BASE_DECLARE_FEATURE(kRecoverFromNeverSaveAndroid); +@@ -62,7 +62,7 @@ BASE_DECLARE_FEATURE(kRecoverFromNeverSaveAndroid); #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) // Desktop BASE_DECLARE_FEATURE(kRevampedPasswordManagementBubble); #endif -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kSkipUndecryptablePasswords); #endif #if BUILDFLAG(IS_ANDROID) diff --git a/www/ungoogled-chromium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc b/www/ungoogled-chromium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc index 1b947584c78c..6dd6cd6dd8db 100644 --- a/www/ungoogled-chromium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc +++ b/www/ungoogled-chromium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc @@ -1,11 +1,11 @@ ---- components/policy/core/browser/policy_pref_mapping_test.cc.orig 2022-12-02 17:56:32 UTC +--- components/policy/core/browser/policy_pref_mapping_test.cc.orig 2023-02-11 09:11:04 UTC +++ components/policy/core/browser/policy_pref_mapping_test.cc -@@ -337,7 +337,7 @@ class PolicyTestCase { +@@ -325,7 +325,7 @@ class PolicyTestCase { const std::string os("chromeos_lacros"); #elif BUILDFLAG(IS_IOS) const std::string os("ios"); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const std::string os("linux"); #elif BUILDFLAG(IS_MAC) const std::string os("mac"); diff --git a/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc b/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc index 2a65f4c8355c..18423d86ce63 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 2022-12-02 17:56:32 UTC +--- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2023-02-11 09:11:04 UTC +++ components/policy/core/common/cloud/cloud_policy_client.cc -@@ -448,7 +448,7 @@ void CloudPolicyClient::FetchPolicy() { +@@ -432,7 +432,7 @@ void CloudPolicyClient::FetchPolicy() { 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_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 c4ea333fa5d9..f3dc642db0a6 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 2022-12-02 17:56:32 UTC +--- components/segmentation_platform/embedder/default_model/cross_device_user_segment.cc.orig 2023-02-11 09:11:04 UTC +++ components/segmentation_platform/embedder/default_model/cross_device_user_segment.cc -@@ -200,7 +200,7 @@ void CrossDeviceUserSegment::ExecuteModelWithInput( +@@ -201,7 +201,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_sync__device__info_local__device__info__util.cc b/www/ungoogled-chromium/files/patch-components_sync__device__info_local__device__info__util.cc index 6985e3eace7d..fc9498a6b46e 100644 --- a/www/ungoogled-chromium/files/patch-components_sync__device__info_local__device__info__util.cc +++ b/www/ungoogled-chromium/files/patch-components_sync__device__info_local__device__info__util.cc @@ -1,29 +1,29 @@ ---- components/sync_device_info/local_device_info_util.cc.orig 2022-12-02 17:56:32 UTC +--- components/sync_device_info/local_device_info_util.cc.orig 2023-02-11 09:11:04 UTC +++ components/sync_device_info/local_device_info_util.cc -@@ -78,7 +78,7 @@ void OnMachineStatisticsLoaded(LocalDeviceNameInfo* na +@@ -82,7 +82,7 @@ void OnMachineStatisticsLoaded(LocalDeviceNameInfo* na sync_pb::SyncEnums::DeviceType GetLocalDeviceType() { #if BUILDFLAG(IS_CHROMEOS) return sync_pb::SyncEnums_DeviceType_TYPE_CROS; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return sync_pb::SyncEnums_DeviceType_TYPE_LINUX; #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) return ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET -@@ -98,7 +98,7 @@ DeviceInfo::OsType GetLocalDeviceOSType() { +@@ -102,7 +102,7 @@ DeviceInfo::OsType GetLocalDeviceOSType() { return DeviceInfo::OsType::kChromeOsAsh; #elif BUILDFLAG(IS_CHROMEOS_LACROS) return DeviceInfo::OsType::kChromeOsLacros; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return DeviceInfo::OsType::kLinux; #elif BUILDFLAG(IS_ANDROID) return DeviceInfo::OsType::kAndroid; -@@ -117,7 +117,7 @@ DeviceInfo::OsType GetLocalDeviceOSType() { +@@ -121,7 +121,7 @@ DeviceInfo::OsType GetLocalDeviceOSType() { DeviceInfo::FormFactor GetLocalDeviceFormFactor() { #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return DeviceInfo::FormFactor::kDesktop; #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) return ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET diff --git a/www/ungoogled-chromium/files/patch-components_url__formatter_spoof__checks_idn__spoof__checker.cc b/www/ungoogled-chromium/files/patch-components_url__formatter_spoof__checks_idn__spoof__checker.cc index 2a17f1524c1d..89bb070568ad 100644 --- a/www/ungoogled-chromium/files/patch-components_url__formatter_spoof__checks_idn__spoof__checker.cc +++ b/www/ungoogled-chromium/files/patch-components_url__formatter_spoof__checks_idn__spoof__checker.cc @@ -1,11 +1,11 @@ ---- components/url_formatter/spoof_checks/idn_spoof_checker.cc.orig 2022-10-01 07:40:07 UTC +--- components/url_formatter/spoof_checks/idn_spoof_checker.cc.orig 2023-02-11 09:11:04 UTC +++ components/url_formatter/spoof_checks/idn_spoof_checker.cc -@@ -285,7 +285,7 @@ IDNSpoofChecker::IDNSpoofChecker() { +@@ -286,7 +286,7 @@ IDNSpoofChecker::IDNSpoofChecker() { // The ideal fix would be to change the omnibox font used for Thai. In // that case, the Linux-only list should be revisited and potentially // removed. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) "[ทนบพรหเแ๐ดลปฟม]", #else "[บพเแ๐]", 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 476d829995b3..3664c60b3d58 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,20 +1,11 @@ ---- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2023-01-13 08:56:02 UTC +--- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2023-02-11 09:11:04 UTC +++ components/viz/service/display_embedder/skia_output_surface_impl.cc -@@ -1174,7 +1174,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor +@@ -1231,7 +1231,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor ->GetDeviceQueue() ->GetVulkanPhysicalDevice(), VK_IMAGE_TILING_OPTIMAL, ycbcr_info); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Textures that were allocated _on linux_ with ycbcr info came from // VaapiVideoDecoder, which exports using DRM format modifiers. return GrBackendFormat::MakeVk(gr_ycbcr_info, -@@ -1193,7 +1193,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor - return GrBackendFormat::MakeMtl(ToMTLPixelFormat(resource_format)); - #endif - } else { --#if !BUILDFLAG(IS_LINUX) -+#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) - // Skip the check as ycbcr info is always set by `VaapiVideoDecoder` on - // Linux. - DCHECK(!ycbcr_info); diff --git a/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_software__output__surface.cc b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_software__output__surface.cc index e3a01f679221..8e7c4f4e1396 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_software__output__surface.cc +++ b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_software__output__surface.cc @@ -1,20 +1,20 @@ ---- components/viz/service/display_embedder/software_output_surface.cc.orig 2022-10-01 07:40:07 UTC +--- components/viz/service/display_embedder/software_output_surface.cc.orig 2023-02-11 09:11:04 UTC +++ components/viz/service/display_embedder/software_output_surface.cc -@@ -93,7 +93,7 @@ void SoftwareOutputSurface::SwapBuffersCallback(base:: +@@ -98,7 +98,7 @@ void SoftwareOutputSurface::SwapBuffersCallback(base:: now.SnappedToNextTick(refresh_timebase_, refresh_interval_) - now; // 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 (needs_swap_size_notifications_) client_->DidSwapWithSize(pixel_size); #endif -@@ -120,7 +120,7 @@ gfx::OverlayTransform SoftwareOutputSurface::GetDispla +@@ -125,7 +125,7 @@ gfx::OverlayTransform SoftwareOutputSurface::GetDispla // 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) void SoftwareOutputSurface::SetNeedsSwapSizeNotifications( bool needs_swap_size_notifications) { needs_swap_size_notifications_ = needs_swap_size_notifications; 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 5993129e07ce..ddf19ce733db 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 2022-12-02 17:56:32 UTC +--- components/viz/service/display/skia_renderer.cc.orig 2023-02-11 09:11:04 UTC +++ components/viz/service/display/skia_renderer.cc -@@ -1129,7 +1129,7 @@ void SkiaRenderer::ClearFramebuffer() { +@@ -1145,7 +1145,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-content_app_content__main.cc b/www/ungoogled-chromium/files/patch-content_app_content__main.cc index 475d284dd6c0..ea626c5d70b2 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 2022-10-29 17:50:56 UTC +--- content/app/content_main.cc.orig 2023-02-11 09:11:04 UTC +++ content/app/content_main.cc -@@ -226,7 +226,7 @@ RunContentProcess(ContentMainParams params, +@@ -228,7 +228,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 b93fbf57244a..b6a739bd0263 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,120 +1,130 @@ ---- content/app/content_main_runner_impl.cc.orig 2023-01-13 08:56:02 UTC +--- content/app/content_main_runner_impl.cc.orig 2023-02-11 09:11:04 UTC +++ content/app/content_main_runner_impl.cc -@@ -135,13 +135,13 @@ +@@ -138,13 +138,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" - #include "content/public/common/zygote/sandbox_support_linux.h" -@@ -180,6 +180,10 @@ +@@ -184,6 +184,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" -@@ -361,7 +365,7 @@ void InitializeZygoteSandboxForBrowserProcess( +@@ -365,7 +369,7 @@ void InitializeZygoteSandboxForBrowserProcess( } #endif // BUILDFLAG(USE_ZYGOTE_HANDLE) -#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 -@@ -397,7 +401,7 @@ void PreloadLibraryCdms() { +@@ -401,15 +405,17 @@ void PreloadLibraryCdms() { } #endif // BUILDFLAG(ENABLE_LIBRARY_CDMS) -#if BUILDFLAG(USE_ZYGOTE_HANDLE) +#if BUILDFLAG(USE_ZYGOTE_HANDLE) || BUILDFLAG(IS_BSD) void PreSandboxInit() { // Pre-acquire resources needed by BoringSSL. See // https://boringssl.9oo91esource.qjz9zk/boringssl/+/HEAD/SANDBOXING.md -@@ -420,6 +424,11 @@ void PreSandboxInit() { + CRYPTO_pre_sandbox_init(); + ++#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. +@@ -428,6 +434,11 @@ void PreSandboxInit() { } #endif +#if BUILDFLAG(IS_BSD) + // "cache" the amount of physical memory before pledge(2) + base::SysInfo::AmountOfPhysicalMemoryMB(); +#endif + // Set the android SkFontMgr for blink. We need to ensure this is done // before the sandbox is initialized to allow the font manager to access // font configuration files on disk. -@@ -602,7 +611,7 @@ int NO_STACK_PROTECTOR RunZygote(ContentMainDelegate* +@@ -615,7 +626,7 @@ int NO_STACK_PROTECTOR RunZygote(ContentMainDelegate* delegate->ZygoteStarting(&zygote_fork_delegates); media::InitializeMediaLibrary(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) PreSandboxInit(); #endif -@@ -796,11 +805,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -809,11 +820,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) -@@ -982,6 +990,16 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -997,6 +1007,16 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam } #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_HANDLE) -@@ -1045,7 +1063,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1060,7 +1080,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { 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 -@@ -1078,6 +1096,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1093,6 +1113,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 0ff0445c2f4f..3af2e701882c 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-01-26 13:28:14 UTC +--- content/browser/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ content/browser/BUILD.gn -@@ -2340,6 +2340,13 @@ source_set("browser") { +@@ -2368,6 +2368,13 @@ source_set("browser") { ] } + 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 f4a39bdb079a..1e786468f55c 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 2022-12-02 17:56:32 UTC +--- content/browser/browser_main_loop.cc.orig 2023-02-11 09:11:04 UTC +++ content/browser/browser_main_loop.cc -@@ -242,6 +242,12 @@ +@@ -244,6 +244,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 -@@ -526,6 +532,12 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -528,6 +534,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 -@@ -557,7 +569,7 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -559,7 +571,7 @@ int BrowserMainLoop::EarlyInitialization() { base::PlatformThread::SetCurrentThreadType(base::ThreadType::kCompositing); #if BUILDFLAG(IS_MAC) || 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 the Mac is low (256), so bump it up. 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 7eaac8edc3cf..3f32a521daaf 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,80 +1,80 @@ ---- content/browser/child_process_launcher_helper_linux.cc.orig 2022-10-01 07:40:07 UTC +--- content/browser/child_process_launcher_helper_linux.cc.orig 2023-02-11 09:11:04 UTC +++ content/browser/child_process_launcher_helper_linux.cc @@ -20,7 +20,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 { @@ -74,6 +76,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr int* launch_result) { *is_synchronous_launch = true; Process process; +#if !BUILDFLAG(IS_BSD) ZygoteHandle zygote_handle = base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoZygote) ? nullptr @@ -87,7 +90,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; @@ -96,15 +98,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) { @@ -124,10 +128,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 { @@ -151,13 +159,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( + void ChildProcessLauncherHelper::SetProcessBackgroundedOnLauncherThread( diff --git a/www/ungoogled-chromium/files/patch-content_browser_devtools_protocol_system__info__handler.cc b/www/ungoogled-chromium/files/patch-content_browser_devtools_protocol_system__info__handler.cc index 2d271b4c4e76..06b7631baf38 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_devtools_protocol_system__info__handler.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_devtools_protocol_system__info__handler.cc @@ -1,11 +1,11 @@ ---- content/browser/devtools/protocol/system_info_handler.cc.orig 2023-01-13 08:56:02 UTC +--- content/browser/devtools/protocol/system_info_handler.cc.orig 2023-02-11 09:11:04 UTC +++ content/browser/devtools/protocol/system_info_handler.cc -@@ -49,7 +49,7 @@ std::unique_ptr GfxSizeToSystemInfoS +@@ -50,7 +50,7 @@ std::unique_ptr GfxSizeToSystemInfoS // 1046598, and 1153667. // Windows builds need more time -- see Issue 873112 and 1004472. // Mac builds need more time - see Issue angleproject:6182. -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !defined(NDEBUG)) || \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && !defined(NDEBUG)) || \ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_OZONE) static constexpr int kGPUInfoWatchdogTimeoutMultiplierOS = 3; #else diff --git a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__process__host.cc b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__process__host.cc index a692b245bb5f..1e82d78949db 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 2022-12-02 17:56:32 UTC +--- content/browser/gpu/gpu_process_host.cc.orig 2023-02-11 09:11:04 UTC +++ content/browser/gpu/gpu_process_host.cc -@@ -255,6 +255,7 @@ static const char* const kSwitchNames[] = { +@@ -249,6 +249,7 @@ static const char* const kSwitchNames[] = { switches::kEnableBackgroundThreadPool, switches::kEnableGpuRasterization, switches::kEnableLogging, + switches::kDisableUnveil, - switches::kEnableDeJelly, - switches::kDeJellyScreenWidth, switches::kDoubleBufferCompositing, -@@ -288,7 +289,7 @@ static const char* const kSwitchNames[] = { + switches::kHeadless, + switches::kLoggingLevel, +@@ -280,7 +281,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_renderer__host_delegated__frame__host.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_delegated__frame__host.cc index a04178b1549a..12ab3420ef45 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_delegated__frame__host.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_delegated__frame__host.cc @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/delegated_frame_host.cc.orig 2022-10-01 07:40:07 UTC +--- content/browser/renderer_host/delegated_frame_host.cc.orig 2023-02-11 09:11:04 UTC +++ content/browser/renderer_host/delegated_frame_host.cc -@@ -289,7 +289,7 @@ void DelegatedFrameHost::EmbedSurface( +@@ -295,7 +295,7 @@ void DelegatedFrameHost::EmbedSurface( if (!primary_surface_id || primary_surface_id->local_surface_id() != local_surface_id_) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // On Windows and Linux, we would like to produce new content as soon as // possible or the OS will create an additional black gutter. Until we can // block resize on surface synchronization on these platforms, we will not diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__message__filter.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__message__filter.cc deleted file mode 100644 index 992caf5abf4e..000000000000 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__message__filter.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- content/browser/renderer_host/render_message_filter.cc.orig 2022-12-02 17:56:32 UTC -+++ content/browser/renderer_host/render_message_filter.cc -@@ -66,7 +66,7 @@ - #if BUILDFLAG(IS_MAC) - #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" - #endif --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "base/linux_util.h" - #include "base/threading/platform_thread.h" - #endif -@@ -130,7 +130,7 @@ void RenderMessageFilter::GenerateFrameRoutingID( - document_token); - } - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - void RenderMessageFilter::SetThreadTypeOnWorkerThread( - base::PlatformThreadId ns_tid, - base::ThreadType thread_type) { -@@ -151,7 +151,7 @@ void RenderMessageFilter::SetThreadTypeOnWorkerThread( - } - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - void RenderMessageFilter::SetThreadType(int32_t ns_tid, - base::ThreadType thread_type) { - constexpr base::TaskTraits kTraits = { diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__message__filter.h b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__message__filter.h deleted file mode 100644 index cb1840b24b2b..000000000000 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__message__filter.h +++ /dev/null @@ -1,18 +0,0 @@ ---- content/browser/renderer_host/render_message_filter.h.orig 2022-10-01 07:40:07 UTC -+++ content/browser/renderer_host/render_message_filter.h -@@ -78,13 +78,13 @@ class RenderMessageFilter - void GenerateRoutingID(GenerateRoutingIDCallback routing_id) override; - void GenerateFrameRoutingID(GenerateFrameRoutingIDCallback callback) override; - void HasGpuProcess(HasGpuProcessCallback callback) override; --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - void SetThreadType(int32_t ns_tid, base::ThreadType thread_type) override; - #endif - - void OnResolveProxy(const GURL& url, IPC::Message* reply_msg); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - void SetThreadTypeOnWorkerThread(base::PlatformThreadId ns_tid, - base::ThreadType thread_type); - #endif diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc index db3542c9c756..330912dd8832 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,64 @@ ---- content/browser/renderer_host/render_process_host_impl.cc.orig 2023-01-13 08:56:02 UTC +--- content/browser/renderer_host/render_process_host_impl.cc.orig 2023-02-11 09:11:04 UTC +++ content/browser/renderer_host/render_process_host_impl.cc @@ -216,7 +216,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 -@@ -1140,7 +1140,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = +@@ -1142,7 +1142,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; -@@ -1227,7 +1227,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1229,7 +1229,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; -@@ -2130,7 +2130,7 @@ void RenderProcessHostImpl::ReinitializeLogging( +@@ -1318,7 +1318,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) +@@ -2170,7 +2170,7 @@ void RenderProcessHostImpl::ReinitializeLogging( } #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void RenderProcessHostImpl::CreateStableVideoDecoder( mojo::PendingReceiver receiver) { if (!stable_video_decoder_factory_remote_.is_bound()) { -@@ -3285,6 +3285,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin +@@ -3332,6 +3332,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin switches::kDisableSpeechAPI, switches::kDisableThreadedCompositing, switches::kDisableTouchDragDrop, + switches::kDisableUnveil, + switches::kDisableUseMojoVideoDecoderForPepper, switches::kDisableV8IdleTasks, switches::kDisableVideoCaptureUseGpuMemoryBuffer, - switches::kDisableWebGLImageChromium, -@@ -4761,7 +4762,7 @@ void RenderProcessHostImpl::ResetIPC() { +@@ -4811,7 +4812,7 @@ void RenderProcessHostImpl::ResetIPC() { coordinator_connector_receiver_.reset(); tracing_registration_.reset(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) stable_video_decoder_factory_remote_.reset(); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) 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 c8bd16b99f3c..729c1a9a9dba 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,38 +1,38 @@ ---- content/browser/renderer_host/render_process_host_impl.h.orig 2023-01-13 08:56:02 UTC +--- content/browser/renderer_host/render_process_host_impl.h.orig 2023-02-11 09:11:04 UTC +++ content/browser/renderer_host/render_process_host_impl.h -@@ -84,7 +84,7 @@ +@@ -85,7 +85,7 @@ #include "content/public/browser/android/child_process_importance.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "media/mojo/mojom/stable/stable_video_decoder.mojom.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -484,7 +484,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -489,7 +489,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) -@@ -684,7 +684,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -704,7 +704,7 @@ class CONTENT_EXPORT RenderProcessHostImpl mojo::PendingReceiver receiver) override; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void CreateStableVideoDecoder( mojo::PendingReceiver receiver) override; -@@ -1139,7 +1139,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -1165,7 +1165,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // RenderProcessHost. This is destroyed early in ResetIPC() method. std::unique_ptr permission_service_context_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Connection to the StableVideoDecoderFactory that lives in a utility // process. This is only used for out-of-process video decoding. mojo::Remote diff --git a/www/ungoogled-chromium/files/patch-content_browser_scheduler_responsiveness_native__event__observer.h b/www/ungoogled-chromium/files/patch-content_browser_scheduler_responsiveness_native__event__observer.h index 3c67407496f1..3d0d4c245500 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_scheduler_responsiveness_native__event__observer.h +++ b/www/ungoogled-chromium/files/patch-content_browser_scheduler_responsiveness_native__event__observer.h @@ -1,47 +1,47 @@ ---- content/browser/scheduler/responsiveness/native_event_observer.h.orig 2022-10-01 07:40:07 UTC +--- content/browser/scheduler/responsiveness/native_event_observer.h.orig 2023-02-11 09:11:04 UTC +++ content/browser/scheduler/responsiveness/native_event_observer.h -@@ -15,7 +15,7 @@ +@@ -16,7 +16,7 @@ #include "content/public/browser/native_event_processor_observer_mac.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "ui/aura/window_event_dispatcher_observer.h" #endif -@@ -40,7 +40,7 @@ namespace responsiveness { +@@ -41,7 +41,7 @@ namespace responsiveness { class CONTENT_EXPORT NativeEventObserver #if BUILDFLAG(IS_MAC) : public NativeEventProcessorObserver -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) : public aura::WindowEventDispatcherObserver #elif BUILDFLAG(IS_WIN) : public base::MessagePumpForUI::Observer -@@ -57,7 +57,7 @@ class CONTENT_EXPORT NativeEventObserver +@@ -58,7 +58,7 @@ class CONTENT_EXPORT NativeEventObserver NativeEventObserver(WillRunEventCallback will_run_event_callback, DidRunEventCallback did_run_event_callback); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) NativeEventObserver(const NativeEventObserver&) = delete; NativeEventObserver& operator=(const NativeEventObserver&) = delete; -@@ -73,7 +73,7 @@ class CONTENT_EXPORT NativeEventObserver +@@ -74,7 +74,7 @@ class CONTENT_EXPORT NativeEventObserver // Exposed for tests. void WillRunNativeEvent(const void* opaque_identifier) override; void DidRunNativeEvent(const void* opaque_identifier) override; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // aura::WindowEventDispatcherObserver overrides: void OnWindowEventDispatcherStartedProcessing( aura::WindowEventDispatcher* dispatcher, -@@ -90,7 +90,7 @@ class CONTENT_EXPORT NativeEventObserver +@@ -91,7 +91,7 @@ class CONTENT_EXPORT NativeEventObserver void RegisterObserver(); void DeregisterObserver(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) struct EventInfo { - const void* unique_id; + raw_ptr unique_id; }; diff --git a/www/ungoogled-chromium/files/patch-content_browser_v8__snapshot__files.cc b/www/ungoogled-chromium/files/patch-content_browser_v8__snapshot__files.cc index 8d15a11ec93d..8c38457168f4 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_v8__snapshot__files.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_v8__snapshot__files.cc @@ -1,11 +1,11 @@ ---- content/browser/v8_snapshot_files.cc.orig 2022-10-01 07:40:07 UTC +--- content/browser/v8_snapshot_files.cc.orig 2023-02-11 09:11:04 UTC +++ content/browser/v8_snapshot_files.cc -@@ -10,7 +10,7 @@ +@@ -11,7 +11,7 @@ namespace content { std::map GetV8SnapshotFilesToPreload() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #if defined(USE_V8_CONTEXT_SNAPSHOT) + #if BUILDFLAG(USE_V8_CONTEXT_SNAPSHOT) return {{kV8ContextSnapshotDataDescriptor, - base::FilePath(FILE_PATH_LITERAL(V8_CONTEXT_SNAPSHOT_FILENAME))}}; + base::FilePath( diff --git a/www/ungoogled-chromium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.h b/www/ungoogled-chromium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.h index 279aca6a1e60..788819688bfd 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.h +++ b/www/ungoogled-chromium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.h @@ -1,29 +1,29 @@ ---- content/browser/zygote_host/zygote_host_impl_linux.h.orig 2022-12-02 17:56:32 UTC +--- content/browser/zygote_host/zygote_host_impl_linux.h.orig 2023-02-11 09:11:04 UTC +++ content/browser/zygote_host/zygote_host_impl_linux.h @@ -47,12 +47,14 @@ class CONTENT_EXPORT ZygoteHostImpl : public ZygoteHos base::ScopedFD* control_fd, base::FileHandleMappingVector additional_remapped_fds); +#if !BUILDFLAG(IS_BSD) void AdjustRendererOOMScore(base::ProcessHandle process_handle, int score) override; - #if BUILDFLAG(IS_CHROMEOS_ASH) + #if BUILDFLAG(IS_CHROMEOS) void ReinitializeLogging(uint32_t logging_dest, base::PlatformFile log_file_fd) override; - #endif + #endif // BUILDFLAG(IS_CHROMEOS) +#endif bool HasZygote() { return !zygote_pids_.empty(); } @@ -67,9 +69,11 @@ class CONTENT_EXPORT ZygoteHostImpl : public ZygoteHos int renderer_sandbox_status_; +#if !BUILDFLAG(IS_BSD) bool use_namespace_sandbox_; bool use_suid_sandbox_; bool use_suid_sandbox_for_adj_oom_score_; +#endif std::string sandbox_binary_; // This lock protects the |zygote_pids_| set. diff --git a/www/ungoogled-chromium/files/patch-content_common_BUILD.gn b/www/ungoogled-chromium/files/patch-content_common_BUILD.gn index 9fb98bc52a98..5a4329a49602 100644 --- a/www/ungoogled-chromium/files/patch-content_common_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-content_common_BUILD.gn @@ -1,12 +1,21 @@ ---- content/common/BUILD.gn.orig 2023-01-13 08:56:02 UTC +--- content/common/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ content/common/BUILD.gn @@ -433,6 +433,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" ] + } } } +@@ -481,7 +484,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_font__list__unittest.cc b/www/ungoogled-chromium/files/patch-content_common_font__list__unittest.cc index 2663be43b370..0978584f9227 100644 --- a/www/ungoogled-chromium/files/patch-content_common_font__list__unittest.cc +++ b/www/ungoogled-chromium/files/patch-content_common_font__list__unittest.cc @@ -1,11 +1,11 @@ ---- content/common/font_list_unittest.cc.orig 2022-10-01 07:40:07 UTC +--- content/common/font_list_unittest.cc.orig 2023-02-11 09:11:04 UTC +++ content/common/font_list_unittest.cc -@@ -48,7 +48,7 @@ TEST(FontList, GetFontList) { +@@ -47,7 +47,7 @@ TEST(FontList, GetFontList) { EXPECT_TRUE(HasFontWithName(fonts, "MS Gothic", "MS Gothic")); EXPECT_TRUE(HasFontWithName(fonts, "Segoe UI", "Segoe UI")); EXPECT_TRUE(HasFontWithName(fonts, "Verdana", "Verdana")); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) EXPECT_TRUE(HasFontWithName(fonts, "Arimo", "Arimo")); #else EXPECT_TRUE(HasFontWithName(fonts, "Arial", "Arial")); diff --git a/www/ungoogled-chromium/files/patch-content_gpu_gpu__main.cc b/www/ungoogled-chromium/files/patch-content_gpu_gpu__main.cc index d471341fd27d..61725e5678ea 100644 --- a/www/ungoogled-chromium/files/patch-content_gpu_gpu__main.cc +++ b/www/ungoogled-chromium/files/patch-content_gpu_gpu__main.cc @@ -1,47 +1,47 @@ ---- content/gpu/gpu_main.cc.orig 2023-01-13 08:56:02 UTC +--- content/gpu/gpu_main.cc.orig 2023-02-11 09:11:04 UTC +++ content/gpu/gpu_main.cc -@@ -87,7 +87,7 @@ +@@ -88,7 +88,7 @@ #include "sandbox/win/src/sandbox.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/gpu/gpu_sandbox_hook_linux.h" #include "sandbox/policy/linux/sandbox_linux.h" #include "sandbox/policy/sandbox_type.h" -@@ -108,7 +108,7 @@ namespace content { +@@ -109,7 +109,7 @@ namespace content { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool StartSandboxLinux(gpu::GpuWatchdogThread*, const gpu::GPUInfo*, const gpu::GpuPreferences&); -@@ -170,7 +170,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel +@@ -171,7 +171,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel bool EnsureSandboxInitialized(gpu::GpuWatchdogThread* watchdog_thread, const gpu::GPUInfo* gpu_info, const gpu::GpuPreferences& gpu_prefs) override { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return StartSandboxLinux(watchdog_thread, gpu_info, gpu_prefs); #elif BUILDFLAG(IS_WIN) return StartSandboxWindows(sandbox_info_); -@@ -267,7 +267,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -269,7 +269,7 @@ int GpuMain(MainFunctionParams parameters) { std::make_unique( gpu_preferences.message_pump_type); } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #error "Unsupported Linux platform." #elif BUILDFLAG(IS_MAC) // Cross-process CoreAnimation requires a CFRunLoop to function at all, and -@@ -402,7 +402,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -404,7 +404,7 @@ int GpuMain(MainFunctionParams parameters) { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread, const gpu::GPUInfo* gpu_info, const gpu::GpuPreferences& gpu_prefs) { diff --git a/www/ungoogled-chromium/files/patch-content_ppapi__plugin_ppapi__plugin__main.cc b/www/ungoogled-chromium/files/patch-content_ppapi__plugin_ppapi__plugin__main.cc index 93bd6e95dee2..e0494472ed22 100644 --- a/www/ungoogled-chromium/files/patch-content_ppapi__plugin_ppapi__plugin__main.cc +++ b/www/ungoogled-chromium/files/patch-content_ppapi__plugin_ppapi__plugin__main.cc @@ -1,23 +1,23 @@ ---- content/ppapi_plugin/ppapi_plugin_main.cc.orig 2022-12-02 17:56:32 UTC +--- content/ppapi_plugin/ppapi_plugin_main.cc.orig 2023-02-11 09:11:04 UTC +++ content/ppapi_plugin/ppapi_plugin_main.cc -@@ -53,6 +53,11 @@ +@@ -54,6 +54,11 @@ #include "gin/v8_initializer.h" #endif +#if BUILDFLAG(IS_OPENBSD) +#include "sandbox/policy/openbsd/sandbox_openbsd.h" +#include "sandbox/policy/sandbox_type.h" +#endif + #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) #include #endif -@@ -146,7 +151,7 @@ int PpapiPluginMain(MainFunctionParams parameters) { +@@ -148,7 +153,7 @@ int PpapiPluginMain(MainFunctionParams parameters) { gin::V8Initializer::LoadV8Snapshot(); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) sandbox::policy::SandboxLinux::GetInstance()->InitializeSandbox( sandbox::policy::SandboxTypeFromCommandLine(command_line), sandbox::policy::SandboxLinux::PreSandboxHook(), diff --git a/www/ungoogled-chromium/files/patch-content_public_browser_render__process__host.h b/www/ungoogled-chromium/files/patch-content_public_browser_render__process__host.h index 0694ad764828..f563bae5e9f8 100644 --- a/www/ungoogled-chromium/files/patch-content_public_browser_render__process__host.h +++ b/www/ungoogled-chromium/files/patch-content_public_browser_render__process__host.h @@ -1,20 +1,20 @@ ---- content/public/browser/render_process_host.h.orig 2023-01-13 08:56:02 UTC +--- content/public/browser/render_process_host.h.orig 2023-02-11 09:11:04 UTC +++ content/public/browser/render_process_host.h @@ -54,7 +54,7 @@ #include "content/public/browser/android/child_process_importance.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "media/mojo/mojom/stable/stable_video_decoder.mojom-forward.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -629,7 +629,7 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::S +@@ -641,7 +641,7 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::S const blink::StorageKey& storage_key, mojo::PendingReceiver receiver) = 0; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) virtual void CreateStableVideoDecoder( mojo::PendingReceiver receiver) = 0; diff --git a/www/ungoogled-chromium/files/patch-content_public_browser_zygote__host_zygote__host__linux.h b/www/ungoogled-chromium/files/patch-content_public_browser_zygote__host_zygote__host__linux.h index a4184c403af5..61f5e0853896 100644 --- a/www/ungoogled-chromium/files/patch-content_public_browser_zygote__host_zygote__host__linux.h +++ b/www/ungoogled-chromium/files/patch-content_public_browser_zygote__host_zygote__host__linux.h @@ -1,16 +1,16 @@ ---- content/public/browser/zygote_host/zygote_host_linux.h.orig 2022-12-02 17:56:32 UTC +--- content/public/browser/zygote_host/zygote_host_linux.h.orig 2023-02-11 09:11:04 UTC +++ content/public/browser/zygote_host/zygote_host_linux.h @@ -35,11 +35,13 @@ class ZygoteHost { // after the first render has been forked. virtual int GetRendererSandboxStatus() = 0; +#if !BUILDFLAG(IS_BSD) // Adjust the OOM score of the given renderer's PID. The allowed // range for the score is [0, 1000], where higher values are more // likely to be killed by the OOM killer. virtual void AdjustRendererOOMScore(base::ProcessHandle process_handle, int score) = 0; +#endif - #if BUILDFLAG(IS_CHROMEOS_ASH) + #if BUILDFLAG(IS_CHROMEOS) // Reinitialize logging for the Zygote processes. Needed on ChromeOS, which diff --git a/www/ungoogled-chromium/files/patch-content_public_common_common__param__traits__macros.h b/www/ungoogled-chromium/files/patch-content_public_common_common__param__traits__macros.h index e61fe90f625c..5c25e937f93e 100644 --- a/www/ungoogled-chromium/files/patch-content_public_common_common__param__traits__macros.h +++ b/www/ungoogled-chromium/files/patch-content_public_common_common__param__traits__macros.h @@ -1,11 +1,11 @@ ---- content/public/common/common_param_traits_macros.h.orig 2022-10-29 17:50:56 UTC +--- content/public/common/common_param_traits_macros.h.orig 2023-02-11 09:11:04 UTC +++ content/public/common/common_param_traits_macros.h -@@ -125,7 +125,7 @@ IPC_STRUCT_TRAITS_BEGIN(blink::RendererPreferences) +@@ -113,7 +113,7 @@ IPC_STRUCT_TRAITS_BEGIN(blink::RendererPreferences) IPC_STRUCT_TRAITS_MEMBER(accept_languages) IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed) IPC_STRUCT_TRAITS_MEMBER(caret_browsing_enabled) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) IPC_STRUCT_TRAITS_MEMBER(system_font_family_name) #endif #if BUILDFLAG(IS_WIN) 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 2977151f5cff..72ceb73265d9 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,59 @@ ---- content/public/common/content_features.cc.orig 2023-01-13 08:56:02 UTC +--- content/public/common/content_features.cc.orig 2023-02-11 09:11:04 UTC +++ content/public/common/content_features.cc @@ -41,7 +41,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 @@ -53,7 +53,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 -@@ -1251,7 +1251,7 @@ BASE_FEATURE(kWebAssemblyCodeProtection, +@@ -499,7 +499,7 @@ BASE_FEATURE(kGetDisplayMediaSetAutoSelectAllScreens, + // (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 +@@ -1258,7 +1258,7 @@ BASE_FEATURE(kWebAssemblyCodeProtection, "WebAssemblyCodeProtection", base::FEATURE_DISABLED_BY_DEFAULT); -#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) // Use memory protection keys in userspace (PKU) (if available) to protect code // JITed for WebAssembly. Fall back to traditional memory protection if // WebAssemblyCodeProtection is also enabled. -@@ -1287,7 +1287,7 @@ BASE_FEATURE(kWebAssemblyTiering, +@@ -1305,7 +1305,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 -@@ -1362,7 +1362,11 @@ BASE_FEATURE(kWebUIReportOnlyTrustedTypes, +@@ -1381,7 +1381,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 index aff97eee6841..3be7b4d6654a 100644 --- a/www/ungoogled-chromium/files/patch-content_public_common_content__features.h +++ b/www/ungoogled-chromium/files/patch-content_public_common_content__features.h @@ -1,11 +1,20 @@ ---- content/public/common/content_features.h.orig 2023-01-13 08:56:02 UTC +--- content/public/common/content_features.h.orig 2023-02-11 09:11:04 UTC +++ content/public/common/content_features.h -@@ -272,7 +272,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kVideoPlaybackQual +@@ -107,7 +107,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kFractionalScrollO + CONTENT_EXPORT BASE_DECLARE_FEATURE(kGetDisplayMediaSet); + CONTENT_EXPORT BASE_DECLARE_FEATURE(kGetDisplayMediaSetAutoSelectAllScreens); + 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); +@@ -282,7 +282,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kVideoPlaybackQual CONTENT_EXPORT BASE_DECLARE_FEATURE(kV8VmFuture); CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyBaseline); CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyCodeProtection); -#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) CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyCodeProtectionPku); #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && // defined(ARCH_CPU_X86_64) diff --git a/www/ungoogled-chromium/files/patch-content_public_common_content__switches.cc b/www/ungoogled-chromium/files/patch-content_public_common_content__switches.cc index 65acec4911c5..07553a548fd2 100644 --- a/www/ungoogled-chromium/files/patch-content_public_common_content__switches.cc +++ b/www/ungoogled-chromium/files/patch-content_public_common_content__switches.cc @@ -1,20 +1,20 @@ ---- content/public/common/content_switches.cc.orig 2022-12-02 17:56:32 UTC +--- content/public/common/content_switches.cc.orig 2023-02-11 09:11:04 UTC +++ content/public/common/content_switches.cc @@ -367,6 +367,8 @@ const char kEnableGpuMemoryBufferVideoFrames[] = // builds. const char kEnableLogging[] = "enable-logging"; +const char kDisableUnveil[] = "disable-unveil"; + // Enables the type, downlinkMax attributes of the NetInfo API. Also, enables // triggering of change attribute of the NetInfo API when there is a change in // the connection type. -@@ -994,7 +996,7 @@ const char kEnableAutomation[] = "enable-automation"; +@@ -1003,7 +1005,7 @@ const char kEnableAutomation[] = "enable-automation"; // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Allows sending text-to-speech requests to speech-dispatcher, a common // Linux speech service. Because it's buggy, the user must explicitly // enable it so that visiting a random webpage can't cause instability. diff --git a/www/ungoogled-chromium/files/patch-content_public_common_content__switches.h b/www/ungoogled-chromium/files/patch-content_public_common_content__switches.h index aa622272a727..cb9d15614756 100644 --- a/www/ungoogled-chromium/files/patch-content_public_common_content__switches.h +++ b/www/ungoogled-chromium/files/patch-content_public_common_content__switches.h @@ -1,19 +1,19 @@ ---- content/public/common/content_switches.h.orig 2022-12-02 17:56:32 UTC +--- content/public/common/content_switches.h.orig 2023-02-11 09:11:04 UTC +++ content/public/common/content_switches.h @@ -118,6 +118,7 @@ CONTENT_EXPORT extern const char kEnableBlinkTestFeatu CONTENT_EXPORT extern const char kEnableGpuMemoryBufferVideoFrames[]; CONTENT_EXPORT extern const char kEnableLCDText[]; CONTENT_EXPORT extern const char kEnableLogging[]; +CONTENT_EXPORT extern const char kDisableUnveil[]; CONTENT_EXPORT extern const char kEnableNetworkInformationDownlinkMax[]; CONTENT_EXPORT extern const char kEnableCanvas2DLayers[]; CONTENT_EXPORT extern const char kEnablePluginPlaceholderTesting[]; -@@ -269,7 +270,7 @@ CONTENT_EXPORT extern const char kRendererWaitForJavaD +@@ -271,7 +272,7 @@ CONTENT_EXPORT extern const char kRendererWaitForJavaD // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT extern const char kEnableSpeechDispatcher[]; #endif diff --git a/www/ungoogled-chromium/files/patch-content_public_test_mock__render__process__host.h b/www/ungoogled-chromium/files/patch-content_public_test_mock__render__process__host.h index 2bba0cd28ba8..d570e7102ba4 100644 --- a/www/ungoogled-chromium/files/patch-content_public_test_mock__render__process__host.h +++ b/www/ungoogled-chromium/files/patch-content_public_test_mock__render__process__host.h @@ -1,11 +1,11 @@ ---- content/public/test/mock_render_process_host.h.orig 2023-01-13 08:56:02 UTC +--- content/public/test/mock_render_process_host.h.orig 2023-02-11 09:11:04 UTC +++ content/public/test/mock_render_process_host.h -@@ -267,7 +267,7 @@ class MockRenderProcessHost : public RenderProcessHost +@@ -276,7 +276,7 @@ class MockRenderProcessHost : public RenderProcessHost const blink::StorageKey& storage_key, mojo::PendingReceiver receiver) override {} -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void CreateStableVideoDecoder( mojo::PendingReceiver receiver) override {} diff --git a/www/ungoogled-chromium/files/patch-content_renderer_BUILD.gn b/www/ungoogled-chromium/files/patch-content_renderer_BUILD.gn new file mode 100644 index 000000000000..7becde32b6ac --- /dev/null +++ b/www/ungoogled-chromium/files/patch-content_renderer_BUILD.gn @@ -0,0 +1,16 @@ +--- content/renderer/BUILD.gn.orig 2023-02-11 09:11:04 UTC ++++ content/renderer/BUILD.gn +@@ -198,6 +198,13 @@ target(link_target_type, "renderer") { + ] + } + ++ if (is_bsd) { ++ sources -= [ ++ "renderer_thread_type_handler.cc", ++ "renderer_thread_type_handler.h", ++ ] ++ } ++ + if (is_mac) { + sources += [ + "renderer_main_platform_delegate_mac.mm", 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 8a6749e9207b..f4e2c4abefe0 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,29 +1,29 @@ ---- content/renderer/render_process_impl.cc.orig 2023-01-13 08:56:02 UTC +--- content/renderer/render_process_impl.cc.orig 2023-02-11 09:11:04 UTC +++ content/renderer/render_process_impl.cc @@ -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 @@ -154,7 +154,7 @@ RenderProcessImpl::RenderProcessImpl() SetV8FlagIfNotFeature(features::kWebAssemblyCodeProtection, "--no-wasm-write-protect-code-memory"); -#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) SetV8FlagIfFeature(features::kWebAssemblyCodeProtectionPku, "--wasm-memory-protection-keys"); SetV8FlagIfNotFeature(features::kWebAssemblyCodeProtectionPku, -@@ -224,7 +224,7 @@ RenderProcessImpl::RenderProcessImpl() +@@ -234,7 +234,7 @@ RenderProcessImpl::RenderProcessImpl() SetV8FlagIfNotFeature(features::kWebAssemblyDynamicTiering, "--no-wasm-dynamic-tiering"); -#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 ee07aa955eea..cac204bb7814 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-01-13 08:56:02 UTC +--- content/renderer/render_thread_impl.cc.orig 2023-02-11 09:11:04 UTC +++ content/renderer/render_thread_impl.cc -@@ -194,7 +194,7 @@ +@@ -197,6 +197,8 @@ #if BUILDFLAG(IS_MAC) #include --#else -+#elif !BUILDFLAG(IS_OPENBSD) ++#elif BUILDFLAG(IS_BSD) ++#include + #else #include #endif - -@@ -665,7 +665,7 @@ void RenderThreadImpl::Init() { - base::DiscardableMemoryAllocator::SetInstance( - discardable_memory_allocator_.get()); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - render_message_filter()->SetThreadType( - ChildProcess::current()->io_thread_id(), base::ThreadType::kCompositing); - #endif -@@ -1043,7 +1043,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1038,7 +1040,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: 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) && -@@ -1053,7 +1053,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1048,7 +1050,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: 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) && +@@ -1082,7 +1084,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: + 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 6ba06e237efc..6faf39d9f36c 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,47 +1,38 @@ ---- content/renderer/renderer_blink_platform_impl.cc.orig 2023-01-13 08:56:02 UTC +--- content/renderer/renderer_blink_platform_impl.cc.orig 2023-02-11 09:11:04 UTC +++ content/renderer/renderer_blink_platform_impl.cc -@@ -112,7 +112,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,7 +182,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -183,7 +183,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( main_thread_scheduler_(main_thread_scheduler) { // 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()); -@@ -192,7 +192,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -193,7 +193,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(); -@@ -263,7 +263,7 @@ RendererBlinkPlatformImpl::WrapURLLoaderFactory( - /*terminate_sync_load_event=*/nullptr); - } - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - void RendererBlinkPlatformImpl::SetThreadType(base::PlatformThreadId thread_id, - base::ThreadType thread_type) { - if (RenderThreadImpl* render_thread = RenderThreadImpl::current()) { -@@ -274,7 +274,7 @@ void RendererBlinkPlatformImpl::SetThreadType(base::Pl +@@ -275,7 +275,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 11da969426f8..1f0f7cf41f0d 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,38 +1,29 @@ ---- content/renderer/renderer_blink_platform_impl.h.orig 2023-01-13 08:56:02 UTC +--- content/renderer/renderer_blink_platform_impl.h.orig 2023-02-11 09:11:04 UTC +++ content/renderer/renderer_blink_platform_impl.h -@@ -30,7 +30,7 @@ +@@ -31,7 +31,7 @@ #include "third_party/blink/public/common/user_agent/user_agent_metadata.h" #include "third_party/blink/public/mojom/cache_storage/cache_storage.mojom.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/services/font/public/cpp/font_loader.h" // nogncheck #include "third_party/skia/include/core/SkRefCnt.h" // nogncheck #endif -@@ -172,7 +172,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi - const blink::WebURL& top_document_web_url) override; - gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; - blink::WebString ConvertIDNToUnicode(const blink::WebString& host) override; --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - void SetThreadType(base::PlatformThreadId thread_id, - base::ThreadType) override; - #endif -@@ -240,7 +240,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi +@@ -243,7 +243,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 -@@ -260,7 +260,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi +@@ -263,7 +263,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi mutable base::WaitableEvent io_thread_id_ready_event_; base::PlatformThreadId io_thread_id_ = base::kInvalidThreadId; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sk_sp font_loader_; #endif diff --git a/www/ungoogled-chromium/files/patch-content_shell_BUILD.gn b/www/ungoogled-chromium/files/patch-content_shell_BUILD.gn index 1317b7b23fb5..3df484ef6630 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-01-13 08:56:02 UTC +--- content/shell/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ content/shell/BUILD.gn -@@ -901,7 +901,7 @@ group("content_shell_crash_test") { +@@ -903,7 +903,7 @@ group("content_shell_crash_test") { if (is_win) { data_deps += [ "//build/win:copy_cdb_to_output" ] } - if (is_posix) { + if (is_posix && !is_bsd) { data_deps += [ "//third_party/breakpad:dump_syms", "//third_party/breakpad:minidump_stackwalk", diff --git a/www/ungoogled-chromium/files/patch-content_shell_app_shell__main__delegate.cc b/www/ungoogled-chromium/files/patch-content_shell_app_shell__main__delegate.cc index f36285ce3c09..5f1d1b9bfb69 100644 --- a/www/ungoogled-chromium/files/patch-content_shell_app_shell__main__delegate.cc +++ b/www/ungoogled-chromium/files/patch-content_shell_app_shell__main__delegate.cc @@ -1,11 +1,11 @@ ---- content/shell/app/shell_main_delegate.cc.orig 2022-10-29 17:50:56 UTC +--- content/shell/app/shell_main_delegate.cc.orig 2023-02-11 09:11:04 UTC +++ content/shell/app/shell_main_delegate.cc -@@ -213,7 +213,7 @@ void ShellMainDelegate::PreSandboxStartup() { +@@ -214,7 +214,7 @@ void ShellMainDelegate::PreSandboxStartup() { // Reporting for sub-processes will be initialized in ZygoteForked. if (process_type != switches::kZygoteProcess) { crash_reporter::InitializeCrashpad(process_type.empty(), process_type); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) crash_reporter::SetFirstChanceExceptionHandler( v8::TryHandleWebAssemblyTrapPosix); #endif diff --git a/www/ungoogled-chromium/files/patch-content_shell_browser_shell__browser__main__parts.cc b/www/ungoogled-chromium/files/patch-content_shell_browser_shell__browser__main__parts.cc index 7f3e27869a57..d10a435dec0e 100644 --- a/www/ungoogled-chromium/files/patch-content_shell_browser_shell__browser__main__parts.cc +++ b/www/ungoogled-chromium/files/patch-content_shell_browser_shell__browser__main__parts.cc @@ -1,47 +1,47 @@ ---- content/shell/browser/shell_browser_main_parts.cc.orig 2022-10-29 17:50:56 UTC +--- content/shell/browser/shell_browser_main_parts.cc.orig 2023-02-11 09:11:04 UTC +++ content/shell/browser/shell_browser_main_parts.cc @@ -50,7 +50,7 @@ #include "net/base/network_change_notifier.h" #endif -#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) #include "ui/base/ime/init/input_method_initializer.h" #endif @@ -65,7 +65,7 @@ #include "chromeos/lacros/dbus/lacros_dbus_thread_manager.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui.h" // nogncheck #include "ui/linux/linux_ui_factory.h" // nogncheck #endif @@ -129,7 +129,7 @@ void ShellBrowserMainParts::PostCreateMainMessageLoop( } int ShellBrowserMainParts::PreEarlyInitialization() { -#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) ui::InitializeInputMethodForTesting(); #endif #if BUILDFLAG(IS_ANDROID) -@@ -153,7 +153,7 @@ void ShellBrowserMainParts::ToolkitInitialized() { +@@ -158,7 +158,7 @@ void ShellBrowserMainParts::ToolkitInitialized() { if (switches::IsRunWebTestsSwitchPresent()) return; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ui::LinuxUi::SetInstance(ui::GetDefaultLinuxUi()); #endif } -@@ -196,7 +196,7 @@ void ShellBrowserMainParts::PostMainMessageLoopRun() { +@@ -201,7 +201,7 @@ void ShellBrowserMainParts::PostMainMessageLoopRun() { ShellDevToolsManagerDelegate::StopHttpHandler(); browser_context_.reset(); off_the_record_browser_context_.reset(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ui::LinuxUi::SetInstance(nullptr); #endif performance_manager_lifetime_.reset(); diff --git a/www/ungoogled-chromium/files/patch-content_shell_utility_shell__content__utility__client.cc b/www/ungoogled-chromium/files/patch-content_shell_utility_shell__content__utility__client.cc index 5ceaaffffc12..e7a3c74240c0 100644 --- a/www/ungoogled-chromium/files/patch-content_shell_utility_shell__content__utility__client.cc +++ b/www/ungoogled-chromium/files/patch-content_shell_utility_shell__content__utility__client.cc @@ -1,20 +1,20 @@ ---- content/shell/utility/shell_content_utility_client.cc.orig 2023-01-13 08:56:02 UTC +--- content/shell/utility/shell_content_utility_client.cc.orig 2023-02-11 09:11:04 UTC +++ content/shell/utility/shell_content_utility_client.cc @@ -34,7 +34,7 @@ #include "sandbox/policy/sandbox.h" #include "services/test/echo/echo_service.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/test/sandbox_status_service.h" #endif @@ -155,7 +155,7 @@ void ShellContentUtilityClient::ExposeInterfacesToBrow binders->Add( base::BindRepeating(&PowerMonitorTestImpl::MakeSelfOwnedReceiver), - base::ThreadTaskRunnerHandle::Get()); + base::SingleThreadTaskRunner::GetCurrentDefault()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (register_sandbox_status_helper_) { binders->Add( base::BindRepeating( diff --git a/www/ungoogled-chromium/files/patch-content_test_BUILD.gn b/www/ungoogled-chromium/files/patch-content_test_BUILD.gn index ba219c3f8c39..d2babc288ec6 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-01-13 08:56:02 UTC +--- content/test/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ content/test/BUILD.gn -@@ -2038,7 +2038,7 @@ static_library("run_all_unittests") { +@@ -2091,7 +2091,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" ] } } -@@ -3031,7 +3031,7 @@ test("content_unittests") { +@@ -3111,7 +3111,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 2a6be61e3224..732129d426d5 100644 --- a/www/ungoogled-chromium/files/patch-content_utility_services.cc +++ b/www/ungoogled-chromium/files/patch-content_utility_services.cc @@ -1,47 +1,63 @@ ---- content/utility/services.cc.orig 2023-01-13 08:56:02 UTC +--- content/utility/services.cc.orig 2023-02-11 09:11:04 UTC +++ content/utility/services.cc -@@ -64,7 +64,7 @@ +@@ -63,7 +63,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" - #include "sandbox/policy/sandbox_type.h" @@ -86,7 +86,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_service.h" // nogncheck #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && -@@ -209,7 +209,7 @@ auto RunAudio(mojo::PendingReceiver -@@ -365,7 +365,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -328,7 +328,7 @@ auto RunStableVideoDecoderFactoryService( + #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) { +@@ -386,13 +386,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(RunStableVideoDecoderFactoryService); #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && + // (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + services.Add(RunVideoEncodeAcceleratorProviderFactory); + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + diff --git a/www/ungoogled-chromium/files/patch-content_zygote_zygote__linux.cc b/www/ungoogled-chromium/files/patch-content_zygote_zygote__linux.cc index 54fb06e62869..f9d233c9cf9c 100644 --- a/www/ungoogled-chromium/files/patch-content_zygote_zygote__linux.cc +++ b/www/ungoogled-chromium/files/patch-content_zygote_zygote__linux.cc @@ -1,15 +1,15 @@ ---- content/zygote/zygote_linux.cc.orig 2022-12-02 17:56:32 UTC +--- content/zygote/zygote_linux.cc.orig 2023-02-11 09:11:04 UTC +++ content/zygote/zygote_linux.cc @@ -1,6 +1,7 @@ // Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#if 0 #include "content/zygote/zygote_linux.h" -@@ -696,3 +697,4 @@ void Zygote::HandleReinitializeLoggingRequest(base::Pi +@@ -706,3 +707,4 @@ void Zygote::HandleReinitializeLoggingRequest(base::Pi } } // namespace content +#endif diff --git a/www/ungoogled-chromium/files/patch-device_gamepad_gamepad__provider.cc b/www/ungoogled-chromium/files/patch-device_gamepad_gamepad__provider.cc index a7b5eaf80aba..dafbb5aca13d 100644 --- a/www/ungoogled-chromium/files/patch-device_gamepad_gamepad__provider.cc +++ b/www/ungoogled-chromium/files/patch-device_gamepad_gamepad__provider.cc @@ -1,11 +1,11 @@ ---- device/gamepad/gamepad_provider.cc.orig 2022-10-01 07:40:07 UTC +--- device/gamepad/gamepad_provider.cc.orig 2023-02-11 09:11:04 UTC +++ device/gamepad/gamepad_provider.cc -@@ -216,7 +216,7 @@ void GamepadProvider::Initialize(std::unique_ptr("Gamepad polling thread"); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux, the data fetcher needs to watch file descriptors, so the message // loop needs to be a libevent loop. const base::MessagePumpType kMessageLoopType = base::MessagePumpType::IO; diff --git a/www/ungoogled-chromium/files/patch-extensions_browser_extension__prefs.cc b/www/ungoogled-chromium/files/patch-extensions_browser_extension__prefs.cc index 6b1b99ac5654..b4f730a5c4d4 100644 --- a/www/ungoogled-chromium/files/patch-extensions_browser_extension__prefs.cc +++ b/www/ungoogled-chromium/files/patch-extensions_browser_extension__prefs.cc @@ -1,11 +1,11 @@ ---- extensions/browser/extension_prefs.cc.orig 2023-01-13 08:56:02 UTC +--- extensions/browser/extension_prefs.cc.orig 2023-02-11 09:11:04 UTC +++ extensions/browser/extension_prefs.cc -@@ -2273,7 +2273,7 @@ void ExtensionPrefs::RegisterProfilePrefs( +@@ -2216,7 +2216,7 @@ void ExtensionPrefs::RegisterProfilePrefs( registry->RegisterDictionaryPref(kInstallSignature); registry->RegisterListPref(kExternalUninstalls); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(pref_names::kChromeAppsEnabled, false); #endif diff --git a/www/ungoogled-chromium/files/patch-extensions_browser_pref__names.cc b/www/ungoogled-chromium/files/patch-extensions_browser_pref__names.cc index 545fbd152eab..2619b1a2a950 100644 --- a/www/ungoogled-chromium/files/patch-extensions_browser_pref__names.cc +++ b/www/ungoogled-chromium/files/patch-extensions_browser_pref__names.cc @@ -1,11 +1,11 @@ ---- extensions/browser/pref_names.cc.orig 2023-01-13 08:56:02 UTC +--- extensions/browser/pref_names.cc.orig 2023-02-11 09:11:04 UTC +++ extensions/browser/pref_names.cc -@@ -48,7 +48,7 @@ const char kStorageGarbageCollect[] = "extensions.stor +@@ -49,7 +49,7 @@ const char kStorageGarbageCollect[] = "extensions.stor const char kDeletedComponentExtensions[] = "extensions.deleted_component_extensions"; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kChromeAppsEnabled[] = "extensions.chrome_apps_enabled"; #endif diff --git a/www/ungoogled-chromium/files/patch-extensions_browser_pref__names.h b/www/ungoogled-chromium/files/patch-extensions_browser_pref__names.h index adb1626fe1b2..70244d09b21d 100644 --- a/www/ungoogled-chromium/files/patch-extensions_browser_pref__names.h +++ b/www/ungoogled-chromium/files/patch-extensions_browser_pref__names.h @@ -1,11 +1,11 @@ ---- extensions/browser/pref_names.h.orig 2022-10-01 07:40:07 UTC +--- extensions/browser/pref_names.h.orig 2023-02-11 09:11:04 UTC +++ extensions/browser/pref_names.h -@@ -98,7 +98,7 @@ extern const char kStorageGarbageCollect[]; +@@ -103,7 +103,7 @@ extern const char kStorageGarbageCollect[]; extern const char kDeletedComponentExtensions[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // A preference for whether Chrome Apps should be allowed. The default depends // on the ChromeAppsDeprecation feature flag, and this pref can extend support // for Chrome Apps by enterprise policy. diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_common_gpu__memory__buffer__support.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_common_gpu__memory__buffer__support.cc index 9f06e9a652d9..729e16be2168 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_common_gpu__memory__buffer__support.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_common_gpu__memory__buffer__support.cc @@ -1,20 +1,20 @@ ---- gpu/command_buffer/common/gpu_memory_buffer_support.cc.orig 2023-01-13 08:56:02 UTC +--- gpu/command_buffer/common/gpu_memory_buffer_support.cc.orig 2023-02-11 09:11:04 UTC +++ gpu/command_buffer/common/gpu_memory_buffer_support.cc @@ -173,7 +173,7 @@ uint32_t GetPlatformSpecificTextureTarget() { #if BUILDFLAG(IS_MAC) return macos_specific_texture_target; #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return GL_TEXTURE_EXTERNAL_OES; #elif BUILDFLAG(IS_FUCHSIA) - return GL_TEXTURE_2D; -@@ -205,7 +205,7 @@ GPU_EXPORT bool NativeBufferNeedsPlatformSpecificTextu + // Fuchsia uses Vulkan. +@@ -206,7 +206,7 @@ GPU_EXPORT bool NativeBufferNeedsPlatformSpecificTextu gfx::BufferFormat format, gfx::BufferPlane plane) { #if BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Always use GL_TEXTURE_2D as the target for RGB textures. // https://crbug.com/916728 if (format == gfx::BufferFormat::R_8 || format == gfx::BufferFormat::RG_88 || diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc index a87bbf3416ef..92e52f578dde 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.cc.orig 2022-12-02 17:56:32 UTC +--- gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.cc.orig 2023-02-11 09:11:04 UTC +++ gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.cc -@@ -94,7 +94,7 @@ bool AngleVulkanImageBackingFactory::CanUseAngleVulkan +@@ -123,7 +123,7 @@ bool AngleVulkanImageBackingFactory::CanUseAngleVulkan // TODO(penghuang): verify the scanout is the right usage for video playback. // crbug.com/1280798 constexpr auto kSupportedUsages = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) SHARED_IMAGE_USAGE_SCANOUT | #endif SHARED_IMAGE_USAGE_GLES2 | SHARED_IMAGE_USAGE_GLES2_FRAMEBUFFER_HINT | 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 95cc50a4bda5..4020e2454e67 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-01-13 08:56:02 UTC +--- gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig 2023-02-11 09:11:04 UTC +++ gpu/command_buffer/service/shared_image/external_vk_image_backing.cc -@@ -32,7 +32,7 @@ +@@ -33,7 +33,7 @@ #include "ui/gl/gl_version_info.h" #include "ui/gl/scoped_binders.h" -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) #include "gpu/command_buffer/service/shared_image/external_vk_image_dawn_representation.h" #endif -@@ -572,7 +572,7 @@ std::unique_ptr ExternalVkIma - MemoryTypeTracker* tracker, +@@ -574,7 +574,7 @@ std::unique_ptr ExternalVkIma WGPUDevice wgpuDevice, - WGPUBackendType backend_type) { + WGPUBackendType backend_type, + std::vector view_formats) { -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) - auto wgpu_format = viz::ToWGPUFormat(format()); + auto wgpu_format = ToWGPUFormat(format()); if (wgpu_format == WGPUTextureFormat_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 new file mode 100644 index 000000000000..55d17ad69ba7 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc @@ -0,0 +1,11 @@ +--- gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc.orig 2023-02-11 09:11:04 UTC ++++ gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc +@@ -173,7 +173,7 @@ bool ExternalVkImageBackingFactory::IsSupported( + + // TODO: remove it when below formats are converted to multi plane shared + // image formats. +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + switch (format.resource_format()) { + case viz::YUV_420_BIPLANAR: + case viz::YUVA_420_TRIPLANAR: diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing.cc index 5b3515799109..edc128e976eb 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/gl_texture_image_backing.cc.orig 2023-01-13 08:56:02 UTC +--- gpu/command_buffer/service/shared_image/gl_texture_image_backing.cc.orig 2023-02-11 09:11:04 UTC +++ gpu/command_buffer/service/shared_image/gl_texture_image_backing.cc -@@ -346,7 +346,7 @@ void GLTextureImageBacking::InitializeGLTexture( +@@ -465,7 +465,7 @@ void GLTextureImageBacking::InitializeGLTexture( } void GLTextureImageBacking::CreateEGLImage() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD) SharedContextState* shared_context_state = factory()->GetSharedContextState(); ui::ScopedMakeCurrent smc(shared_context_state->context(), shared_context_state->surface()); diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing__factory.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing__factory.cc index 0e77085c37de..c539b584badb 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing__factory.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing__factory.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.cc.orig 2023-01-13 08:56:02 UTC +--- gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.cc.orig 2023-02-11 09:11:04 UTC +++ gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.cc -@@ -165,7 +165,7 @@ bool GLTextureImageBackingFactory::IsSupported( +@@ -143,7 +143,7 @@ bool GLTextureImageBackingFactory::IsSupported( // Linux and ChromeOS support WebGPU/Compat on GL. All other platforms // do not support WebGPU on GL. if (usage & SHARED_IMAGE_USAGE_WEBGPU) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD) if (use_webgpu_adapter_ != WebGPUAdapterName::kCompat) { return false; } diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc new file mode 100644 index 000000000000..d2e35a2c0efc --- /dev/null +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc @@ -0,0 +1,11 @@ +--- gpu/command_buffer/service/shared_image/shared_image_manager.cc.orig 2023-02-11 09:11:04 UTC ++++ gpu/command_buffer/service/shared_image/shared_image_manager.cc +@@ -472,7 +472,7 @@ bool SharedImageManager::SupportsScanoutImages() { + return true; + #elif BUILDFLAG(IS_ANDROID) + return base::AndroidHardwareBufferCompat::IsSupportAvailable(); +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + return ui::OzonePlatform::GetInstance() + ->GetPlatformRuntimeProperties() + .supports_native_pixmaps; diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing__factory.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing__factory.cc index 83886de7a70a..b22dc38b244f 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing__factory.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing__factory.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/wrapped_sk_image_backing_factory.cc.orig 2023-01-13 08:56:02 UTC +--- gpu/command_buffer/service/shared_image/wrapped_sk_image_backing_factory.cc.orig 2023-02-11 09:11:04 UTC +++ gpu/command_buffer/service/shared_image/wrapped_sk_image_backing_factory.cc -@@ -237,7 +237,7 @@ class WrappedSkImage : public ClearTrackingSharedImage +@@ -216,7 +216,7 @@ class WrappedSkImage : public ClearTrackingSharedImage : GrMipMapped::kNo; const std::string label = "WrappedSkImageBackingFactory_Initialize" + CreateLabelForSharedImageUsage(usage()); -#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) +#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // Initializing to bright green makes it obvious if the pixels are not // properly set before they are displayed (e.g. https://crbug.com/956555). // We don't do this on release builds because there is a slight overhead. 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 09168e138d37..7237858e77df 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,11 +1,11 @@ ---- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2023-01-13 08:56:02 UTC +--- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2023-02-11 09:11:04 UTC +++ gpu/command_buffer/service/webgpu_decoder_impl.cc -@@ -1213,7 +1213,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( +@@ -1225,7 +1225,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( if (gr_context_type_ != GrContextType::kVulkan && use_webgpu_adapter_ != WebGPUAdapterName::kCompat) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) callback(WGPURequestAdapterStatus_Unavailable, nullptr, "WebGPU on Linux requires command-line flag " "--enable-features=Vulkan", 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 3e128718342d..d59cee02ea37 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,83 +1,83 @@ ---- gpu/ipc/service/gpu_init.cc.orig 2022-12-02 17:56:32 UTC +--- gpu/ipc/service/gpu_init.cc.orig 2023-02-11 09:11:04 UTC +++ gpu/ipc/service/gpu_init.cc @@ -351,7 +351,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 @@ -387,7 +387,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. @@ -436,7 +436,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL if (gl_initialized && gl_use_swiftshader_ && !gl::IsSoftwareGLImplementation(gl::GetGLImplementationParts())) { -#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; @@ -487,7 +487,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 @@ -547,7 +547,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; @@ -675,7 +675,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. @@ -727,7 +727,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL gl_use_swiftshader_ = true; } } -#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 -@@ -869,7 +869,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -870,7 +870,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 -@@ -932,7 +932,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -933,7 +933,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c 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. diff --git a/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__memory__buffer__factory.cc b/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__memory__buffer__factory.cc index d8715492b63e..2d2fb6828d5b 100644 --- a/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__memory__buffer__factory.cc +++ b/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__memory__buffer__factory.cc @@ -1,20 +1,20 @@ ---- gpu/ipc/service/gpu_memory_buffer_factory.cc.orig 2022-10-01 07:40:07 UTC +--- gpu/ipc/service/gpu_memory_buffer_factory.cc.orig 2023-02-11 09:11:04 UTC +++ gpu/ipc/service/gpu_memory_buffer_factory.cc @@ -12,7 +12,7 @@ #include "gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "gpu/ipc/service/gpu_memory_buffer_factory_native_pixmap.h" #endif -@@ -34,7 +34,7 @@ GpuMemoryBufferFactory::CreateNativeType( +@@ -35,7 +35,7 @@ GpuMemoryBufferFactory::CreateNativeType( return std::make_unique(); #elif BUILDFLAG(IS_ANDROID) return std::make_unique(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) return std::make_unique( vulkan_context_provider); #elif BUILDFLAG(IS_WIN) diff --git a/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__image.cc b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__image.cc index 19532dcf0134..c7ce28cd90a1 100644 --- a/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__image.cc +++ b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__image.cc @@ -1,11 +1,11 @@ ---- gpu/vulkan/vulkan_image.cc.orig 2022-10-01 07:40:07 UTC +--- gpu/vulkan/vulkan_image.cc.orig 2023-02-11 09:11:04 UTC +++ gpu/vulkan/vulkan_image.cc -@@ -322,7 +322,7 @@ bool VulkanImage::InitializeWithExternalMemory( +@@ -392,7 +392,7 @@ bool VulkanImage::InitializeWithExternalMemory( // 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) VkPhysicalDeviceImageDrmFormatModifierInfoEXT modifier_info = { .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT, diff --git a/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__image.h b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__image.h index b490cddde5de..1e619804f0ab 100644 --- a/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__image.h +++ b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__image.h @@ -1,20 +1,20 @@ ---- gpu/vulkan/vulkan_image.h.orig 2022-10-01 07:40:07 UTC +--- gpu/vulkan/vulkan_image.h.orig 2023-02-11 09:11:04 UTC +++ gpu/vulkan/vulkan_image.h -@@ -86,7 +86,7 @@ class COMPONENT_EXPORT(VULKAN) VulkanImage { +@@ -87,7 +87,7 @@ class COMPONENT_EXPORT(VULKAN) VulkanImage { VkImageUsageFlags usage, VkImageCreateFlags flags); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) static std::unique_ptr CreateWithExternalMemoryAndModifiers( VulkanDeviceQueue* device_queue, const gfx::Size& size, -@@ -170,7 +170,7 @@ class COMPONENT_EXPORT(VULKAN) VulkanImage { +@@ -199,7 +199,7 @@ class COMPONENT_EXPORT(VULKAN) VulkanImage { VkImageTiling image_tiling, uint32_t queue_family_index); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool InitializeWithExternalMemoryAndModifiers(VulkanDeviceQueue* device_queue, const gfx::Size& size, VkFormat format, diff --git a/www/ungoogled-chromium/files/patch-headless_lib_browser_headless__web__contents__impl.cc b/www/ungoogled-chromium/files/patch-headless_lib_browser_headless__web__contents__impl.cc index 39096f4d277d..858339727fdd 100644 --- a/www/ungoogled-chromium/files/patch-headless_lib_browser_headless__web__contents__impl.cc +++ b/www/ungoogled-chromium/files/patch-headless_lib_browser_headless__web__contents__impl.cc @@ -1,11 +1,11 @@ ---- headless/lib/browser/headless_web_contents_impl.cc.orig 2022-10-29 17:50:56 UTC +--- headless/lib/browser/headless_web_contents_impl.cc.orig 2023-02-11 09:11:04 UTC +++ headless/lib/browser/headless_web_contents_impl.cc -@@ -60,7 +60,7 @@ namespace headless { +@@ -61,7 +61,7 @@ namespace headless { namespace { void UpdatePrefsFromSystemSettings(blink::RendererPreferences* prefs) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) content::UpdateFontRendererPreferencesFromSystemSettings(prefs); #endif diff --git a/www/ungoogled-chromium/files/patch-headless_lib_headless__content__main__delegate.cc b/www/ungoogled-chromium/files/patch-headless_lib_headless__content__main__delegate.cc index fa24da5b63b2..37f1824ea122 100644 --- a/www/ungoogled-chromium/files/patch-headless_lib_headless__content__main__delegate.cc +++ b/www/ungoogled-chromium/files/patch-headless_lib_headless__content__main__delegate.cc @@ -1,11 +1,11 @@ ---- headless/lib/headless_content_main_delegate.cc.orig 2022-12-02 17:56:32 UTC +--- headless/lib/headless_content_main_delegate.cc.orig 2023-02-11 09:11:04 UTC +++ headless/lib/headless_content_main_delegate.cc -@@ -336,7 +336,7 @@ void HeadlessContentMainDelegate::InitCrashReporter( +@@ -337,7 +337,7 @@ void HeadlessContentMainDelegate::InitCrashReporter( if (process_type != switches::kZygoteProcess) { g_headless_crash_client.Pointer()->set_crash_dumps_dir( options()->crash_dumps_dir); -#if !BUILDFLAG(IS_WIN) +#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_BSD) crash_reporter::InitializeCrashpad(process_type.empty(), process_type); #endif // !BUILDFLAG(IS_WIN) crash_keys::SetSwitchesFromCommandLine(command_line, nullptr); diff --git a/www/ungoogled-chromium/files/patch-ipc_ipc__channel__common.cc b/www/ungoogled-chromium/files/patch-ipc_ipc__channel__common.cc index de26aaa6deee..f087289cddef 100644 --- a/www/ungoogled-chromium/files/patch-ipc_ipc__channel__common.cc +++ b/www/ungoogled-chromium/files/patch-ipc_ipc__channel__common.cc @@ -1,11 +1,11 @@ ---- ipc/ipc_channel_common.cc.orig 2022-10-01 07:40:07 UTC +--- ipc/ipc_channel_common.cc.orig 2023-02-11 09:11:04 UTC +++ ipc/ipc_channel_common.cc -@@ -11,7 +11,7 @@ +@@ -10,7 +10,7 @@ namespace IPC { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) namespace { int g_global_pid = 0; diff --git a/www/ungoogled-chromium/files/patch-ipc_ipc__channel__mojo.cc b/www/ungoogled-chromium/files/patch-ipc_ipc__channel__mojo.cc index d5c017476d07..3d9e4414b682 100644 --- a/www/ungoogled-chromium/files/patch-ipc_ipc__channel__mojo.cc +++ b/www/ungoogled-chromium/files/patch-ipc_ipc__channel__mojo.cc @@ -1,11 +1,11 @@ ---- ipc/ipc_channel_mojo.cc.orig 2023-01-13 08:56:02 UTC +--- ipc/ipc_channel_mojo.cc.orig 2023-02-11 09:11:04 UTC +++ ipc/ipc_channel_mojo.cc -@@ -113,7 +113,7 @@ class ThreadSafeChannelProxy : public mojo::ThreadSafe +@@ -105,7 +105,7 @@ class ThreadSafeChannelProxy : public mojo::ThreadSafe }; base::ProcessId GetSelfPID() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (int global_pid = Channel::GetGlobalPid()) return global_pid; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-media_BUILD.gn b/www/ungoogled-chromium/files/patch-media_BUILD.gn index 2f899554c7e7..27daf060d393 100644 --- a/www/ungoogled-chromium/files/patch-media_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-media_BUILD.gn @@ -1,12 +1,12 @@ ---- media/BUILD.gn.orig 2023-01-13 08:56:02 UTC +--- media/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ media/BUILD.gn -@@ -88,6 +88,9 @@ config("media_config") { +@@ -87,6 +87,9 @@ config("media_config") { defines += [ "DLOPEN_PULSEAUDIO" ] } } + if (use_sndio) { + defines += [ "USE_SNDIO" ] + } if (use_cras) { defines += [ "USE_CRAS" ] } diff --git a/www/ungoogled-chromium/files/patch-media_audio_BUILD.gn b/www/ungoogled-chromium/files/patch-media_audio_BUILD.gn index a7a027f95f1c..946744a45d05 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-01-13 08:56:02 UTC +--- media/audio/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ media/audio/BUILD.gn -@@ -248,9 +248,20 @@ source_set("audio") { +@@ -246,9 +246,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_audio_audio__output__proxy__unittest.cc b/www/ungoogled-chromium/files/patch-media_audio_audio__output__proxy__unittest.cc index 0a1b717f6950..c91cd6843c16 100644 --- a/www/ungoogled-chromium/files/patch-media_audio_audio__output__proxy__unittest.cc +++ b/www/ungoogled-chromium/files/patch-media_audio_audio__output__proxy__unittest.cc @@ -1,14 +1,14 @@ ---- media/audio/audio_output_proxy_unittest.cc.orig 2022-10-01 07:40:07 UTC +--- media/audio/audio_output_proxy_unittest.cc.orig 2023-02-11 09:11:04 UTC +++ media/audio/audio_output_proxy_unittest.cc -@@ -412,7 +412,11 @@ class AudioOutputProxyTest : public testing::Test { +@@ -444,7 +444,11 @@ class AudioOutputProxyTest : public testing::Test { // |stream| is closed at this point. Start() should reopen it again. EXPECT_CALL(manager(), MakeAudioOutputStream(_, _, _)) .Times(2) +#if BUILDFLAG(IS_BSD) + .WillRepeatedly(Return(static_cast(NULL))); +#else .WillRepeatedly(Return(reinterpret_cast(NULL))); +#endif EXPECT_CALL(callback_, OnError(_)).Times(2); diff --git a/www/ungoogled-chromium/files/patch-media_audio_sndio_sndio__output.cc b/www/ungoogled-chromium/files/patch-media_audio_sndio_sndio__output.cc index 82b9f21bee63..dc09c7d4ecab 100644 --- a/www/ungoogled-chromium/files/patch-media_audio_sndio_sndio__output.cc +++ b/www/ungoogled-chromium/files/patch-media_audio_sndio_sndio__output.cc @@ -1,190 +1,190 @@ ---- media/audio/sndio/sndio_output.cc.orig 2022-10-01 07:40:07 UTC +--- media/audio/sndio/sndio_output.cc.orig 2023-02-11 09:11:04 UTC +++ media/audio/sndio/sndio_output.cc @@ -0,0 +1,187 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/logging.h" +#include "base/time/time.h" +#include "base/time/default_tick_clock.h" +#include "media/audio/audio_manager_base.h" +#include "media/base/audio_timestamp_helper.h" +#include "media/audio/sndio/sndio_output.h" + +namespace media { + +static const SampleFormat kSampleFormat = kSampleFormatS16; + +void SndioAudioOutputStream::OnMoveCallback(void *arg, int delta) { + SndioAudioOutputStream* self = static_cast(arg); + + self->hw_delay -= delta; +} + +void SndioAudioOutputStream::OnVolCallback(void *arg, unsigned int vol) { + SndioAudioOutputStream* self = static_cast(arg); + + self->vol = vol; +} + +void *SndioAudioOutputStream::ThreadEntry(void *arg) { + SndioAudioOutputStream* self = static_cast(arg); + + self->ThreadLoop(); + return NULL; +} + +SndioAudioOutputStream::SndioAudioOutputStream(const AudioParameters& params, + AudioManagerBase* manager) + : manager(manager), + params(params), + audio_bus(AudioBus::Create(params)), + state(kClosed), + mutex(PTHREAD_MUTEX_INITIALIZER) { +} + +SndioAudioOutputStream::~SndioAudioOutputStream() { + if (state != kClosed) + Close(); +} + +bool SndioAudioOutputStream::Open() { + if (params.format() != AudioParameters::AUDIO_PCM_LINEAR && + params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) { + LOG(WARNING) << "Unsupported audio format."; + return false; + } + state = kStopped; + volpending = 0; + vol = SIO_MAXVOL; + buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)]; + return true; +} + +void SndioAudioOutputStream::Close() { + if (state == kClosed) + goto release; + if (state == kRunning) + Stop(); + state = kClosed; + delete [] buffer; +release: + manager->ReleaseOutputStream(this); // Calls the destructor +} + +void SndioAudioOutputStream::Start(AudioSourceCallback* callback) { + struct sio_par par; + int sig; + + sio_initpar(&par); + par.rate = params.sample_rate(); + par.pchan = params.channels(); + par.bits = SampleFormatToBitsPerChannel(kSampleFormat); + par.bps = par.bits / 8; + par.sig = sig = par.bits != 8 ? 1 : 0; + par.le = SIO_LE_NATIVE; + par.appbufsz = params.frames_per_buffer(); + + hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0); + if (hdl == NULL) { + LOG(ERROR) << "Couldn't open audio device."; + return; + } + if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) { + LOG(ERROR) << "Couldn't set audio parameters."; + sio_close(hdl); + return; + } + if (par.rate != (unsigned int)params.sample_rate() || + par.pchan != (unsigned int)params.channels() || + par.bits != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) || + par.sig != (unsigned int)sig || + (par.bps > 1 && par.le != SIO_LE_NATIVE) || + (par.bits != par.bps * 8)) { + LOG(ERROR) << "Unsupported audio parameters."; + sio_close(hdl); + return; + } + + sio_onmove(hdl, &OnMoveCallback, this); + sio_onvol(hdl, &OnVolCallback, this); + + state = kRunning; + hw_delay = 0; + source = callback; + sio_start(hdl); + + if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) { + LOG(ERROR) << "Failed to create real-time thread."; + sio_stop(hdl); + sio_close(hdl); + state = kStopped; + } +} + +void SndioAudioOutputStream::Stop() { + if (state == kStopped) + return; + state = kStopWait; + pthread_join(thread, NULL); + sio_stop(hdl); + sio_close(hdl); + state = kStopped; +} + +void SndioAudioOutputStream::SetVolume(double v) { + pthread_mutex_lock(&mutex); + vol = v * SIO_MAXVOL; + volpending = 1; + pthread_mutex_unlock(&mutex); +} + +void SndioAudioOutputStream::GetVolume(double* v) { + pthread_mutex_lock(&mutex); + *v = vol * (1. / SIO_MAXVOL); + pthread_mutex_unlock(&mutex); +} + +// This stream is always used with sub second buffer sizes, where it's +// sufficient to simply always flush upon Start(). +void SndioAudioOutputStream::Flush() {} + +void SndioAudioOutputStream::ThreadLoop(void) { + int avail, count, result; + + while (state == kRunning) { + // Update volume if needed + pthread_mutex_lock(&mutex); + if (volpending) { + volpending = 0; + sio_setvol(hdl, vol); + } + pthread_mutex_unlock(&mutex); + + // Get data to play + const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay, + params.sample_rate()); -+ count = source->OnMoreData(delay, base::TimeTicks::Now(), 0, audio_bus.get()); ++ count = source->OnMoreData(delay, base::TimeTicks::Now(), {}, audio_bus.get()); + audio_bus->ToInterleaved(count, reinterpret_cast(buffer)); + if (count == 0) { + // We have to submit something to the device + count = audio_bus->frames(); + memset(buffer, 0, count * params.GetBytesPerFrame(kSampleFormat)); + LOG(WARNING) << "No data to play, running empty cycle."; + } + + // Submit data to the device + avail = count * params.GetBytesPerFrame(kSampleFormat); + result = sio_write(hdl, buffer, avail); + if (result == 0) { + LOG(WARNING) << "Audio device disconnected."; + break; + } + + // Update hardware pointer + hw_delay += count; + } +} + +} // namespace media 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 ef62dd5d2e0b..5f0e7bcd8e20 100644 --- a/www/ungoogled-chromium/files/patch-media_base_media__switches.cc +++ b/www/ungoogled-chromium/files/patch-media_base_media__switches.cc @@ -1,55 +1,73 @@ ---- media/base/media_switches.cc.orig 2023-01-13 08:56:02 UTC +--- media/base/media_switches.cc.orig 2023-02-11 09:11:04 UTC +++ media/base/media_switches.cc @@ -12,7 +12,7 @@ #include "components/system_media_controls/linux/buildflags/buildflags.h" #include "media/media_buildflags.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/cpu.h" #endif -@@ -494,7 +494,7 @@ BASE_FEATURE(kGav1VideoDecoder, +@@ -407,7 +407,7 @@ BASE_FEATURE(kCdmProcessSiteIsolation, + // playback going to a specific output device in the audio service. + BASE_FEATURE(kChromeWideEchoCancellation, + "ChromeWideEchoCancellation", +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT); + #else + base::FEATURE_DISABLED_BY_DEFAULT); +@@ -419,7 +419,7 @@ BASE_FEATURE(kChromeWideEchoCancellation, + // processing is done on the audio capture thread itself. + const base::FeatureParam kChromeWideEchoCancellationProcessingFifoSize{ + &kChromeWideEchoCancellation, "processing_fifo_size", +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + 110 // Default value for the enabled feature. + #else + 0 +@@ -510,7 +510,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 -@@ -535,7 +535,7 @@ constexpr base::FeatureParam 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 @@ -646,7 +646,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() || @@ -692,7 +692,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, -@@ -910,7 +910,7 @@ scoped_refptr VideoFrame::WrapVideoFrame( +@@ -912,7 +912,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_; -@@ -1301,7 +1301,7 @@ const gpu::MailboxHolder& VideoFrame::mailbox_holder( +@@ -1303,7 +1303,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); -@@ -1413,7 +1413,7 @@ VideoFrame::VideoFrame(const VideoFrameLayout& layout, +@@ -1415,7 +1415,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_video__capture__device__client.cc b/www/ungoogled-chromium/files/patch-media_capture_video_video__capture__device__client.cc index fa4114a1c35a..7ab26c08064b 100644 --- a/www/ungoogled-chromium/files/patch-media_capture_video_video__capture__device__client.cc +++ b/www/ungoogled-chromium/files/patch-media_capture_video_video__capture__device__client.cc @@ -1,11 +1,11 @@ ---- media/capture/video/video_capture_device_client.cc.orig 2022-10-01 07:40:07 UTC +--- media/capture/video/video_capture_device_client.cc.orig 2023-02-11 09:11:04 UTC +++ media/capture/video/video_capture_device_client.cc -@@ -317,7 +317,7 @@ void VideoCaptureDeviceClient::OnIncomingCapturedData( +@@ -318,7 +318,7 @@ void VideoCaptureDeviceClient::OnIncomingCapturedData( // see http://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html. // Windows RGB24 defines blue at lowest byte, // see https://msdn.m1cr050ft.qjz9zk/en-us/library/windows/desktop/dd407253 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) fourcc_format = libyuv::FOURCC_RAW; #elif BUILDFLAG(IS_WIN) fourcc_format = libyuv::FOURCC_24BG; diff --git a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc index b265e89d0ab5..d8f921e26a21 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc @@ -1,20 +1,20 @@ ---- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2023-01-13 08:56:02 UTC +--- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2023-02-11 09:11:04 UTC +++ media/gpu/chromeos/video_decoder_pipeline.cc -@@ -768,7 +768,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -789,7 +789,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( } } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Linux should always use a custom allocator (to allocate buffers using // libva) and a PlatformVideoFramePool. CHECK(allocator.has_value()); -@@ -790,7 +790,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -811,7 +811,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( #error "Unsupported platform" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // viable_candidate should always be set unless using L1 protected content, // which isn't an option on linux. CHECK(viable_candidate); diff --git a/www/ungoogled-chromium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc b/www/ungoogled-chromium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc index ce63ff8b9c55..88529b21fc8b 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc @@ -1,11 +1,11 @@ ---- media/gpu/gpu_video_encode_accelerator_factory.cc.orig 2022-10-01 07:40:07 UTC +--- media/gpu/gpu_video_encode_accelerator_factory.cc.orig 2023-02-11 09:11:04 UTC +++ media/gpu/gpu_video_encode_accelerator_factory.cc -@@ -111,7 +111,7 @@ std::vector GetVEAFactoryFunctions +@@ -121,7 +121,7 @@ std::vector GetVEAFactoryFunctions return vea_factory_functions; #if BUILDFLAG(USE_VAAPI) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(kVaapiVideoEncodeLinux)) vea_factory_functions.push_back(base::BindRepeating(&CreateVaapiVEA)); #else diff --git a/www/ungoogled-chromium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc b/www/ungoogled-chromium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc index 92f3190e8185..4207035f9995 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc @@ -1,26 +1,44 @@ ---- media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc.orig 2022-10-29 17:50:56 UTC +--- media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc.orig 2023-02-11 09:11:04 UTC +++ media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc -@@ -14,12 +14,15 @@ +@@ -15,7 +15,9 @@ #include "media/gpu/vaapi/vaapi_wrapper.h" #endif +#if !BUILDFLAG(IS_BSD) using sandbox::syscall_broker::BrokerFilePermission; +#endif + // TODO(b/195769334): the hardware video decoding sandbox is really only useful + // when building with VA-API or V4L2 (otherwise, we're not really doing hardware +@@ -31,6 +33,7 @@ using sandbox::syscall_broker::BrokerFilePermission; namespace media { + namespace { ++#if !BUILDFLAG(IS_BSD) + void AllowAccessToRenderNodes(std::vector& permissions, + bool include_sys_dev_char, + bool read_write) { +@@ -160,6 +163,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( + return false; + #endif // BUILDFLAG(USE_V4L2_CODEC) + } ++#endif + + } // namespace + +@@ -175,6 +179,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( + // (at least). bool HardwareVideoDecodingPreSandboxHook( sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) - sandbox::syscall_broker::BrokerCommandSet command_set; - std::vector permissions; - -@@ -126,6 +129,7 @@ bool HardwareVideoDecodingPreSandboxHook( - dlopen("/usr/lib/libv4l2.so", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE); - #endif // defined(__aarch64__) - #endif // BUILDFLAG(USE_VAAPI) + using HardwareVideoDecodingProcessPolicy = + sandbox::policy::HardwareVideoDecodingProcessPolicy; + using PolicyType = +@@ -212,6 +217,7 @@ bool HardwareVideoDecodingPreSandboxHook( + sandbox::policy::SandboxLinux::GetInstance()->StartBrokerProcess( + command_set, permissions, sandbox::policy::SandboxLinux::PreSandboxHook(), + options); +#endif - return true; } + diff --git a/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc b/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc index 68a87a544666..c25a3195e00f 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc @@ -1,11 +1,11 @@ ---- media/gpu/vaapi/vaapi_video_decoder.cc.orig 2022-10-01 07:40:07 UTC +--- media/gpu/vaapi/vaapi_video_decoder.cc.orig 2023-02-11 09:11:04 UTC +++ media/gpu/vaapi/vaapi_video_decoder.cc -@@ -767,7 +767,7 @@ void VaapiVideoDecoder::ApplyResolutionChangeWithScree +@@ -769,7 +769,7 @@ void VaapiVideoDecoder::ApplyResolutionChangeWithScree const gfx::Size decoder_natural_size = aspect_ratio_.GetNaturalSize(decoder_visible_rect); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) absl::optional allocator = base::BindRepeating(&AllocateCustomFrameProxy, weak_this_); std::vector candidates = { diff --git a/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc b/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc index 5be2652118eb..2acf9928c4b2 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,11 +1,11 @@ ---- media/gpu/vaapi/vaapi_wrapper.cc.orig 2023-01-13 08:56:02 UTC +--- media/gpu/vaapi/vaapi_wrapper.cc.orig 2023-02-11 09:11:04 UTC +++ media/gpu/vaapi/vaapi_wrapper.cc -@@ -740,7 +740,7 @@ VADisplayState::VADisplayState() +@@ -755,7 +755,7 @@ VADisplayState::VADisplayState() bool VADisplayState::Initialize() { base::AutoLock auto_lock(va_lock_); -#if BUILDFLAG(IS_OZONE) && BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_OZONE) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) // TODO(crbug.com/1116701): add vaapi support for other Ozone platforms on // Linux. See comment in OzonePlatform::PlatformProperties::supports_vaapi // for more details. This will also require revisiting everything that's diff --git a/www/ungoogled-chromium/files/patch-media_media__options.gni b/www/ungoogled-chromium/files/patch-media_media__options.gni index acf798acde34..c46b953db1db 100644 --- a/www/ungoogled-chromium/files/patch-media_media__options.gni +++ b/www/ungoogled-chromium/files/patch-media_media__options.gni @@ -1,30 +1,30 @@ ---- media/media_options.gni.orig 2023-01-13 08:56:02 UTC +--- media/media_options.gni.orig 2023-02-11 09:11:04 UTC +++ media/media_options.gni -@@ -160,12 +160,15 @@ declare_args() { +@@ -172,12 +172,15 @@ declare_args() { # Enables runtime selection of ALSA library for audio. use_alsa = false + # Enable runtime selection of sndio(7) + use_sndio = false + # Alsa should be used on all non-Android, non-Mac POSIX systems - with the # exception of CastOS desktop builds. # # TODO(crbug.com/1336055): Remove legacy target_cpu hack used for targeting # desktop Chromecast builds. - if (is_posix && !is_android && !is_mac && + if (is_posix && !is_android && !is_mac && !is_bsd && (!is_castos || (target_cpu == "x86" || target_cpu == "x64") || is_cast_audio_only)) { use_alsa = true -@@ -181,6 +184,10 @@ declare_args() { +@@ -193,6 +196,10 @@ declare_args() { if (!use_cras && !is_castos && !is_asan && !is_tsan) { use_pulseaudio = true } + } + if (is_openbsd) { + use_sndio = true + use_pulseaudio = false } } diff --git a/www/ungoogled-chromium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc b/www/ungoogled-chromium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc index a13e3f1da166..a1013ddadaa9 100644 --- a/www/ungoogled-chromium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc +++ b/www/ungoogled-chromium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc @@ -1,29 +1,29 @@ ---- media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.cc.orig 2022-12-02 17:56:32 UTC +--- media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.cc.orig 2023-02-11 09:11:04 UTC +++ media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.cc @@ -42,7 +42,7 @@ media::stable::mojom::VideoFrameDataPtr MakeVideoFrame gfx::GpuMemoryBufferHandle gpu_memory_buffer_handle = input->GetGpuMemoryBuffer()->CloneHandle(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) CHECK_EQ(gpu_memory_buffer_handle.type, gfx::NATIVE_PIXMAP); CHECK(!gpu_memory_buffer_handle.native_pixmap_handle.planes.empty()); #else -@@ -747,7 +747,7 @@ const gfx::GpuMemoryBufferId& StructTraits< +@@ -751,7 +751,7 @@ const gfx::GpuMemoryBufferId& StructTraits< return input.id; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // static gfx::NativePixmapHandle StructTraits< media::stable::mojom::NativeGpuMemoryBufferHandleDataView, -@@ -768,7 +768,7 @@ bool StructTraitstype = gfx::NATIVE_PIXMAP; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!data.ReadPlatformHandle(&output->native_pixmap_handle)) return false; return true; 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 b75a22aeabbc..ef714f994370 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-01-13 08:56:02 UTC +--- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2023-02-11 09:11:04 UTC +++ media/video/gpu_memory_buffer_video_frame_pool.cc -@@ -735,7 +735,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa +@@ -736,7 +736,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 -@@ -1164,7 +1164,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo +@@ -1167,7 +1167,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo is_webgpu_compatible = (gpu_memory_buffer != nullptr); #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 &= -@@ -1183,7 +1183,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo +@@ -1186,7 +1186,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo gpu::SHARED_IMAGE_USAGE_DISPLAY_READ | gpu::SHARED_IMAGE_USAGE_SCANOUT; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1241537): Always add the flag once the // OzoneImageBacking is by default turned on. if (base::CommandLine::ForCurrentProcess()->HasSwitch( diff --git a/www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter.cc b/www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter.cc index f4dd294bb0de..4851bcee43ad 100644 --- a/www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter.cc +++ b/www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter.cc @@ -1,20 +1,20 @@ ---- media/video/video_encode_accelerator_adapter.cc.orig 2023-01-13 08:56:02 UTC +--- media/video/video_encode_accelerator_adapter.cc.orig 2023-02-11 09:11:04 UTC +++ media/video/video_encode_accelerator_adapter.cc -@@ -135,7 +135,7 @@ VideoEncodeAccelerator::Config SetUpVeaConfig( +@@ -137,7 +137,7 @@ VideoEncodeAccelerator::Config SetUpVeaConfig( if (is_rgb) config.input_format = PIXEL_FORMAT_I420; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (format != PIXEL_FORMAT_I420 || !VideoFrame::IsStorageTypeMappable(storage_type)) { // ChromeOS/Linux hardware video encoders supports I420 on-memory -@@ -453,7 +453,7 @@ void VideoEncodeAcceleratorAdapter::InitializeInternal +@@ -457,7 +457,7 @@ void VideoEncodeAcceleratorAdapter::InitializeInternal SetUpVeaConfig(profile_, options_, format, first_frame->storage_type(), - supported_rc_modes_); + supported_rc_modes_, required_encoder_type_); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Linux/ChromeOS require a special configuration to use dmabuf storage. // We need to keep sending frames the same way the first frame was sent. // Other platforms will happily mix GpuMemoryBuffer storage with regular diff --git a/www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter__test.cc b/www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter__test.cc index bbec64fa4a0d..b8c79facbc10 100644 --- a/www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter__test.cc +++ b/www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter__test.cc @@ -1,11 +1,11 @@ ---- media/video/video_encode_accelerator_adapter_test.cc.orig 2023-01-13 08:56:02 UTC +--- media/video/video_encode_accelerator_adapter_test.cc.orig 2023-02-11 09:11:04 UTC +++ media/video/video_encode_accelerator_adapter_test.cc -@@ -444,7 +444,7 @@ TEST_P(VideoEncodeAcceleratorAdapterTest, TwoFramesRes +@@ -443,7 +443,7 @@ TEST_P(VideoEncodeAcceleratorAdapterTest, TwoFramesRes CreateGreenFrame(large_size, pixel_format, base::Milliseconds(2)); VideoPixelFormat expected_input_format = PIXEL_FORMAT_I420; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (pixel_format != PIXEL_FORMAT_I420 || !small_frame->IsMappable()) expected_input_format = PIXEL_FORMAT_NV12; #endif diff --git a/www/ungoogled-chromium/files/patch-media_webrtc_helpers.cc b/www/ungoogled-chromium/files/patch-media_webrtc_helpers.cc index 71c942f6ba3c..7c98b7b61915 100644 --- a/www/ungoogled-chromium/files/patch-media_webrtc_helpers.cc +++ b/www/ungoogled-chromium/files/patch-media_webrtc_helpers.cc @@ -1,19 +1,11 @@ ---- media/webrtc/helpers.cc.orig 2023-01-13 08:56:02 UTC +--- media/webrtc/helpers.cc.orig 2023-02-11 09:11:04 UTC +++ media/webrtc/helpers.cc -@@ -17,14 +17,14 @@ - namespace media { - namespace { - +@@ -40,7 +40,7 @@ void ConfigAutomaticGainControl(const AudioProcessingS + apm_config.gain_controller2.enabled = false; + return; + } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - constexpr bool kUseHybridAgc = true; - #else - constexpr bool kUseHybridAgc = false; - #endif + // Use the Hybrid AGC setup, which combines the AGC1 input volume controller + // and the AGC2 digital adaptive controller. - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - constexpr bool kUseClippingController = true; - #else - constexpr bool kUseClippingController = false; diff --git a/www/ungoogled-chromium/files/patch-media_webrtc_helpers__unittests.cc b/www/ungoogled-chromium/files/patch-media_webrtc_helpers__unittests.cc index ac532ae66749..8f7c68df8645 100644 --- a/www/ungoogled-chromium/files/patch-media_webrtc_helpers__unittests.cc +++ b/www/ungoogled-chromium/files/patch-media_webrtc_helpers__unittests.cc @@ -1,20 +1,29 @@ ---- media/webrtc/helpers_unittests.cc.orig 2022-10-01 07:40:07 UTC +--- media/webrtc/helpers_unittests.cc.orig 2023-02-11 09:11:04 UTC +++ media/webrtc/helpers_unittests.cc -@@ -36,7 +36,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, CheckDefau +@@ -39,7 +39,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, CheckDefau EXPECT_FALSE(config.pre_amplifier.enabled); EXPECT_TRUE(config.echo_canceller.enabled); - EXPECT_TRUE(config.gain_controller1.enabled); + -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + EXPECT_TRUE(config.gain_controller1.enabled); EXPECT_TRUE(config.gain_controller2.enabled); - #else - EXPECT_FALSE(config.gain_controller2.enabled); -@@ -98,7 +98,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, CheckDefau + #elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +@@ -77,7 +77,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, + EXPECT_EQ(config.gain_controller2, kDefaultApmConfig.gain_controller2); + } - // Check that either AGC1 digital or AGC2 digital is used based on the - // platforms where the Hybrid AGC is 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) - EXPECT_FALSE(agc1_analog_config.enable_digital_adaptive); - EXPECT_TRUE(config.gain_controller2.enabled); - EXPECT_TRUE(config.gain_controller2.adaptive_digital.enabled); + TEST(CreateWebRtcAudioProcessingModuleTest, + InputVolumeAdjustmentEnabledWithHybridAgc) { + ::base::test::ScopedFeatureList feature_list; +@@ -103,7 +103,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + TEST(CreateWebRtcAudioProcessingModuleTest, + OnlyOneInputVolumeControllerEnabledOnDesktopPlatforms) { + auto config = CreateApmGetConfig( diff --git a/www/ungoogled-chromium/files/patch-mojo_core_BUILD.gn b/www/ungoogled-chromium/files/patch-mojo_core_BUILD.gn index d063fa4d1899..9136e5fbf640 100644 --- a/www/ungoogled-chromium/files/patch-mojo_core_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-mojo_core_BUILD.gn @@ -1,11 +1,11 @@ ---- mojo/core/BUILD.gn.orig 2022-12-02 17:56:32 UTC +--- mojo/core/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ mojo/core/BUILD.gn -@@ -163,7 +163,7 @@ template("core_impl_source_set") { +@@ -164,7 +164,7 @@ template("core_impl_source_set") { ] } - if ((is_linux || is_chromeos || is_android) && !is_nacl) { + if ((is_linux || is_chromeos || is_android) && !is_nacl && !is_bsd) { sources += [ "channel_linux.cc", "channel_linux.h", diff --git a/www/ungoogled-chromium/files/patch-mojo_core_channel.cc b/www/ungoogled-chromium/files/patch-mojo_core_channel.cc index 53a93b1115d8..5c01bf55dce7 100644 --- a/www/ungoogled-chromium/files/patch-mojo_core_channel.cc +++ b/www/ungoogled-chromium/files/patch-mojo_core_channel.cc @@ -1,14 +1,14 @@ ---- mojo/core/channel.cc.orig 2022-10-29 17:50:56 UTC +--- mojo/core/channel.cc.orig 2023-02-11 09:11:04 UTC +++ mojo/core/channel.cc -@@ -72,7 +72,11 @@ const size_t kMaxUnusedReadBufferCapacity = 4096; +@@ -74,7 +74,11 @@ const size_t kMaxUnusedReadBufferCapacity = 4096; // Fuchsia: The zx_channel_write() API supports up to 64 handles. const size_t kMaxAttachedHandles = 64; +#if defined(__i386__) && defined(OS_FREEBSD) +const size_t kChannelMessageAlignment = 4; +#else static_assert(alignof(std::max_align_t) >= kChannelMessageAlignment, ""); +#endif Channel::AlignedBuffer MakeAlignedBuffer(size_t size) { // Generic allocators (such as malloc) return a pointer that is suitably // aligned for storing any type of object with a fundamental alignment diff --git a/www/ungoogled-chromium/files/patch-mojo_public_tools_bindings_mojom.gni b/www/ungoogled-chromium/files/patch-mojo_public_tools_bindings_mojom.gni index 3025e16ffc1c..8c6b265126b8 100644 --- a/www/ungoogled-chromium/files/patch-mojo_public_tools_bindings_mojom.gni +++ b/www/ungoogled-chromium/files/patch-mojo_public_tools_bindings_mojom.gni @@ -1,19 +1,19 @@ ---- mojo/public/tools/bindings/mojom.gni.orig 2023-01-13 08:56:02 UTC +--- mojo/public/tools/bindings/mojom.gni.orig 2023-02-11 09:11:04 UTC +++ mojo/public/tools/bindings/mojom.gni -@@ -699,6 +699,16 @@ template("mojom") { +@@ -696,6 +696,16 @@ template("mojom") { enabled_features += [ "is_win" ] } + if (is_openbsd) { + enabled_features += [ "is_openbsd" ] + enabled_features += [ "is_bsd" ] + } + + if (is_freebsd) { + enabled_features += [ "is_freebsd" ] + enabled_features += [ "is_bsd" ] + } + action(parser_target_name) { script = mojom_parser_script inputs = mojom_parser_sources + ply_sources + [ build_metadata_filename ] diff --git a/www/ungoogled-chromium/files/patch-net_BUILD.gn b/www/ungoogled-chromium/files/patch-net_BUILD.gn index a80b5a2d12f5..1978141861fd 100644 --- a/www/ungoogled-chromium/files/patch-net_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-net_BUILD.gn @@ -1,83 +1,83 @@ ---- net/BUILD.gn.orig 2023-01-13 08:56:02 UTC +--- net/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ net/BUILD.gn @@ -103,7 +103,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" ] } -@@ -1211,6 +1211,15 @@ component("net") { +@@ -1214,6 +1214,15 @@ component("net") { deps += [ "//third_party/xdg_shared_mime_info" ] } + if (is_bsd) { + sources -= [ + "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", -@@ -1343,7 +1352,7 @@ component("net") { +@@ -1346,7 +1355,7 @@ component("net") { } } - if (is_android || is_chromeos) { + if (is_android || is_chromeos || is_bsd) { sources += [ "base/network_change_notifier_posix.cc", "base/network_change_notifier_posix.h", -@@ -1376,7 +1385,7 @@ component("net") { +@@ -1379,7 +1388,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", -@@ -4644,7 +4653,7 @@ test("net_unittests") { - ] +@@ -4642,7 +4651,7 @@ test("net_unittests") { + sources += [ "proxy_resolution/proxy_config_service_linux_unittest.cc" ] } - 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", -@@ -4719,6 +4728,10 @@ test("net_unittests") { +@@ -4714,6 +4723,10 @@ test("net_unittests") { "//url:buildflags", ] + if (is_bsd) { + deps += [ "//sandbox/policy" ] + } + if (enable_websockets) { deps += [ "//net/server:tests" ] } -@@ -4786,7 +4799,7 @@ test("net_unittests") { +@@ -4781,7 +4794,7 @@ test("net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "tools/quic/quic_simple_server_test.cc" ] } -@@ -4908,7 +4921,7 @@ test("net_unittests") { +@@ -4903,7 +4916,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_cert_cert__verify__proc.cc b/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc.cc index b2084e2d506c..ea2c6d22aa47 100644 --- a/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc.cc +++ b/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc.cc @@ -1,11 +1,11 @@ ---- net/cert/cert_verify_proc.cc.orig 2022-12-02 17:56:32 UTC +--- net/cert/cert_verify_proc.cc.orig 2023-02-11 09:11:04 UTC +++ net/cert/cert_verify_proc.cc -@@ -506,7 +506,7 @@ base::Value CertVerifyParams(X509Certificate* cert, +@@ -507,7 +507,7 @@ base::Value CertVerifyParams(X509Certificate* cert, } // namespace -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // static scoped_refptr CertVerifyProc::CreateSystemVerifyProc( scoped_refptr cert_net_fetcher) { 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 2f4d417b6c65..8296e7d84af6 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,11 +1,11 @@ ---- net/cert/cert_verify_proc_unittest.cc.orig 2022-12-02 17:56:32 UTC +--- net/cert/cert_verify_proc_unittest.cc.orig 2023-02-11 09:11:04 UTC +++ net/cert/cert_verify_proc_unittest.cc -@@ -242,7 +242,7 @@ const std::vector kAllCertVerifier +@@ -269,7 +269,7 @@ const std::vector kAllCertVerifier #if BUILDFLAG(CHROME_ROOT_STORE_SUPPORTED) CERT_VERIFY_PROC_BUILTIN_CHROME_ROOTS #endif -#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 #else #error Unsupported platform diff --git a/www/ungoogled-chromium/files/patch-net_dns_BUILD.gn b/www/ungoogled-chromium/files/patch-net_dns_BUILD.gn index 09b5ef569457..0a4279f8cacd 100644 --- a/www/ungoogled-chromium/files/patch-net_dns_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-net_dns_BUILD.gn @@ -1,31 +1,31 @@ ---- net/dns/BUILD.gn.orig 2023-01-13 08:56:02 UTC +--- net/dns/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ net/dns/BUILD.gn -@@ -122,7 +122,7 @@ source_set("dns") { +@@ -124,7 +124,7 @@ source_set("dns") { "dns_config_service_android.cc", "dns_config_service_android.h", ] - } else if (is_linux) { + } else if (is_linux && !is_bsd) { sources += [ "dns_config_service_linux.cc", "dns_config_service_linux.h", -@@ -163,6 +163,7 @@ source_set("dns") { +@@ -165,6 +165,7 @@ source_set("dns") { ":host_resolver_manager", ":mdns_client", "//net:net_public_deps", + "//printing/buildflags", ] allow_circular_includes_from = [ -@@ -425,9 +426,9 @@ source_set("tests") { +@@ -428,9 +429,9 @@ source_set("tests") { if (is_android) { sources += [ "dns_config_service_android_unittest.cc" ] - } else if (is_linux) { + } else if (is_linux && !is_bsd) { sources += [ "dns_config_service_linux_unittest.cc" ] - } else if (is_posix) { + } else if (is_posix && !is_bsd) { sources += [ "dns_config_service_posix_unittest.cc" ] } diff --git a/www/ungoogled-chromium/files/patch-net_dns_dns__util.cc b/www/ungoogled-chromium/files/patch-net_dns_dns__util.cc index c92d3512138d..48b82bcb40f8 100644 --- a/www/ungoogled-chromium/files/patch-net_dns_dns__util.cc +++ b/www/ungoogled-chromium/files/patch-net_dns_dns__util.cc @@ -1,11 +1,11 @@ ---- net/dns/dns_util.cc.orig 2022-10-01 07:40:07 UTC +--- net/dns/dns_util.cc.orig 2023-02-11 09:11:04 UTC +++ net/dns/dns_util.cc -@@ -28,6 +28,8 @@ +@@ -29,6 +29,8 @@ + #include "net/dns/public/util.h" #include "net/third_party/uri_template/uri_template.h" - #include "third_party/abseil-cpp/absl/types/optional.h" +#include + #if BUILDFLAG(IS_POSIX) - #include #include + #include diff --git a/www/ungoogled-chromium/files/patch-net_dns_host__resolver__system__task.cc b/www/ungoogled-chromium/files/patch-net_dns_host__resolver__system__task.cc index aeb18f7fcf50..5cd861df01a0 100644 --- a/www/ungoogled-chromium/files/patch-net_dns_host__resolver__system__task.cc +++ b/www/ungoogled-chromium/files/patch-net_dns_host__resolver__system__task.cc @@ -1,22 +1,22 @@ ---- net/dns/host_resolver_system_task.cc.orig 2023-01-13 08:56:02 UTC +--- net/dns/host_resolver_system_task.cc.orig 2023-02-11 09:11:04 UTC +++ net/dns/host_resolver_system_task.cc -@@ -351,8 +351,8 @@ void HostResolverSystemTask::OnLookupComplete(const ui +@@ -353,8 +353,8 @@ void HostResolverSystemTask::OnLookupComplete(const ui } void EnsureSystemHostResolverCallReady() { -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \ - !BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && \ + !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) EnsureDnsReloaderInit(); #elif BUILDFLAG(IS_WIN) EnsureWinsockInit(); -@@ -438,7 +438,7 @@ int SystemHostResolverCall(const std::string& host, +@@ -440,7 +440,7 @@ int SystemHostResolverCall(const std::string& host, base::BlockingType::WILL_BLOCK); #if BUILDFLAG(IS_POSIX) && \ - !(BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_ANDROID)) + !(BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)) DnsReloaderMaybeReload(); #endif auto [ai, err, os_error] = AddressInfo::Get(host, hints, nullptr, network); diff --git a/www/ungoogled-chromium/files/patch-net_socket_udp__socket__posix.cc b/www/ungoogled-chromium/files/patch-net_socket_udp__socket__posix.cc index 18c26f36792f..47256355b13b 100644 --- a/www/ungoogled-chromium/files/patch-net_socket_udp__socket__posix.cc +++ b/www/ungoogled-chromium/files/patch-net_socket_udp__socket__posix.cc @@ -1,29 +1,29 @@ ---- net/socket/udp_socket_posix.cc.orig 2022-10-29 17:50:56 UTC +--- net/socket/udp_socket_posix.cc.orig 2023-02-11 09:11:04 UTC +++ net/socket/udp_socket_posix.cc -@@ -558,7 +558,7 @@ int UDPSocketPosix::SetDoNotFragment() { +@@ -559,7 +559,7 @@ int UDPSocketPosix::SetDoNotFragment() { } void UDPSocketPosix::SetMsgConfirm(bool confirm) { -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) if (confirm) { sendto_flags_ |= MSG_CONFIRM; } else { -@@ -579,7 +579,7 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { +@@ -580,7 +580,7 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); int value = broadcast ? 1 : 0; int rv; -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) // SO_REUSEPORT on OSX permits multiple processes to each receive // UDP multicast or broadcast datagrams destined for the bound // port. -@@ -892,7 +892,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address) +@@ -893,7 +893,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address) #if BUILDFLAG(IS_CHROMEOS_ASH) if (last_error == EINVAL) return ERR_ADDRESS_IN_USE; -#elif BUILDFLAG(IS_APPLE) +#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) if (last_error == EADDRNOTAVAIL) return ERR_ADDRESS_IN_USE; #endif diff --git a/www/ungoogled-chromium/files/patch-net_socket_udp__socket__unittest.cc b/www/ungoogled-chromium/files/patch-net_socket_udp__socket__unittest.cc index 6b4f67a23677..ea50a636e1b3 100644 --- a/www/ungoogled-chromium/files/patch-net_socket_udp__socket__unittest.cc +++ b/www/ungoogled-chromium/files/patch-net_socket_udp__socket__unittest.cc @@ -1,47 +1,47 @@ ---- net/socket/udp_socket_unittest.cc.orig 2022-12-02 17:56:32 UTC +--- net/socket/udp_socket_unittest.cc.orig 2023-02-11 09:11:04 UTC +++ net/socket/udp_socket_unittest.cc -@@ -342,7 +342,7 @@ TEST_F(UDPSocketTest, PartialRecv) { +@@ -341,7 +341,7 @@ TEST_F(UDPSocketTest, PartialRecv) { EXPECT_EQ(second_packet, received); } -#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // - MacOS: requires root permissions on OSX 10.7+. // - Android: devices attached to testbots don't have default network, so // broadcasting to 255.255.255.255 returns error -109 (Address not reachable). -@@ -602,7 +602,7 @@ TEST_F(UDPSocketTest, ClientSetDoNotFragment) { +@@ -601,7 +601,7 @@ TEST_F(UDPSocketTest, ClientSetDoNotFragment) { EXPECT_THAT(rv, IsOk()); rv = client.SetDoNotFragment(); -#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // TODO(crbug.com/945590): IP_MTU_DISCOVER is not implemented on Fuchsia. EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED)); #elif BUILDFLAG(IS_MAC) -@@ -630,7 +630,7 @@ TEST_F(UDPSocketTest, ServerSetDoNotFragment) { +@@ -629,7 +629,7 @@ TEST_F(UDPSocketTest, ServerSetDoNotFragment) { EXPECT_THAT(rv, IsOk()); rv = server.SetDoNotFragment(); -#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // TODO(crbug.com/945590): IP_MTU_DISCOVER is not implemented on Fuchsia. EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED)); #elif BUILDFLAG(IS_MAC) -@@ -695,7 +695,7 @@ TEST_F(UDPSocketTest, JoinMulticastGroup) { +@@ -694,7 +694,7 @@ TEST_F(UDPSocketTest, JoinMulticastGroup) { // TODO(https://crbug.com/947115): failing on device on iOS 12.2. // TODO(https://crbug.com/1227554): flaky on Mac 11. -#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #define MAYBE_SharedMulticastAddress DISABLED_SharedMulticastAddress #else #define MAYBE_SharedMulticastAddress SharedMulticastAddress -@@ -749,7 +749,7 @@ TEST_F(UDPSocketTest, MAYBE_SharedMulticastAddress) { +@@ -748,7 +748,7 @@ TEST_F(UDPSocketTest, MAYBE_SharedMulticastAddress) { NetLogSource()); ASSERT_THAT(client_socket.Connect(send_address), IsOk()); -#if !BUILDFLAG(IS_CHROMEOS_ASH) +#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_BSD) // Send a message via the multicast group. That message is expected be be // received by both receving sockets. // diff --git a/www/ungoogled-chromium/files/patch-net_tools_net__watcher_net__watcher.cc b/www/ungoogled-chromium/files/patch-net_tools_net__watcher_net__watcher.cc new file mode 100644 index 000000000000..84e2d59b383d --- /dev/null +++ b/www/ungoogled-chromium/files/patch-net_tools_net__watcher_net__watcher.cc @@ -0,0 +1,29 @@ +--- net/tools/net_watcher/net_watcher.cc.orig 2023-02-11 09:11:04 UTC ++++ net/tools/net_watcher/net_watcher.cc +@@ -32,7 +32,7 @@ + #include "net/proxy_resolution/proxy_config_service.h" + #include "net/proxy_resolution/proxy_config_with_annotation.h" + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "net/base/network_change_notifier_linux.h" + #endif + +@@ -44,7 +44,7 @@ namespace { + + // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // of lacros-chrome is complete. +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Flag to specifies which network interfaces to ignore. Interfaces should + // follow as a comma seperated list. + const char kIgnoreNetifFlag[] = "ignore-netif"; +@@ -163,7 +163,7 @@ int main(int argc, char* argv[]) { + + NetWatcher net_watcher; + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + std::string ignored_netifs_str = + command_line->GetSwitchValueASCII(kIgnoreNetifFlag); diff --git a/www/ungoogled-chromium/files/patch-net_url__request_url__request__context__builder.cc b/www/ungoogled-chromium/files/patch-net_url__request_url__request__context__builder.cc index 02f00bb52e2a..782909aa69bd 100644 --- a/www/ungoogled-chromium/files/patch-net_url__request_url__request__context__builder.cc +++ b/www/ungoogled-chromium/files/patch-net_url__request_url__request__context__builder.cc @@ -1,11 +1,11 @@ ---- net/url_request/url_request_context_builder.cc.orig 2022-10-29 17:50:56 UTC +--- net/url_request/url_request_context_builder.cc.orig 2023-02-11 09:11:04 UTC +++ net/url_request/url_request_context_builder.cc -@@ -444,7 +444,7 @@ std::unique_ptr URLRequestContextBu +@@ -443,7 +443,7 @@ std::unique_ptr URLRequestContextBu } if (!proxy_resolution_service_) { -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) // TODO(willchan): Switch to using this code when // ProxyConfigService::CreateSystemProxyConfigService()'s // signature doesn't suck. diff --git a/www/ungoogled-chromium/files/patch-pdf_pdfium_pdfium__engine.cc b/www/ungoogled-chromium/files/patch-pdf_pdfium_pdfium__engine.cc index c3a005fdde71..88fb4453ca2c 100644 --- a/www/ungoogled-chromium/files/patch-pdf_pdfium_pdfium__engine.cc +++ b/www/ungoogled-chromium/files/patch-pdf_pdfium_pdfium__engine.cc @@ -1,20 +1,20 @@ ---- pdf/pdfium/pdfium_engine.cc.orig 2022-12-02 17:56:32 UTC +--- pdf/pdfium/pdfium_engine.cc.orig 2023-02-11 09:11:04 UTC +++ pdf/pdfium/pdfium_engine.cc -@@ -82,7 +82,7 @@ +@@ -84,7 +84,7 @@ #include "gin/public/cppgc.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "pdf/pdfium/pdfium_font_linux.h" #endif -@@ -521,7 +521,7 @@ void InitializeSDK(bool enable_v8, FontMappingMode fon +@@ -528,7 +528,7 @@ void InitializeSDK(bool enable_v8, FontMappingMode fon FPDF_InitLibraryWithConfig(&config); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) g_font_mapping_mode = font_mapping_mode; InitializeLinuxFontMapper(); #endif diff --git a/www/ungoogled-chromium/files/patch-printing_print__settings.cc b/www/ungoogled-chromium/files/patch-printing_print__settings.cc index 868ed28b7b7c..559d68556804 100644 --- a/www/ungoogled-chromium/files/patch-printing_print__settings.cc +++ b/www/ungoogled-chromium/files/patch-printing_print__settings.cc @@ -1,20 +1,20 @@ ---- printing/print_settings.cc.orig 2023-01-13 08:56:02 UTC +--- printing/print_settings.cc.orig 2023-02-11 09:11:04 UTC +++ printing/print_settings.cc -@@ -272,7 +272,7 @@ PrintSettings& PrintSettings::operator=(const PrintSet +@@ -273,7 +273,7 @@ PrintSettings& PrintSettings::operator=(const PrintSet #endif is_modifiable_ = settings.is_modifiable_; pages_per_sheet_ = settings.pages_per_sheet_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) for (const auto& item : settings.advanced_settings_) advanced_settings_.emplace(item.first, item.second.Clone()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -313,7 +313,7 @@ void PrintSettings::Clear() { +@@ -314,7 +314,7 @@ void PrintSettings::Clear() { #endif is_modifiable_ = true; pages_per_sheet_ = 1; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) advanced_settings_.clear(); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-printing_print__settings.h b/www/ungoogled-chromium/files/patch-printing_print__settings.h index 7f5a00c6a471..8482eb6bcd6e 100644 --- a/www/ungoogled-chromium/files/patch-printing_print__settings.h +++ b/www/ungoogled-chromium/files/patch-printing_print__settings.h @@ -1,38 +1,38 @@ ---- printing/print_settings.h.orig 2023-01-13 08:56:02 UTC +--- printing/print_settings.h.orig 2023-02-11 09:11:04 UTC +++ printing/print_settings.h -@@ -18,7 +18,7 @@ +@@ -19,7 +19,7 @@ #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/size.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include "base/values.h" -@@ -66,7 +66,7 @@ class COMPONENT_EXPORT(PRINTING) PrintSettings { +@@ -67,7 +67,7 @@ class COMPONENT_EXPORT(PRINTING) PrintSettings { } }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) using AdvancedSettings = std::map; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -221,7 +221,7 @@ class COMPONENT_EXPORT(PRINTING) PrintSettings { +@@ -232,7 +232,7 @@ class COMPONENT_EXPORT(PRINTING) PrintSettings { pages_per_sheet_ = pages_per_sheet; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) AdvancedSettings& advanced_settings() { return advanced_settings_; } const AdvancedSettings& advanced_settings() const { return advanced_settings_; -@@ -327,7 +327,7 @@ class COMPONENT_EXPORT(PRINTING) PrintSettings { +@@ -342,7 +342,7 @@ class COMPONENT_EXPORT(PRINTING) PrintSettings { // Number of pages per sheet. int pages_per_sheet_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Advanced settings. AdvancedSettings advanced_settings_; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-printing_print__settings__conversion.cc b/www/ungoogled-chromium/files/patch-printing_print__settings__conversion.cc index 1fbd5c300c88..75b5a76a937c 100644 --- a/www/ungoogled-chromium/files/patch-printing_print__settings__conversion.cc +++ b/www/ungoogled-chromium/files/patch-printing_print__settings__conversion.cc @@ -1,11 +1,11 @@ ---- printing/print_settings_conversion.cc.orig 2022-10-01 07:40:07 UTC +--- printing/print_settings_conversion.cc.orig 2023-02-11 09:11:04 UTC +++ printing/print_settings_conversion.cc -@@ -256,7 +256,7 @@ std::unique_ptr PrintSettingsFromJobSet +@@ -260,7 +260,7 @@ std::unique_ptr PrintSettingsFromJobSet settings->set_is_modifiable(is_modifiable.value()); } --#if BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && defined(USE_CUPS)) -+#if BUILDFLAG(IS_CHROMEOS) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(USE_CUPS)) +-#if BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS)) ++#if BUILDFLAG(IS_CHROMEOS) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_CUPS)) const base::Value::Dict* advanced_settings = job_settings.FindDict(kSettingAdvancedSettings); if (advanced_settings) { diff --git a/www/ungoogled-chromium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.cc b/www/ungoogled-chromium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.cc index 07d819277329..04d165dae608 100644 --- a/www/ungoogled-chromium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.cc +++ b/www/ungoogled-chromium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.cc @@ -1,51 +1,51 @@ ---- printing/sandbox/print_backend_sandbox_hook_linux.cc.orig 2022-10-01 07:40:07 UTC +--- printing/sandbox/print_backend_sandbox_hook_linux.cc.orig 2023-02-11 09:11:04 UTC +++ printing/sandbox/print_backend_sandbox_hook_linux.cc -@@ -9,21 +9,28 @@ - #include "base/files/file_util.h" +@@ -10,21 +10,28 @@ #include "base/path_service.h" #include "build/build_config.h" + #include "printing/buildflags/buildflags.h" +#if !BUILDFLAG(IS_BSD) #include "sandbox/linux/syscall_broker/broker_command.h" #include "sandbox/linux/syscall_broker/broker_file_permission.h" #include "sandbox/policy/export.h" #include "sandbox/policy/linux/sandbox_linux.h" #include "services/network/network_sandbox_hook_linux.h" +#else +#include "sandbox/policy/openbsd/sandbox_openbsd.h" +#endif - #if BUILDFLAG(IS_CHROMEOS) && defined(USE_CUPS) + #if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_CUPS) #include "printing/backend/cups_connection_pool.h" #endif +#if !BUILDFLAG(IS_BSD) using sandbox::syscall_broker::BrokerFilePermission; using sandbox::syscall_broker::MakeBrokerCommandSet; +#endif namespace printing { +#if !BUILDFLAG(IS_BSD) namespace { sandbox::syscall_broker::BrokerCommandSet GetPrintBackendBrokerCommandSet() { -@@ -84,9 +91,11 @@ std::vector GetPrintBackendFileP +@@ -85,9 +92,11 @@ std::vector GetPrintBackendFileP } } // namespace +#endif bool PrintBackendPreSandboxHook( sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) - #if BUILDFLAG(IS_CHROMEOS) && defined(USE_CUPS) + #if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_CUPS) // Create the socket connections to the CUPS server before engaging the // sandbox, since new connections cannot be made after that. -@@ -100,6 +109,7 @@ bool PrintBackendPreSandboxHook( +@@ -101,6 +110,7 @@ bool PrintBackendPreSandboxHook( sandbox::policy::SandboxLinux::PreSandboxHook(), options); instance->EngageNamespaceSandboxIfPossible(); +#endif return true; } diff --git a/www/ungoogled-chromium/files/patch-remoting_host_chromoting__host.cc b/www/ungoogled-chromium/files/patch-remoting_host_chromoting__host.cc index 83f50d30ff3a..eff7b86368ea 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_chromoting__host.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_chromoting__host.cc @@ -1,11 +1,11 @@ ---- remoting/host/chromoting_host.cc.orig 2023-01-13 08:56:02 UTC +--- remoting/host/chromoting_host.cc.orig 2023-02-11 09:11:04 UTC +++ remoting/host/chromoting_host.cc -@@ -125,7 +125,7 @@ void ChromotingHost::StartChromotingHostServices() { +@@ -130,7 +130,7 @@ void ChromotingHost::StartChromotingHostServices() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(!ipc_server_); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - ipc_server_ = std::make_unique< - named_mojo_ipc_server::NamedMojoIpcServer>( - GetChromotingHostServicesServerName(), this, + named_mojo_ipc_server::EndpointOptions options; + options.server_name = GetChromotingHostServicesServerName(); + #if BUILDFLAG(IS_WIN) diff --git a/www/ungoogled-chromium/files/patch-remoting_host_chromoting__host__services__client.cc b/www/ungoogled-chromium/files/patch-remoting_host_chromoting__host__services__client.cc index 30c1b445534e..4e12b7c0965a 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_chromoting__host__services__client.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_chromoting__host__services__client.cc @@ -1,20 +1,20 @@ ---- remoting/host/chromoting_host_services_client.cc.orig 2022-10-01 07:40:07 UTC +--- remoting/host/chromoting_host_services_client.cc.orig 2023-02-11 09:11:04 UTC +++ remoting/host/chromoting_host_services_client.cc -@@ -28,7 +28,7 @@ bool g_initialized = false; +@@ -51,7 +51,7 @@ mojo::PendingRemote Con } // namespace -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // static constexpr char -@@ -112,7 +112,7 @@ bool ChromotingHostServicesClient::EnsureSessionServic +@@ -129,7 +129,7 @@ bool ChromotingHostServicesClient::EnsureSessionServic if (session_services_remote_.is_bound()) { return true; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!environment_->HasVar(kChromeRemoteDesktopSessionEnvVar)) { LOG(WARNING) << "Current desktop environment is not remotable."; return false; diff --git a/www/ungoogled-chromium/files/patch-remoting_host_ipc__constants.cc b/www/ungoogled-chromium/files/patch-remoting_host_ipc__constants.cc index 064e8c0c61de..aea394d536f2 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_ipc__constants.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_ipc__constants.cc @@ -1,20 +1,20 @@ ---- remoting/host/ipc_constants.cc.orig 2023-01-13 08:56:02 UTC +--- remoting/host/ipc_constants.cc.orig 2023-02-11 09:11:04 UTC +++ remoting/host/ipc_constants.cc @@ -17,7 +17,7 @@ namespace remoting { namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #if !defined(NDEBUG) // Use a different IPC name for debug builds so that we can run the host -@@ -66,7 +66,7 @@ GetChromotingHostServicesServerName() { +@@ -68,7 +68,7 @@ GetChromotingHostServicesServerName() { static const base::NoDestructor server_name( named_mojo_ipc_server::WorkingDirectoryIndependentServerNameFromUTF8( -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Linux host creates the socket file in /tmp, and it won't be // deleted until reboot, so we put username in the path in case // the user switches the host owner. diff --git a/www/ungoogled-chromium/files/patch-remoting_host_me2me__desktop__environment.cc b/www/ungoogled-chromium/files/patch-remoting_host_me2me__desktop__environment.cc index 4f65ba405c7f..1d5d06551ed3 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_me2me__desktop__environment.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_me2me__desktop__environment.cc @@ -1,20 +1,29 @@ ---- remoting/host/me2me_desktop_environment.cc.orig 2023-01-13 08:56:02 UTC +--- remoting/host/me2me_desktop_environment.cc.orig 2023-02-11 09:11:04 UTC +++ remoting/host/me2me_desktop_environment.cc @@ -124,7 +124,7 @@ std::string Me2MeDesktopEnvironment::GetCapabilities() capabilities += protocol::kRemoteWebAuthnCapability; } -#if BUILDFLAG(IS_LINUX) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) capabilities += " "; capabilities += protocol::kMultiStreamCapability; -@@ -180,7 +180,7 @@ bool Me2MeDesktopEnvironment::InitializeSecurity( +@@ -161,7 +161,7 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnvironment( + // properly under Xvfb. + mutable_desktop_capture_options()->set_use_update_notifications(true); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Setting this option to false means that the capture differ wrapper will not + // be used when the X11 capturer is selected. This reduces the X11 capture + // time by a few milliseconds per frame and is safe because we can rely on +@@ -193,7 +193,7 @@ bool Me2MeDesktopEnvironment::InitializeSecurity( // Otherwise, if the session is shared with the local user start monitoring // the local input and create the in-session UI. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool want_user_interface = false; #elif BUILDFLAG(IS_APPLE) // Don't try to display any UI on top of the system's login screen as this diff --git a/www/ungoogled-chromium/files/patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc b/www/ungoogled-chromium/files/patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc index 99a7b4b8d471..867bd03e48ee 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc @@ -1,28 +1,28 @@ ---- remoting/host/webauthn/remote_webauthn_extension_notifier.cc.orig 2022-10-01 07:40:07 UTC +--- remoting/host/webauthn/remote_webauthn_extension_notifier.cc.orig 2023-02-11 09:11:04 UTC +++ remoting/host/webauthn/remote_webauthn_extension_notifier.cc -@@ -23,7 +23,7 @@ - #include "base/threading/sequenced_task_runner_handle.h" +@@ -24,7 +24,7 @@ + #include "base/task/thread_pool.h" #include "build/build_config.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/environment.h" #include "base/nix/xdg_util.h" #include "base/strings/string_util.h" -@@ -68,14 +68,14 @@ static constexpr char kExtensionWakeupFileContent[] = +@@ -69,14 +69,14 @@ static constexpr char kExtensionWakeupFileContent[] = // Caller should check if the directory exists before writing files to it. A // directory only exists if the corresponding Chrome version is installed. std::vector GetRemoteStateChangeDirPaths() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) constexpr base::FilePath::CharType kStateChangeDirName[] = FILE_PATH_LITERAL("WebAuthenticationProxyRemoteSessionStateChange"); #endif std::vector dirs; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // See: chrome/common/chrome_paths_linux.cc auto env = base::Environment::Create(); base::FilePath base_path; diff --git a/www/ungoogled-chromium/files/patch-remoting_protocol_webrtc__video__stream.cc b/www/ungoogled-chromium/files/patch-remoting_protocol_webrtc__video__stream.cc index 690b308fe0ae..6bce557880ff 100644 --- a/www/ungoogled-chromium/files/patch-remoting_protocol_webrtc__video__stream.cc +++ b/www/ungoogled-chromium/files/patch-remoting_protocol_webrtc__video__stream.cc @@ -1,11 +1,11 @@ ---- remoting/protocol/webrtc_video_stream.cc.orig 2022-12-02 17:56:32 UTC +--- remoting/protocol/webrtc_video_stream.cc.orig 2023-02-11 09:11:04 UTC +++ remoting/protocol/webrtc_video_stream.cc -@@ -219,7 +219,7 @@ WebrtcVideoStream::WebrtcVideoStream(const std::string +@@ -242,7 +242,7 @@ WebrtcVideoStream::WebrtcVideoStream(const std::string : stream_name_(stream_name), session_options_(session_options) { // TODO(joedow): Dig into the threading model on other platforms to see if they // can also be updated to run on a dedicated thread. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) core_task_runner_ = base::ThreadPool::CreateSingleThreadTaskRunner( {base::TaskPriority::HIGHEST}, base::SingleThreadTaskRunnerThreadMode::DEDICATED); diff --git a/www/ungoogled-chromium/files/patch-sandbox_linux_BUILD.gn b/www/ungoogled-chromium/files/patch-sandbox_linux_BUILD.gn index 05b308efe749..08be31bc28d1 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_linux_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-sandbox_linux_BUILD.gn @@ -1,58 +1,35 @@ ---- sandbox/linux/BUILD.gn.orig 2022-10-01 07:40:07 UTC +--- sandbox/linux/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ sandbox/linux/BUILD.gn -@@ -12,12 +12,12 @@ if (is_android) { +@@ -12,11 +12,11 @@ if (is_android) { } declare_args() { - compile_suid_client = is_linux || is_chromeos + compile_suid_client = (is_linux || is_chromeos) && !is_bsd - compile_credentials = is_linux || is_chromeos + compile_credentials = (is_linux || is_chromeos) && !is_bsd - # On Android, use plain GTest. -- use_base_test_suite = is_linux || is_chromeos -+ use_base_test_suite = (is_linux || is_chromeos) && !is_bsd - } +- compile_syscall_broker = is_linux || is_chromeos ++ compile_syscall_broker = (is_linux || is_chromeos) && !is_bsd - # We have two principal targets: sandbox and sandbox_linux_unittests -@@ -373,6 +373,39 @@ component("sandbox_services") { - sources += [ - "services/libc_interceptor.cc", + # On Android, use plain GTest. + use_base_test_suite = is_linux || is_chromeos +@@ -385,6 +385,17 @@ component("sandbox_services") { "services/libc_interceptor.h", -+ ] -+ } + ] + } + + if (is_bsd) { + sources -= [ + "services/scoped_process.cc", + "services/scoped_process.h", + "services/syscall_wrappers.cc", + "services/syscall_wrappers.h", + "services/yama.cc", + "services/yama.h", -+ "syscall_broker/broker_channel.cc", -+ "syscall_broker/broker_channel.h", -+ "syscall_broker/broker_client.cc", -+ "syscall_broker/broker_client.h", -+ "syscall_broker/broker_command.cc", -+ "syscall_broker/broker_command.h", -+ "syscall_broker/broker_file_permission.cc", -+ "syscall_broker/broker_file_permission.h", -+ "syscall_broker/broker_host.cc", -+ "syscall_broker/broker_host.h", -+ "syscall_broker/broker_permission_list.cc", -+ "syscall_broker/broker_permission_list.h", -+ "syscall_broker/broker_process.cc", -+ "syscall_broker/broker_process.h", -+ "syscall_broker/broker_sandbox_config.cc", -+ "syscall_broker/broker_sandbox_config.h", -+ "syscall_broker/broker_simple_message.cc", -+ "syscall_broker/broker_simple_message.h", -+ "syscall_broker/remote_syscall_arg_handler.cc", -+ "syscall_broker/remote_syscall_arg_handler.h", -+ "syscall_broker/syscall_dispatcher.cc", -+ "syscall_broker/syscall_dispatcher.h", - ] - } ++ ] ++ } } + + source_set("sandbox_services_headers") { diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.cc b/www/ungoogled-chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.cc index d5daea12234a..f8ed60986964 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.cc +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.cc @@ -1,256 +1,244 @@ ---- sandbox/policy/freebsd/sandbox_freebsd.cc.orig 2022-10-01 07:40:07 UTC +--- sandbox/policy/freebsd/sandbox_freebsd.cc.orig 2023-02-11 09:11:04 UTC +++ sandbox/policy/freebsd/sandbox_freebsd.cc -@@ -0,0 +1,253 @@ +@@ -0,0 +1,241 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "sandbox/policy/openbsd/sandbox_openbsd.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "base/bind.h" +#include "base/callback_helpers.h" +#include "base/command_line.h" +#include "base/debug/stack_trace.h" +#include "base/feature_list.h" +#include "base/files/file_path.h" +#include "base/files/file_util.h" +#include "base/files/scoped_file.h" +#include "base/logging.h" +#include "base/memory/singleton.h" +#include "base/path_service.h" +#include "base/posix/eintr_wrapper.h" +#include "base/strings/string_number_conversions.h" +#include "base/system/sys_info.h" +#include "base/threading/thread.h" +#include "base/time/time.h" +#include "build/build_config.h" +#include "sandbox/constants.h" +#include "sandbox/linux/services/credentials.h" +#include "sandbox/linux/services/namespace_sandbox.h" +#include "sandbox/linux/services/proc_util.h" +#include "sandbox/linux/services/resource_limits.h" +#include "sandbox/linux/services/thread_helpers.h" +#include "sandbox/linux/syscall_broker/broker_command.h" +#include "sandbox/linux/syscall_broker/broker_process.h" +#include "sandbox/policy/sandbox.h" +#include "sandbox/policy/sandbox_type.h" +#include "sandbox/policy/mojom/sandbox.mojom.h" +#include "sandbox/policy/switches.h" +#include "sandbox/sandbox_buildflags.h" + +#if BUILDFLAG(USING_SANITIZER) +#include +#endif + +#if defined(USE_NSS_CERTS) +#include "crypto/nss_util.h" +#endif + -+#include "ui/gfx/x/connection.h" +#include "ui/gfx/font_util.h" + -+#include -+ +#define MAXTOKENS 3 + +#define _UNVEIL_MAIN "/etc/ungoogled-chromium/unveil.main"; +#define _UNVEIL_RENDERER "/etc/ungoogled-chromium/unveil.renderer"; +#define _UNVEIL_GPU "/etc/ungoogled-chromium/unveil.gpu"; +#define _UNVEIL_PLUGIN "/etc/ungoogled-chromium/unveil.plugin"; +#define _UNVEIL_UTILITY "/etc/ungoogled-chromium/unveil.utility"; +#define _UNVEIL_UTILITY_NETWORK "/etc/ungoogled-chromium/unveil.utility_network"; +#define _UNVEIL_UTILITY_AUDIO "/etc/ungoogled-chromium/unveil.utility_audio"; +#define _UNVEIL_UTILITY_VIDEO "/etc/ungoogled-chromium/unveil.utility_video"; + +namespace sandbox { +namespace policy { + +SandboxLinux::SandboxLinux() + : sandbox_status_flags_(kInvalid), + pre_initialized_(false), + initialize_sandbox_ran_(false), + broker_process_(nullptr) { +} + +SandboxLinux::~SandboxLinux() { + if (pre_initialized_) { + CHECK(initialize_sandbox_ran_); + } +} + +SandboxLinux* SandboxLinux::GetInstance() { + SandboxLinux* instance = base::Singleton::get(); + CHECK(instance); + return instance; +} + +void SandboxLinux::StopThread(base::Thread* thread) { + DCHECK(thread); + thread->Stop(); +} + +void SandboxLinux::PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type) { + CHECK(!pre_initialized_); +#if BUILDFLAG(USING_SANITIZER) + // Sanitizers need to open some resources before the sandbox is enabled. + // This should not fork, not launch threads, not open a directory. + __sanitizer_sandbox_on_notify(sanitizer_args()); + sanitizer_args_.reset(); +#endif + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + const std::string process_type = + command_line->GetSwitchValueASCII(switches::kProcessType); + + base::SysInfo::AmountOfPhysicalMemory(); + base::SysInfo::NumberOfProcessors(); + +#if defined(USE_NSS_CERTS) + // The main process has to initialize the ~/.pki dir which won't work + // after unveil(2). + if (process_type.empty()) + crypto::EnsureNSSInit(); +#endif + -+ // cache the XErrorDB by forcing a read on it -+ { -+ auto* connection = x11::Connection::Get(); -+ auto* display = connection->GetXlibDisplay().display(); -+ -+ char buf[1]; -+ XGetErrorDatabaseText(display, "XProtoError", "0", "", buf, std::size(buf)); -+ } -+ + if (process_type.empty()) { + base::FilePath cache_directory, local_directory; + + base::PathService::Get(base::DIR_CACHE, &cache_directory); + base::PathService::Get(base::DIR_HOME, &local_directory); + + cache_directory = cache_directory.AppendASCII("ungoogled-chromium"); + local_directory = local_directory.AppendASCII(".local").AppendASCII("share").AppendASCII("applications"); + + if (!base::CreateDirectory(cache_directory)) { + LOG(ERROR) << "Failed to create " << cache_directory.value() << " directory."; + } + + if (!base::CreateDirectory(local_directory)) { + LOG(ERROR) << "Failed to create " << local_directory.value() << " directory."; + } + } + + if (process_type == switches::kRendererProcess) + gfx::InitializeFonts(); + + pre_initialized_ = true; +} + +bool SandboxLinux::InitializeSandbox(sandbox::mojom::Sandbox sandbox_type, + SandboxLinux::PreSandboxHook hook, + const Options& options) { + DCHECK(!initialize_sandbox_ran_); + initialize_sandbox_ran_ = true; + + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + const std::string process_type = + command_line->GetSwitchValueASCII(switches::kProcessType); + + if (command_line->HasSwitch(switches::kNoSandbox)) + return true; + + VLOG(1) << "SandboxLinux::InitializeSandbox: process_type=" + << process_type << " sandbox_type=" << GetSandboxTypeInEnglish(sandbox_type); + + // Only one thread is running, pre-initialize if not already done. + if (!pre_initialized_) + PreinitializeSandbox(sandbox_type); + + // Attempt to limit the future size of the address space of the process. + int error = 0; + const bool limited_as = LimitAddressSpace(&error); + if (error) { + // Restore errno. Internally to |LimitAddressSpace|, the errno due to + // setrlimit may be lost. + errno = error; + PCHECK(limited_as); + } + + return true; +} + +bool SandboxLinux::LimitAddressSpace(int* error) { +#if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \ + !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER) + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + if (SandboxTypeFromCommandLine(*command_line) == sandbox::mojom::Sandbox::kNoSandbox) { + return false; + } + + // Unfortunately, it does not appear possible to set RLIMIT_AS such that it + // will both (a) be high enough to support V8's and WebAssembly's address + // space requirements while also (b) being low enough to mitigate exploits + // using integer overflows that require large allocations, heap spray, or + // other memory-hungry attack modes. + + *error = sandbox::ResourceLimits::Lower( + RLIMIT_DATA, static_cast(sandbox::kDataSizeLimit)); + + // Cache the resource limit before turning on the sandbox. + base::SysInfo::AmountOfVirtualMemory(); + base::SysInfo::MaxSharedMemorySize(); + + return *error == 0; +#else + base::SysInfo::AmountOfVirtualMemory(); + return false; +#endif // !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && + // !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER) +} + +// static +std::string SandboxLinux::GetSandboxTypeInEnglish(sandbox::mojom::Sandbox sandbox_type) { + switch (sandbox_type) { + case sandbox::mojom::Sandbox::kNoSandbox: + return "Unsandboxed"; + case sandbox::mojom::Sandbox::kRenderer: + return "Renderer"; + case sandbox::mojom::Sandbox::kUtility: + return "Utility"; + case sandbox::mojom::Sandbox::kGpu: + return "GPU"; + case sandbox::mojom::Sandbox::kPpapi: + return "PPAPI"; + case sandbox::mojom::Sandbox::kNetwork: + return "Network"; + case sandbox::mojom::Sandbox::kCdm: + return "CDM"; + case sandbox::mojom::Sandbox::kPrintCompositor: + return "Print Compositor"; + case sandbox::mojom::Sandbox::kAudio: + return "Audio"; + case sandbox::mojom::Sandbox::kSpeechRecognition: + return "Speech Recognition"; + case sandbox::mojom::Sandbox::kService: + return "Service"; + case sandbox::mojom::Sandbox::kVideoCapture: + return "Video Capture"; + default: + return "Unknown"; + } +} + +} // namespace policy +} // namespace sandbox diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc b/www/ungoogled-chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc index 9861f34c7f73..c7b7a11f99fd 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc @@ -1,416 +1,404 @@ ---- sandbox/policy/openbsd/sandbox_openbsd.cc.orig 2022-10-01 07:40:07 UTC +--- sandbox/policy/openbsd/sandbox_openbsd.cc.orig 2023-02-11 09:11:04 UTC +++ sandbox/policy/openbsd/sandbox_openbsd.cc -@@ -0,0 +1,413 @@ +@@ -0,0 +1,401 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "sandbox/policy/openbsd/sandbox_openbsd.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "base/bind.h" +#include "base/callback_helpers.h" +#include "base/command_line.h" +#include "base/debug/stack_trace.h" +#include "base/feature_list.h" +#include "base/files/file_path.h" +#include "base/files/file_util.h" +#include "base/files/scoped_file.h" +#include "base/logging.h" +#include "base/memory/singleton.h" +#include "base/path_service.h" +#include "base/posix/eintr_wrapper.h" +#include "base/strings/string_number_conversions.h" +#include "base/system/sys_info.h" +#include "base/threading/thread.h" +#include "base/time/time.h" +#include "build/build_config.h" +#include "sandbox/constants.h" +#include "sandbox/linux/services/credentials.h" +#include "sandbox/linux/services/namespace_sandbox.h" +#include "sandbox/linux/services/proc_util.h" +#include "sandbox/linux/services/resource_limits.h" +#include "sandbox/linux/services/thread_helpers.h" +#include "sandbox/linux/syscall_broker/broker_command.h" +#include "sandbox/linux/syscall_broker/broker_process.h" +#include "sandbox/policy/sandbox.h" +#include "sandbox/policy/sandbox_type.h" +#include "sandbox/policy/mojom/sandbox.mojom.h" +#include "sandbox/policy/switches.h" +#include "sandbox/sandbox_buildflags.h" + +#if BUILDFLAG(USING_SANITIZER) +#include +#endif + +#if defined(USE_NSS_CERTS) +#include "crypto/nss_util.h" +#endif + +#include "third_party/boringssl/src/include/openssl/crypto.h" + -+#include "ui/gfx/x/connection.h" +#include "ui/gfx/font_util.h" + -+#include -+ +#define MAXTOKENS 3 + +#define _UNVEIL_MAIN "/etc/ungoogled-chromium/unveil.main"; +#define _UNVEIL_RENDERER "/etc/ungoogled-chromium/unveil.renderer"; +#define _UNVEIL_GPU "/etc/ungoogled-chromium/unveil.gpu"; +#define _UNVEIL_PLUGIN "/etc/ungoogled-chromium/unveil.plugin"; +#define _UNVEIL_UTILITY "/etc/ungoogled-chromium/unveil.utility"; +#define _UNVEIL_UTILITY_NETWORK "/etc/ungoogled-chromium/unveil.utility_network"; +#define _UNVEIL_UTILITY_AUDIO "/etc/ungoogled-chromium/unveil.utility_audio"; +#define _UNVEIL_UTILITY_VIDEO "/etc/ungoogled-chromium/unveil.utility_video"; + +namespace sandbox { +namespace policy { + +SandboxLinux::SandboxLinux() + : unveil_initialized_(false), + sandbox_status_flags_(kInvalid), + pre_initialized_(false), + initialize_sandbox_ran_(false), + broker_process_(nullptr) { +} + +SandboxLinux::~SandboxLinux() { + if (pre_initialized_) { + CHECK(initialize_sandbox_ran_); + } +} + +SandboxLinux* SandboxLinux::GetInstance() { + SandboxLinux* instance = base::Singleton::get(); + CHECK(instance); + return instance; +} + +void SandboxLinux::StopThread(base::Thread* thread) { + DCHECK(thread); + thread->Stop(); +} + +void SandboxLinux::PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type) { + CHECK(!pre_initialized_); +#if BUILDFLAG(USING_SANITIZER) + // Sanitizers need to open some resources before the sandbox is enabled. + // This should not fork, not launch threads, not open a directory. + __sanitizer_sandbox_on_notify(sanitizer_args()); + sanitizer_args_.reset(); +#endif + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + const std::string process_type = + command_line->GetSwitchValueASCII(switches::kProcessType); + + base::SysInfo::AmountOfPhysicalMemory(); + base::SysInfo::NumberOfProcessors(); + base::SysInfo::CPUModelName(); + +#if defined(USE_NSS_CERTS) + // The main process has to initialize the ~/.pki dir which won't work + // after unveil(2). + if (process_type.empty()) + crypto::EnsureNSSInit(); +#endif + + if (process_type.empty()) + CRYPTO_pre_sandbox_init(); + -+ // cache the XErrorDB by forcing a read on it -+ { -+ auto* connection = x11::Connection::Get(); -+ auto* display = connection->GetXlibDisplay().display(); -+ -+ char buf[1]; -+ XGetErrorDatabaseText(display, "XProtoError", "0", "", buf, std::size(buf)); -+ } -+ + if (process_type.empty()) { + base::FilePath cache_directory, local_directory; + + base::PathService::Get(base::DIR_CACHE, &cache_directory); + base::PathService::Get(base::DIR_HOME, &local_directory); + + cache_directory = cache_directory.AppendASCII("ungoogled-chromium"); + local_directory = local_directory.AppendASCII(".local").AppendASCII("share").AppendASCII("applications"); + + if (!base::CreateDirectory(cache_directory)) { + LOG(ERROR) << "Failed to create " << cache_directory.value() << " directory."; + } + + if (!base::CreateDirectory(local_directory)) { + LOG(ERROR) << "Failed to create " << local_directory.value() << " directory."; + } + } + + if (process_type == switches::kRendererProcess) + gfx::InitializeFonts(); + + if (!command_line->HasSwitch(switches::kDisableUnveil)) + SetUnveil(process_type, sandbox_type); + + pre_initialized_ = true; +} + +bool SandboxLinux::SetPledge(const char *pstring, const char *ppath) { + FILE *fp; + char *s = NULL; + size_t len = 0; + ssize_t read; + + if (pstring != NULL) { + if (pledge(pstring, NULL) == -1) + goto err; + } else if (ppath != NULL) { + fp = fopen(ppath, "r"); + if (fp != NULL) { + while ((read = getline(&s, &len, fp)) != -1 ) { + if (s[strlen(s)-1] == '\n') + s[strlen(s)-1] = '\0'; + if (pledge(s, NULL) == -1) + goto err; + } + fclose(fp); + } else { + LOG(ERROR) << "fopen() failed, errno: " << errno; + return false; + } + } + return true; +err: + LOG(ERROR) << "pledge() failed, errno: " << errno; + return false; +} + +bool SandboxLinux::SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type) { + FILE *fp; + char *s = NULL, *cp = NULL, *home = NULL, **ap, *tokens[MAXTOKENS]; + char path[PATH_MAX]; + const char *ufile; + size_t len = 0, lineno = 0; + + if (process_type.empty()) { + ufile = _UNVEIL_MAIN; + } else if (process_type == switches::kRendererProcess) { + ufile = _UNVEIL_RENDERER; + } else if (process_type == switches::kGpuProcess) { + ufile = _UNVEIL_GPU; + } else if (process_type == switches::kPpapiPluginProcess) { + ufile = _UNVEIL_PLUGIN; + } else if (process_type == switches::kUtilityProcess) { + if (sandbox_type == sandbox::mojom::Sandbox::kNetwork) { + ufile = _UNVEIL_UTILITY_NETWORK; + } else if (sandbox_type == sandbox::mojom::Sandbox::kAudio) { + ufile = _UNVEIL_UTILITY_AUDIO; + } else if (sandbox_type == sandbox::mojom::Sandbox::kVideoCapture) { + ufile = _UNVEIL_UTILITY_VIDEO; + } else { + ufile = _UNVEIL_UTILITY; + } + } + + fp = fopen(ufile, "r"); + if (fp != NULL) { + while (!feof(fp)) { + if ((s = fparseln(fp, &len, &lineno, NULL, + FPARSELN_UNESCCOMM | FPARSELN_UNESCCONT)) == NULL) { + if (ferror(fp)) { + LOG(ERROR) << "ferror(), errno: " << errno; + _exit(1); + } else { + continue; + } + } + cp = s; + cp += strspn(cp, " \t\n"); /* eat whitespace */ + if (cp[0] == '\0') + continue; + + for (ap = tokens; ap < &tokens[MAXTOKENS - 1] && + (*ap = strsep(&cp, " \t")) != NULL;) { + if (**ap != '\0') + ap++; + } + *ap = NULL; + + if (tokens[1] == NULL) { + LOG(ERROR) << ufile << ": line " << lineno << ": must supply value to " << s; + _exit(1); + } + + if (tokens[0][0] == '~') { + if ((home = getenv("HOME")) == NULL || *home == '\0') { + LOG(ERROR) << "failed to get home"; + _exit(1); + } + memmove(tokens[0], tokens[0] + 1, strlen(tokens[0])); + strncpy(path, home, sizeof(path) - 1); + path[sizeof(path) - 1] = '\0'; + strncat(path, tokens[0], sizeof(path) - 1 - strlen(path)); + } else { + strncpy(path, tokens[0], sizeof(path) - 1); + path[sizeof(path) - 1] = '\0'; + } + + if (unveil(path, tokens[1]) == -1) { + LOG(ERROR) << "failed unveiling " << path << " with permissions " << tokens[1]; + _exit(1); + } else { + VLOG(1) << "unveiling " << path << " with permissions " << tokens[1]; + } + } + fclose(fp); + } else { + LOG(ERROR) << "failed to open " << ufile << " errno: " << errno; + _exit(1); + } + + unveil_initialized_ = true; + + return true; +} + +bool SandboxLinux::unveil_initialized() const { + return unveil_initialized_; +} + +bool SandboxLinux::InitializeSandbox(sandbox::mojom::Sandbox sandbox_type, + SandboxLinux::PreSandboxHook hook, + const Options& options) { + DCHECK(!initialize_sandbox_ran_); + initialize_sandbox_ran_ = true; + + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + const std::string process_type = + command_line->GetSwitchValueASCII(switches::kProcessType); + + if (command_line->HasSwitch(switches::kNoSandbox)) + return true; + + VLOG(1) << "SandboxLinux::InitializeSandbox: process_type=" + << process_type << " sandbox_type=" << GetSandboxTypeInEnglish(sandbox_type); + + // Only one thread is running, pre-initialize if not already done. + if (!pre_initialized_) + PreinitializeSandbox(sandbox_type); + + // Attempt to limit the future size of the address space of the process. + int error = 0; + const bool limited_as = LimitAddressSpace(&error); + if (error) { + // Restore errno. Internally to |LimitAddressSpace|, the errno due to + // setrlimit may be lost. + errno = error; + PCHECK(limited_as); + } + + if (process_type.empty()) { + // XXX use a file for listing pledges of the main process for now + // XXX not having the file is not a fatal error + SetPledge(NULL, "/etc/ungoogled-chromium/pledge.main"); + } else if (process_type == switches::kRendererProcess) { + // prot_exec needed by v8 + // flock needed by sqlite3 locking + SetPledge("stdio rpath flock prot_exec recvfd sendfd ps", NULL); + } else if (process_type == switches::kGpuProcess) { + SetPledge("stdio rpath cpath wpath getpw drm prot_exec recvfd sendfd tmppath", NULL); + } else if (process_type == switches::kPpapiPluginProcess) { + // prot_exec needed by v8 + SetPledge("stdio rpath prot_exec recvfd sendfd", NULL); + } else if (process_type == switches::kUtilityProcess) { + if (sandbox_type == sandbox::mojom::Sandbox::kAudio) + SetPledge(NULL, "/etc/ungoogled-chromium/pledge.utility_audio"); + else if (sandbox_type == sandbox::mojom::Sandbox::kNetwork) + SetPledge(NULL, "/etc/ungoogled-chromium/pledge.utility_network"); + else if (sandbox_type == sandbox::mojom::Sandbox::kVideoCapture) + SetPledge(NULL, "/etc/ungoogled-chromium/pledge.utility_video"); + else + SetPledge("stdio rpath cpath wpath fattr flock sendfd recvfd prot_exec", NULL); + } else { + LOG(ERROR) << "non-pledge()'d process: " << process_type; + return false; + } + + return true; +} + +bool SandboxLinux::LimitAddressSpace(int* error) { +#if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \ + !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER) + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + if (SandboxTypeFromCommandLine(*command_line) == sandbox::mojom::Sandbox::kNoSandbox) { + return false; + } + + // Unfortunately, it does not appear possible to set RLIMIT_AS such that it + // will both (a) be high enough to support V8's and WebAssembly's address + // space requirements while also (b) being low enough to mitigate exploits + // using integer overflows that require large allocations, heap spray, or + // other memory-hungry attack modes. + + *error = sandbox::ResourceLimits::Lower( + RLIMIT_DATA, static_cast(sandbox::kDataSizeLimit)); + + // Cache the resource limit before turning on the sandbox. + base::SysInfo::AmountOfVirtualMemory(); + base::SysInfo::MaxSharedMemorySize(); + + return *error == 0; +#else + base::SysInfo::AmountOfVirtualMemory(); + return false; +#endif // !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && + // !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER) +} + +// static +std::string SandboxLinux::GetSandboxTypeInEnglish(sandbox::mojom::Sandbox sandbox_type) { + switch (sandbox_type) { + case sandbox::mojom::Sandbox::kNoSandbox: + return "Unsandboxed"; + case sandbox::mojom::Sandbox::kRenderer: + return "Renderer"; + case sandbox::mojom::Sandbox::kUtility: + return "Utility"; + case sandbox::mojom::Sandbox::kGpu: + return "GPU"; + case sandbox::mojom::Sandbox::kPpapi: + return "PPAPI"; + case sandbox::mojom::Sandbox::kNetwork: + return "Network"; + case sandbox::mojom::Sandbox::kCdm: + return "CDM"; + case sandbox::mojom::Sandbox::kPrintCompositor: + return "Print Compositor"; + case sandbox::mojom::Sandbox::kAudio: + return "Audio"; + case sandbox::mojom::Sandbox::kSpeechRecognition: + return "Speech Recognition"; + case sandbox::mojom::Sandbox::kService: + return "Service"; + case sandbox::mojom::Sandbox::kVideoCapture: + return "Video Capture"; + default: + return "Unknown"; + } +} + +} // namespace policy +} // namespace sandbox diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_switches.cc b/www/ungoogled-chromium/files/patch-sandbox_policy_switches.cc index 2dd222e964dc..23d0cb3b2c20 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_switches.cc +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_switches.cc @@ -1,26 +1,26 @@ ---- sandbox/policy/switches.cc.orig 2023-01-13 08:56:02 UTC +--- sandbox/policy/switches.cc.orig 2023-02-11 09:11:04 UTC +++ sandbox/policy/switches.cc -@@ -54,10 +54,10 @@ const char kWindowsSystemProxyResolverSandbox[] = "pro +@@ -53,10 +53,10 @@ const char kWindowsSystemProxyResolverSandbox[] = "pro const char kMirroringSandbox[] = "mirroring"; #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) const char kHardwareVideoDecodingSandbox[] = "hardware_video_decoding"; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kHardwareVideoEncodingSandbox[] = "hardware_video_encoding"; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -104,7 +104,9 @@ const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-f +@@ -103,7 +103,9 @@ const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-f // Meant to be used as a browser-level switch for testing purposes only. const char kNoSandbox[] = "no-sandbox"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +const char kDisableUnveil[] = "disable-unveil"; + +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Instructs the zygote to launch without a sandbox. Processes forked from this // type of zygote will apply their own custom sandboxes later. const char kNoZygoteSandbox[] = "no-zygote-sandbox"; diff --git a/www/ungoogled-chromium/files/patch-services_device_geolocation_location__arbitrator.cc b/www/ungoogled-chromium/files/patch-services_device_geolocation_location__arbitrator.cc index 5e388fd6e4a5..b176885b825e 100644 --- a/www/ungoogled-chromium/files/patch-services_device_geolocation_location__arbitrator.cc +++ b/www/ungoogled-chromium/files/patch-services_device_geolocation_location__arbitrator.cc @@ -1,11 +1,11 @@ ---- services/device/geolocation/location_arbitrator.cc.orig 2022-10-01 07:40:07 UTC +--- services/device/geolocation/location_arbitrator.cc.orig 2023-02-11 09:11:04 UTC +++ services/device/geolocation/location_arbitrator.cc -@@ -161,7 +161,7 @@ LocationArbitrator::NewNetworkLocationProvider( +@@ -158,7 +158,7 @@ LocationArbitrator::NewNetworkLocationProvider( std::unique_ptr LocationArbitrator::NewSystemLocationProvider() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) return nullptr; #else return device::NewSystemLocationProvider(main_task_runner_, diff --git a/www/ungoogled-chromium/files/patch-services_network_BUILD.gn b/www/ungoogled-chromium/files/patch-services_network_BUILD.gn index 3fef10d465c4..49f9b63b91c8 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-01-13 08:56:02 UTC +--- services/network/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ services/network/BUILD.gn -@@ -336,7 +336,6 @@ if (is_linux || is_chromeos) { +@@ -334,7 +334,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_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc b/www/ungoogled-chromium/files/patch-services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc new file mode 100644 index 000000000000..d0e94811411c --- /dev/null +++ b/www/ungoogled-chromium/files/patch-services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc @@ -0,0 +1,11 @@ +--- services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc.orig 2023-02-11 09:11:04 UTC ++++ services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc +@@ -37,7 +37,7 @@ + #include "third_party/perfetto/protos/perfetto/trace/track_event/process_descriptor.pbzero.h" + #include "third_party/perfetto/protos/perfetto/trace/track_event/thread_descriptor.pbzero.h" + +-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_APPLE) ++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) + #include "base/profiler/thread_delegate_posix.h" + #define INITIALIZE_THREAD_DELEGATE_POSIX 1 + #else // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_APPLE) diff --git a/www/ungoogled-chromium/files/patch-third__party_angle_BUILD.gn b/www/ungoogled-chromium/files/patch-third__party_angle_BUILD.gn index af0ca5e66e13..8b6a2b188f70 100644 --- a/www/ungoogled-chromium/files/patch-third__party_angle_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-third__party_angle_BUILD.gn @@ -1,47 +1,47 @@ ---- third_party/angle/BUILD.gn.orig 2023-01-13 08:56:02 UTC +--- third_party/angle/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ third_party/angle/BUILD.gn -@@ -276,7 +276,6 @@ config("extra_warnings") { +@@ -279,7 +279,6 @@ config("extra_warnings") { "-Wtautological-type-limit-compare", "-Wundefined-reinterpret-cast", "-Wunneeded-internal-declaration", - "-Wunused-but-set-variable", "-Wsuggest-destructor-override", "-Wsuggest-override", -@@ -459,7 +458,7 @@ angle_static_library("angle_common") { +@@ -465,7 +464,7 @@ angle_static_library("angle_common") { all_dependent_configs = [ ":angle_disable_pool_alloc" ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { libs = [ "dl" ] } -@@ -601,6 +600,9 @@ angle_static_library("angle_gpu_info_util") { +@@ -607,6 +606,9 @@ angle_static_library("angle_gpu_info_util") { "Xi", "Xext", ] + if (is_bsd) { + libs += [ "GL" ] + } } if (angle_use_wayland && angle_has_build) { -@@ -1104,12 +1106,12 @@ if (angle_use_wayland) { +@@ -1092,12 +1094,12 @@ if (angle_use_wayland) { "wayland-client", "wayland-egl", ] + } else { + include_dirs = [ + "$wayland_dir/egl", + "$wayland_dir/src", + ] } - - include_dirs = [ - "$wayland_dir/egl", - "$wayland_dir/src", - ] } group("angle_wayland") { 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 2641987a36c5..f67e12f16164 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-01-13 08:56:02 UTC +--- third_party/angle/src/libANGLE/Display.cpp.orig 2023-02-11 09:11:04 UTC +++ third_party/angle/src/libANGLE/Display.cpp @@ -55,7 +55,7 @@ # include "libANGLE/renderer/gl/wgl/DisplayWGL.h" # elif defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_IOS) # include "libANGLE/renderer/gl/apple/DisplayApple_api.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_GBM) - # include "libANGLE/renderer/gl/egl/gbm/DisplayGbm.h" -@@ -346,7 +346,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di + # if defined(ANGLE_USE_X11) + # include "libANGLE/renderer/gl/glx/DisplayGLX.h" +@@ -343,7 +343,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di impl = rx::CreateDisplayCGLOrEAGL(state); break; -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_GBM) if (platformType == 0) { -@@ -389,7 +389,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -384,7 +384,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 || platformType == EGL_PLATFORM_VULKAN_DISPLAY_MODE_HEADLESS_ANGLE) -@@ -440,7 +440,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -433,7 +433,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()) { -@@ -2042,7 +2042,7 @@ static ClientExtensions GenerateClientExtensions() +@@ -2038,7 +2038,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_angle_util_BUILD.gn b/www/ungoogled-chromium/files/patch-third__party_angle_util_BUILD.gn index f485561339b3..51299e14502f 100644 --- a/www/ungoogled-chromium/files/patch-third__party_angle_util_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-third__party_angle_util_BUILD.gn @@ -1,11 +1,11 @@ ---- third_party/angle/util/BUILD.gn.orig 2023-01-13 08:56:02 UTC +--- third_party/angle/util/BUILD.gn.orig 2023-02-11 09:11:04 UTC +++ third_party/angle/util/BUILD.gn -@@ -271,7 +271,7 @@ foreach(is_shared_library, +@@ -292,7 +292,7 @@ foreach(is_shared_library, ] libs = [] - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { libs += [ "rt", "dl", 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 c4aba457ba79..955a57a4b7b7 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-01-13 08:56:02 UTC +--- third_party/blink/public/platform/platform.h.orig 2023-02-11 09:11:04 UTC +++ third_party/blink/public/platform/platform.h -@@ -351,7 +351,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -357,7 +357,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_exported_web__view__impl.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc index 637246b70b07..3cc6afa0f131 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 2022-12-02 17:56:32 UTC +--- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2023-02-11 09:11:04 UTC +++ third_party/blink/renderer/core/exported/web_view_impl.cc @@ -408,7 +408,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' -@@ -3278,7 +3278,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs +@@ -3296,7 +3296,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 bda5749f6797..e71c3f282110 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-01-13 08:56:02 UTC +--- third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2023-02-11 09:11:04 UTC +++ third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -6449,7 +6449,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { +@@ -6451,7 +6451,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { MoveCaretStaysHorizontallyAlignedWhenMoved #endif // TODO(crbug.com/1317375): Build these tests on all platforms. -#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) TEST_F(WebFrameTest, MAYBE_SelectRangeStaysHorizontallyAlignedWhenMoved) { RegisterMockedHttpURLLoad("move_caret.html"); -@@ -6846,7 +6846,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc +@@ -6848,7 +6848,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_paint_paint__layer.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc index 298e982038e1..d24e65ace991 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-01-13 08:56:02 UTC +--- third_party/blink/renderer/core/paint/paint_layer.cc.orig 2023-02-11 09:11:04 UTC +++ third_party/blink/renderer/core/paint/paint_layer.cc -@@ -113,7 +113,7 @@ namespace blink { +@@ -114,7 +114,7 @@ namespace blink { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) struct SameSizeAsPaintLayer : GarbageCollected, DisplayItemClient { // The bit fields may fit into the machine word of DisplayItemClient which // has only 8-bit data. diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc index edee89048627..b068f43b0b37 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-01-13 08:56:02 UTC +--- third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc.orig 2023-02-11 09:11:04 UTC +++ third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc -@@ -114,7 +114,7 @@ class SharedXnnpackContext : public ThreadSafeRefCount +@@ -169,7 +169,7 @@ class SharedXnnpackContext : public ThreadSafeRefCount ~SharedXnnpackContext() { base::AutoLock auto_lock(SharedXnnpackContextLock()); -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // For Linux and ChromeOS, cpuinfo needs to parse /proc/cpuinfo to // initialize in pre sandbox stage. Calling xnn_deinitialize() here will // deinitialize cpuinfo within sandbox and cannot access /proc/cpuinfo diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc index 014cd80a202f..9e3411a8bb38 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-01-13 08:56:02 UTC +--- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2023-02-11 09:11:04 UTC +++ third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -6153,7 +6153,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid +@@ -6159,7 +6159,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