diff --git a/www/ungoogled-chromium/Makefile b/www/ungoogled-chromium/Makefile index 07f88286d389..302b3c6f0755 100644 --- a/www/ungoogled-chromium/Makefile +++ b/www/ungoogled-chromium/Makefile @@ -1,379 +1,394 @@ PORTNAME= ungoogled-chromium -PORTVERSION= 113.0.5672.126 +PORTVERSION= 114.0.5735.90 UGVERSION= ${DISTVERSION}-1 CATEGORIES= www wayland MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ https://nerd.hu/distfiles/:external DISTFILES= chromium-${DISTVERSION}${EXTRACT_SUFX} \ ungoogled-chromium-${UGVERSION}.tar.gz:external MAINTAINER= chromium@FreeBSD.org COMMENT= Google web browser based on WebKit sans integration with Google WWW= https://github.com/ungoogled-software/ungoogled-chromium LICENSE= BSD3CLAUSE LGPL21 MPL11 LICENSE_COMB= multi ONLY_FOR_ARCHS= aarch64 amd64 i386 PATCH_DEPENDS= gpatch:devel/patch \ ${PYTHON_VERSION}:lang/python${PYTHON_SUFFIX} BUILD_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \ gperf:devel/gperf \ flock:sysutils/flock \ node:www/node \ xcb-proto>0:x11/xcb-proto \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ ${LOCALBASE}/share/usbids/usb.ids:misc/usbids \ ${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib@${PY_FLAVOR} \ ${LOCALBASE}/include/va/va.h:multimedia/libva \ ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri \ ${LOCALBASE}/libdata/pkgconfig/Qt5Core.pc:devel/qt5-core \ ${LOCALBASE}/libdata/pkgconfig/Qt5Widgets.pc:x11-toolkits/qt5-widgets LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-core \ libatspi.so:accessibility/at-spi2-core \ libspeechd.so:accessibility/speech-dispatcher \ libsnappy.so:archivers/snappy \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libepoll-shim.so:devel/libepoll-shim \ libevent.so:devel/libevent \ libffi.so:devel/libffi \ libicuuc.so:devel/icu \ libjsoncpp.so:devel/jsoncpp \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libcairo.so:graphics/cairo \ libdrm.so:graphics/libdrm \ libexif.so:graphics/libexif \ libpng.so:graphics/png \ libwebp.so:graphics/webp \ libdav1d.so:multimedia/dav1d \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libfontconfig.so:x11-fonts/fontconfig \ libwayland-client.so:graphics/wayland \ libxkbcommon.so:x11/libxkbcommon \ libxshmfence.so:x11/libxshmfence RUN_DEPENDS= xdg-open:devel/xdg-utils \ noto-basic>0:x11-fonts/noto-basic -USES= bison compiler:c++17-lang cpe desktop-file-utils gl gnome iconv:wchar_t jpeg \ - localbase:ldflags ninja perl5 pkgconfig python:3.7+,build qt:5 shebangfix \ - tar:xz xorg +USES= bison compiler:c++17-lang cpe desktop-file-utils gl gmake gnome \ + iconv:wchar_t 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_udev=false \ extra_cxxflags="${CXXFLAGS}" \ - extra_ldflags="${LDFLAGS}" + extra_ldflags="${LDFLAGS}" \ + ffmpeg_branding="${FFMPEG_BRAND}" # sync with flags.gni GN_ARGS+= build_with_tflite_lib=false \ chrome_pgo_phase=0 \ clang_use_chrome_plugins=false \ disable_fieldtrial_testing_config=true \ enable_backup_ref_ptr_support=false \ enable_hangout_services_extension=false \ enable_mdns=false \ enable_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 +CODECS_VARS= GN_ARGS+=proprietary_codecs=true \ + FFMPEG_BRAND="Chrome" +CODECS_VARS_OFF= GN_ARGS+=proprietary_codecs=false \ + FFMPEG_BRAND="Chromium" CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_VARS= GN_ARGS+=use_cups=true CUPS_VARS_OFF= GN_ARGS+=use_cups=false DEBUG_BUILD_DEPENDS= esbuild:devel/esbuild DEBUG_VARS= BUILDTYPE=Debug \ GN_ARGS+=is_debug=true \ GN_ARGS+=is_component_build=false \ GN_ARGS+=symbol_level=1 \ GN_BOOTSTRAP_FLAGS+=--debug \ WANTSPACE="21 GB" DEBUG_VARS_OFF= BUILDTYPE=Release \ GN_ARGS+=blink_symbol_level=0 \ GN_ARGS+=is_debug=false \ GN_ARGS+=is_official_build=true \ GN_ARGS+=symbol_level=0 \ WANTSPACE="14 GB" DRIVER_MAKE_ARGS= chromedriver HEIMDAL_LIB_DEPENDS= libkrb.so.26:security/heimdal KERBEROS_VARS= GN_ARGS+=use_kerberos=true KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false LTO_VARS= GN_ARGS+=use_thin_lto=true \ GN_ARGS+=thin_lto_enable_optimizations=true \ WANTSPACE="14 GB" LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false MIT_LIB_DEPENDS= libkrb.so.3:security/krb5 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 # for COMPILER_VERSION .if ${PORT_OPTIONS:MHEIMDAL_BASE} && !exists(/usr/lib/libkrb5.so) IGNORE= you have selected HEIMDAL_BASE but do not have Heimdal installed in base .endif .if ${COMPILER_VERSION} < 150 LLVM_DEFAULT= 15 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 +# - swiftshader/lib/{libEGL.so,libGLESv2.so} is x86 only +# - map ffmpeg target to ${ARCH} .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " -.else +FFMPEG_TARGET= arm64 +.elif ${ARCH} == amd64 +BUILD_DEPENDS+= nasm:devel/nasm +PLIST_SUB+= NOT_AARCH64="" +FFMPEG_TARGET= x64 +.elif ${ARCH} == i386 +BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" +FFMPEG_TARGET= ia32 .endif +FFMPEG_BDIR= ${WRKSRC}/third_party/ffmpeg/build.${FFMPEG_TARGET}.freebsd/${FFMPEG_BRAND} +FFMPEG_CDIR= ${WRKSRC}/third_party/ffmpeg/chromium/config/${FFMPEG_BRAND}/freebsd/${FFMPEG_TARGET} + # Allow relocations against read-only segments (override lld default) LDFLAGS_i386= -Wl,-znotext # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include WRKSRC= ${WRKDIR}/chromium-${DISTVERSION} pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "To build Ungoogled Chromium, you should have around 2GB of memory" @${ECHO_MSG} "and around ${WANTSPACE} of free disk space." @${ECHO_MSG} post-extract-TEST-on: @${MKDIR} ${WRKSRC}/third_party/test_fonts/test_fonts @${MV} ${WRKDIR}/test_fonts ${WRKSRC}/third_party/test_fonts/ pre-patch: cd ${WRKDIR}/ungoogled-chromium-${UGVERSION} && ${PYTHON_CMD} \ utils/prune_binaries.py ${WRKSRC} pruning.list cd ${WRKDIR}/ungoogled-chromium-${UGVERSION} && PATCH_BIN=gpatch \ ${PYTHON_CMD} utils/patches.py apply ${WRKSRC} patches cd ${WRKDIR}/ungoogled-chromium-${UGVERSION} && ${PYTHON_CMD} \ utils/domain_substitution.py apply -r domain_regex.list -f \ domain_substitution.list -c ${WRKSRC}/domsubcache.tar.gz ${WRKSRC} pre-configure: # We used to remove bundled libraries to be sure that chromium uses # system libraries and not shipped ones. # cd ${WRKSRC} && ${PYTHON_CMD} \ #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved] cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ ./build/linux/unbundle/replace_gn_files.py --system-libraries \ dav1d flac fontconfig freetype harfbuzz-ng icu libdrm libevent libpng \ libusb libwebp libxml libxslt openh264 opus snappy || ${FALSE} # Chromium uses an unreleased version of FFmpeg, so configure it -.for brand in Chrome Chromium - ${CP} -R \ - ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/linux/ \ - ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/freebsd + cd ${WRKSRC}/third_party/ffmpeg && \ + ${PYTHON_CMD} chromium/scripts/build_ffmpeg.py freebsd ${FFMPEG_TARGET} \ + --config-only --branding=${FFMPEG_BRAND} + cd ${FFMPEG_BDIR} && ${GMAKE} ffversion.h + ${MKDIR} ${FFMPEG_CDIR} +.for _e in config.h config.asm config_components.h libavcodec libavformat libavutil + -${CP} -pR ${FFMPEG_BDIR}/${_e} ${FFMPEG_CDIR} .endfor do-configure: # GN generator bootstrapping and generating ninja files cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \ READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn \ gen --args='${GN_ARGS}' out/${BUILDTYPE} # Setup nodejs dependency @${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin/node # Setup buildtools/freebsd @${MKDIR} ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/buildtools/linux64/clang-format ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/out/${BUILDTYPE}/gn ${WRKSRC}/buildtools/freebsd ${LN} -sf /usr/bin/strip ${WRKSRC}/buildtools/freebsd/strip do-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_MAN} ${WRKSRC}/chrome/app/resources/manpage.1.in \ ${STAGEDIR}${MANPREFIX}/man/man1/ungoogled-chromium.1 @${SED} -i "" -e 's,\@\@PACKAGE\@\@,chromium,g;s,\@\@MENUNAME\@\@,Chromium Web Browser,g' \ ${STAGEDIR}${MANPREFIX}/man/man1/ungoogled-chromium.1 ${CP} ${WRKSRC}/chrome/app/theme/chromium/product_logo_22_mono.png ${WRKSRC}/chrome/app/theme/chromium/product_logo_22.png .for s in 22 24 48 64 128 256 @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps ${INSTALL_DATA} ${WRKSRC}/chrome/app/theme/chromium/product_logo_${s}.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/ungoogled-chromium.png .endfor ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.png ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.pak ${STAGEDIR}${DATADIR} .for d in protoc mksnapshot ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor .for d in snapshot_blob.bin v8_context_snapshot.bin ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chrome \ ${STAGEDIR}${DATADIR}/ungoogled-chromium cd ${WRKSRC}/out/${BUILDTYPE} && \ ${COPYTREE_SHARE} "locales resources" ${STAGEDIR}${DATADIR} @${MKDIR} ${STAGEDIR}${DESKTOPDIR} ${INSTALL_DATA} ${WRKDIR}/ungoogled-chromium.desktop \ ${STAGEDIR}${DESKTOPDIR} ${INSTALL_SCRIPT} ${WRKDIR}/ungoogled-chromium ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/chrome/tools/build/linux/chrome-wrapper \ ${STAGEDIR}${DATADIR} # ANGLE, EGL, Vk .for f in libEGL.so libGLESv2.so libVkICD_mock_icd.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvulkan.so.1 \ ${STAGEDIR}${DATADIR}/libvulkan.so .if ${BUILDTYPE} == Debug ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libVkLayer_khronos_validation.so ${STAGEDIR}${DATADIR} .endif # SwiftShader .if ${ARCH} != aarch64 ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvk_swiftshader.so ${STAGEDIR}${DATADIR} .endif post-install-DEBUG-on: ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/*.so \ ${STAGEDIR}${DATADIR} ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/character_data_generator \ ${STAGEDIR}${DATADIR} post-install-DRIVER-on: ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver \ ${STAGEDIR}${PREFIX}/bin/ungoogled-chromedriver do-test-TEST-on: .for t in ${TEST_TARGETS} cd ${WRKSRC}/out/${BUILDTYPE} && ${SETENV} LC_ALL=en_US.UTF-8 \ ./${t} --gtest_filter=-${EXCLUDE_${t}:ts:} || ${TRUE} .endfor .include diff --git a/www/ungoogled-chromium/distinfo b/www/ungoogled-chromium/distinfo index 3551498cb7d1..cbe98e9d0686 100644 --- a/www/ungoogled-chromium/distinfo +++ b/www/ungoogled-chromium/distinfo @@ -1,9 +1,9 @@ -TIMESTAMP = 1684563730 -SHA256 (chromium-113.0.5672.126.tar.xz) = 0def7cd594304d7675821d42a4207377af98e321a78a91ee5200aea55adc2d93 -SIZE (chromium-113.0.5672.126.tar.xz) = 1556790928 -SHA256 (ungoogled-chromium-113.0.5672.126-1.tar.gz) = 1025329c38041b3b8b200fe3405d4b873345e87cba6333e036b83ad2f0000d3e -SIZE (ungoogled-chromium-113.0.5672.126-1.tar.gz) = 674145 -SHA256 (chromium-113.0.5672.126-testdata.tar.xz) = 89088e4cdc494ad5c468c7cf7e7ed26c4f76244d42ec74dac0ee141ead0fd6e6 -SIZE (chromium-113.0.5672.126-testdata.tar.xz) = 262980780 +TIMESTAMP = 1685990313 +SHA256 (chromium-114.0.5735.90.tar.xz) = 071a8620b6175923f91f0ce0e3a0b2b20bf350a7d1a0f5513c160df7c17526d8 +SIZE (chromium-114.0.5735.90.tar.xz) = 1570683592 +SHA256 (ungoogled-chromium-114.0.5735.90-1.tar.gz) = a96154372365e63444b4a3ee069636b53f59b74513e6d1a4e217713eb059db67 +SIZE (ungoogled-chromium-114.0.5735.90-1.tar.gz) = 679795 +SHA256 (chromium-114.0.5735.90-testdata.tar.xz) = 9ce66f3d7b60e5f74d0f4e4290b1e159b3346e4afb85373c745ac44fc1d14994 +SIZE (chromium-114.0.5735.90-testdata.tar.xz) = 256217488 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 58d02bbd3662..1c8f12a0d5c4 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-05-05 12:12:41 UTC +--- BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ BUILD.gn -@@ -60,7 +60,7 @@ declare_args() { +@@ -61,7 +61,7 @@ declare_args() { root_extra_deps = [] } -if (is_official_build) { +if (is_official_build && !is_bsd) { # An official (maximally optimized!) component (optimized for build times) # build doesn't make sense and usually doesn't work. assert(!is_component_build) -@@ -85,7 +85,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", -@@ -426,7 +425,7 @@ group("gn_all") { +@@ -95,7 +95,6 @@ group("gn_all") { + "//codelabs", + "//components:components_unittests", + "//components/gwp_asan:gwp_asan_unittests", +- "//infra/orchestrator:orchestrator_all", + "//net:net_unittests", + "//sandbox:sandbox_unittests", + "//services:services_unittests", +@@ -419,7 +418,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", -@@ -622,6 +621,15 @@ 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", +@@ -611,6 +610,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_bsd) { ++ deps -= [ ++ "//third_party/breakpad:dump_syms($host_toolchain)", ++ "//third_party/breakpad:microdump_stackwalk($host_toolchain)", ++ "//third_party/breakpad:minidump_dump($host_toolchain)", ++ "//third_party/breakpad:minidump_stackwalk($host_toolchain)", ++ ] ++ } + - if (is_mac) { - deps += [ - "//third_party/breakpad:dump_syms", -@@ -669,7 +677,7 @@ group("gn_all") { - host_os == "win") { - deps += [ "//chrome/test/mini_installer:mini_installer_tests" ] + if (is_mac) { + deps += [ + "//third_party/breakpad:dump_syms", +@@ -658,7 +666,7 @@ group("gn_all") { + host_os == "win") { + deps += [ "//chrome/test/mini_installer:mini_installer_tests" ] + } +- } else if (!is_android && !is_ios && !is_fuchsia) { ++ } else if (!is_android && !is_ios && !is_fuchsia && !is_bsd) { + deps += [ "//third_party/breakpad:symupload($host_toolchain)" ] } -- } 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)" ] - } -@@ -1092,7 +1100,7 @@ if (!is_ios) { +@@ -1088,7 +1096,7 @@ if (!is_ios && !is_cronet_build) { ] } - if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos) { + if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos && !is_bsd) { # WPT Webdriver tests runner # chrome/test/chromedriver/test/run_webdriver_tests.py script_test("webdriver_wpt_tests") { -@@ -1192,7 +1200,7 @@ if (!is_ios) { +@@ -1188,7 +1196,7 @@ if (!is_ios && !is_cronet_build) { data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ] } - if (!is_win && !is_android) { + if (!is_win && !is_android && !is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } -@@ -1201,7 +1209,7 @@ if (!is_ios) { +@@ -1197,7 +1205,7 @@ if (!is_ios && !is_cronet_build) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } - if (is_linux || is_chromeos) { + if ((is_linux && !is_bsd) || is_chromeos) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } -@@ -1669,7 +1677,7 @@ group("chromium_builder_perf") { +@@ -1664,7 +1672,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-ash_display_mirror__window__controller.cc b/www/ungoogled-chromium/files/patch-ash_display_mirror__window__controller.cc index 860e3163ba7d..40146623de3a 100644 --- a/www/ungoogled-chromium/files/patch-ash_display_mirror__window__controller.cc +++ b/www/ungoogled-chromium/files/patch-ash_display_mirror__window__controller.cc @@ -1,14 +1,14 @@ ---- ash/display/mirror_window_controller.cc.orig 2022-10-29 17:50:56 UTC +--- ash/display/mirror_window_controller.cc.orig 2023-06-05 19:39:05 UTC +++ ash/display/mirror_window_controller.cc -@@ -295,7 +295,11 @@ void MirrorWindowController::UpdateWindow( +@@ -296,7 +296,11 @@ void MirrorWindowController::UpdateWindow( if (!base::Contains(display_info_list, iter->first, &display::ManagedDisplayInfo::id)) { CloseAndDeleteHost(iter->second, true); +#if defined(__llvm__) + mirroring_host_info_map_.erase(iter++); +#else iter = mirroring_host_info_map_.erase(iter); +#endif } else { ++iter; } diff --git a/www/ungoogled-chromium/files/patch-base_BUILD.gn b/www/ungoogled-chromium/files/patch-base_BUILD.gn index ed38e02a0524..f259fecfbd2c 100644 --- a/www/ungoogled-chromium/files/patch-base_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-base_BUILD.gn @@ -1,143 +1,143 @@ ---- base/BUILD.gn.orig 2023-05-05 12:12:41 UTC +--- base/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ base/BUILD.gn -@@ -198,7 +198,7 @@ buildflag_header("ios_cronet_buildflags") { +@@ -197,7 +197,7 @@ buildflag_header("ios_cronet_buildflags") { flags = [ "CRONET_BUILD=$is_cronet_build" ] } -enable_message_pump_epoll = is_linux || is_chromeos || is_android +enable_message_pump_epoll = (is_linux || is_chromeos || is_android) && !is_bsd buildflag_header("message_pump_buildflags") { header = "message_pump_buildflags.h" header_dir = "base/message_loop" -@@ -1105,11 +1105,23 @@ component("base") { +@@ -1100,11 +1100,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", -@@ -1137,7 +1149,7 @@ component("base") { +@@ -1132,7 +1144,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", -@@ -1178,7 +1190,7 @@ component("base") { +@@ -1173,7 +1185,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" ] } -@@ -2135,6 +2147,43 @@ component("base") { +@@ -2127,6 +2139,43 @@ component("base") { } } + if (is_bsd) { + sources -= [ + "files/file_path_watcher_inotify.cc", + "files/scoped_file_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", + "profiler/stack_copier_signal.cc", + "profiler/stack_copier_signal.h", + "profiler/thread_delegate_posix.cc", + "profiler/thread_delegate_posix.h", + ] + sources += [ + "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 += [ -@@ -2244,7 +2293,7 @@ component("base") { +@@ -2236,7 +2285,7 @@ component("base") { } if (dep_libevent) { - deps += [ "//third_party/libevent" ] + public_deps += [ "//third_party/libevent" ] } if (use_libevent) { -@@ -3562,7 +3611,7 @@ test("base_unittests") { +@@ -3559,7 +3608,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", -@@ -3611,7 +3660,7 @@ test("base_unittests") { +@@ -3608,7 +3657,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", -@@ -3622,7 +3671,7 @@ test("base_unittests") { +@@ -3619,7 +3668,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" ] } -@@ -3848,7 +3897,7 @@ test("base_unittests") { +@@ -3843,7 +3892,7 @@ test("base_unittests") { } } - if (is_fuchsia || is_linux || is_chromeos) { + if ((is_fuchsia || is_linux || is_chromeos) && !is_bsd) { sources += [ "debug/elf_reader_unittest.cc", "debug/test_elf_image_builder.cc", diff --git a/www/ungoogled-chromium/files/patch-base_allocator_dispatcher_tls.h b/www/ungoogled-chromium/files/patch-base_allocator_dispatcher_tls.h index d1f54c7aafeb..4df995cf06b5 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_dispatcher_tls.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_dispatcher_tls.h @@ -1,11 +1,11 @@ ---- base/allocator/dispatcher/tls.h.orig 2023-02-11 09:11:04 UTC +--- base/allocator/dispatcher/tls.h.orig 2023-06-05 19:39:05 UTC +++ base/allocator/dispatcher/tls.h -@@ -51,7 +51,7 @@ struct BASE_EXPORT MMapAllocator { +@@ -50,7 +50,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.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator.h index 5f009ecca999..69ad7ed381aa 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/page_allocator.h.orig 2022-12-02 17:56:32 UTC +--- base/allocator/partition_allocator/page_allocator.h.orig 2023-06-05 19:39:05 UTC +++ base/allocator/partition_allocator/page_allocator.h -@@ -231,7 +231,7 @@ void DecommitAndZeroSystemPages(void* address, size_t +@@ -238,7 +238,7 @@ void DecommitAndZeroSystemPages(void* address, size_t // recommitted. Do not assume that this will not change over time. constexpr PA_COMPONENT_EXPORT( PARTITION_ALLOC) bool DecommittedMemoryIsAlwaysZeroed() { -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) return false; #else return true; diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h index 4bea35599953..7b0919bf7268 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-05-05 12:12:41 UTC +--- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2023-06-05 19:39:05 UTC +++ base/allocator/partition_allocator/page_allocator_internals_posix.h -@@ -383,8 +383,12 @@ bool TryRecommitSystemPagesInternal( +@@ -387,8 +387,12 @@ bool TryRecommitSystemPagesInternal( void DiscardSystemPagesInternal(uintptr_t address, size_t length) { void* ptr = reinterpret_cast(address); -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) +#if BUILDFLAG(IS_BSD) + int ret = madvise(ptr, length, MADV_FREE); +#else int ret = madvise(ptr, length, MADV_FREE_REUSABLE); +#endif if (ret) { // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED. ret = madvise(ptr, length, MADV_DONTNEED); diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni index 2b195ed5dcf6..ee687865cd45 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-05-05 12:12:41 UTC +--- base/allocator/partition_allocator/partition_alloc.gni.orig 2023-06-05 19:39:05 UTC +++ base/allocator/partition_allocator/partition_alloc.gni -@@ -285,7 +285,7 @@ assert(!use_asan_backup_ref_ptr || use_hookable_raw_pt +@@ -305,7 +305,7 @@ assert(!use_asan_backup_ref_ptr || use_hookable_raw_pt "AsanBackupRefPtr requires RawPtrHookableImpl") 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__root.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__root.cc index 03593e710a3d..c13d50a007b0 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__root.cc +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__root.cc @@ -1,38 +1,38 @@ ---- base/allocator/partition_allocator/partition_root.cc.orig 2023-05-05 12:12:41 UTC +--- base/allocator/partition_allocator/partition_root.cc.orig 2023-06-05 19:39:05 UTC +++ base/allocator/partition_allocator/partition_root.cc -@@ -43,7 +43,7 @@ +@@ -46,7 +46,7 @@ #include "wow64apiset.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #endif -@@ -284,7 +284,7 @@ void PartitionAllocMallocInitOnce() { +@@ -287,7 +287,7 @@ void PartitionAllocMallocInitOnce() { return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // When fork() is called, only the current thread continues to execute in the // child process. If the lock is held, but *not* by this thread when fork() is // called, we have a deadlock. -@@ -378,7 +378,7 @@ static size_t PartitionPurgeSlotSpan( +@@ -381,7 +381,7 @@ static size_t PartitionPurgeSlotSpan( constexpr size_t kMaxSlotCount = (PartitionPageSize() * kMaxPartitionPagesPerRegularSlotSpan) / MinPurgeableSlotSize(); -#elif BUILDFLAG(IS_APPLE) || (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) +#elif BUILDFLAG(IS_APPLE) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) // It's better for slot_usage to be stack-allocated and fixed-size, which // demands that its size be constexpr. On IS_APPLE and Linux on arm64, // PartitionPageSize() is always SystemPageSize() << 2, so regardless of -@@ -850,7 +850,7 @@ void PartitionRoot::Init(PartitionOptions +@@ -853,7 +853,7 @@ void PartitionRoot::Init(PartitionOptions // apple OSes. PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) || (internal::SystemPageSize() == (size_t{1} << 14))); -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // Check runtime pagesize. Though the code is currently the same, it is // not merged with the IS_APPLE case above as a 1 << 16 case needs to be // added here in the future, to allow 64 kiB pagesize. That is only diff --git a/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc index ad2e7803bf75..b91c7278521b 100644 --- a/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc @@ -1,29 +1,29 @@ ---- base/files/file_path_watcher_unittest.cc.orig 2023-02-11 09:11:04 UTC +--- base/files/file_path_watcher_unittest.cc.orig 2023-06-05 19:39:05 UTC +++ base/files/file_path_watcher_unittest.cc -@@ -521,7 +521,7 @@ TEST_F(FilePathWatcherTest, MAYBE_WatchDirectory) { +@@ -473,7 +473,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) { VLOG(1) << "Waiting for file1 creation"; 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"; -@@ -1345,7 +1345,7 @@ enum Permission { +@@ -1275,7 +1275,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; -@@ -1376,7 +1376,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi +@@ -1306,7 +1306,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_files_file__util__unittest.cc b/www/ungoogled-chromium/files/patch-base_files_file__util__unittest.cc index 23afe7fc269e..a7388b6af925 100644 --- a/www/ungoogled-chromium/files/patch-base_files_file__util__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_files_file__util__unittest.cc @@ -1,20 +1,20 @@ ---- base/files/file_util_unittest.cc.orig 2023-05-05 12:12:41 UTC +--- base/files/file_util_unittest.cc.orig 2023-06-05 19:39:05 UTC +++ base/files/file_util_unittest.cc -@@ -3853,7 +3853,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { +@@ -3871,7 +3871,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { } #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) TEST_F(FileUtilTest, ReadFileToStringWithProcFileSystem) { FilePath file_path("/proc/cpuinfo"); std::string data = "temp"; -@@ -4576,7 +4576,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles +@@ -4594,7 +4594,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles NULL); #else size_t bytes_written = - ::write(::fileno(output_file.get()), content.c_str(), content.length()); + ::write(fileno(output_file.get()), content.c_str(), content.length()); #endif EXPECT_EQ(content.length(), bytes_written); ::fflush(output_file.get()); diff --git a/www/ungoogled-chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc b/www/ungoogled-chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc index b621decda352..0efce0ad9c4b 100644 --- a/www/ungoogled-chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc @@ -1,21 +1,21 @@ ---- base/memory/madv_free_discardable_memory_posix.cc.orig 2022-10-01 07:40:07 UTC +--- base/memory/madv_free_discardable_memory_posix.cc.orig 2023-06-05 19:39:05 UTC +++ base/memory/madv_free_discardable_memory_posix.cc -@@ -295,6 +295,10 @@ void MadvFreeDiscardableMemoryPosix::SetKeepMemoryForT +@@ -306,6 +306,10 @@ void MadvFreeDiscardableMemoryPosix::SetKeepMemoryForT bool MadvFreeDiscardableMemoryPosix::IsResident() const { DFAKE_SCOPED_RECURSIVE_LOCK(thread_collision_warner_); +// XXX mincore +#if BUILDFLAG(IS_BSD) + return false; +#else #if BUILDFLAG(IS_APPLE) std::vector vec(allocated_pages_); #else -@@ -310,6 +314,7 @@ bool MadvFreeDiscardableMemoryPosix::IsResident() cons +@@ -321,6 +325,7 @@ bool MadvFreeDiscardableMemoryPosix::IsResident() cons return false; } return true; +#endif } bool MadvFreeDiscardableMemoryPosix::IsDiscarded() const { diff --git a/www/ungoogled-chromium/files/patch-base_process_process__metrics.cc b/www/ungoogled-chromium/files/patch-base_process_process__metrics.cc index bbecf45ca95a..2fdde30d8a3a 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__metrics.cc +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics.cc @@ -1,54 +1,54 @@ ---- base/process/process_metrics.cc.orig 2023-03-10 11:01:21 UTC +--- base/process/process_metrics.cc.orig 2023-06-05 19:39:05 UTC +++ base/process/process_metrics.cc @@ -17,7 +17,7 @@ namespace base { namespace { #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) int CalculateEventsPerSecond(uint64_t event_count, uint64_t* last_event_count, base::TimeTicks* last_calculated) { @@ -54,7 +54,7 @@ SystemMetrics SystemMetrics::Sample() { SystemMetrics system_metrics; system_metrics.committed_memory_ = GetSystemCommitCharge(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) GetSystemMemoryInfo(&system_metrics.memory_info_); GetVmStatInfo(&system_metrics.vmstat_info_); GetSystemDiskInfo(&system_metrics.disk_info_); @@ -73,7 +73,7 @@ Value::Dict SystemMetrics::ToDict() const { Value::Dict res; res.Set("committed_memory", static_cast(committed_memory_)); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) Value::Dict meminfo = memory_info_.ToDict(); meminfo.Merge(vmstat_info_.ToDict()); res.Set("meminfo", std::move(meminfo)); -@@ -98,7 +98,6 @@ std::unique_ptr ProcessMetrics::Create +@@ -100,7 +100,6 @@ std::unique_ptr ProcessMetrics::Create #endif // !BUILDFLAG(IS_MAC) } -#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX) double ProcessMetrics::GetPlatformIndependentCPUUsage( TimeDelta cumulative_cpu) { TimeTicks time = TimeTicks::Now(); -@@ -124,7 +123,6 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( +@@ -126,7 +125,6 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( double ProcessMetrics::GetPlatformIndependentCPUUsage() { return GetPlatformIndependentCPUUsage(GetCumulativeCPUUsage()); } -#endif #if BUILDFLAG(IS_WIN) double ProcessMetrics::GetPreciseCPUUsage(TimeDelta cumulative_cpu) { -@@ -155,7 +153,7 @@ double ProcessMetrics::GetPreciseCPUUsage() { +@@ -157,7 +155,7 @@ double ProcessMetrics::GetPreciseCPUUsage() { #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) int ProcessMetrics::CalculateIdleWakeupsPerSecond( uint64_t absolute_idle_wakeups) { return CalculateEventsPerSecond(absolute_idle_wakeups, diff --git a/www/ungoogled-chromium/files/patch-base_process_process__metrics__posix.cc b/www/ungoogled-chromium/files/patch-base_process_process__metrics__posix.cc index 1d8226ebb594..70d19dad131a 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__metrics__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics__posix.cc @@ -1,20 +1,20 @@ ---- base/process/process_metrics_posix.cc.orig 2022-10-01 07:40:07 UTC +--- base/process/process_metrics_posix.cc.orig 2023-06-05 19:39:05 UTC +++ base/process/process_metrics_posix.cc @@ -20,6 +20,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_OPENBSD) +#include #else #include #endif -@@ -135,7 +137,7 @@ size_t ProcessMetrics::GetMallocUsage() { +@@ -133,7 +135,7 @@ size_t ProcessMetrics::GetMallocUsage() { return stats.size_in_use; #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) return GetMallocUsageMallinfo(); -#elif BUILDFLAG(IS_FUCHSIA) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. return 0; #endif diff --git a/www/ungoogled-chromium/files/patch-base_rand__util.h b/www/ungoogled-chromium/files/patch-base_rand__util.h index dea2d8dc4e36..412bf8de4730 100644 --- a/www/ungoogled-chromium/files/patch-base_rand__util.h +++ b/www/ungoogled-chromium/files/patch-base_rand__util.h @@ -1,11 +1,11 @@ ---- base/rand_util.h.orig 2022-12-02 17:56:32 UTC +--- base/rand_util.h.orig 2023-06-05 19:39:05 UTC +++ base/rand_util.h -@@ -117,7 +117,7 @@ void RandomShuffle(Itr first, Itr last) { +@@ -121,7 +121,7 @@ void RandomShuffle(Itr first, Itr last) { std::shuffle(first, last, RandomBitGenerator()); } -#if BUILDFLAG(IS_POSIX) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_BSD) BASE_EXPORT int GetUrandomFD(); #endif diff --git a/www/ungoogled-chromium/files/patch-base_system_sys__info.cc b/www/ungoogled-chromium/files/patch-base_system_sys__info.cc index 44c6389a5cdc..a4b7c21406e5 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 2023-03-10 11:01:21 UTC +--- base/system/sys_info.cc.orig 2023-06-05 19:39:05 UTC +++ base/system/sys_info.cc -@@ -106,7 +106,7 @@ std::string SysInfo::HardwareModelName() { +@@ -148,7 +148,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 2650a8f2d8d5..8288244ee2ed 100644 --- a/www/ungoogled-chromium/files/patch-base_system_sys__info.h +++ b/www/ungoogled-chromium/files/patch-base_system_sys__info.h @@ -1,20 +1,20 @@ ---- base/system/sys_info.h.orig 2023-02-11 09:11:04 UTC +--- base/system/sys_info.h.orig 2023-06-05 19:39:05 UTC +++ base/system/sys_info.h -@@ -246,6 +246,8 @@ class BASE_EXPORT SysInfo { +@@ -253,6 +253,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); -@@ -257,7 +259,7 @@ class BASE_EXPORT SysInfo { +@@ -264,7 +266,7 @@ class BASE_EXPORT SysInfo { static HardwareInfo GetHardwareInfoSync(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) static uint64_t AmountOfAvailablePhysicalMemory( const SystemMemoryInfoKB& meminfo); #endif diff --git a/www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc b/www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc index b5a50d6a9488..8d3239484de6 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-03-10 11:01:21 UTC +--- base/test/launcher/test_launcher.cc.orig 2023-06-05 19:39:05 UTC +++ base/test/launcher/test_launcher.cc -@@ -67,6 +67,7 @@ +@@ -69,6 +69,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-build_config_compiler_BUILD.gn b/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn index db9f66592f8d..b6aa6d2518ff 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,140 @@ ---- build/config/compiler/BUILD.gn.orig 2023-05-05 12:12:41 UTC +--- build/config/compiler/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ build/config/compiler/BUILD.gn @@ -237,13 +237,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 --------------------------------------------------------------------- @@ -467,6 +470,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ if (use_gold) { @@ -542,7 +549,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 += [ -@@ -816,7 +823,7 @@ config("compiler") { +@@ -727,7 +734,7 @@ config("compiler") { + + ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ] + +- if (!is_chromeos) { ++ if (!is_chromeos && !is_bsd) { + # TODO(https://crbug.com/972449): turn on for ChromeOS when that + # toolchain has this flag. + # We only use one version of LLVM within a build so there's no need to +@@ -825,7 +832,7 @@ config("compiler") { # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode # lldb doesn't have the needed changes yet. # TODO(crbug.com/1379070): Remove if the upstream default ever changes. - if (is_clang && !is_nacl && !is_win && !is_apple) { + if (is_clang && !is_nacl && !is_win && !is_apple && !is_bsd) { cflags_cc += [ "-gsimple-template-names" ] } -@@ -996,7 +1003,7 @@ config("compiler_cpu_abi") { +@@ -1005,7 +1012,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" ] -@@ -1011,7 +1018,7 @@ config("compiler_cpu_abi") { +@@ -1020,7 +1027,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" ] -@@ -1346,7 +1353,7 @@ config("compiler_deterministic") { +@@ -1355,7 +1362,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", -@@ -1398,7 +1405,7 @@ config("compiler_deterministic") { +@@ -1407,7 +1414,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", -@@ -1636,7 +1643,7 @@ config("default_warnings") { +@@ -1645,7 +1652,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", -@@ -1827,7 +1834,7 @@ config("no_chromium_code") { +@@ -1836,7 +1843,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", -@@ -2337,7 +2344,7 @@ config("afdo_optimize_size") { +@@ -2346,7 +2353,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. -@@ -2356,7 +2363,7 @@ config("afdo") { +@@ -2365,7 +2372,7 @@ config("afdo") { } 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 ] } -@@ -2511,7 +2518,8 @@ config("symbols") { +@@ -2523,7 +2530,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 029cf9d5d85c..3e6ba99d637f 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 2023-05-05 12:12:41 UTC +--- build/config/rust.gni.orig 2023-06-05 19:39:05 UTC +++ build/config/rust.gni -@@ -157,7 +157,7 @@ if (enable_rust) { +@@ -170,7 +170,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_toolchain_gcc__toolchain.gni b/www/ungoogled-chromium/files/patch-build_toolchain_gcc__toolchain.gni index 01636b7f5176..cba8c9171a7e 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-05-05 12:12:41 UTC +--- build/toolchain/gcc_toolchain.gni.orig 2023-06-05 19:39:05 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). # -@@ -837,22 +844,12 @@ template("gcc_toolchain") { +@@ -859,22 +866,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 825fa28f527c..3e15a33a7016 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-05-05 12:12:41 UTC +--- cc/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ cc/BUILD.gn -@@ -664,7 +664,7 @@ cc_test_static_library("test_support") { +@@ -672,7 +672,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" ] } } -@@ -911,7 +911,6 @@ cc_test("cc_unittests") { +@@ -922,7 +922,6 @@ cc_test("cc_unittests") { data = [ "//components/test/data/viz/" ] data_deps = [ "//testing/buildbot/filters:cc_unittests_filters", - "//third_party/mesa_headers", ] if (is_android && enable_chrome_android_internal) { diff --git a/www/ungoogled-chromium/files/patch-chrome_app_app__management__strings.grdp b/www/ungoogled-chromium/files/patch-chrome_app_app__management__strings.grdp index e454c8c799f5..7174367722bb 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_app__management__strings.grdp +++ b/www/ungoogled-chromium/files/patch-chrome_app_app__management__strings.grdp @@ -1,11 +1,11 @@ ---- chrome/app/app_management_strings.grdp.orig 2022-10-01 07:40:07 UTC +--- chrome/app/app_management_strings.grdp.orig 2023-06-05 19:39:05 UTC +++ chrome/app/app_management_strings.grdp -@@ -173,7 +173,7 @@ +@@ -176,7 +176,7 @@ You can open and edit supported files with this app from Finder or other apps. To control which files open this app by default, <a href="#">learn how to set default apps on your device</a>. - + You can open and edit supported files with this app from your file browser or other apps. To control which files open this app by default, <a href="#">learn how to set default apps on your device</a>. diff --git a/www/ungoogled-chromium/files/patch-chrome_app_chrome__main.cc b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main.cc index 7cc5ce4e9faf..4ef69db12a70 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_chrome__main.cc +++ b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main.cc @@ -1,34 +1,34 @@ ---- chrome/app/chrome_main.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/app/chrome_main.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/app/chrome_main.cc -@@ -28,11 +28,11 @@ +@@ -27,11 +27,11 @@ #include "chrome/app/notification_metrics.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/base_switches.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/app/chrome_main_linux.h" #endif -@@ -147,7 +147,7 @@ int ChromeMain(int argc, const char** argv) { +@@ -136,7 +136,7 @@ int ChromeMain(int argc, const char** argv) { SetUpBundleOverrides(); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) AppendExtraArgumentsToCommandLine(command_line); #endif -@@ -175,7 +175,7 @@ int ChromeMain(int argc, const char** argv) { +@@ -164,7 +164,7 @@ int ChromeMain(int argc, const char** argv) { headless::SetUpCommandLine(command_line); } else { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (headless::IsOldHeadlessMode()) { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) command_line->AppendSwitch(::headless::switches::kEnableCrashReporter); diff --git a/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc index 8ee33d024c92..80934b2e7664 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc +++ b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc @@ -1,112 +1,112 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/app/chrome_main_delegate.cc -@@ -135,7 +135,7 @@ +@@ -137,7 +137,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 -@@ -179,16 +179,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 -@@ -323,7 +323,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -327,7 +327,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 -@@ -408,7 +408,7 @@ bool HandleVersionSwitches(const base::CommandLine& co +@@ -412,7 +412,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) || -@@ -522,7 +522,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -526,7 +526,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. -@@ -611,7 +611,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat +@@ -615,7 +615,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( -@@ -941,7 +941,7 @@ void ChromeMainDelegate::CommonEarlyInitialization() { +@@ -956,7 +956,7 @@ void ChromeMainDelegate::CommonEarlyInitialization() { 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 +1080,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1094,7 +1094,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 +1110,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1124,7 +1124,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 -@@ -1484,7 +1484,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1498,7 +1498,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)) { -@@ -1586,7 +1586,7 @@ absl::variant Chrome +@@ -1600,7 +1600,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 d01351922a60..cc6dd6e47624 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-05-05 12:12:41 UTC +--- chrome/app/generated_resources.grd.orig 2023-06-05 19:39:05 UTC +++ chrome/app/generated_resources.grd @@ -2,7 +2,7 @@ -@@ -3219,7 +3219,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -3258,7 +3258,7 @@ are declared in tools/grit/grit_rule.gni. - + Device Credentials -@@ -4974,7 +4974,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -5007,7 +5007,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 -@@ -5644,7 +5644,7 @@ Keep your key file in a safe place. You will need it t +@@ -5689,7 +5689,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. -@@ -5690,7 +5690,7 @@ Keep your key file in a safe place. You will need it t +@@ -5735,7 +5735,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. -@@ -9707,7 +9707,7 @@ Check your passwords anytime in - + Use system title bar and borders -@@ -11048,7 +11048,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -11182,7 +11182,7 @@ Please help our engineers fix this problem. Tell us wh Set as default - + Minimize -@@ -13184,7 +13184,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -13324,7 +13324,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_profiles__strings.grdp b/www/ungoogled-chromium/files/patch-chrome_app_profiles__strings.grdp index 98e99a73a793..9fd78acf460c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_profiles__strings.grdp +++ b/www/ungoogled-chromium/files/patch-chrome_app_profiles__strings.grdp @@ -1,11 +1,11 @@ ---- chrome/app/profiles_strings.grdp.orig 2022-10-01 07:40:07 UTC +--- chrome/app/profiles_strings.grdp.orig 2023-06-05 19:39:05 UTC +++ chrome/app/profiles_strings.grdp -@@ -66,7 +66,7 @@ +@@ -60,7 +60,7 @@ Add Profile... - + Add profile... diff --git a/www/ungoogled-chromium/files/patch-chrome_app_settings__strings.grdp b/www/ungoogled-chromium/files/patch-chrome_app_settings__strings.grdp index 4794f4d7dfef..3c80f64b67aa 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-04-08 11:38:38 UTC +--- chrome/app/settings_strings.grdp.orig 2023-06-05 19:39:05 UTC +++ chrome/app/settings_strings.grdp -@@ -166,7 +166,7 @@ +@@ -202,7 +202,7 @@ Theme - + GTK -@@ -186,7 +186,7 @@ +@@ -222,7 +222,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 b97b2d260b69..aa1347af7ca9 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 2023-04-08 11:38:38 UTC +--- chrome/app/theme/chrome_unscaled_resources.grd.orig 2023-06-05 19:39:05 UTC +++ chrome/app/theme/chrome_unscaled_resources.grd @@ -16,7 +16,7 @@ - + -@@ -63,7 +63,7 @@ +@@ -67,7 +67,7 @@ - + -@@ -77,7 +77,7 @@ +@@ -81,7 +81,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 f4c9b4ae44bc..a274dc7a503f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc @@ -1,126 +1,144 @@ ---- chrome/browser/about_flags.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/about_flags.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/about_flags.cc -@@ -221,7 +221,7 @@ +@@ -222,7 +222,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 -@@ -313,7 +313,7 @@ +@@ -315,7 +315,7 @@ #include "device/vr/public/cpp/features.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "ui/ozone/buildflags.h" #include "ui/ozone/public/ozone_switches.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -@@ -419,7 +419,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap +@@ -421,7 +421,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, -@@ -1448,7 +1448,7 @@ const FeatureEntry::FeatureVariation kLocalWebApproval - #endif +@@ -1448,7 +1448,7 @@ const FeatureEntry::FeatureVariation kChromeRefresh202 + std::size(kChromeRefresh2023Level1), nullptr}}; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kOmniboxDocumentProviderCapLowQualitySuggestionsTo1[] = { {"DocumentProviderMaxLowQualitySuggestions", "1"}, -@@ -4644,13 +4644,13 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4756,13 +4756,13 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kWebShare)}, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"ozone-platform-hint", flag_descriptions::kOzonePlatformHintName, flag_descriptions::kOzonePlatformHintDescription, kOsLinux, MULTI_VALUE_TYPE(kOzonePlatformHintRuntimeChoices)}, #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"skip-undecryptable-passwords", flag_descriptions::kSkipUndecryptablePasswordsName, flag_descriptions::kSkipUndecryptablePasswordsDescription, -@@ -4924,7 +4924,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5039,7 +5039,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)}, -@@ -5544,7 +5544,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5686,7 +5686,7 @@ const FeatureEntry kFeatureEntries[] = { kOsAll, FEATURE_VALUE_TYPE(omnibox::kUseExistingAutocompleteClient)}, #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, -@@ -6259,7 +6259,7 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kPointerLockOptionsDescription, kOsDesktop, - FEATURE_VALUE_TYPE(features::kPointerLockOptions)}, +@@ -6470,7 +6470,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kParallelDownloadingDescription, kOsAll, + FEATURE_VALUE_TYPE(download::features::kParallelDownloading)}, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"enable-async-dns", flag_descriptions::kAsyncDnsName, flag_descriptions::kAsyncDnsDescription, kOsWin | kOsLinux, FEATURE_VALUE_TYPE(features::kAsyncDns)}, -@@ -7152,7 +7152,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7343,7 +7343,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, -@@ -7890,7 +7890,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8118,7 +8118,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)}, -@@ -8115,7 +8115,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8363,7 +8363,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(ash::features::kWallpaperPerDesk)}, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - {"enable-get-display-media-set", flag_descriptions::kGetDisplayMediaSetName, - flag_descriptions::kGetDisplayMediaSetDescription, + {"enable-get-all-screens-media", flag_descriptions::kGetAllScreensMediaName, + flag_descriptions::kGetAllScreensMediaDescription, kOsCrOS | kOsLacros | kOsLinux, -@@ -8176,7 +8176,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8424,7 +8424,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, -@@ -8729,7 +8729,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9001,7 +9001,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, +@@ -9699,7 +9699,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kWebUIOmniboxPopupDescription, kOsDesktop, + FEATURE_VALUE_TYPE(omnibox::kWebUIOmniboxPopup)}, + +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + {"webui-system-font", flag_descriptions::kWebUiSystemFontName, + flag_descriptions::kWebUiSystemFontDescription, kOsAll, + FEATURE_VALUE_TYPE(features::kWebUiSystemFont)}, +@@ -9900,7 +9900,7 @@ const FeatureEntry kFeatureEntries[] = { + #endif + + #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || \ +- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + {"data-retention-policies-disable-sync-types-needed", + flag_descriptions::kDataRetentionPoliciesDisableSyncTypesNeededName, + flag_descriptions::kDataRetentionPoliciesDisableSyncTypesNeededDescription, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc b/www/ungoogled-chromium/files/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc new file mode 100644 index 000000000000..bf6ce9ac8fd4 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc @@ -0,0 +1,11 @@ +--- chrome/browser/apps/app_service/publishers/extension_apps.cc.orig 2023-06-05 19:39:05 UTC ++++ chrome/browser/apps/app_service/publishers/extension_apps.cc +@@ -25,7 +25,7 @@ ExtensionApps::~ExtensionApps() = default; + + bool ExtensionApps::Accepts(const extensions::Extension* extension) { + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + if (extensions::IsExtensionUnsupportedDeprecatedApp(profile(), + extension->id())) { + return false; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc b/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc index fb06d11b9883..4e2a3daec9ce 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc @@ -1,20 +1,20 @@ ---- chrome/browser/apps/platform_apps/platform_app_launch.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/apps/platform_apps/platform_app_launch.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/apps/platform_apps/platform_app_launch.cc @@ -20,7 +20,7 @@ #include "extensions/common/extension.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_navigator.h" #include "chrome/browser/ui/browser_window.h" -@@ -124,7 +124,7 @@ bool OpenExtensionApplicationTab(Profile* profile, con +@@ -138,7 +138,7 @@ bool OpenExtensionApplicationTab(Profile* profile, con } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) bool OpenDeprecatedApplicationPrompt(Profile* profile, const std::string& app_id) { if (!extensions::IsExtensionUnsupportedDeprecatedApp(profile, app_id)) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h b/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h index a5a1ff9f1b43..86f1be78d5a7 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h @@ -1,11 +1,11 @@ ---- chrome/browser/apps/platform_apps/platform_app_launch.h.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/apps/platform_apps/platform_app_launch.h.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/apps/platform_apps/platform_app_launch.h -@@ -36,7 +36,7 @@ bool OpenExtensionApplicationWindow(Profile* profile, - // and false otherwise. +@@ -37,7 +37,7 @@ bool OpenExtensionApplicationWindow(Profile* profile, bool OpenExtensionApplicationTab(Profile* profile, const std::string& app_id); --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Opens the deprecated Chrome Apps flow if |app_id| refers to a Chrome App and // Chrome Apps are deprecated on the |profile|. Returns true if that was the // case, or false otherwise. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_background_background__mode__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_background_background__mode__manager.cc index ac23eaeb0d21..89647a71553f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_background_background__mode__manager.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_background_background__mode__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/background/background_mode_manager.cc.orig 2023-03-10 11:01:21 UTC +--- chrome/browser/background/background_mode_manager.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/background/background_mode_manager.cc -@@ -889,7 +889,7 @@ gfx::ImageSkia GetStatusTrayIcon() { +@@ -874,7 +874,7 @@ gfx::ImageSkia GetStatusTrayIcon() { return gfx::ImageSkia(); return family->CreateExact(size).AsImageSkia(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( IDR_PRODUCT_LOGO_128); #elif BUILDFLAG(IS_MAC) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc b/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc index ddb7b2fcf4d2..7de6a93f0fae 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc @@ -1,11 +1,11 @@ ---- chrome/browser/browser_features.cc.orig 2023-03-10 11:01:21 UTC +--- chrome/browser/browser_features.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/browser_features.cc -@@ -24,7 +24,7 @@ BASE_FEATURE(kClosedTabCache, - // the browser exits. +@@ -27,7 +27,7 @@ BASE_FEATURE(kClosedTabCache, BASE_FEATURE(kDestroyProfileOnBrowserClose, "DestroyProfileOnBrowserClose", --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ +- BUILDFLAG(IS_CHROMEOS_LACROS) ++ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT); #else base::FEATURE_DISABLED_BY_DEFAULT); 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 2a13a34cd101..d609bf8b05c8 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc @@ -1,29 +1,29 @@ ---- chrome/browser/browser_process_impl.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/browser_process_impl.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/browser_process_impl.cc @@ -216,7 +216,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 -@@ -1227,7 +1227,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { +@@ -1200,7 +1200,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 -@@ -1460,7 +1460,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1433,7 +1433,7 @@ void BrowserProcessImpl::Unpin() { // Mac is currently not supported. // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) bool BrowserProcessImpl::IsRunningInBackground() const { // Check if browser is in the background. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc index e36d681774db..33599e74b08f 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-05-05 12:12:41 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -113,13 +113,13 @@ +@@ -117,13 +117,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 -@@ -193,7 +193,7 @@ +@@ -197,7 +197,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" -@@ -853,7 +853,7 @@ void PopulateChromeFrameBinders( +@@ -881,7 +881,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)); -@@ -861,7 +861,7 @@ void PopulateChromeFrameBinders( +@@ -889,7 +889,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 -@@ -926,14 +926,14 @@ void PopulateChromeWebUIFrameBinders( - SegmentationInternalsUI>(map); +@@ -958,14 +958,14 @@ void PopulateChromeWebUIFrameBinders( + commerce::CommerceInternalsUI>(map); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< connectors_internals::mojom::PageHandler, enterprise_connectors::ConnectorsInternalsUI>(map); #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 -@@ -1377,7 +1377,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1420,7 +1420,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 b7bf021e5a48..81f84168ec31 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-05-05 12:12:41 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -240,11 +240,11 @@ +@@ -241,11 +241,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 @@ +@@ -280,7 +280,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" -@@ -991,7 +991,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -992,7 +992,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 . -@@ -1047,7 +1047,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1048,7 +1048,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 b5df7a4f49c3..1f1923a66836 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc @@ -1,165 +1,165 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -419,7 +419,7 @@ +@@ -423,7 +423,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" -@@ -502,12 +502,12 @@ +@@ -511,12 +511,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 -@@ -516,14 +516,14 @@ +@@ -525,14 +525,14 @@ #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/enterprise/profile_token_management/profile_token_navigation_throttle.h" #include "chrome/browser/ui/webui/app_settings/web_app_settings_navigation_throttle.h" #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/navigation_throttle.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -552,11 +552,11 @@ +@@ -561,11 +561,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" -@@ -1542,7 +1542,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre +@@ -1584,7 +1584,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre policy::policy_prefs::kPPAPISharedImagesSwapChainAllowed, true); registry->RegisterBooleanPref( policy::policy_prefs::kForceEnablePepperVideoDecoderDevAPI, false); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOutOfProcessSystemDnsResolutionEnabled, true); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) -@@ -1655,7 +1655,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1697,7 +1697,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) -@@ -1694,7 +1694,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1736,7 +1736,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 -@@ -1715,7 +1715,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1757,7 +1757,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()); -@@ -1734,7 +1734,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1776,7 +1776,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>()); -@@ -2558,6 +2558,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2602,6 +2602,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()) { -@@ -2927,7 +2929,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2996,7 +2998,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)) { -@@ -4480,7 +4482,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -4550,7 +4552,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, -@@ -4994,7 +4996,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5064,7 +5066,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati &throttles); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) MaybeAddThrottle( WebAppSettingsNavigationThrottle::MaybeCreateThrottleFor(handle), &throttles); -@@ -5004,7 +5006,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5074,7 +5076,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) MaybeAddThrottle(enterprise_connectors::DeviceTrustNavigationThrottle:: MaybeCreateThrottleFor(handle), &throttles); -@@ -5035,7 +5037,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5105,7 +5107,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); -@@ -6640,7 +6642,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS +@@ -6786,7 +6788,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS } bool ChromeContentBrowserClient::ShouldRunOutOfProcessSystemDnsResolution() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // This is possibly called before `g_browser_process` is initialized. PrefService* local_state; if (g_browser_process) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.h b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.h index ea9f1c83efa0..820a499d7de8 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-05-05 12:12:41 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -458,7 +458,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -460,7 +460,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_dev__ui__browser__resources.grd b/www/ungoogled-chromium/files/patch-chrome_browser_dev__ui__browser__resources.grd index af2da2329232..e00f18f87bcd 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 2023-02-11 09:11:04 UTC +--- chrome/browser/dev_ui_browser_resources.grd.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/dev_ui_browser_resources.grd -@@ -33,7 +33,7 @@ This file specifies browser resources for developer-fa +@@ -34,7 +34,7 @@ This file specifies browser resources for developer-fa - + 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 1939ad58e4e7..20f24429fb33 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-05-05 12:12:41 UTC +--- chrome/browser/download/download_item_model.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/download/download_item_model.cc @@ -763,7 +763,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(); @@ -806,7 +806,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); -@@ -1129,7 +1129,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe +@@ -1141,7 +1141,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (download_->GetOriginalMimeType() == "application/x-x509-user-cert") { SetShouldPreferOpeningInBrowser(true); return; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc index 45d3800ec203..4fc71e26c3ec 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc @@ -1,90 +1,90 @@ ---- chrome/browser/download/download_prefs.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/download/download_prefs.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/download/download_prefs.cc @@ -11,6 +11,7 @@ #include "base/check.h" #include "base/cxx17_backports.h" +#include "base/command_line.h" #include "base/feature_list.h" #include "base/files/file_util.h" #include "base/functional/bind.h" -@@ -64,6 +65,10 @@ +@@ -63,6 +64,10 @@ #include "chrome/browser/download/bubble/download_bubble_prefs.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + using content::BrowserContext; using content::BrowserThread; using content::DownloadManager; -@@ -74,7 +79,7 @@ namespace { +@@ -73,7 +78,7 @@ namespace { // Consider downloads 'dangerous' if they go to the home directory on Linux and // to the desktop on any platform. bool DownloadPathIsDangerous(const base::FilePath& download_path) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath home_dir = base::GetHomeDir(); if (download_path == home_dir) { return true; -@@ -185,7 +190,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi +@@ -181,7 +186,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) should_open_pdf_in_system_reader_ = prefs->GetBoolean(prefs::kOpenPdfDownloadInSystemReader); #endif -@@ -305,7 +310,7 @@ void DownloadPrefs::RegisterProfilePrefs( +@@ -304,7 +309,7 @@ void DownloadPrefs::RegisterProfilePrefs( registry->RegisterTimePref(prefs::kDownloadLastCompleteTime, /*default_value=*/base::Time()); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOpenPdfDownloadInSystemReader, false); #endif #if BUILDFLAG(IS_ANDROID) -@@ -474,7 +479,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens +@@ -473,7 +478,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) void DownloadPrefs::SetShouldOpenPdfInSystemReader(bool should_open) { if (should_open_pdf_in_system_reader_ == should_open) return; -@@ -506,7 +511,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons +@@ -505,7 +510,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons void DownloadPrefs::ResetAutoOpenByUser() { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) SetShouldOpenPdfInSystemReader(false); #endif auto_open_by_user_.clear(); -@@ -537,7 +542,7 @@ void DownloadPrefs::SaveAutoOpenState() { +@@ -536,7 +541,7 @@ void DownloadPrefs::SaveAutoOpenState() { bool DownloadPrefs::CanPlatformEnableAutoOpenForPdf() const { #if BUILDFLAG(IS_CHROMEOS) return false; // There is no UI for auto-open on ChromeOS. -#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return ShouldOpenPdfInSystemReader(); #else return false; -@@ -661,7 +666,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa +@@ -660,7 +665,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa #else // If the stored download directory is an absolute path, we presume it's // correct; there's not really much more validation we can do here. +#if BUILDFLAG(IS_OPENBSD) + // If unveil(2) is used, force the file dialog directory to something we + // know is available. + auto* sandbox = sandbox::policy::SandboxLinux::GetInstance(); + if (!sandbox->unveil_initialized() && path.IsAbsolute()) +#else if (path.IsAbsolute()) +#endif return path; // When the default download directory is *not* an absolute path, we use the diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc index 8c21778a0c9c..af943dd60c16 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc.orig 2023-04-08 11:38:38 UTC +--- chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc @@ -18,7 +18,7 @@ #include "chrome/browser/profiles/profile.h" #include "components/policy/core/common/management/management_service.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "base/check.h" #include "chrome/browser/enterprise/connectors/device_trust/signals/decorators/browser/browser_signals_decorator.h" #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h" -@@ -55,7 +55,7 @@ std::unique_ptr CreateSignalsService(P +@@ -56,7 +56,7 @@ std::unique_ptr CreateSignalsService(P enterprise_signals::ContextInfoFetcher::CreateInstance( profile, ConnectorsServiceFactory::GetForBrowserContext(profile)))); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - policy::CloudPolicyStore* store = nullptr; - // Managed device. + policy::CloudPolicyStore* browser_cloud_policy_store = nullptr; + if (management_service->HasManagementAuthority( 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 b966bcac7f6f..cffcd0ec3fbc 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-04-08 11:38:38 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1334,6 +1334,10 @@ static_library("extensions") { +@@ -1342,6 +1342,10 @@ static_library("extensions") { deps += [ "//chrome/services/printing/public/mojom" ] } + if (is_bsd) { + sources -= [ "api/image_writer_private/removable_storage_provider_linux.cc" ] + } + if (enable_service_discovery) { sources += [ "api/mdns/mdns_api.cc", diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_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 7ab04d37526a..be22e7cf88e7 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-05-05 12:12:41 UTC +--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc -@@ -517,7 +517,7 @@ void PasswordsPrivateDelegateImpl::OsReauthCall( +@@ -544,7 +544,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 fc087b5db135..4823112efa00 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2023-04-08 11:38:38 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -190,7 +190,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -194,7 +194,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 -@@ -202,7 +202,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -206,7 +206,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_flag__descriptions.cc b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc index cafed2f4f559..f9a82428028e 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,92 @@ ---- chrome/browser/flag_descriptions.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/flag_descriptions.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/flag_descriptions.cc -@@ -6315,7 +6315,7 @@ const char kLibAssistantV2MigrationDescription[] = +@@ -2454,7 +2454,7 @@ const char kWebUIOmniboxPopupName[] = "WebUI Omnibox P + const char kWebUIOmniboxPopupDescription[] = + "If enabled, shows the omnibox suggestions popup in WebUI."; + +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + const char kWebUiSystemFontName[] = "WebUI System font"; + const char kWebUiSystemFontDescription[] = + "If enabled, all WebUI surfaces will use the default UI font of the " +@@ -6597,7 +6597,7 @@ const char kLibAssistantV2MigrationDescription[] = #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const char kGetDisplayMediaSetName[] = "GetDisplayMediaSet API"; - const char kGetDisplayMediaSetDescription[] = - "When enabled, the getDisplayMediaSet API for capturing multiple surfaces " -@@ -6563,7 +6563,7 @@ const char kSearchWebInSidePanelDescription[] = + const char kGetAllScreensMediaName[] = "GetAllScreensMedia API"; + const char kGetAllScreensMediaDescription[] = + "When enabled, the getAllScreensMedia API for capturing multiple screens " +@@ -6843,7 +6843,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."; -@@ -6572,7 +6572,7 @@ const char kQuickCommandsDescription[] = +@@ -6852,7 +6852,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."; -@@ -6593,7 +6593,7 @@ const char kWebShareDescription[] = +@@ -6874,7 +6874,7 @@ const char kEnableProtoApiForClassifyUrlDescription[] + "instead of JSON."; + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + const char kUseOutOfProcessVideoDecodingName[] = + "Use out-of-process video decoding (OOP-VD)"; + const char kUseOutOfProcessVideoDecodingDescription[] = +@@ -6892,7 +6892,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"; -@@ -6613,7 +6613,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti +@@ -6912,7 +6912,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti "Bluetooth"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const char kSkipUndecryptablePasswordsName[] = "Skip undecryptable passwords to use the available decryptable " "passwords."; -@@ -6627,7 +6627,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail +@@ -6926,7 +6926,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) -@@ -6728,7 +6728,7 @@ const char kElasticOverscrollDescription[] = +@@ -7027,7 +7027,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."; +@@ -7056,7 +7056,7 @@ const char kSigninInterceptBubbleV2Description[] = + #endif + + #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || \ +- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + const char kDataRetentionPoliciesDisableSyncTypesNeededName[] = + "Data Retention Policies Disable Sync Types"; + const char kDataRetentionPoliciesDisableSyncTypesNeededDescription[] = 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 c0addb30e95d..76c6409c8901 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h @@ -1,71 +1,98 @@ ---- chrome/browser/flag_descriptions.h.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/flag_descriptions.h.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/flag_descriptions.h -@@ -3663,7 +3663,7 @@ extern const char kLacrosScreenCoordinatesEnabledName[ +@@ -1382,7 +1382,7 @@ extern const char kOmniboxUpdatedConnectionSecurityInd + extern const char kWebUIOmniboxPopupName[]; + extern const char kWebUIOmniboxPopupDescription[]; + +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + extern const char kWebUiSystemFontName[]; + extern const char kWebUiSystemFontDescription[]; + #endif +@@ -3818,7 +3818,7 @@ extern const char kLacrosScreenCoordinatesEnabledName[ extern const char kLacrosScreenCoordinatesEnabledDescription[]; #endif // #if BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - extern const char kGetDisplayMediaSetName[]; - extern const char kGetDisplayMediaSetDescription[]; - -@@ -3790,14 +3790,14 @@ extern const char kSearchWebInSidePanelDescription[]; + extern const char kGetAllScreensMediaName[]; + extern const char kGetAllScreensMediaDescription[]; + #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +@@ -3945,14 +3945,14 @@ extern const char kSearchWebInSidePanelDescription[]; // Random platform combinations ----------------------------------------------- #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kQuickCommandsName[]; extern const char kQuickCommandsDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // defined (OS_FUCHSIA) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kWebShareName[]; extern const char kWebShareDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -@@ -3807,7 +3807,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa +@@ -3962,7 +3962,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[]; -@@ -3817,7 +3817,7 @@ extern const char kOzonePlatformHintName[]; +@@ -3972,7 +3972,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[]; -@@ -3825,13 +3825,13 @@ extern const char kForcePasswordInitialSyncWhenDecrypt +@@ -3980,13 +3980,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) || -@@ -3911,7 +3911,7 @@ extern const char kElasticOverscrollDescription[]; +@@ -4002,7 +4002,7 @@ extern const char kEnableProtoApiForClassifyUrlName[]; + extern const char kEnableProtoApiForClassifyUrlDescription[]; + #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + extern const char kUseOutOfProcessVideoDecodingName[]; + extern const char kUseOutOfProcessVideoDecodingDescription[]; + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +@@ -4076,7 +4076,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[]; +@@ -4094,7 +4094,7 @@ extern const char kSigninInterceptBubbleV2Description[ + #endif + + #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || \ +- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + extern const char kDataRetentionPoliciesDisableSyncTypesNeededName[]; + extern const char kDataRetentionPoliciesDisableSyncTypesNeededDescription[]; + #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_capture__policy__utils.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_capture__policy__utils.cc index 575bfb02bf39..da3031009814 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_capture__policy__utils.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_capture__policy__utils.cc @@ -1,20 +1,20 @@ ---- chrome/browser/media/webrtc/capture_policy_utils.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/media/webrtc/capture_policy_utils.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/media/webrtc/capture_policy_utils.cc -@@ -121,7 +121,7 @@ AllowedScreenCaptureLevel GetAllowedCaptureLevel(const +@@ -125,7 +125,7 @@ AllowedScreenCaptureLevel GetAllowedCaptureLevel(const bool IsGetDisplayMediaSetSelectAllScreensAllowedForAnySite( content::BrowserContext* context) { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) Profile* profile = Profile::FromBrowserContext(context); if (!profile) { return false; -@@ -148,7 +148,7 @@ bool IsGetDisplayMediaSetSelectAllScreensAllowedForAny +@@ -162,7 +162,7 @@ bool IsGetDisplayMediaSetSelectAllScreensAllowedForAny bool IsGetDisplayMediaSetSelectAllScreensAllowed( content::BrowserContext* context, const GURL& url) { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) Profile* profile = Profile::FromBrowserContext(context); - if (!profile) + if (!profile) { return false; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc index 7d0707045397..6d3d276f467d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc @@ -1,47 +1,47 @@ ---- chrome/browser/media/webrtc/chrome_screen_enumerator.cc.orig 2023-03-10 11:01:21 UTC +--- chrome/browser/media/webrtc/chrome_screen_enumerator.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/media/webrtc/chrome_screen_enumerator.cc -@@ -20,7 +20,7 @@ +@@ -21,7 +21,7 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) #include "ash/shell.h" #include "ui/aura/window.h" -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/functional/callback.h" #include "content/public/browser/desktop_capture.h" #endif -@@ -31,7 +31,7 @@ base::LazyInstance>::Destru +@@ -32,7 +32,7 @@ base::LazyInstance>::Destru root_windows_for_testing_ = LAZY_INSTANCE_INITIALIZER; } // namespace -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) namespace { base::LazyInstance>::DestructorAtExit g_desktop_capturer_for_testing = LAZY_INSTANCE_INITIALIZER; -@@ -77,7 +77,7 @@ blink::mojom::StreamDevicesSetPtr EnumerateScreens( +@@ -78,7 +78,7 @@ blink::mojom::StreamDevicesSetPtr EnumerateScreens( return stream_devices_set; } -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) blink::mojom::StreamDevicesSetPtr EnumerateScreens( blink::mojom::MediaStreamType stream_type) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); -@@ -128,7 +128,7 @@ void ChromeScreenEnumerator::SetRootWindowsForTesting( +@@ -129,7 +129,7 @@ void ChromeScreenEnumerator::SetRootWindowsForTesting( root_windows_for_testing_.Get() = std::move(root_windows); } -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void ChromeScreenEnumerator::SetDesktopCapturerForTesting( std::unique_ptr capturer) { g_desktop_capturer_for_testing.Get() = std::move(capturer); -@@ -144,7 +144,7 @@ void ChromeScreenEnumerator::EnumerateScreens( - DCHECK(base::FeatureList::IsEnabled( - features::kGetDisplayMediaSetAutoSelectAllScreens)); +@@ -146,7 +146,7 @@ void ChromeScreenEnumerator::EnumerateScreens( + features::kGetDisplayMediaSetAutoSelectAllScreens)) || + base::FeatureList::IsEnabled(blink::features::kGetAllScreensMedia)); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) content::GetUIThreadTaskRunner({})->PostTaskAndReplyWithResult( FROM_HERE, base::BindOnce(::EnumerateScreens, stream_type), base::BindOnce( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc index 52f76875fe8f..1f5758c2beac 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc @@ -1,41 +1,41 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc -@@ -65,8 +65,10 @@ +@@ -66,8 +66,10 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if defined(__GLIBC__) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if defined(__GLIBC__) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) +#if !BUILDFLAG(IS_BSD) #include +#endif #include "base/linux_util.h" #include "base/strings/string_split.h" -@@ -100,7 +102,7 @@ +@@ -101,7 +103,7 @@ #include "chromeos/startup/startup_switches.h" #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/pressure/pressure_metrics_reporter.h" #endif // BUILDFLAG(IS_LINUX) -@@ -512,7 +514,7 @@ void RecordStartupMetrics() { +@@ -528,7 +530,7 @@ void RecordStartupMetrics() { // Record whether Chrome is the default browser or not. // Disabled on Linux due to hanging browser tests, see crbug.com/1216328. -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) shell_integration::DefaultWebClientState default_state = shell_integration::GetDefaultBrowser(); base::UmaHistogramEnumeration("DefaultBrowser.State", default_state, -@@ -712,7 +714,7 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt +@@ -728,7 +730,7 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt } #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) pressure_metrics_reporter_ = std::make_unique(); #endif // BUILDFLAG(IS_LINUX) 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 c5b07e861eff..c638b80b1e05 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,65 +1,65 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -176,7 +176,7 @@ +@@ -178,7 +178,7 @@ #include "chrome/notification_helper/notification_helper_constants.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "components/metrics/motherboard_metrics_provider.h" #endif -@@ -202,7 +202,7 @@ +@@ -204,7 +204,7 @@ #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/family_link_user_metrics_provider.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS_LACROS))||BUILDFLAG(IS_ANDROID)) -@@ -764,7 +764,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -770,7 +770,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 -@@ -843,7 +843,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -849,7 +849,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()); -@@ -852,7 +852,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -858,7 +858,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic #if BUILDFLAG(ENABLE_SUPERVISED_USERS) && \ (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS)) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) if (base::FeatureList::IsEnabled( kExtendFamilyLinkUserLogSegmentToAllPlatforms)) { metrics_service_->RegisterMetricsProvider( -@@ -960,7 +960,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -966,7 +966,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) -@@ -1144,7 +1144,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1163,7 +1163,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) // This creates the DesktopProfileSessionDurationsServices if it didn't exist // already. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.cc index 675caf0fe752..1c3f76d803a5 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,65 +1,65 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/net/system_network_context_manager.cc @@ -93,7 +93,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" @@ -178,7 +178,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) @@ -456,7 +456,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) -@@ -489,7 +489,7 @@ SystemNetworkContextManager::SystemNetworkContextManag - base::Unretained(this))); +@@ -503,7 +503,7 @@ SystemNetworkContextManager::SystemNetworkContextManag + #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) pref_change_registrar_.Add( prefs::kEnforceLocalAnchorConstraintsEnabled, base::BindRepeating(&SystemNetworkContextManager:: -@@ -539,7 +539,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -553,7 +553,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) -@@ -568,7 +568,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -582,7 +582,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterBooleanPref(prefs::kChromeRootStoreEnabled, false); #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Note that the default value is not relevant because the pref is only // evaluated when it is managed. registry->RegisterBooleanPref(prefs::kEnforceLocalAnchorConstraintsEnabled, -@@ -959,7 +959,7 @@ void SystemNetworkContextManager::UpdateExplicitlyAllo - } +@@ -1004,7 +1004,7 @@ void SystemNetworkContextManager::UpdateChromeRootStor + #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) void SystemNetworkContextManager::UpdateEnforceLocalAnchorConstraintsEnabled() { const PrefService::Preference* enforce_local_anchor_constraints_enabled_pref = local_state_->FindPreference( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.h b/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.h index eec925e2032d..66f3484d1913 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.h @@ -1,11 +1,11 @@ ---- chrome/browser/net/system_network_context_manager.h.orig 2023-04-08 11:38:38 UTC +--- chrome/browser/net/system_network_context_manager.h.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/net/system_network_context_manager.h -@@ -194,7 +194,7 @@ class SystemNetworkContextManager { - void UpdateExplicitlyAllowedNetworkPorts(); +@@ -207,7 +207,7 @@ class SystemNetworkContextManager { + #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Applies the current value of the kEnforceLocalAnchorConstraintsEnabled // pref to the enforcement state. void UpdateEnforceLocalAnchorConstraintsEnabled(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc b/www/ungoogled-chromium/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc deleted file mode 100644 index 35afccf24900..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/policy/browser_signin_policy_handler.cc.orig 2022-10-29 17:50:56 UTC -+++ chrome/browser/policy/browser_signin_policy_handler.cc -@@ -44,7 +44,7 @@ void BrowserSigninPolicyHandler::ApplyPolicySettings(c - policies.GetValue(policy_name(), base::Value::Type::INTEGER); - switch (static_cast(value->GetInt())) { - case BrowserSigninMode::kForced: --#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -+#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) - prefs->SetValue(prefs::kForceBrowserSignin, base::Value(true)); - #endif - [[fallthrough]]; 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 415ead87cf71..018faa73093a 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,180 +1,171 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -203,12 +203,12 @@ +@@ -204,12 +204,12 @@ #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) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) #include "chrome/browser/privacy_sandbox/privacy_sandbox_policy_handler.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -740,14 +740,14 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -744,14 +744,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 }, -@@ -1407,7 +1407,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1405,7 +1405,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 }, -@@ -1477,18 +1477,18 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1475,18 +1475,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 }, -@@ -1501,7 +1501,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1499,7 +1499,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 }, -@@ -1602,7 +1602,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1600,7 +1600,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 }, -@@ -1689,13 +1689,13 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1687,13 +1687,13 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kGetDisplayMediaSetSelectAllScreensAllowedForUrls, prefs::kManagedGetDisplayMediaSetSelectAllScreensAllowedForUrls, base::Value::Type::LIST }, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) { key::kAuthNegotiateDelegateByKdcPolicy, prefs::kAuthNegotiateDelegateByKdcPolicy, base::Value::Type::BOOLEAN }, -@@ -1726,7 +1726,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1724,7 +1724,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) { key::kEnforceLocalAnchorConstraintsEnabled, prefs::kEnforceLocalAnchorConstraintsEnabled, base::Value::Type::BOOLEAN }, -@@ -1755,7 +1755,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 }, -@@ -1815,7 +1815,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1806,7 +1806,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = ash::prefs::kUrlParameterToAutofillSAMLUsername, base::Value::Type::STRING }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) { key::kHighEfficiencyModeEnabled, performance_manager::user_tuning::prefs::kHighEfficiencyModeEnabled, base::Value::Type::BOOLEAN }, -@@ -1860,7 +1860,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1851,7 +1851,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = policy::policy_prefs::kForceEnablePepperVideoDecoderDevAPI, base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(ENABLE_PPAPI) -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kOutOfProcessSystemDnsResolutionEnabled, prefs::kOutOfProcessSystemDnsResolutionEnabled, base::Value::Type::BOOLEAN }, -@@ -2112,7 +2112,7 @@ std::unique_ptr BuildH +@@ -2103,7 +2103,7 @@ std::unique_ptr BuildH #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) handlers->AddHandler( std::make_unique()); handlers->AddHandler( -@@ -2169,7 +2169,7 @@ std::unique_ptr BuildH +@@ -2160,7 +2160,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) -@@ -2540,7 +2540,7 @@ std::unique_ptr BuildH +@@ -2533,7 +2533,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( -@@ -2548,7 +2548,7 @@ std::unique_ptr BuildH +@@ -2541,7 +2541,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)); -@@ -2561,7 +2561,7 @@ std::unique_ptr BuildH +@@ -2554,7 +2554,7 @@ std::unique_ptr BuildH handlers->AddHandler( std::make_unique( chrome_schema)); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) handlers->AddHandler(std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc b/www/ungoogled-chromium/files/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc new file mode 100644 index 000000000000..2f7764b0fc95 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc @@ -0,0 +1,20 @@ +--- chrome/browser/policy/policy_value_and_status_aggregator.cc.orig 2023-06-05 19:39:05 UTC ++++ chrome/browser/policy/policy_value_and_status_aggregator.cc +@@ -55,7 +55,7 @@ + #include "chrome/browser/policy/value_provider/extension_policies_value_provider.h" + #endif // BUILDFLAG(ENABLE_EXTENSIONS) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "components/policy/core/common/cloud/profile_cloud_policy_manager.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + +@@ -106,7 +106,7 @@ std::unique_ptr GetUserP + #else // BUILDFLAG(IS_CHROMEOS_ASH) + policy::CloudPolicyManager* cloud_policy_manager = + profile->GetUserCloudPolicyManager(); +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (!cloud_policy_manager) { + cloud_policy_manager = profile->GetProfileCloudPolicyManager(); + } 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 18c6d171edf3..414245e4d6c6 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,86 +1,86 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -461,13 +461,13 @@ +@@ -462,13 +462,13 @@ #include "components/os_crypt/sync/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 "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 -@@ -500,7 +500,7 @@ +@@ -501,7 +501,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 -@@ -797,7 +797,7 @@ const char kPluginsPluginsList[] = "plugins.plugins_li +@@ -728,7 +728,7 @@ const char kPluginsPluginsList[] = "plugins.plugins_li const char kPluginsShowDetails[] = "plugins.show_details"; // Deprecated 02/2023. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kWebAppsUrlHandlerInfo[] = "web_apps.url_handler_info"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -901,7 +901,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistryS +@@ -869,7 +869,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistryS #endif // BUILDFLAG(IS_CHROMEOS_ASH) // Deprecated 02/2023. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterDictionaryPref(kWebAppsUrlHandlerInfo); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -1030,7 +1030,7 @@ void RegisterProfilePrefsForMigration( +@@ -984,7 +984,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 -@@ -1679,11 +1679,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -1683,11 +1683,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 -@@ -1871,7 +1871,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local +@@ -1850,7 +1850,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local #endif // BUILDFLAG(IS_CHROMEOS_ASH) // Added 02/2023 -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) local_state->ClearPref(kWebAppsUrlHandlerInfo); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -2031,7 +2031,7 @@ void MigrateObsoleteProfilePrefs(Profile* profile) { +@@ -1985,7 +1985,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 36303f9d22ec..1fa0c8c7b2bf 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,38 @@ ---- chrome/browser/printing/print_backend_service_manager.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/printing/print_backend_service_manager.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/printing/print_backend_service_manager.cc -@@ -602,7 +602,7 @@ PrintBackendServiceManager::RegisterClient( +@@ -687,7 +687,7 @@ PrintBackendServiceManager::RegisterClient( 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 -@@ -868,7 +868,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate +@@ -960,7 +960,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; -@@ -925,7 +925,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate +@@ -1017,7 +1017,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate return kNoClientsRegisteredResetOnIdleTimeout; case ClientType::kQueryWithUi: -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // No need to update if there were other query with UI clients. if (HasQueryWithUiClientForRemoteId(remote_id)) { return absl::nullopt; +@@ -1477,7 +1477,7 @@ template + void PrintBackendServiceManager::RunSavedCallbacks( + RemoteSavedCallbacks& saved_callbacks, + const RemoteId& remote_id, +- std::remove_reference::type... result) { ++ typename std::remove_reference::type... result) { + auto found_callbacks_map = saved_callbacks.find(remote_id); + if (found_callbacks_map == saved_callbacks.end()) + return; // No callbacks to run. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__backend__service__manager.h b/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__backend__service__manager.h new file mode 100644 index 000000000000..82ea9f406e4d --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__backend__service__manager.h @@ -0,0 +1,11 @@ +--- chrome/browser/printing/print_backend_service_manager.h.orig 2023-06-05 19:39:05 UTC ++++ chrome/browser/printing/print_backend_service_manager.h +@@ -587,7 +587,7 @@ class PrintBackendServiceManager { + template + void RunSavedCallbacks(RemoteSavedCallbacks& saved_callbacks, + const RemoteId& remote_id, +- std::remove_reference::type... result); ++ typename std::remove_reference::type... result); + + // Test support for client ID management. + static void SetClientsForTesting( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_printing_printer__query.cc b/www/ungoogled-chromium/files/patch-chrome_browser_printing_printer__query.cc index 9898326e7bbf..d7f07777273e 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_printing_printer__query.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_printing_printer__query.cc @@ -1,11 +1,11 @@ ---- chrome/browser/printing/printer_query.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/printing/printer_query.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/printing/printer_query.cc -@@ -339,7 +339,7 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Di +@@ -341,7 +341,7 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Di crash_key = std::make_unique( print_backend->GetPrinterDriverInfo(printer_name)); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS) +#if (BUILDFLAG(IS_BSD) || BUILDFLAG(IS_LINUX)) && BUILDFLAG(USE_CUPS) PrinterBasicInfo basic_info; if (print_backend->GetPrinterBasicInfo(printer_name, &basic_info) == mojom::ResultCode::kSuccess) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc index 4a0485ca3525..b015fb3ae8c6 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,71 +1,71 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -361,17 +361,17 @@ +@@ -363,17 +363,17 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.h" #include "chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/idle_service_factory.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_switcher/browser_switcher_service_factory.h" #include "chrome/browser/enterprise/connectors/analysis/local_binary_upload_service_factory.h" #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h" -@@ -535,7 +535,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -543,7 +543,7 @@ void ChromeBrowserMainExtraPartsProfiles:: BreadcrumbManagerKeyedServiceFactory::GetInstance(); } browser_sync::UserEventServiceFactory::GetInstance(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) browser_switcher::BrowserSwitcherServiceFactory::GetInstance(); #endif BrowsingDataHistoryObserverService::Factory::GetInstance(); -@@ -606,12 +606,12 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -614,12 +614,12 @@ void ChromeBrowserMainExtraPartsProfiles:: #if !BUILDFLAG(IS_ANDROID) DriveServiceFactory::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_signals::SignalsAggregatorFactory::GetInstance(); #endif enterprise::ProfileIdServiceFactory::GetInstance(); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) enterprise_connectors::DeviceTrustServiceFactory::GetInstance(); enterprise_connectors::DeviceTrustConnectorServiceFactory::GetInstance(); #endif -@@ -715,12 +715,12 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -726,12 +726,12 @@ 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) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) enterprise_idle::IdleServiceFactory::GetInstance(); #endif ModelTypeStoreServiceFactory::GetInstance(); -@@ -783,7 +783,7 @@ void ChromeBrowserMainExtraPartsProfiles:: - PolicyBlocklistFactory::GetInstance(); +@@ -798,7 +798,7 @@ void ChromeBrowserMainExtraPartsProfiles:: PredictionServiceFactory::GetInstance(); + PrimaryAccountPolicyManagerFactory::GetInstance(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ProfileTokenWebSigninInterceptorFactory::GetInstance(); + policy::ProfileTokenPolicyWebSigninServiceFactory::GetInstance(); #endif - #if !BUILDFLAG(IS_ANDROID) 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 be204fba344e..7bb049fb5c02 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,40 @@ ---- chrome/browser/profiles/profile_impl.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/profiles/profile_impl.cc -@@ -258,6 +258,10 @@ +@@ -261,6 +261,10 @@ #include "chrome/browser/spellchecker/spellcheck_service.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + using bookmarks::BookmarkModel; using content::BrowserThread; using content::DownloadManagerDelegate; -@@ -852,7 +856,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) +@@ -609,7 +613,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async + #else + { + #endif // BUILDFLAG(IS_CHROMEOS_LACROS) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + ProfileManager* profile_manager = g_browser_process->profile_manager(); + ProfileAttributesEntry* entry = + profile_manager->GetProfileAttributesStorage() +@@ -873,7 +877,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) } base::FilePath ProfileImpl::last_selected_directory() { +#if BUILDFLAG(IS_OPENBSD) + // If unveil(2) is used, force the file dialog directory to something we + // know is available. + auto* sandbox = sandbox::policy::SandboxLinux::GetInstance(); + if (sandbox->unveil_initialized()) + return GetPrefs()->GetFilePath(prefs::kDownloadDefaultDirectory); + else + return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); +#else return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); +#endif } void ProfileImpl::set_last_selected_directory(const base::FilePath& path) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profiles__state.cc b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profiles__state.cc index a14ab869289b..2bcbb22727c5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profiles__state.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profiles__state.cc @@ -1,11 +1,11 @@ ---- chrome/browser/profiles/profiles_state.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/profiles/profiles_state.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/profiles/profiles_state.cc -@@ -180,7 +180,7 @@ bool IsGuestModeRequested(const base::CommandLine& com +@@ -181,7 +181,7 @@ bool IsGuestModeRequested(const base::CommandLine& com PrefService* local_state, bool show_warning) { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) DCHECK(local_state); // Check if guest mode enforcement commandline switch or policy are provided. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_route.ts b/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_route.ts index 227c3bc4e3cb..20180038e03c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_route.ts +++ b/www/ungoogled-chromium/files/patch-chrome_browser_resources_settings_route.ts @@ -1,11 +1,11 @@ ---- chrome/browser/resources/settings/route.ts.orig 2023-04-08 11:38:38 UTC +--- chrome/browser/resources/settings/route.ts.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/resources/settings/route.ts -@@ -223,7 +223,7 @@ function createBrowserSettingsRoutes(): SettingsRoutes +@@ -232,7 +232,7 @@ function createBrowserSettingsRoutes(): SettingsRoutes r.ACCESSIBILITY = r.ADVANCED.createSection( '/accessibility', 'a11y', loadTimeData.getString('a11yPageTitle')); - // + // r.CAPTIONS = r.ACCESSIBILITY.createChild('/captions'); // diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc index 13495c9ad787..ae34346817e8 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc @@ -1,20 +1,20 @@ ---- chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc @@ -18,7 +18,7 @@ #include "net/base/url_util.h" #include "third_party/abseil-cpp/absl/types/variant.h" -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/analysis/local_binary_upload_service_factory.h" #endif -@@ -364,7 +364,7 @@ BinaryUploadService* BinaryUploadService::GetForProfil +@@ -368,7 +368,7 @@ BinaryUploadService* BinaryUploadService::GetForProfil Profile* profile, const enterprise_connectors::AnalysisSettings& settings) { // Local content analysis is supported only on desktop platforms. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (settings.cloud_or_local_settings.is_cloud_analysis()) { return CloudBinaryUploadServiceFactory::GetForProfile(profile); } else { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__navigation__observer.cc b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__navigation__observer.cc new file mode 100644 index 000000000000..7352d5276d48 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__navigation__observer.cc @@ -0,0 +1,20 @@ +--- chrome/browser/supervised_user/supervised_user_navigation_observer.cc.orig 2023-06-05 19:39:05 UTC ++++ chrome/browser/supervised_user/supervised_user_navigation_observer.cc +@@ -41,7 +41,7 @@ + #include "chrome/browser/supervised_user/android/supervised_user_web_content_handler_impl.h" + #elif BUILDFLAG(IS_CHROMEOS) + #include "chrome/browser/supervised_user/chromeos/supervised_user_web_content_handler_impl.h" +-#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "chrome/browser/supervised_user/linux_mac_windows/supervised_user_web_content_handler_impl.h" + #endif + +@@ -61,7 +61,7 @@ std::unique_ptr Cr + #elif BUILDFLAG(IS_ANDROID) + return std::make_unique( + web_contents, frame_id, navigation_id); +-#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + return std::make_unique( + web_contents, frame_id, navigation_id); + #endif 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 1f1da116ed92..5446e1394495 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc @@ -1,38 +1,38 @@ ---- chrome/browser/sync/chrome_sync_client.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/sync/chrome_sync_client.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/sync/chrome_sync_client.cc @@ -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) || -@@ -473,7 +473,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy +@@ -475,7 +475,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy #endif // !BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(features::kTabGroupsSaveSyncIntegration)) { controllers.push_back(std::make_unique( syncer::SAVED_TAB_GROUP, -@@ -486,7 +486,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy +@@ -488,7 +488,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( -@@ -653,7 +653,7 @@ base::WeakPtr +@@ -655,7 +655,7 @@ base::WeakPtr ChromeSyncClient::GetControllerDelegateForModelType(syncer::ModelType type) { switch (type) { #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) case syncer::SAVED_TAB_GROUP: { DCHECK(base::FeatureList::IsEnabled( features::kTabGroupsSaveSyncIntegration)); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_sync_sync__service__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_sync_sync__service__factory.cc index fb4b25ccf6c0..a2aeb66d34ee 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_sync_sync__service__factory.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_sync_sync__service__factory.cc @@ -1,29 +1,29 @@ ---- chrome/browser/sync/sync_service_factory.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/sync/sync_service_factory.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/sync/sync_service_factory.cc -@@ -76,7 +76,7 @@ +@@ -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) -@@ -117,7 +117,7 @@ std::unique_ptr BuildSyncService( +@@ -119,7 +119,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(); -@@ -258,7 +258,7 @@ SyncServiceFactory::SyncServiceFactory() +@@ -257,7 +257,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.h b/www/ungoogled-chromium/files/patch-chrome_browser_task__manager_sampling_task__group.h index 9c17d08f7f83..45d07c6cfb10 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_task__manager_sampling_task__group.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_task__manager_sampling_task__group.h @@ -1,38 +1,38 @@ ---- chrome/browser/task_manager/sampling/task_group.h.orig 2023-03-10 11:01:21 UTC +--- chrome/browser/task_manager/sampling/task_group.h.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/task_manager/sampling/task_group.h -@@ -43,7 +43,7 @@ constexpr int kUnsupportedVMRefreshFlags = +@@ -44,7 +44,7 @@ constexpr int kUnsupportedVMRefreshFlags = REFRESH_TYPE_WEBCACHE_STATS | REFRESH_TYPE_NETWORK_USAGE | REFRESH_TYPE_NACL | REFRESH_TYPE_IDLE_WAKEUPS | REFRESH_TYPE_HANDLES | REFRESH_TYPE_START_TIME | REFRESH_TYPE_CPU_TIME | REFRESH_TYPE_PRIORITY | -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) REFRESH_TYPE_FD_COUNT | #endif REFRESH_TYPE_HARD_FAULTS; -@@ -149,7 +149,7 @@ class TaskGroup { +@@ -150,7 +150,7 @@ class TaskGroup { } #endif // BUILDFLAG(ENABLE_NACL) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) int open_fd_count() const { return open_fd_count_; } void set_open_fd_count(int open_fd_count) { open_fd_count_ = open_fd_count; } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -@@ -169,7 +169,7 @@ class TaskGroup { +@@ -170,7 +170,7 @@ class TaskGroup { void RefreshNaClDebugStubPort(int child_process_unique_id); void OnRefreshNaClDebugStubPortDone(int port); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) void OnOpenFdCountRefreshDone(int open_fd_count); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -@@ -241,7 +241,7 @@ class TaskGroup { +@@ -243,7 +243,7 @@ class TaskGroup { #if BUILDFLAG(ENABLE_NACL) int nacl_debug_stub_port_; #endif // BUILDFLAG(ENABLE_NACL) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // The number of file descriptors currently open by the process. int open_fd_count_; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) 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 24bd55d20bce..24222c94e6ed 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service.cc @@ -1,20 +1,20 @@ ---- chrome/browser/themes/theme_service.cc.orig 2023-02-11 09:11:04 UTC +--- chrome/browser/themes/theme_service.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/themes/theme_service.cc -@@ -71,7 +71,7 @@ +@@ -73,7 +73,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 -@@ -313,7 +313,7 @@ CustomThemeSupplier* ThemeService::GetThemeSupplier() +@@ -315,7 +315,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 906a4179efa8..21eaf2cddea2 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 2023-05-05 12:12:41 UTC +--- chrome/browser/ui/browser_command_controller.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/browser_command_controller.cc -@@ -104,7 +104,7 @@ +@@ -109,7 +109,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 -@@ -288,7 +288,7 @@ bool BrowserCommandController::IsReservedCommandOrKey( +@@ -293,7 +293,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(); -@@ -540,7 +540,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -545,7 +545,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; -@@ -1107,7 +1107,7 @@ void BrowserCommandController::InitCommandState() { +@@ -1146,7 +1146,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 841a54d60c7d..2cf06b1166d8 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/chrome_pages.cc.orig 2023-04-08 11:38:38 UTC +--- chrome/browser/ui/chrome_pages.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/chrome_pages.cc @@ -68,7 +68,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 -@@ -618,7 +618,7 @@ void ShowBrowserSigninOrSettings(Browser* browser, +@@ -630,7 +630,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 f123e3b7a6c9..36a44d2c9746 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.h @@ -1,20 +1,20 @@ ---- chrome/browser/ui/chrome_pages.h.orig 2023-04-08 11:38:38 UTC +--- chrome/browser/ui/chrome_pages.h.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/chrome_pages.h @@ -34,7 +34,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 -@@ -241,7 +241,7 @@ void ShowBrowserSigninOrSettings(Browser* browser, +@@ -245,7 +245,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_omnibox_omnibox__pedal__implementations.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc new file mode 100644 index 000000000000..c5db6921b224 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc @@ -0,0 +1,11 @@ +--- chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc.orig 2023-06-05 19:39:05 UTC ++++ chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc +@@ -1954,7 +1954,7 @@ const gfx::VectorIcon& GetSharingHubVectorIcon() { + return OmniboxFieldTrial::IsChromeRefreshIconsEnabled() + ? omnibox::kShareWinChromeRefreshIcon + : omnibox::kShareWinIcon; +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return OmniboxFieldTrial::IsChromeRefreshIconsEnabled() + ? omnibox::kShareLinuxChromeRefreshIcon + : omnibox::kShareIcon; 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 7ce24a2c9bfc..612506a799a9 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 2023-02-11 09:11:04 UTC +--- chrome/browser/ui/signin_view_controller.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/signin_view_controller.cc -@@ -275,7 +275,7 @@ void SigninViewController::ShowModalEnterpriseConfirma +@@ -276,7 +276,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 10d10de0bd11..3ced558e60ba 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/startup/bad_flags_prompt.cc.orig 2023-02-11 09:11:04 UTC +--- chrome/browser/ui/startup/bad_flags_prompt.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/startup/bad_flags_prompt.cc -@@ -93,7 +93,7 @@ static const char* kBadFlags[] = { +@@ -94,7 +94,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 347736c0fc48..4c31965a692c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc @@ -1,38 +1,38 @@ ---- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2023-06-05 19:39:05 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/headless/headless_mode_util.h" #include "chrome/browser/ui/startup/web_app_info_recorder_utils.h" #include "components/headless/policy/headless_mode_policy.h" -@@ -957,7 +957,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -961,7 +961,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( TRACE_EVENT0("startup", "StartupBrowserCreator::ProcessCmdLineImpl"); ComputeAndRecordLaunchMode(command_line); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode() && headless::HeadlessModePolicy::IsHeadlessModeDisabled( g_browser_process->local_state())) { -@@ -1061,7 +1061,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1065,7 +1065,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) && -@@ -1253,7 +1253,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1257,7 +1257,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( CHECK_EQ(profile_info.mode, StartupProfileMode::kBrowserWindow) << "Failed launch with app: couldn't pick a profile"; std::string app_id = command_line.GetSwitchValueASCII(switches::kAppId); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If Chrome Apps are deprecated and |app_id| is a Chrome App, display the // deprecation UI instead of launching the app. if (apps::OpenDeprecatedApplicationPrompt(privacy_safe_profile, app_id)) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_tab__helpers.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_tab__helpers.cc index 738f9842411c..c847dd046738 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_tab__helpers.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_tab__helpers.cc @@ -1,26 +1,26 @@ ---- chrome/browser/ui/tab_helpers.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/ui/tab_helpers.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/tab_helpers.cc -@@ -204,7 +204,7 @@ +@@ -208,7 +208,7 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/blocked_content/framebust_block_tab_helper.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/hats/hats_helper.h" -@@ -522,12 +522,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con +@@ -529,12 +529,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) metrics::DesktopSessionDurationObserver::CreateForWebContents(web_contents); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled( features::kHappinessTrackingSurveysForDesktopDemo) || base::FeatureList::IsEnabled(features::kTrustSafetySentimentSurvey) || diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.cc new file mode 100644 index 000000000000..c5c82734b796 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.cc @@ -0,0 +1,11 @@ +--- chrome/browser/ui/ui_features.cc.orig 2023-06-05 19:39:05 UTC ++++ chrome/browser/ui/ui_features.cc +@@ -306,7 +306,7 @@ BASE_FEATURE(kTopChromeWebUIUsesSpareRenderer, + "TopChromeWebUIUsesSpareRenderer", + base::FEATURE_ENABLED_BY_DEFAULT); + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Enables alternate update-related text to be displayed in browser app menu + // button, menu item and confirmation dialog. + BASE_FEATURE(kUpdateTextOptions, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h new file mode 100644 index 000000000000..440ed9d75ded --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h @@ -0,0 +1,11 @@ +--- chrome/browser/ui/ui_features.h.orig 2023-06-05 19:39:05 UTC ++++ chrome/browser/ui/ui_features.h +@@ -203,7 +203,7 @@ BASE_DECLARE_FEATURE(kToolbarUseHardwareBitmapDraw); + + BASE_DECLARE_FEATURE(kTopChromeWebUIUsesSpareRenderer); + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + BASE_DECLARE_FEATURE(kUpdateTextOptions); + extern const base::FeatureParam kUpdateTextOptionNumber; + #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc index 23fbaf77a97d..9f3b2f0e62a1 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc @@ -1,47 +1,47 @@ ---- chrome/browser/ui/views/frame/browser_frame.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/ui/views/frame/browser_frame.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/views/frame/browser_frame.cc @@ -51,7 +51,7 @@ #include "components/user_manager/user_manager.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/display/screen.h" #include "ui/linux/linux_ui.h" #endif @@ -59,7 +59,7 @@ namespace { bool IsUsingLinuxSystemTheme(Profile* profile) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme(); #else return false; -@@ -294,7 +294,7 @@ void BrowserFrame::OnNativeWidgetWorkspaceChanged() { +@@ -298,7 +298,7 @@ void BrowserFrame::OnNativeWidgetWorkspaceChanged() { chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace()); chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(), IsVisibleOnAllWorkspaces()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If the window was sent to a different workspace, prioritize it if // it was sent to the current workspace and deprioritize it // otherwise. This is done by MoveBrowsersInWorkspaceToFront() -@@ -442,7 +442,7 @@ void BrowserFrame::SelectNativeTheme() { +@@ -456,7 +456,7 @@ void BrowserFrame::SelectNativeTheme() { return; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const auto* linux_ui_theme = ui::LinuxUiTheme::GetForWindow(GetNativeWindow()); // Ignore the system theme for web apps with window-controls-overlay as the -@@ -459,7 +459,7 @@ void BrowserFrame::SelectNativeTheme() { +@@ -473,7 +473,7 @@ void BrowserFrame::SelectNativeTheme() { bool BrowserFrame::RegenerateFrameOnThemeChange( BrowserThemeChangeType theme_change_type) { bool need_regenerate = false; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // System and user theme changes can both change frame buttons, so the frame // always needs to be regenerated on Linux. need_regenerate = true; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame.h index c121c00dacea..a8a742595b8d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame.h @@ -1,29 +1,29 @@ ---- chrome/browser/ui/views/frame/browser_frame.h.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/ui/views/frame/browser_frame.h.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/views/frame/browser_frame.h @@ -12,7 +12,7 @@ #include "ui/views/context_menu_controller.h" #include "ui/views/widget/widget.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "ui/base/ui_base_types.h" #endif @@ -68,7 +68,7 @@ class BrowserFrame : public views::Widget, public view ~BrowserFrame() override; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Returns which edges of the frame are tiled. const ui::WindowTiledEdges& tiled_edges() const { return tiled_edges_; } void set_tiled_edges(ui::WindowTiledEdges tiled_edges) { -@@ -228,7 +228,7 @@ class BrowserFrame : public views::Widget, public view +@@ -232,7 +232,7 @@ class BrowserFrame : public views::Widget, public view // contents for smoother dragging. TabDragKind tab_drag_kind_ = TabDragKind::kNone; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) ui::WindowTiledEdges tiled_edges_; #endif 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 68df5e74bed4..695e51a00b00 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-05-05 12:12:41 UTC +--- chrome/browser/ui/views/frame/browser_view.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -1998,7 +1998,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra +@@ -2001,7 +2001,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 573b85680ab4..15a155c74876 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc @@ -1,92 +1,92 @@ ---- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc -@@ -40,7 +40,7 @@ +@@ -42,7 +42,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 -@@ -61,7 +61,7 @@ constexpr int kBackToTabImageSize = 16; +@@ -63,7 +63,7 @@ constexpr int kBackToTabImageSize = 16; // The height of the controls bar at the top of the window. constexpr int kTopControlsHeight = 30; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Frame border when window shadow is not drawn. constexpr int kFrameBorderThickness = 4; #endif -@@ -151,7 +151,7 @@ class WindowEventObserver : public ui::EventObserver { +@@ -153,7 +153,7 @@ class WindowEventObserver : public ui::EventObserver { gfx::Rect input_bounds = pip_browser_frame_view_->GetLocalBounds(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Calculate input bounds for Linux. This is needed because the input bounds // is not necessary the same as the local bounds on Linux. if (pip_browser_frame_view_->ShouldDrawFrameShadow()) { -@@ -341,7 +341,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow +@@ -350,7 +350,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow hide_close_button_animation_.set_continuous(false); hide_close_button_animation_.set_delegate(this); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) frame_background_ = std::make_unique(); #endif -@@ -469,7 +469,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( +@@ -480,7 +480,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( for (ContentSettingImageView* view : content_setting_views_) view->SetIconColor(color_provider->GetColor(kColorPipWindowForeground)); -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // On Linux the top bar background will be drawn in OnPaint(). top_bar_container_view_->SetBackground(views::CreateSolidBackground( color_provider->GetColor(kColorPipWindowTopBarBackground))); -@@ -514,7 +514,7 @@ void PictureInPictureBrowserFrameView::RemovedFromWidg +@@ -525,7 +525,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(); -@@ -715,7 +715,7 @@ void PictureInPictureBrowserFrameView::AnimationProgre +@@ -726,7 +726,7 @@ void PictureInPictureBrowserFrameView::AnimationProgre // views::View implementations: void PictureInPictureBrowserFrameView::OnPaint(gfx::Canvas* canvas) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Draw the PiP window frame borders and shadows, including the top bar // background. if (window_frame_provider_) { -@@ -838,7 +838,7 @@ void PictureInPictureBrowserFrameView::UpdateTopBarVie +@@ -849,7 +849,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(); -@@ -859,7 +859,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor +@@ -870,7 +870,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); -@@ -870,7 +870,7 @@ int PictureInPictureBrowserFrameView::GetTopAreaHeight - return FrameBorderInsets().top() + kTopControlsHeight; +@@ -889,7 +889,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie + top_height + border_thickness.bottom()); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void PictureInPictureBrowserFrameView::SetWindowFrameProvider( ui::WindowFrameProvider* window_frame_provider) { DCHECK(window_frame_provider); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h index 860ace642124..2db020c5f650 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-04-08 11:38:38 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h @@ -20,7 +20,7 @@ #include "ui/views/controls/image_view.h" #include "ui/views/widget/widget_observer.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/window_frame_provider.h" #endif @@ -78,7 +78,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; -@@ -159,7 +159,7 @@ class PictureInPictureBrowserFrameView +@@ -163,7 +163,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); -@@ -222,7 +222,7 @@ class PictureInPictureBrowserFrameView +@@ -227,7 +227,7 @@ class PictureInPictureBrowserFrameView gfx::MultiAnimation show_close_button_animation_; gfx::MultiAnimation hide_close_button_animation_; -#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_tabs_tab.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab.cc index 8a8e3da91c7e..47b9ac8951c1 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/tabs/tab.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/ui/views/tabs/tab.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/views/tabs/tab.cc -@@ -581,7 +581,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& +@@ -582,7 +582,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& if (mouse_hovered_ || !GetWidget()->IsMouseEventsEnabled()) return; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Move the hit test area for hovering up so that it is not overlapped by tab // hover cards when they are shown. // TODO(crbug.com/978134): Once Linux/CrOS widget transparency is solved, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc index 8d40ebf3df7d..5bb74776f37c 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-05-05 12:12:41 UTC +--- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/views/tabs/tab_drag_controller.cc -@@ -79,7 +79,7 @@ +@@ -81,7 +81,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 -@@ -187,7 +187,7 @@ bool IsWindowDragUsingSystemDragDropAllowed() { +@@ -189,7 +189,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)) { -@@ -361,7 +361,7 @@ void TabDragController::Init(TabDragContext* source_co +@@ -363,7 +363,7 @@ void TabDragController::Init(TabDragContext* source_co // synchronous on desktop Linux, so use that. // - ChromeOS Ash // Releasing capture on Ash cancels gestures so avoid it. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) can_release_capture_ = false; #endif start_point_in_screen_ = gfx::Point(source_view_offset, mouse_offset.y()); -@@ -957,7 +957,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon +@@ -952,7 +952,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. -@@ -1957,7 +1957,7 @@ void TabDragController::CompleteDrag() { +@@ -1978,7 +1978,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 -@@ -2340,7 +2340,7 @@ TabDragController::Liveness TabDragController::GetLoca +@@ -2361,7 +2361,7 @@ TabDragController::Liveness TabDragController::GetLoca } // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Exclude windows which are pending deletion via Browser::TabStripEmpty(). // These windows can be returned in the Linux Aura port because the browser // window which was used for dragging is not hidden once all of its tabs are diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc index c8dd6fd00d79..b16feef669c3 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc -@@ -749,7 +749,7 @@ TabHoverCardBubbleView::TabHoverCardBubbleView(Tab* ta +@@ -751,7 +751,7 @@ TabHoverCardBubbleView::TabHoverCardBubbleView(Tab* ta // not become active. Setting this to false creates the need to explicitly // hide the hovercard on press, touch, and keyboard events. SetCanActivate(false); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) set_accept_events(false); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc index c47bb9ef615b..2c752f4d8490 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc @@ -1,92 +1,92 @@ ---- chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc @@ -406,7 +406,7 @@ std::string GetFileExtension(FileExtension file_extens } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) SiteConfig GetSiteConfigurationFromAppName(const std::string& app_name) { SiteConfig config; bool is_app_found = false; -@@ -869,7 +869,7 @@ void WebAppIntegrationTestDriver::TearDownOnMainThread +@@ -872,7 +872,7 @@ void WebAppIntegrationTestDriver::TearDownOnMainThread LOG(INFO) << "TearDownOnMainThread: Deleting dangling shortcuts."; // TODO(crbug.com/1273568): Investigate the true source of flakiness instead // of papering over it here. -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ASSERT_TRUE(override_registration_->test_override->ForceDeleteAllShortcuts()); #endif LOG(INFO) -@@ -1740,7 +1740,7 @@ void WebAppIntegrationTestDriver::DeletePlatformShortc +@@ -1812,7 +1812,7 @@ void WebAppIntegrationTestDriver::DeletePlatformShortc if (app_name.empty()) { app_name = GetSiteConfiguration(site).app_name; } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ASSERT_TRUE(override_registration_->test_override->IsShortcutCreated( profile(), app_id, app_name)); ASSERT_TRUE( -@@ -2905,7 +2905,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginEna +@@ -2992,7 +2992,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginEna app_state->id, app_state->name); ASSERT_TRUE(icon_color.has_value()); ASSERT_THAT(site_config.icon_color, testing::Eq(icon_color.value())); -#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ASSERT_TRUE(override_registration_->test_override->IsRunOnOsLoginEnabled( profile(), app_state->id, app_state->name)); #endif -@@ -2920,7 +2920,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3007,7 +3007,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis GetAppBySiteMode(after_state_change_action_state_.get(), profile(), site); ASSERT_TRUE(app_state); base::ScopedAllowBlockingForTesting allow_blocking; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ASSERT_FALSE(override_registration_->test_override->IsRunOnOsLoginEnabled( profile(), app_state->id, app_state->name)); #endif -@@ -2930,7 +2930,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3017,7 +3017,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis void WebAppIntegrationTestDriver::CheckSiteHandlesFile( Site site, FileExtension file_extension) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!BeforeStateCheckAction(__FUNCTION__)) { return; } -@@ -2946,7 +2946,7 @@ void WebAppIntegrationTestDriver::CheckSiteHandlesFile +@@ -3033,7 +3033,7 @@ void WebAppIntegrationTestDriver::CheckSiteHandlesFile void WebAppIntegrationTestDriver::CheckSiteNotHandlesFile( Site site, FileExtension file_extension) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!BeforeStateCheckAction(__FUNCTION__)) { return; } -@@ -3565,7 +3565,7 @@ base::FilePath WebAppIntegrationTestDriver::GetShortcu +@@ -3759,7 +3759,7 @@ base::FilePath WebAppIntegrationTestDriver::GetShortcu base::FilePath shortcut_dir, const std::string& app_name, const AppId& app_id) { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return override_registration_->test_override->GetShortcutPath( profile(), shortcut_dir, app_id, app_name); #else -@@ -3740,7 +3740,7 @@ bool WebAppIntegrationTestDriver::IsShortcutAndIconCre +@@ -3938,7 +3938,7 @@ bool WebAppIntegrationTestDriver::IsShortcutAndIconCre const AppId& id) { base::ScopedAllowBlockingForTesting allow_blocking; bool is_shortcut_and_icon_correct = false; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool is_shortcut_correct = override_registration_->test_override->IsShortcutCreated(profile, id, name); -@@ -3784,7 +3784,7 @@ bool WebAppIntegrationTestDriver::DoIconColorsMatch(Pr +@@ -3982,7 +3982,7 @@ bool WebAppIntegrationTestDriver::DoIconColorsMatch(Pr do_icon_colors_match = (expected_icon_pixel_color == shortcut_pixel_color_apps_folder.value()); } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) SkColor expected_icon_pixel_color = GetSiteConfigurationFromAppName(name).icon_color; absl::optional actual_color_install_icon_size = diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_about__ui.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_about__ui.cc index cfdd4b2c5f96..564ed13511bd 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_about__ui.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_about__ui.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/about_ui.cc.orig 2023-04-08 11:38:38 UTC +--- chrome/browser/ui/webui/about_ui.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/webui/about_ui.cc -@@ -602,7 +602,7 @@ std::string ChromeURLs() { +@@ -603,7 +603,7 @@ std::string ChromeURLs() { return html; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::string AboutLinuxProxyConfig() { std::string data; AppendHeader(&data, -@@ -656,7 +656,7 @@ void AboutUIHTMLSource::StartDataRequest( +@@ -657,7 +657,7 @@ void AboutUIHTMLSource::StartDataRequest( response = ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(idr); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) } else if (source_name_ == chrome::kChromeUILinuxProxyConfigHost) { response = AboutLinuxProxyConfig(); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc index 24f7cf34e319..06a88fd9003d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/app_home/app_home_page_handler.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/ui/webui/app_home/app_home_page_handler.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/webui/app_home/app_home_page_handler.cc -@@ -362,7 +362,7 @@ app_home::mojom::AppInfoPtr AppHomePageHandler::Create +@@ -416,7 +416,7 @@ app_home::mojom::AppInfoPtr AppHomePageHandler::Create bool deprecated_app = false; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) auto* context = extension_system_->extension_service()->GetBrowserContext(); deprecated_app = extensions::IsExtensionUnsupportedDeprecatedApp(context, extension->id()); -@@ -425,7 +425,7 @@ void AppHomePageHandler::FillExtensionInfoList( +@@ -479,7 +479,7 @@ void AppHomePageHandler::FillExtensionInfoList( } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) auto* context = extension_system_->extension_service()->GetBrowserContext(); const bool is_deprecated_app = extensions::IsExtensionUnsupportedDeprecatedApp(context, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc index 928317dfbcf5..68787c346d19 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-05-05 12:12:41 UTC +--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -330,7 +330,7 @@ +@@ -325,7 +325,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 -@@ -356,17 +356,17 @@ +@@ -351,17 +351,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 -@@ -746,7 +746,7 @@ bool IsAboutUI(const GURL& url) { +@@ -702,7 +702,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) -@@ -1054,7 +1054,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -982,7 +982,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 -@@ -1109,7 +1109,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -1037,7 +1037,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) -@@ -1177,27 +1177,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -1105,27 +1105,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_management_management__ui__handler.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui__handler.cc index 38b5f9219625..40a27c570612 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui__handler.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui__handler.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/management/management_ui_handler.cc.orig 2023-03-10 11:01:21 UTC +--- chrome/browser/ui/webui/management/management_ui_handler.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/webui/management/management_ui_handler.cc -@@ -170,7 +170,7 @@ enum class ReportingType { +@@ -171,7 +171,7 @@ enum class ReportingType { kUserActivity }; -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kManagementScreenCaptureEvent[] = "managementScreenCaptureEvent"; const char kManagementScreenCaptureData[] = "managementScreenCaptureData"; #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -966,7 +966,7 @@ base::Value::Dict ManagementUIHandler::GetThreatProtec +@@ -967,7 +967,7 @@ base::Value::Dict ManagementUIHandler::GetThreatProtec &info); } -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (capture_policy::IsGetDisplayMediaSetSelectAllScreensAllowedForAnySite( profile)) { AddThreatProtectionPermission(kManagementScreenCaptureEvent, 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 10c3a53a7dfc..76dee2799a48 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,47 @@ ---- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -126,7 +126,7 @@ +@@ -128,7 +128,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 -@@ -146,7 +146,7 @@ +@@ -148,7 +148,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 -@@ -235,7 +235,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; -@@ -388,7 +388,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -383,7 +383,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}, -@@ -398,7 +398,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -393,7 +393,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) -@@ -420,7 +420,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -415,7 +415,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) bool show_custom_chrome_frame = ui::OzonePlatform::GetInstance() ->GetPlatformRuntimeProperties() .supports_server_side_window_decorations; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extension__status__utils.h b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extension__status__utils.h index b0b374a026fa..97f9e5141b0a 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extension__status__utils.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_extension__status__utils.h @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/extension_status_utils.h.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/web_applications/extension_status_utils.h.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/web_applications/extension_status_utils.h -@@ -48,7 +48,7 @@ bool ClearExternalExtensionUninstalled(content::Browse +@@ -56,7 +56,7 @@ bool ClearExternalExtensionUninstalled(content::Browse const std::string& extension_id); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Returns whether |extension_id| is a Chrome App and should be blocked by the // Chrome Apps Deprecation. Policy installed Chrome Apps are still allowed, and // all apps are allowed if the deprecation feature flag is not enabled. 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 24019c1e5ae8..9bbfd7ead3b3 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-03-10 11:01:21 UTC +--- chrome/browser/web_applications/extensions/extension_status_utils.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/web_applications/extensions/extension_status_utils.cc @@ -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) // TODO(b/268221237): Remove this allow-list. const char kDefaultAllowedExtensionIds[] = "alhngdkjgnedakdlnamimgfihgkmenbh," -@@ -113,7 +113,7 @@ bool ClearExternalExtensionUninstalled(content::Browse +@@ -116,7 +116,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)) + if (testing::g_enable_chrome_apps_for_testing) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.cc b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.cc deleted file mode 100644 index b26b0a5f8673..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.cc +++ /dev/null @@ -1,92 +0,0 @@ ---- chrome/browser/web_applications/os_integration/os_integration_test_override.cc.orig 2023-05-05 12:12:41 UTC -+++ chrome/browser/web_applications/os_integration/os_integration_test_override.cc -@@ -214,7 +214,7 @@ bool OsIntegrationTestOverride::IsRunOnOsLoginEnabled( - Profile* profile, - const AppId& app_id, - const std::string& app_name) { --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - std::string shortcut_filename = - "chrome-" + app_id + "-" + profile->GetBaseName().value() + ".desktop"; - return base::PathExists(startup().Append(shortcut_filename)); -@@ -491,7 +491,7 @@ base::FilePath OsIntegrationTestOverride::GetShortcutP - app_installed_profiles.end()) { - return shortcut_path; - } --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - std::string shortcut_filename = - "chrome-" + app_id + "-" + profile->GetBaseName().value() + ".desktop"; - base::FilePath shortcut_path = shortcut_dir.Append(shortcut_filename); -@@ -516,7 +516,7 @@ bool OsIntegrationTestOverride::IsShortcutCreated(Prof - base::FilePath app_shortcut_path = - GetShortcutPath(profile, chrome_apps_folder(), app_id, app_name); - return base::PathExists(app_shortcut_path); --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - base::FilePath desktop_shortcut_path = - GetShortcutPath(profile, desktop(), app_id, app_name); - return base::PathExists(desktop_shortcut_path); -@@ -544,7 +544,7 @@ bool OsIntegrationTestOverride::SimulateDeleteShortcut - GetShortcutPath(profile, chrome_apps_folder(), app_id, app_name); - DCHECK(base::PathExists(app_folder_shortcut_path)); - return base::DeletePathRecursively(app_folder_shortcut_path); --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - base::FilePath desktop_shortcut_path = - GetShortcutPath(profile, desktop(), app_id, app_name); - LOG(INFO) << desktop_shortcut_path; -@@ -561,7 +561,7 @@ bool OsIntegrationTestOverride::ForceDeleteAllShortcut - return DeleteDesktopDirOnWin() && DeleteApplicationMenuDirOnWin(); - #elif BUILDFLAG(IS_MAC) - return DeleteChromeAppsDir(); --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - return DeleteDesktopDirOnLinux(); - #else - NOTREACHED() << "Not implemented on ChromeOS/Fuchsia "; -@@ -601,7 +601,7 @@ void OsIntegrationTestOverride::EnableOrDisablePathOnL - startup_enabled_[file_path] = enable_on_login; - } - --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - bool OsIntegrationTestOverride::DeleteDesktopDirOnLinux() { - if (desktop_.IsValid()) { - return desktop_.Delete(); -@@ -634,7 +634,7 @@ OsIntegrationTestOverride::OsIntegrationTestOverride( - #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); -@@ -653,7 +653,7 @@ OsIntegrationTestOverride::OsIntegrationTestOverride( - #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(); -@@ -661,7 +661,7 @@ OsIntegrationTestOverride::OsIntegrationTestOverride( - #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) { -@@ -695,7 +695,7 @@ OsIntegrationTestOverride::~OsIntegrationTestOverride( - } - } - } --#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_os__integration__test__override.h b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h index a56ab2ef951a..488ad5de5154 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h @@ -1,29 +1,11 @@ ---- chrome/browser/web_applications/os_integration/os_integration_test_override.h.orig 2023-05-05 12:12:41 UTC +--- chrome/browser/web_applications/os_integration/os_integration_test_override.h.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/web_applications/os_integration/os_integration_test_override.h -@@ -36,7 +36,7 @@ class ShellLinkItem; - - namespace web_app { - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - struct LinuxFileRegistration { - std::string xdg_command; - std::string file_contents; -@@ -201,7 +201,7 @@ class OsIntegrationTestOverride - } - void EnableOrDisablePathOnLogin(const base::FilePath& file_path, - bool enable_on_login); +@@ -92,7 +92,7 @@ class OsIntegrationTestOverride + virtual const base::FilePath& chrome_apps_folder() = 0; + virtual void EnableOrDisablePathOnLogin(const base::FilePath& file_path, + bool enable_on_login) = 0; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - bool DeleteDesktopDirOnLinux(); - const base::FilePath& desktop() { return desktop_.GetPath(); } - const base::FilePath& startup() { return startup_.GetPath(); } -@@ -250,7 +250,7 @@ class OsIntegrationTestOverride - 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_; + virtual const base::FilePath& desktop() = 0; + virtual const base::FilePath& startup() = 0; + virtual const base::FilePath& applications_dir() = 0; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_shortcut__sub__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_shortcut__sub__manager.cc index 3bef9af3092c..1b89dfce9294 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_shortcut__sub__manager.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_shortcut__sub__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/os_integration/shortcut_sub_manager.cc.orig 2023-04-08 11:38:38 UTC +--- chrome/browser/web_applications/os_integration/shortcut_sub_manager.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/web_applications/os_integration/shortcut_sub_manager.cc -@@ -170,7 +170,7 @@ void ShortcutSubManager::Execute( +@@ -166,7 +166,7 @@ void ShortcutSubManager::Execute( return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Protocol handler update detection. Shortcuts need to be updated in this // case on Linux & Mac because the shortcut itself includes the protocol // handling metadata. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h index b5b14fffc525..d1bc5ca32b80 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h.orig 2022-12-02 17:56:32 UTC +--- chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h -@@ -45,7 +45,7 @@ void UnregisterFileHandlersWithOs(const AppId& app_id, - Profile* profile, +@@ -43,7 +43,7 @@ void UnregisterFileHandlersWithOs(const AppId& app_id, + const base::FilePath& profile_path, ResultCallback callback); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Exposed for testing purposes. Register the set of // MIME-type-to-file-extensions mappings corresponding to |file_handlers|. File - // I/O and a a callout to the Linux shell are performed asynchronously. + // I/O and callouts to the Linux shell are performed asynchronously. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.cc new file mode 100644 index 000000000000..421afc7018ef --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.cc @@ -0,0 +1,128 @@ +--- chrome/browser/web_applications/test/os_integration_test_override_impl.cc.orig 2023-06-05 19:39:05 UTC ++++ chrome/browser/web_applications/test/os_integration_test_override_impl.cc +@@ -127,7 +127,7 @@ std::vector GetFileExtensionsForProgId( + } + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Performs a blocking read of app icons from the disk. + SkColor IconManagerReadIconTopLeftColorForSize(WebAppIconManager& icon_manager, + const AppId& app_id, +@@ -224,7 +224,7 @@ bool OsIntegrationTestOverrideImpl::SimulateDeleteShor + GetShortcutPath(profile, chrome_apps_folder(), app_id, app_name); + CHECK(base::PathExists(app_folder_shortcut_path)); + return base::DeletePathRecursively(app_folder_shortcut_path); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + base::FilePath desktop_shortcut_path = + GetShortcutPath(profile, desktop(), app_id, app_name); + LOG(INFO) << desktop_shortcut_path; +@@ -241,7 +241,7 @@ bool OsIntegrationTestOverrideImpl::ForceDeleteAllShor + return DeleteDesktopDirOnWin() && DeleteApplicationMenuDirOnWin(); + #elif BUILDFLAG(IS_MAC) + return DeleteChromeAppsDir(); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return DeleteDesktopDirOnLinux(); + #else + NOTREACHED() << "Not implemented on ChromeOS/Fuchsia "; +@@ -277,7 +277,7 @@ bool OsIntegrationTestOverrideImpl::DeleteApplicationM + } + #endif // BUILDFLAG(IS_WIN) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool OsIntegrationTestOverrideImpl::DeleteDesktopDirOnLinux() { + if (desktop_.IsValid()) { + return desktop_.Delete(); +@@ -291,7 +291,7 @@ bool OsIntegrationTestOverrideImpl::IsRunOnOsLoginEnab + Profile* profile, + const AppId& app_id, + const std::string& app_name) { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + std::string shortcut_filename = + "chrome-" + app_id + "-" + profile->GetBaseName().value() + ".desktop"; + return base::PathExists(startup().Append(shortcut_filename)); +@@ -347,7 +347,7 @@ bool OsIntegrationTestOverrideImpl::IsFileExtensionHan + is_file_handled = + shell_integration::CanApplicationHandleURL(app_path, test_file_url); + base::DeleteFile(test_file_path); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + base::FilePath user_applications_dir = + applications_dir().Append("applications"); + bool database_update_called = false; +@@ -391,7 +391,7 @@ OsIntegrationTestOverrideImpl::GetShortcutIconTopLeftC + return absl::nullopt; + } + return GetIconTopLeftColorFromShortcutFile(shortcut_path); +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + WebAppProvider* provider = WebAppProvider::GetForLocalAppsUnchecked(profile); + if (!provider) { + return absl::nullopt; +@@ -441,7 +441,7 @@ base::FilePath OsIntegrationTestOverrideImpl::GetShort + app_installed_profiles.end()) { + return shortcut_path; + } +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + std::string shortcut_filename = + "chrome-" + app_id + "-" + profile->GetBaseName().value() + ".desktop"; + base::FilePath shortcut_path = shortcut_dir.Append(shortcut_filename); +@@ -467,7 +467,7 @@ bool OsIntegrationTestOverrideImpl::IsShortcutCreated( + base::FilePath app_shortcut_path = + GetShortcutPath(profile, chrome_apps_folder(), app_id, app_name); + return base::PathExists(app_shortcut_path); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + base::FilePath desktop_shortcut_path = + GetShortcutPath(profile, desktop(), app_id, app_name); + return base::PathExists(desktop_shortcut_path); +@@ -656,7 +656,7 @@ void OsIntegrationTestOverrideImpl::EnableOrDisablePat + } + #endif // BUILDFLAG(IS_MAC) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + const base::FilePath& OsIntegrationTestOverrideImpl::desktop() { + return desktop_.GetPath(); + } +@@ -691,7 +691,7 @@ OsIntegrationTestOverrideImpl::OsIntegrationTestOverri + #elif BUILDFLAG(IS_MAC) + bool success = chrome_apps_folder_.CreateUniqueTempDirUnderPath(base_path); + CHECK(success); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool success = desktop_.CreateUniqueTempDirUnderPath(base_path); + CHECK(success); + success = startup_.CreateUniqueTempDirUnderPath(base_path); +@@ -712,7 +712,7 @@ OsIntegrationTestOverrideImpl::OsIntegrationTestOverri + #elif BUILDFLAG(IS_MAC) + bool success = chrome_apps_folder_.CreateUniqueTempDir(); + CHECK(success); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool success = desktop_.CreateUniqueTempDir(); + CHECK(success); + success = startup_.CreateUniqueTempDir(); +@@ -722,7 +722,7 @@ OsIntegrationTestOverrideImpl::OsIntegrationTestOverri + #endif + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + auto callback = base::BindRepeating([](base::FilePath filename_in, + std::string xdg_command, + std::string file_contents) { +@@ -767,7 +767,7 @@ OsIntegrationTestOverrideImpl::~OsIntegrationTestOverr + } + } + } +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Reset the file handling callback. + SetUpdateMimeInfoDatabaseOnLinuxCallbackForTesting( + UpdateMimeInfoDatabaseOnLinuxCallback()); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h new file mode 100644 index 000000000000..1bfd67b2a1d9 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h @@ -0,0 +1,38 @@ +--- chrome/browser/web_applications/test/os_integration_test_override_impl.h.orig 2023-06-05 19:39:05 UTC ++++ chrome/browser/web_applications/test/os_integration_test_override_impl.h +@@ -38,7 +38,7 @@ class ShellLinkItem; + + namespace web_app { + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + struct LinuxFileRegistration { + base::FilePath file_name; + std::string xdg_command; +@@ -116,7 +116,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra + bool DeleteApplicationMenuDirOnWin(); + #endif // BUILDFLAG(IS_WIN) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool DeleteDesktopDirOnLinux(); + #endif // BUILDFLAG(IS_LINUX) + +@@ -235,7 +235,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra + const base::FilePath& chrome_apps_folder() override; + void EnableOrDisablePathOnLogin(const base::FilePath& file_path, + bool enable_on_login) override; +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + const base::FilePath& desktop() override; + const base::FilePath& startup() override; + const base::FilePath& applications_dir() override; +@@ -282,7 +282,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra + base::ScopedTempDir chrome_apps_folder_; + std::map startup_enabled_; + +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + base::ScopedTempDir desktop_; + base::ScopedTempDir startup_; + base::ScopedTempDir applications_dir_; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc index c105c6c9bb56..3b6b97545434 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-05-05 12:12:41 UTC +--- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/browser/webauthn/chrome_authenticator_request_delegate.cc -@@ -590,7 +590,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureCabl +@@ -561,7 +561,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 12a9aaaf7f67..2511a399156d 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-05-05 12:12:41 UTC +--- chrome/common/chrome_features.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/common/chrome_features.cc @@ -82,7 +82,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, @@ -100,7 +100,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. @@ -284,7 +284,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 -@@ -308,7 +308,7 @@ BASE_FEATURE(kDesktopPWAsWebBundles, +@@ -319,7 +319,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. -@@ -346,7 +346,7 @@ const base::FeatureParam kDnsOverHttpsFallbackPa +@@ -357,7 +357,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 -@@ -747,7 +747,7 @@ BASE_FEATURE(kKAnonymityServiceStorage, +@@ -761,7 +761,7 @@ BASE_FEATURE(kKAnonymityServiceStorage, "KAnonymityServiceStorage", base::FEATURE_DISABLED_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); -@@ -760,7 +760,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit +@@ -774,7 +774,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 3cb086400864..2b5e87a09cd0 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.h @@ -1,45 +1,45 @@ ---- chrome/common/chrome_features.h.orig 2023-05-05 12:12:41 UTC +--- chrome/common/chrome_features.h.orig 2023-06-05 19:39:05 UTC +++ chrome/common/chrome_features.h @@ -64,13 +64,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) -@@ -192,7 +192,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings); +@@ -198,7 +198,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); -@@ -441,7 +441,7 @@ BASE_DECLARE_FEATURE(kKAnonymityServiceOHTTPRequests); +@@ -450,7 +450,7 @@ BASE_DECLARE_FEATURE(kKAnonymityServiceOHTTPRequests); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kKAnonymityServiceStorage); -#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; -@@ -449,7 +449,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -458,7 +458,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam kLinuxLowMemoryMonitorCriticalLevel; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kListWebAppsSwitch); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths__internal.h b/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths__internal.h index 8189610cadee..13df0b208176 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths__internal.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths__internal.h @@ -1,11 +1,11 @@ ---- chrome/common/chrome_paths_internal.h.orig 2022-10-01 07:40:07 UTC +--- chrome/common/chrome_paths_internal.h.orig 2023-06-05 19:39:05 UTC +++ chrome/common/chrome_paths_internal.h -@@ -45,7 +45,7 @@ void GetUserCacheDirectory(const base::FilePath& profi +@@ -43,7 +43,7 @@ void GetUserCacheDirectory(const base::FilePath& profi // Get the path to the user's documents directory. bool GetUserDocumentsDirectory(base::FilePath* result); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Gets the path to a safe default download directory for a user. bool GetUserDownloadsDirectorySafe(base::FilePath* result); #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 b5eb86e46e07..8189d9ddd9cc 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-05-05 12:12:41 UTC +--- chrome/common/chrome_switches.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/common/chrome_switches.cc -@@ -852,14 +852,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- +@@ -860,14 +860,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 8ba15ca592d6..22301a131c55 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-04-08 11:38:38 UTC +--- chrome/common/chrome_switches.h.orig 2023-06-05 19:39:05 UTC +++ chrome/common/chrome_switches.h -@@ -266,12 +266,12 @@ extern const char kAllowNaClSocketAPI[]; +@@ -268,12 +268,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_pref__names.cc b/www/ungoogled-chromium/files/patch-chrome_common_pref__names.cc index 715069e81ea5..b12a9f95c079 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_pref__names.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_pref__names.cc @@ -1,65 +1,65 @@ ---- chrome/common/pref_names.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/common/pref_names.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/common/pref_names.cc -@@ -1151,7 +1151,7 @@ const char kUseAshProxy[] = "lacros.proxy.use_ash_prox +@@ -1181,7 +1181,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"; -@@ -1255,7 +1255,7 @@ const char kShowUpdatePromotionInfoBar[] = +@@ -1288,7 +1288,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"; -@@ -1759,7 +1759,7 @@ const char kDownloadDirUpgraded[] = "download.director +@@ -1789,7 +1789,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 -@@ -2179,7 +2179,7 @@ const char kAmbientAuthenticationInPrivateModesEnabled +@@ -2220,7 +2220,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[] = -@@ -3209,7 +3209,7 @@ const char kFileOrDirectoryPickerWithoutGestureAllowed +@@ -3248,7 +3248,7 @@ const char kFileOrDirectoryPickerWithoutGestureAllowed 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"; -@@ -3262,7 +3262,7 @@ const char kCACertificateManagementAllowed[] = +@@ -3301,7 +3301,7 @@ const char kCACertificateManagementAllowed[] = const char kChromeRootStoreEnabled[] = "chrome_root_store_enabled"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) const char kEnforceLocalAnchorConstraintsEnabled[] = "enforce_local_anchor_constraints_enabled"; #endif -@@ -3585,7 +3585,7 @@ const char kThrottleNonVisibleCrossOriginIframesAllowe +@@ -3629,7 +3629,7 @@ const char kThrottleNonVisibleCrossOriginIframesAllowe const char kNewBaseUrlInheritanceBehaviorAllowed[] = "new_base_url_inheritance_behavior_allowed"; -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If this exists and is true, Chrome may run system DNS resolution out of the // network process. If false, Chrome will run system DNS resolution in the // network process. If non-existent, Chrome will decide where to run system DNS diff --git a/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h b/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h index c4409eab2e2e..ce7437c502dd 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h @@ -1,74 +1,74 @@ ---- chrome/common/pref_names.h.orig 2023-05-05 12:12:41 UTC +--- chrome/common/pref_names.h.orig 2023-06-05 19:39:05 UTC +++ chrome/common/pref_names.h -@@ -372,7 +372,7 @@ extern const char kUseAshProxy[]; +@@ -377,7 +377,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[]; -@@ -393,7 +393,7 @@ extern const char kShowUpdatePromotionInfoBar[]; +@@ -399,7 +399,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 extern const char kPartitionDefaultZoomLevel[]; -@@ -580,7 +580,7 @@ extern const char kDownloadAllowedURLsForOpenByPolicy[ +@@ -585,7 +585,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) -@@ -698,7 +698,7 @@ extern const char kWebAppsUninstalledDefaultChromeApps +@@ -705,7 +705,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 -@@ -827,7 +827,7 @@ extern const char kGloballyScopeHTTPAuthCacheEnabled[] +@@ -832,7 +832,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) -@@ -1106,7 +1106,7 @@ extern const char kFileOrDirectoryPickerWithoutGesture +@@ -1111,7 +1111,7 @@ extern const char kFileOrDirectoryPickerWithoutGesture #endif extern const char kSandboxExternalProtocolBlocked[]; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kAllowSystemNotifications[]; #endif -@@ -1132,7 +1132,7 @@ extern const char kCACertificateManagementAllowed[]; +@@ -1137,7 +1137,7 @@ extern const char kCACertificateManagementAllowed[]; extern const char kChromeRootStoreEnabled[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // TODO(https://crbug.com/1406103): delete this after a few milestones. extern const char kEnforceLocalAnchorConstraintsEnabled[]; #endif -@@ -1282,7 +1282,7 @@ extern const char kDIPSTimerLastUpdate[]; +@@ -1288,7 +1288,7 @@ extern const char kDIPSTimerLastUpdate[]; extern const char kThrottleNonVisibleCrossOriginIframesAllowed[]; extern const char kNewBaseUrlInheritanceBehaviorAllowed[]; -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kOutOfProcessSystemDnsResolutionEnabled[]; #endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) 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 fd6f97ff08d0..0ba9ebc7225f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_url__constants.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_url__constants.cc @@ -1,11 +1,11 @@ ---- chrome/common/url_constants.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/common/url_constants.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/common/url_constants.cc -@@ -522,7 +522,7 @@ const char kPhoneHubPermissionLearnMoreURL[] = +@@ -528,7 +528,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 668a9a648324..927b242311e2 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_url__constants.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_url__constants.h @@ -1,11 +1,11 @@ ---- chrome/common/url_constants.h.orig 2023-05-05 12:12:41 UTC +--- chrome/common/url_constants.h.orig 2023-06-05 19:39:05 UTC +++ chrome/common/url_constants.h -@@ -497,7 +497,7 @@ extern const char kOutdatedPluginLearnMoreURL[]; +@@ -504,7 +504,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 d66378869463..8df90c46e69a 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-05-05 12:12:41 UTC +--- chrome/common/webui_url_constants.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/common/webui_url_constants.cc -@@ -514,18 +514,18 @@ const char kOsUIShortcutCustomizationAppURL[] = "os:// +@@ -515,18 +515,18 @@ const char kOsUIShortcutCustomizationAppURL[] = "os:// const char kOsUIVersionURL[] = "os://version"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kChromeUIWebUIJsErrorHost[] = "webuijserror"; const char kChromeUIWebUIJsErrorURL[] = "chrome://webuijserror/"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) const char kChromeUIConnectorsInternalsHost[] = "connectors-internals"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kChromeUIDiscardsHost[] = "discards"; const char kChromeUIDiscardsURL[] = "chrome://discards/"; #endif -@@ -540,14 +540,14 @@ const char kChromeUILinuxProxyConfigHost[] = "linux-pr +@@ -541,14 +541,14 @@ const char kChromeUILinuxProxyConfigHost[] = "linux-pr #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) const char kChromeUISandboxHost[] = "sandbox"; #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) const char kChromeUIBrowserSwitchHost[] = "browser-switch"; const char kChromeUIBrowserSwitchURL[] = "chrome://browser-switch/"; const char kChromeUIEnterpriseProfileWelcomeHost[] = -@@ -564,7 +564,7 @@ const char kChromeUIProfilePickerUrl[] = "chrome://pro +@@ -565,7 +565,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"; -@@ -642,7 +642,7 @@ const char kPrivacySandboxSubPagePath[] = "/privacySan +@@ -644,7 +644,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 -@@ -864,7 +864,7 @@ const char* const kChromeDebugURLs[] = { +@@ -869,7 +869,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 3ee9d1ec010c..80fe4eb601d8 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-05-05 12:12:41 UTC +--- chrome/common/webui_url_constants.h.orig 2023-06-05 19:39:05 UTC +++ chrome/common/webui_url_constants.h -@@ -435,24 +435,24 @@ extern const char kOsUIShortcutCustomizationAppURL[]; +@@ -436,24 +436,24 @@ extern const char kOsUIShortcutCustomizationAppURL[]; extern const char kOsUIVersionURL[]; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kChromeUIWebUIJsErrorHost[]; extern const char kChromeUIWebUIJsErrorURL[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) extern const char kChromeUIConnectorsInternalsHost[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kChromeUIDiscardsHost[]; extern const char kChromeUIDiscardsURL[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kChromeUIWebAppSettingsURL[]; extern const char kChromeUIWebAppSettingsHost[]; #endif -@@ -467,14 +467,14 @@ extern const char kChromeUILinuxProxyConfigHost[]; +@@ -468,14 +468,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[]; -@@ -488,7 +488,7 @@ extern const char kChromeUIProfilePickerUrl[]; +@@ -489,7 +489,7 @@ extern const char kChromeUIProfilePickerUrl[]; extern const char kChromeUIProfilePickerStartupQuery[]; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) extern const char kChromeUITabModalConfirmDialogHost[]; diff --git a/www/ungoogled-chromium/files/patch-chrome_renderer_chrome__render__frame__observer.cc b/www/ungoogled-chromium/files/patch-chrome_renderer_chrome__render__frame__observer.cc index f31f38c68a86..abb509345b43 100644 --- a/www/ungoogled-chromium/files/patch-chrome_renderer_chrome__render__frame__observer.cc +++ b/www/ungoogled-chromium/files/patch-chrome_renderer_chrome__render__frame__observer.cc @@ -1,11 +1,11 @@ ---- chrome/renderer/chrome_render_frame_observer.cc.orig 2023-03-10 11:01:21 UTC +--- chrome/renderer/chrome_render_frame_observer.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/renderer/chrome_render_frame_observer.cc -@@ -347,7 +347,7 @@ void ChromeRenderFrameObserver::OnDestruct() { +@@ -348,7 +348,7 @@ void ChromeRenderFrameObserver::OnDestruct() { void ChromeRenderFrameObserver::DraggableRegionsChanged() { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Only the main frame is allowed to control draggable regions, to avoid other // frames manipulate the regions in the browser process. if (!render_frame()->IsMainFrame()) diff --git a/www/ungoogled-chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc b/www/ungoogled-chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc index bb87427ed85f..973ce0aeabed 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-05-05 12:12:41 UTC +--- chrome/services/printing/print_backend_service_impl.cc.orig 2023-06-05 19:39:05 UTC +++ chrome/services/printing/print_backend_service_impl.cc -@@ -43,7 +43,7 @@ +@@ -45,7 +45,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" -@@ -70,7 +70,7 @@ namespace printing { +@@ -72,7 +72,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. -@@ -503,7 +503,7 @@ void PrintBackendServiceImpl::Init( +@@ -456,7 +456,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`. -@@ -714,7 +714,7 @@ void PrintBackendServiceImpl::UpdatePrintSettings( +@@ -677,7 +677,7 @@ void PrintBackendServiceImpl::UpdatePrintSettings( crash_keys_ = std::make_unique( print_backend_->GetPrinterDriverInfo(*printer_name)); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_CUPS) // Try to fill in advanced settings based upon basic info options. PrinterBasicInfo basic_info; if (print_backend_->GetPrinterBasicInfo(*printer_name, &basic_info) == diff --git a/www/ungoogled-chromium/files/patch-chrome_test_BUILD.gn b/www/ungoogled-chromium/files/patch-chrome_test_BUILD.gn index 4f509726b521..1b49123e2471 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-05-09 07:16:03 UTC +--- chrome/test/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ chrome/test/BUILD.gn -@@ -10279,7 +10279,7 @@ test("chrome_app_unittests") { +@@ -10374,7 +10374,7 @@ test("chrome_app_unittests") { "//components/heap_profiling/in_process", "//components/safe_browsing:buildflags", ] - if (!is_fuchsia && !is_mac) { + if (!is_fuchsia && !is_mac && !is_bsd) { deps += [ "//third_party/breakpad:client" ] } if (is_android) { diff --git a/www/ungoogled-chromium/files/patch-chrome_updater_app_app__uninstall.cc b/www/ungoogled-chromium/files/patch-chrome_updater_app_app__uninstall.cc new file mode 100644 index 000000000000..3dd4b18b67d3 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_updater_app_app__uninstall.cc @@ -0,0 +1,20 @@ +--- chrome/updater/app/app_uninstall.cc.orig 2023-06-05 19:39:05 UTC ++++ chrome/updater/app/app_uninstall.cc +@@ -39,7 +39,7 @@ + #include "chrome/updater/posix/setup.h" + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // TODO(crbug.com/1431487): Remove these includes after investigation. + #include "base/ranges/algorithm.h" + #include "url/gurl.h" +@@ -141,7 +141,7 @@ void AppUninstall::UninstallAll(int reason) { + uninstall_data.version = base::Version(kUpdaterVersion); + } + // TODO(crbug.com/1431487): Remove this code after investigation. +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + CHECK(base::ranges::none_of(config_->PingUrl(), [](const GURL& url) { + return url.DomainIs("update.9oo91eapis.qjz9zk"); + })) << "Attempted to send an uninstall ping to non-local server"; diff --git a/www/ungoogled-chromium/files/patch-chrome_utility_services.cc b/www/ungoogled-chromium/files/patch-chrome_utility_services.cc index e5f64074c838..8e509d82f97d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_utility_services.cc +++ b/www/ungoogled-chromium/files/patch-chrome_utility_services.cc @@ -1,56 +1,56 @@ ---- chrome/utility/services.cc.orig 2023-02-11 09:11:04 UTC +--- chrome/utility/services.cc.orig 2023-06-05 19:39:05 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) { @@ -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)); -@@ -465,7 +465,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -463,7 +463,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) -@@ -481,7 +481,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -479,7 +479,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-components_autofill_core_browser_personal__data__manager.cc b/www/ungoogled-chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc index d650c679fa0e..77cbad8fa11a 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-05-05 12:12:41 UTC +--- components/autofill/core/browser/personal_data_manager.cc.orig 2023-06-05 19:39:05 UTC +++ components/autofill/core/browser/personal_data_manager.cc -@@ -2260,7 +2260,8 @@ bool PersonalDataManager::ShouldShowCardsFromAccountOp +@@ -2317,7 +2317,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 42946c338cd2..6b4e5d2a08f5 100644 --- a/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc +++ b/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/common/autofill_payments_features.cc.orig 2023-05-05 12:12:41 UTC +--- components/autofill/core/common/autofill_payments_features.cc.orig 2023-06-05 19:39:05 UTC +++ components/autofill/core/common/autofill_payments_features.cc -@@ -267,7 +267,7 @@ const base::FeatureParam +@@ -274,7 +274,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_crash_core_common_BUILD.gn b/www/ungoogled-chromium/files/patch-components_crash_core_common_BUILD.gn index 3bbb040e9ee7..3b9135403b22 100644 --- a/www/ungoogled-chromium/files/patch-components_crash_core_common_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-components_crash_core_common_BUILD.gn @@ -1,11 +1,11 @@ ---- components/crash/core/common/BUILD.gn.orig 2022-12-02 17:56:32 UTC +--- components/crash/core/common/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ components/crash/core/common/BUILD.gn -@@ -8,7 +8,7 @@ import("//components/gwp_asan/buildflags/buildflags.gn +@@ -9,7 +9,7 @@ import("//components/gwp_asan/buildflags/buildflags.gn declare_args() { # If set to true, this will stub out and disable the entire crash key system. - use_crash_key_stubs = is_fuchsia + use_crash_key_stubs = is_fuchsia || is_bsd } group("common") { diff --git a/www/ungoogled-chromium/files/patch-components_embedder__support_user__agent__utils__unittest.cc b/www/ungoogled-chromium/files/patch-components_embedder__support_user__agent__utils__unittest.cc index f7cb714d9de2..28994b621c56 100644 --- a/www/ungoogled-chromium/files/patch-components_embedder__support_user__agent__utils__unittest.cc +++ b/www/ungoogled-chromium/files/patch-components_embedder__support_user__agent__utils__unittest.cc @@ -1,20 +1,20 @@ ---- components/embedder_support/user_agent_utils_unittest.cc.orig 2023-03-10 11:01:21 UTC +--- components/embedder_support/user_agent_utils_unittest.cc.orig 2023-06-05 19:39:05 UTC +++ components/embedder_support/user_agent_utils_unittest.cc -@@ -81,7 +81,7 @@ const char kDesktop[] = +@@ -82,7 +82,7 @@ const char kDesktop[] = "Safari/537.36"; #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::string GetMachine() { struct utsname unixinfo; uname(&unixinfo); -@@ -189,7 +189,7 @@ void CheckUserAgentStringOrdering(bool mobile_device) +@@ -190,7 +190,7 @@ void CheckUserAgentStringOrdering(bool mobile_device) int value; ASSERT_TRUE(base::StringToInt(pieces[i], &value)); } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // X11; Linux x86_64 ASSERT_EQ(2u, pieces.size()); ASSERT_EQ("X11", pieces[0]); diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__configurations.cc b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__configurations.cc index 111abd22a4df..770c3c6bade9 100644 --- a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__configurations.cc +++ b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__configurations.cc @@ -1,21 +1,21 @@ ---- components/feature_engagement/public/feature_configurations.cc.orig 2023-05-05 12:12:41 UTC +--- components/feature_engagement/public/feature_configurations.cc.orig 2023-06-05 19:39:05 UTC +++ components/feature_engagement/public/feature_configurations.cc @@ -39,7 +39,7 @@ FeatureConfig CreateAlwaysTriggerConfig(const base::Fe absl::optional GetClientSideFeatureConfig( const base::Feature* feature) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (kIPHPasswordsAccountStorageFeature.name == feature->name) { absl::optional config = FeatureConfig(); config->valid = true; -@@ -1150,7 +1150,8 @@ absl::optional GetClientSideFeatureConf +@@ -1140,7 +1140,8 @@ absl::optional GetClientSideFeatureConf #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) - if (kIPHAutofillVirtualCardSuggestionFeature.name == feature->name) { - // A config that allows the virtual card credit card suggestion IPH to be - // shown when: + + if (kIPHAutofillExternalAccountProfileSuggestionFeature.name == + feature->name) { diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.cc b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.cc index c45d575c1be6..36c697283e5a 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-05-05 12:12:41 UTC +--- components/feature_engagement/public/feature_constants.cc.orig 2023-06-05 19:39:05 UTC +++ components/feature_engagement/public/feature_constants.cc -@@ -19,7 +19,7 @@ BASE_FEATURE(kUseClientConfigIPH, +@@ -20,7 +20,7 @@ BASE_FEATURE(kUseClientConfigIPH, BASE_FEATURE(kIPHDummyFeature, "IPH_Dummy", base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - BASE_FEATURE(kIPHBatterySaverModeFeature, - "IPH_BatterySaverMode", - base::FEATURE_ENABLED_BY_DEFAULT); -@@ -472,7 +472,8 @@ BASE_FEATURE(kIPHiOSPromoCredentialProviderExtensionFe + BASE_FEATURE(kIPHAutofillFeedbackNewBadgeFeature, + "IPH_AutofillFeedbackNewBadge", + base::FEATURE_DISABLED_BY_DEFAULT); +@@ -480,7 +480,8 @@ BASE_FEATURE(kIPHiOSPromoDefaultBrowserFeature, #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(kIPHAutofillExternalAccountProfileSuggestionFeature, + "IPH_AutofillExternalAccountProfileSuggestion", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.h b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.h index 5cb039ba6c5b..dd4a48313a92 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-05-05 12:12:41 UTC +--- components/feature_engagement/public/feature_constants.h.orig 2023-06-05 19:39:05 UTC +++ components/feature_engagement/public/feature_constants.h @@ -22,7 +22,7 @@ BASE_DECLARE_FEATURE(kUseClientConfigIPH); BASE_DECLARE_FEATURE(kIPHDummyFeature); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + BASE_DECLARE_FEATURE(kIPHAutofillFeedbackNewBadgeFeature); BASE_DECLARE_FEATURE(kIPHBatterySaverModeFeature); BASE_DECLARE_FEATURE(kIPHDesktopSharedHighlightingFeature); - BASE_DECLARE_FEATURE(kIPHDesktopTabGroupsNewGroupFeature); -@@ -194,7 +194,8 @@ BASE_DECLARE_FEATURE(kIPHiOSPromoCredentialProviderExt +@@ -196,7 +196,8 @@ BASE_DECLARE_FEATURE(kIPHiOSPromoDefaultBrowserFeature #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(kIPHAutofillExternalAccountProfileSuggestionFeature); 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 97d866e2e3ff..53e7e60cde4e 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-05-05 12:12:41 UTC +--- components/feature_engagement/public/feature_list.cc.orig 2023-06-05 19:39:05 UTC +++ components/feature_engagement/public/feature_list.cc -@@ -133,7 +133,7 @@ const base::Feature* const kAllFeatures[] = { - &kIPHiOSPromoCredentialProviderExtensionFeature, +@@ -134,7 +134,7 @@ const base::Feature* const kAllFeatures[] = { + &kIPHiOSPromoDefaultBrowserFeature, #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + &kIPHAutofillFeedbackNewBadgeFeature, &kIPHBatterySaverModeFeature, &kIPHDesktopTabGroupsNewGroupFeature, - &kIPHDesktopCustomizeChromeFeature, -@@ -171,7 +171,8 @@ const base::Feature* const kAllFeatures[] = { +@@ -173,7 +173,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) + &kIPHAutofillExternalAccountProfileSuggestionFeature, &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 d787c85758e7..bbfb29373946 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-05-05 12:12:41 UTC +--- components/feature_engagement/public/feature_list.h.orig 2023-06-05 19:39:05 UTC +++ components/feature_engagement/public/feature_list.h -@@ -244,7 +244,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSPromoCredentialProviderE +@@ -246,7 +246,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSPromoDefaultBrowserFeatu #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + DEFINE_VARIATION_PARAM(kIPHAutofillFeedbackNewBadgeFeature, + "IPH_AutofillFeedbackNewBadge"); DEFINE_VARIATION_PARAM(kIPHBatterySaverModeFeature, "IPH_BatterySaverMode"); - DEFINE_VARIATION_PARAM(kIPHDesktopCustomizeChromeFeature, - "IPH_DesktopCustomizeChrome"); -@@ -302,7 +302,8 @@ DEFINE_VARIATION_PARAM(kIPHPriceTrackingInSidePanelFea +@@ -306,7 +306,8 @@ DEFINE_VARIATION_PARAM(kIPHBackNavigationMenuFeature, // 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(kIPHAutofillExternalAccountProfileSuggestionFeature, + "IPH_AutofillExternalAccountProfileSuggestion"); DEFINE_VARIATION_PARAM(kIPHAutofillVirtualCardSuggestionFeature, - "IPH_AutofillVirtualCardSuggestion"); - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || -@@ -428,7 +429,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation - VARIATION_ENTRY(kIPHiOSPromoPostRestoreFeature), +@@ -437,7 +438,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation VARIATION_ENTRY(kIPHiOSPromoCredentialProviderExtensionFeature), + VARIATION_ENTRY(kIPHiOSPromoDefaultBrowserFeature), #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + VARIATION_ENTRY(kIPHAutofillFeedbackNewBadgeFeature), VARIATION_ENTRY(kIPHBatterySaverModeFeature), VARIATION_ENTRY(kIPHDesktopCustomizeChromeFeature), - VARIATION_ENTRY(kIPHDesktopTabGroupsNewGroupFeature), -@@ -467,7 +468,8 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -477,7 +478,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(kIPHAutofillExternalAccountProfileSuggestionFeature), 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_flags__ui_flags__state.cc b/www/ungoogled-chromium/files/patch-components_flags__ui_flags__state.cc index 79d02662b268..e2e50039d7a9 100644 --- a/www/ungoogled-chromium/files/patch-components_flags__ui_flags__state.cc +++ b/www/ungoogled-chromium/files/patch-components_flags__ui_flags__state.cc @@ -1,11 +1,11 @@ ---- components/flags_ui/flags_state.cc.orig 2022-10-01 07:40:07 UTC +--- components/flags_ui/flags_state.cc.orig 2023-06-05 19:39:05 UTC +++ components/flags_ui/flags_state.cc -@@ -681,7 +681,7 @@ unsigned short FlagsState::GetCurrentPlatform() { +@@ -682,7 +682,7 @@ unsigned short FlagsState::GetCurrentPlatform() { return kOsCrOS; #elif BUILDFLAG(IS_CHROMEOS_LACROS) return kOsLacros; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kOsLinux; #elif BUILDFLAG(IS_ANDROID) return kOsAndroid; diff --git a/www/ungoogled-chromium/files/patch-components_gwp__asan_crash__handler_crash__analyzer.cc b/www/ungoogled-chromium/files/patch-components_gwp__asan_crash__handler_crash__analyzer.cc index 88015956d8f4..d0c56a8726ac 100644 --- a/www/ungoogled-chromium/files/patch-components_gwp__asan_crash__handler_crash__analyzer.cc +++ b/www/ungoogled-chromium/files/patch-components_gwp__asan_crash__handler_crash__analyzer.cc @@ -1,20 +1,20 @@ ---- components/gwp_asan/crash_handler/crash_analyzer.cc.orig 2023-05-05 12:12:41 UTC +--- components/gwp_asan/crash_handler/crash_analyzer.cc.orig 2023-06-05 19:39:05 UTC +++ components/gwp_asan/crash_handler/crash_analyzer.cc @@ -30,7 +30,7 @@ #include "third_party/crashpad/crashpad/snapshot/process_snapshot.h" #include "third_party/crashpad/crashpad/util/process/process_memory.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include #elif BUILDFLAG(IS_APPLE) #include -@@ -65,7 +65,7 @@ bool CrashAnalyzer::GetExceptionInfo( +@@ -90,7 +90,7 @@ bool CrashAnalyzer::GetExceptionInfo( crashpad::VMAddress CrashAnalyzer::GetAccessAddress( const crashpad::ExceptionSnapshot& exception) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) if (exception.Exception() == SIGSEGV || exception.Exception() == SIGBUS) return exception.ExceptionAddress(); #elif BUILDFLAG(IS_APPLE) diff --git a/www/ungoogled-chromium/files/patch-components_metrics_metrics__log.cc b/www/ungoogled-chromium/files/patch-components_metrics_metrics__log.cc index fb1c460651d7..b16974949e00 100644 --- a/www/ungoogled-chromium/files/patch-components_metrics_metrics__log.cc +++ b/www/ungoogled-chromium/files/patch-components_metrics_metrics__log.cc @@ -1,38 +1,38 @@ ---- components/metrics/metrics_log.cc.orig 2023-05-05 12:12:41 UTC +--- components/metrics/metrics_log.cc.orig 2023-06-05 19:39:05 UTC +++ components/metrics/metrics_log.cc -@@ -53,7 +53,7 @@ +@@ -52,7 +52,7 @@ #include "base/win/current_module.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/environment.h" #include "base/nix/xdg_util.h" #endif -@@ -131,7 +131,7 @@ void RecordCurrentTime( +@@ -130,7 +130,7 @@ void RecordCurrentTime( } } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) metrics::SystemProfileProto::OS::XdgSessionType ToProtoSessionType( base::nix::SessionType session_type) { switch (session_type) { @@ -390,7 +390,7 @@ void MetricsLog::RecordCoreSystemProfile( // OperatingSystemVersion refers to the ChromeOS release version. #if BUILDFLAG(IS_CHROMEOS_ASH) os->set_kernel_version(base::SysInfo::KernelVersion()); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Linux operating system version is copied over into kernel version to be // consistent. os->set_kernel_version(base::SysInfo::OperatingSystemVersion()); @@ -407,7 +407,7 @@ void MetricsLog::RecordCoreSystemProfile( os->set_build_number(base::SysInfo::GetIOSBuildNumber()); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr env = base::Environment::Create(); os->set_xdg_session_type(ToProtoSessionType(base::nix::GetSessionType(*env))); os->set_xdg_current_desktop( diff --git a/www/ungoogled-chromium/files/patch-components_omnibox_browser_omnibox__edit__model.cc b/www/ungoogled-chromium/files/patch-components_omnibox_browser_omnibox__edit__model.cc new file mode 100644 index 000000000000..b583321cabf2 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_omnibox_browser_omnibox__edit__model.cc @@ -0,0 +1,10 @@ +--- components/omnibox/browser/omnibox_edit_model.cc.orig 2023-06-05 19:39:05 UTC ++++ components/omnibox/browser/omnibox_edit_model.cc +@@ -23,6 +23,7 @@ + #include "base/trace_event/trace_event.h" + #include "base/trace_event/typed_macros.h" + #include "build/build_config.h" ++#include "build/branding_buildflags.h" + #include "components/bookmarks/browser/bookmark_model.h" + #include "components/dom_distiller/core/url_constants.h" + #include "components/dom_distiller/core/url_utils.h" diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_login__database.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_login__database.cc index 8730d69298e7..d61b63f3e338 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 2023-04-08 11:38:38 UTC +--- components/password_manager/core/browser/login_database.cc.orig 2023-06-05 19:39:05 UTC +++ components/password_manager/core/browser/login_database.cc -@@ -757,7 +757,7 @@ std::string GeneratePlaceholders(size_t count) { +@@ -771,7 +771,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) { -@@ -774,7 +774,7 @@ PasswordForm GetFormForRemoval(sql::Statement& stateme +@@ -788,7 +788,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; -@@ -1602,7 +1602,7 @@ bool LoginDatabase::DeleteAndRecreateDatabaseFile() { +@@ -1617,7 +1617,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 1235ee26bb6b..9d2681139ec3 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-05-05 12:12:41 UTC +--- components/password_manager/core/browser/login_database_unittest.cc.orig 2023-06-05 19:39:05 UTC +++ components/password_manager/core/browser/login_database_unittest.cc -@@ -2115,7 +2115,7 @@ TEST_F(LoginDatabaseUndecryptableLoginsTest, DeleteUnd +@@ -2141,7 +2141,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; -@@ -2142,7 +2142,7 @@ TEST_F(LoginDatabaseUndecryptableLoginsTest, DeleteUnd +@@ -2168,7 +2168,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, -@@ -2185,7 +2185,7 @@ TEST_F(LoginDatabaseUndecryptableLoginsTest, KeychainL +@@ -2211,7 +2211,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) { std::vector> forms; 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 eab9f9bec086..39f6c49da325 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,20 @@ ---- components/password_manager/core/common/password_manager_features.cc.orig 2023-05-05 12:12:41 UTC +--- components/password_manager/core/common/password_manager_features.cc.orig 2023-06-05 19:39:05 UTC +++ components/password_manager/core/common/password_manager_features.cc -@@ -82,7 +82,7 @@ BASE_FEATURE(kPasswordManagerLogToTerminal, +@@ -95,7 +95,7 @@ BASE_FEATURE(kPasswordManagerLogToTerminal, "PasswordManagerLogToTerminal", base::FEATURE_DISABLED_BY_DEFAULT); -#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, -@@ -210,7 +210,7 @@ BASE_FEATURE(kPasswordStrengthIndicator, +@@ -218,7 +218,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 af5f22ab6cfe..71cf0be629e1 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-05-05 12:12:41 UTC +--- components/password_manager/core/common/password_manager_features.h.orig 2023-06-05 19:39:05 UTC +++ components/password_manager/core/common/password_manager_features.h -@@ -42,7 +42,7 @@ BASE_DECLARE_FEATURE(kEnablePasswordManagerWithinFence - BASE_DECLARE_FEATURE(kFillingAcrossAffiliatedWebsites); +@@ -44,7 +44,7 @@ BASE_DECLARE_FEATURE(kFillingAcrossAffiliatedWebsites) + BASE_DECLARE_FEATURE(kFillingAcrossGroupedSites); BASE_DECLARE_FEATURE(kFillOnAccountSelect); BASE_DECLARE_FEATURE(kPasswordManagerLogToTerminal); -#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); -@@ -75,7 +75,7 @@ BASE_DECLARE_FEATURE(kRecoverFromNeverSaveAndroid); +@@ -74,7 +74,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_common_cloud_cloud__policy__client.cc b/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc index e3dca5e8ffe9..610bbe922c33 100644 --- a/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc +++ b/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc @@ -1,11 +1,11 @@ ---- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2023-04-08 11:38:38 UTC +--- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2023-06-05 19:39:05 UTC +++ components/policy/core/common/cloud/cloud_policy_client.cc -@@ -453,7 +453,7 @@ void CloudPolicyClient::FetchPolicy() { +@@ -455,7 +455,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_power__metrics_energy__metrics__provider.cc b/www/ungoogled-chromium/files/patch-components_power__metrics_energy__metrics__provider.cc new file mode 100644 index 000000000000..7ac601b460c4 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_power__metrics_energy__metrics__provider.cc @@ -0,0 +1,20 @@ +--- components/power_metrics/energy_metrics_provider.cc.orig 2023-06-05 19:39:05 UTC ++++ components/power_metrics/energy_metrics_provider.cc +@@ -7,7 +7,7 @@ + #include "build/build_config.h" + #if BUILDFLAG(IS_WIN) + #include "components/power_metrics/energy_metrics_provider_win.h" +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "components/power_metrics/energy_metrics_provider_linux.h" + #endif // BUILDFLAG(IS_WIN) + +@@ -20,7 +20,7 @@ EnergyMetricsProvider::~EnergyMetricsProvider() = defa + std::unique_ptr EnergyMetricsProvider::Create() { + #if BUILDFLAG(IS_WIN) + return EnergyMetricsProviderWin::Create(); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return EnergyMetricsProviderLinux::Create(); + #else + return nullptr; diff --git a/www/ungoogled-chromium/files/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc b/www/ungoogled-chromium/files/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc index 6fcb144b381b..db39065ef8ab 100644 --- a/www/ungoogled-chromium/files/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc +++ b/www/ungoogled-chromium/files/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc @@ -1,29 +1,29 @@ ---- components/services/paint_preview_compositor/paint_preview_compositor_collection_impl.cc.orig 2023-03-10 11:01:21 UTC +--- components/services/paint_preview_compositor/paint_preview_compositor_collection_impl.cc.orig 2023-06-05 19:39:05 UTC +++ components/services/paint_preview_compositor/paint_preview_compositor_collection_impl.cc @@ -20,7 +20,7 @@ #if BUILDFLAG(IS_WIN) #include "content/public/child/dwrite_font_proxy_init_win.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/services/font/public/cpp/font_loader.h" #endif -@@ -65,7 +65,7 @@ PaintPreviewCompositorCollectionImpl::PaintPreviewComp +@@ -66,7 +66,7 @@ PaintPreviewCompositorCollectionImpl::PaintPreviewComp // Initialize font access for Skia. #if BUILDFLAG(IS_WIN) content::InitializeDWriteFontProxy(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::PendingRemote font_service; content::UtilityThread::Get()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); -@@ -88,7 +88,7 @@ PaintPreviewCompositorCollectionImpl::PaintPreviewComp +@@ -89,7 +89,7 @@ PaintPreviewCompositorCollectionImpl::PaintPreviewComp base::BindOnce([] { SkFontMgr::RefDefault(); })); // Sanity check that fonts are working. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // No WebSandbox is provided on Linux so the local fonts aren't accessible. // This is fine since since the subsetted fonts are provided in the SkPicture. // However, we still need to check that the SkFontMgr starts as it is used by diff --git a/www/ungoogled-chromium/files/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.h b/www/ungoogled-chromium/files/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.h deleted file mode 100644 index 1499ae4d82a2..000000000000 --- a/www/ungoogled-chromium/files/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.h +++ /dev/null @@ -1,20 +0,0 @@ ---- components/services/paint_preview_compositor/paint_preview_compositor_collection_impl.h.orig 2022-10-01 07:40:07 UTC -+++ components/services/paint_preview_compositor/paint_preview_compositor_collection_impl.h -@@ -21,7 +21,7 @@ - #include "mojo/public/cpp/bindings/pending_receiver.h" - #include "mojo/public/cpp/bindings/receiver.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" - #include "third_party/skia/include/core/SkRefCnt.h" - #endif -@@ -73,7 +73,7 @@ class PaintPreviewCompositorCollectionImpl - std::unique_ptr> - compositors_; - --#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-components_update__client_update__query__params.cc b/www/ungoogled-chromium/files/patch-components_update__client_update__query__params.cc index 7c538dde74a6..b82f1f211d31 100644 --- a/www/ungoogled-chromium/files/patch-components_update__client_update__query__params.cc +++ b/www/ungoogled-chromium/files/patch-components_update__client_update__query__params.cc @@ -1,11 +1,11 @@ ---- components/update_client/update_query_params.cc.orig 2022-10-01 07:40:07 UTC +--- components/update_client/update_query_params.cc.orig 2023-06-05 19:39:05 UTC +++ components/update_client/update_query_params.cc -@@ -40,6 +40,8 @@ const char kOs[] = +@@ -41,6 +41,8 @@ const char kOs[] = "fuchsia"; #elif BUILDFLAG(IS_OPENBSD) "openbsd"; +#elif defined(OS_FREEBSD) + "freebsd"; #else #error "unknown os" #endif diff --git a/www/ungoogled-chromium/files/patch-components_variations_service_variations__service.cc b/www/ungoogled-chromium/files/patch-components_variations_service_variations__service.cc index 0754bd72840f..d98f5cd7eafc 100644 --- a/www/ungoogled-chromium/files/patch-components_variations_service_variations__service.cc +++ b/www/ungoogled-chromium/files/patch-components_variations_service_variations__service.cc @@ -1,11 +1,11 @@ ---- components/variations/service/variations_service.cc.orig 2023-05-05 12:12:41 UTC +--- components/variations/service/variations_service.cc.orig 2023-06-05 19:39:05 UTC +++ components/variations/service/variations_service.cc -@@ -94,7 +94,7 @@ std::string GetPlatformString() { +@@ -95,7 +95,7 @@ std::string GetPlatformString() { return "android"; #elif BUILDFLAG(IS_FUCHSIA) return "fuchsia"; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_SOLARIS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_BSD) // Default BSD and SOLARIS to Linux to not break those builds, although these // platforms are not officially supported by Chrome. return "linux"; diff --git a/www/ungoogled-chromium/files/patch-components_version__info_version__info.h b/www/ungoogled-chromium/files/patch-components_version__info_version__info.h index 335d9e3557d6..dc84b8d2e406 100644 --- a/www/ungoogled-chromium/files/patch-components_version__info_version__info.h +++ b/www/ungoogled-chromium/files/patch-components_version__info_version__info.h @@ -1,145 +1,143 @@ ---- components/version_info/version_info.h.orig 2023-05-05 12:12:41 UTC +--- components/version_info/version_info.h.orig 2023-06-05 19:39:05 UTC +++ components/version_info/version_info.h -@@ -7,12 +7,7 @@ +@@ -7,10 +7,6 @@ #include -#include "base/notreached.h" -#include "base/sanitizer_buildflags.h" -#include "build/branding_buildflags.h" -#include "build/build_config.h" #include "components/version_info/channel.h" --#include "components/version_info/version_info_values.h" + #include "components/version_info/version_info_values.h" - namespace base { - class Version; -@@ -20,6 +15,10 @@ class Version; +@@ -20,6 +16,10 @@ class Version; namespace version_info { +// Returns the product name and version information for the User-Agent header, +// in the format: Chrome/.... +const std::string& GetProductNameAndVersionForUserAgent(); + // Returns the product name and reduced version information for the User-Agent // header, in the format: Chrome/.0.build_version.0, where // `build_version` is a frozen BUILD number. -@@ -27,21 +26,11 @@ const std::string GetProductNameAndVersionForReducedUs +@@ -27,21 +27,11 @@ const std::string GetProductNameAndVersionForReducedUs const std::string& build_version); // Returns the product name, e.g. "Chromium" or "Google Chrome". -constexpr std::string GetProductName() { - return PRODUCT_NAME; -} +std::string GetProductName(); // Returns the version number, e.g. "6.0.490.1". -constexpr std::string GetVersionNumber() { - return PRODUCT_VERSION; -} +std::string GetVersionNumber(); -// Returns the product name and version information for the User-Agent header, -// in the format: Chrome/.... -constexpr std::string GetProductNameAndVersionForUserAgent() { - return "Chrome/" + GetVersionNumber(); -} - // Returns the major component (aka the milestone) of the version as an int, // e.g. 6 when the version is "6.0.490.1". int GetMajorVersionNumberAsInt(); -@@ -53,89 +42,22 @@ std::string GetMajorVersionNumber(); +@@ -53,89 +43,22 @@ std::string GetMajorVersionNumber(); const base::Version& GetVersion(); // Returns a version control specific identifier of this release. -constexpr std::string GetLastChange() { - return LAST_CHANGE; -} +std::string GetLastChange(); // Returns whether this is an "official" release of the current version, i.e. // whether knowing GetVersionNumber() is enough to completely determine what // GetLastChange() is. -constexpr bool IsOfficialBuild() { - return IS_OFFICIAL_BUILD; -} +bool IsOfficialBuild(); // Returns the OS type, e.g. "Windows", "Linux", "FreeBSD", ... -constexpr std::string GetOSType() { -#if BUILDFLAG(IS_WIN) - return "Windows"; -#elif BUILDFLAG(IS_IOS) - return "iOS"; -#elif BUILDFLAG(IS_MAC) - return "Mac OS X"; -#elif BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) - return "ChromeOS"; -#else - return "ChromiumOS"; -#endif -#elif BUILDFLAG(IS_ANDROID) - return "Android"; -#elif BUILDFLAG(IS_LINUX) - return "Linux"; -#elif BUILDFLAG(IS_FREEBSD) - return "FreeBSD"; -#elif BUILDFLAG(IS_OPENBSD) - return "OpenBSD"; -#elif BUILDFLAG(IS_SOLARIS) - return "Solaris"; -#elif BUILDFLAG(IS_FUCHSIA) - return "Fuchsia"; -#else - return "Unknown"; -#endif -} +std::string GetOSType(); // Returns a string equivalent of |channel|, independent of whether the build // is branded or not and without any additional modifiers. -constexpr std::string GetChannelString(Channel channel) { - switch (channel) { - case Channel::STABLE: - return "stable"; - case Channel::BETA: - return "beta"; - case Channel::DEV: - return "dev"; - case Channel::CANARY: - return "canary"; - case Channel::UNKNOWN: - return "unknown"; - } - NOTREACHED_NORETURN(); -} +std::string GetChannelString(Channel channel); // Returns a list of sanitizers enabled in this build. -constexpr std::string GetSanitizerList() { - return "" -#if defined(ADDRESS_SANITIZER) - "address " -#endif -#if BUILDFLAG(IS_HWASAN) - "hwaddress " -#endif -#if defined(LEAK_SANITIZER) - "leak " -#endif -#if defined(MEMORY_SANITIZER) - "memory " -#endif -#if defined(THREAD_SANITIZER) - "thread " -#endif -#if defined(UNDEFINED_SANITIZER) - "undefined " -#endif - ; -} +std::string GetSanitizerList(); } // namespace version_info diff --git a/www/ungoogled-chromium/files/patch-components_viz_common_gpu_dawn__context__provider.cc b/www/ungoogled-chromium/files/patch-components_viz_common_gpu_dawn__context__provider.cc index aa83acdce915..cda327d579e6 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_common_gpu_dawn__context__provider.cc +++ b/www/ungoogled-chromium/files/patch-components_viz_common_gpu_dawn__context__provider.cc @@ -1,11 +1,11 @@ ---- components/viz/common/gpu/dawn_context_provider.cc.orig 2022-10-01 07:40:07 UTC +--- components/viz/common/gpu/dawn_context_provider.cc.orig 2023-06-05 19:39:05 UTC +++ components/viz/common/gpu/dawn_context_provider.cc -@@ -20,7 +20,7 @@ namespace { +@@ -23,7 +23,7 @@ namespace { wgpu::BackendType GetDefaultBackendType() { #if BUILDFLAG(IS_WIN) return wgpu::BackendType::D3D12; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return wgpu::BackendType::Vulkan; - #else - NOTREACHED(); + #elif BUILDFLAG(IS_MAC) + return wgpu::BackendType::Metal; 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 1382d9d0fe91..b876b9a3c781 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc +++ b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc @@ -1,11 +1,11 @@ ---- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2023-05-05 12:12:41 UTC +--- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2023-06-05 19:39:05 UTC +++ components/viz/service/display_embedder/skia_output_surface_impl.cc -@@ -1279,7 +1279,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor +@@ -1289,7 +1289,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, 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 fc18439b5828..6aed364b569f 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_display_skia__renderer.cc +++ b/www/ungoogled-chromium/files/patch-components_viz_service_display_skia__renderer.cc @@ -1,11 +1,11 @@ ---- components/viz/service/display/skia_renderer.cc.orig 2023-05-05 12:12:41 UTC +--- components/viz/service/display/skia_renderer.cc.orig 2023-06-05 19:39:05 UTC +++ components/viz/service/display/skia_renderer.cc -@@ -1158,7 +1158,7 @@ void SkiaRenderer::ClearFramebuffer() { +@@ -1168,7 +1168,7 @@ void SkiaRenderer::ClearFramebuffer() { if (current_frame()->current_render_pass->has_transparent_background) { ClearCanvas(SkColors::kTransparent); } else { -#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) +#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // On DEBUG builds, opaque render passes are cleared to blue // to easily see regions that were not drawn on the screen. // ClearCavas() call causes slight pixel difference, so linux-ref and diff --git a/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc b/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc index de04d91abac2..fa84c7d6a243 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc +++ b/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc @@ -1,20 +1,20 @@ ---- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2023-05-05 12:12:41 UTC +--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2023-06-05 19:39:05 UTC +++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc -@@ -102,7 +102,7 @@ RootCompositorFrameSinkImpl::Create( +@@ -103,7 +103,7 @@ RootCompositorFrameSinkImpl::Create( // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // For X11, we need notify client about swap completion after resizing, so the // client can use it for synchronize with X11 WM. output_surface->SetNeedsSwapSizeNotifications(true); -@@ -607,7 +607,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw +@@ -617,7 +617,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw display_client_->DidCompleteSwapWithSize(pixel_size); // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) if (display_client_ && pixel_size != last_swap_pixel_size_) { last_swap_pixel_size_ = pixel_size; display_client_->DidCompleteSwapWithNewSize(last_swap_pixel_size_); diff --git a/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h b/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h index d2e308572ea0..35b5b028f995 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h +++ b/www/ungoogled-chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h @@ -1,11 +1,11 @@ ---- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h.orig 2023-03-10 11:01:21 UTC +--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h.orig 2023-06-05 19:39:05 UTC +++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h -@@ -200,7 +200,7 @@ class VIZ_SERVICE_EXPORT RootCompositorFrameSinkImpl +@@ -204,7 +204,7 @@ class VIZ_SERVICE_EXPORT RootCompositorFrameSinkImpl // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) gfx::Size last_swap_pixel_size_; #endif diff --git a/www/ungoogled-chromium/files/patch-content_app_content__main__runner__impl.cc b/www/ungoogled-chromium/files/patch-content_app_content__main__runner__impl.cc index 0b4ba508373d..aeafed35549a 100644 --- a/www/ungoogled-chromium/files/patch-content_app_content__main__runner__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_app_content__main__runner__impl.cc @@ -1,122 +1,122 @@ ---- content/app/content_main_runner_impl.cc.orig 2023-05-05 12:12:41 UTC +--- content/app/content_main_runner_impl.cc.orig 2023-06-05 19:39:05 UTC +++ content/app/content_main_runner_impl.cc -@@ -139,13 +139,13 @@ +@@ -143,13 +143,13 @@ #include "content/browser/posix_file_descriptor_info_impl.h" #include "content/public/common/content_descriptors.h" -#if !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) #include "content/public/common/zygote/zygote_fork_delegate_linux.h" #endif #endif // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/files/file_path_watcher_inotify.h" #include "base/native_library.h" #include "base/rand_util.h" -@@ -188,6 +188,10 @@ +@@ -192,6 +192,10 @@ #include "chromeos/startup/startup_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" -@@ -389,7 +393,7 @@ void InitializeZygoteSandboxForBrowserProcess( +@@ -393,7 +397,7 @@ void InitializeZygoteSandboxForBrowserProcess( } #endif // BUILDFLAG(USE_ZYGOTE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if BUILDFLAG(ENABLE_PPAPI) // Loads the (native) libraries but does not initialize them (i.e., does not -@@ -427,7 +431,10 @@ void PreloadLibraryCdms() { +@@ -431,7 +435,10 @@ void PreloadLibraryCdms() { void PreSandboxInit() { // Ensure the /dev/urandom is opened. + // we use arc4random +#if !BUILDFLAG(IS_BSD) base::GetUrandomFD(); +#endif // May use sysinfo(), sched_getaffinity(), and open various /sys/ and /proc/ // files. -@@ -438,9 +445,16 @@ void PreSandboxInit() { +@@ -442,9 +449,16 @@ void PreSandboxInit() { // https://boringssl.9oo91esource.qjz9zk/boringssl/+/HEAD/SANDBOXING.md CRYPTO_pre_sandbox_init(); +#if BUILDFLAG(IS_BSD) + // "cache" the amount of physical memory before pledge(2) + base::SysInfo::AmountOfPhysicalMemoryMB(); +#endif + +#if !BUILDFLAG(IS_BSD) // Pre-read /proc/sys/fs/inotify/max_user_watches so it doesn't have to be // allowed by the sandbox. base::GetMaxNumberOfInotifyWatches(); +#endif #if BUILDFLAG(ENABLE_PPAPI) // Ensure access to the Pepper plugins before the sandbox is turned on. -@@ -810,11 +824,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -829,11 +843,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) -@@ -1002,8 +1015,20 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -1021,8 +1034,20 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam process_type == switches::kZygoteProcess) { PreSandboxInit(); } +#elif BUILDFLAG(IS_BSD) + PreSandboxInit(); #endif +#if BUILDFLAG(IS_BSD) + if (process_type.empty()) { + sandbox::policy::SandboxLinux::Options sandbox_options; + sandbox::policy::SandboxLinux::GetInstance()->InitializeSandbox( + sandbox::policy::SandboxTypeFromCommandLine( + *base::CommandLine::ForCurrentProcess()), + sandbox::policy::SandboxLinux::PreSandboxHook(), sandbox_options); + } +#endif + delegate_->SandboxInitialized(process_type); #if BUILDFLAG(USE_ZYGOTE) -@@ -1071,7 +1096,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1090,7 +1115,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { ->ReconfigureAfterFeatureListInit(process_type); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If dynamic Mojo Core is being used, ensure that it's loaded very early in // the child/zygote process, before any sandbox is initialized. The library // is not fully initialized with IPC support until a ChildProcess is later -@@ -1106,6 +1131,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1125,6 +1150,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 90c746766136..48acfb7d47c1 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-05-05 12:12:41 UTC +--- content/browser/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ content/browser/BUILD.gn -@@ -2366,6 +2366,13 @@ source_set("browser") { +@@ -2389,6 +2389,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 ce3e1dee8bb4..ccfe68532b8a 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_browser__main__loop.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_browser__main__loop.cc @@ -1,37 +1,37 @@ ---- content/browser/browser_main_loop.cc.orig 2023-03-10 11:01:21 UTC +--- content/browser/browser_main_loop.cc.orig 2023-06-05 19:39:05 UTC +++ content/browser/browser_main_loop.cc @@ -245,6 +245,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 @@ -538,6 +544,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 @@ -575,7 +587,7 @@ int BrowserMainLoop::EarlyInitialization() { base::PlatformThread::SetCurrentThreadType(base::ThreadType::kCompositing); - #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ + #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // We use quite a few file descriptors for our IPC as well as disk the disk - // cache,and the default limit on the Mac is low (256), so bump it up. + // cache, and the default limit on Apple is low (256), so bump it up. diff --git a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc index 69787cf00f46..ad744d5a4d0b 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc @@ -1,11 +1,11 @@ ---- content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2023-05-05 12:12:41 UTC +--- content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2023-06-05 19:39:05 UTC +++ content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1723,7 +1723,7 @@ void GpuDataManagerImplPrivate::RecordCompositingMode( +@@ -1706,7 +1706,7 @@ void GpuDataManagerImplPrivate::RecordCompositingMode( UMA_HISTOGRAM_ENUMERATION("GPU.CompositingMode", compositing_mode); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool GpuDataManagerImplPrivate::IsGpuMemoryBufferNV12Supported() { return is_gpu_memory_buffer_NV12_supported_; } diff --git a/www/ungoogled-chromium/files/patch-content_browser_media_frameless__media__interface__proxy.cc b/www/ungoogled-chromium/files/patch-content_browser_media_frameless__media__interface__proxy.cc deleted file mode 100644 index 8ad8f219401a..000000000000 --- a/www/ungoogled-chromium/files/patch-content_browser_media_frameless__media__interface__proxy.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- content/browser/media/frameless_media_interface_proxy.cc.orig 2022-10-01 07:40:07 UTC -+++ content/browser/media/frameless_media_interface_proxy.cc -@@ -16,7 +16,7 @@ - #include "media/mojo/mojom/renderer_extensions.mojom.h" - #include "media/mojo/mojom/stable/stable_video_decoder.mojom.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "content/public/browser/stable_video_decoder_factory.h" - #include "media/base/media_switches.h" - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -67,7 +67,7 @@ void FramelessMediaInterfaceProxy::CreateVideoDecoder( - - mojo::PendingRemote - oop_video_decoder; --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (base::FeatureList::IsEnabled(media::kUseOutOfProcessVideoDecoding)) { - if (!render_process_host_) { - if (!stable_vd_factory_remote_.is_bound()) { diff --git a/www/ungoogled-chromium/files/patch-content_browser_media_media__interface__proxy.cc b/www/ungoogled-chromium/files/patch-content_browser_media_media__interface__proxy.cc deleted file mode 100644 index 666757f8164e..000000000000 --- a/www/ungoogled-chromium/files/patch-content_browser_media_media__interface__proxy.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- content/browser/media/media_interface_proxy.cc.orig 2022-10-29 17:50:56 UTC -+++ content/browser/media/media_interface_proxy.cc -@@ -73,7 +73,7 @@ - #include "media/mojo/services/mojo_renderer_service.h" // nogncheck - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "content/public/browser/stable_video_decoder_factory.h" - #include "media/base/media_switches.h" - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -286,7 +286,7 @@ void MediaInterfaceProxy::CreateVideoDecoder( - - mojo::PendingRemote - oop_video_decoder; --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (base::FeatureList::IsEnabled(media::kUseOutOfProcessVideoDecoding)) { - render_frame_host().GetProcess()->CreateStableVideoDecoder( - oop_video_decoder.InitWithNewPipeAndPassReceiver()); diff --git a/www/ungoogled-chromium/files/patch-content_browser_network__service__instance__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_network__service__instance__impl.cc index 3a5969406b86..85eb5641291c 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_network__service__instance__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_network__service__instance__impl.cc @@ -1,20 +1,20 @@ ---- content/browser/network_service_instance_impl.cc.orig 2023-03-10 11:01:21 UTC +--- content/browser/network_service_instance_impl.cc.orig 2023-06-05 19:39:05 UTC +++ content/browser/network_service_instance_impl.cc -@@ -76,7 +76,7 @@ +@@ -78,7 +78,7 @@ #include "content/browser/network/network_service_process_tracker_win.h" #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/browser/system_dns_resolution/system_dns_resolver.h" #include "services/network/public/mojom/system_dns_resolution.mojom-forward.h" #endif -@@ -404,7 +404,7 @@ network::mojom::NetworkServiceParamsPtr CreateNetworkS +@@ -422,7 +422,7 @@ network::mojom::NetworkServiceParamsPtr CreateNetworkS } #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (GetContentClient() ->browser() ->ShouldRunOutOfProcessSystemDnsResolution() && diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_back__forward__cache__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_back__forward__cache__impl.cc index a41a6aea5248..9203e7ed537e 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_back__forward__cache__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_back__forward__cache__impl.cc @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/back_forward_cache_impl.cc.orig 2023-05-05 12:12:41 UTC +--- content/browser/renderer_host/back_forward_cache_impl.cc.orig 2023-06-05 19:39:05 UTC +++ content/browser/renderer_host/back_forward_cache_impl.cc -@@ -57,7 +57,7 @@ BASE_FEATURE(kBackForwardCacheSize, +@@ -58,7 +58,7 @@ BASE_FEATURE(kBackForwardCacheSize, // Sets the BackForwardCache size for desktop. // See crbug.com/1291435. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT 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 12ab3420ef45..6dfab866eebc 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_delegated__frame__host.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_delegated__frame__host.cc @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/delegated_frame_host.cc.orig 2023-02-11 09:11:04 UTC +--- content/browser/renderer_host/delegated_frame_host.cc.orig 2023-06-05 19:39:05 UTC +++ content/browser/renderer_host/delegated_frame_host.cc -@@ -295,7 +295,7 @@ void DelegatedFrameHost::EmbedSurface( +@@ -296,7 +296,7 @@ void DelegatedFrameHost::EmbedSurface( if (!primary_surface_id || primary_surface_id->local_surface_id() != local_surface_id_) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // On Windows and Linux, we would like to produce new content as soon as // possible or the OS will create an additional black gutter. Until we can // block resize on surface synchronization on these platforms, we will not diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc index e11b0425e748..97be8cde1110 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc @@ -1,64 +1,64 @@ ---- content/browser/renderer_host/render_process_host_impl.cc.orig 2023-05-05 12:12:41 UTC +--- content/browser/renderer_host/render_process_host_impl.cc.orig 2023-06-05 19:39:05 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 -@@ -1150,7 +1150,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = +@@ -1180,7 +1180,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; -@@ -1242,7 +1242,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1272,7 +1272,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; -@@ -1331,7 +1331,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1361,7 +1361,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) -@@ -2157,7 +2157,7 @@ void RenderProcessHostImpl::ReinitializeLogging( +@@ -2183,7 +2183,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) { DCHECK_CURRENTLY_ON(BrowserThread::UI); -@@ -3356,6 +3356,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin +@@ -3388,6 +3388,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin switches::kDisableSpeechAPI, switches::kDisableThreadedCompositing, switches::kDisableTouchDragDrop, + switches::kDisableUnveil, switches::kDisableUseMojoVideoDecoderForPepper, switches::kDisableV8IdleTasks, switches::kDisableVideoCaptureUseGpuMemoryBuffer, -@@ -4859,7 +4860,7 @@ void RenderProcessHostImpl::ResetIPC() { +@@ -4912,7 +4913,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 7a029d44e6bd..21806ad79f14 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-05-05 12:12:41 UTC +--- content/browser/renderer_host/render_process_host_impl.h.orig 2023-06-05 19:39:05 UTC +++ content/browser/renderer_host/render_process_host_impl.h -@@ -85,7 +85,7 @@ +@@ -86,7 +86,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) -@@ -498,7 +498,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -499,7 +499,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) -@@ -707,7 +707,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -708,7 +708,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; -@@ -1182,7 +1182,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -1188,7 +1188,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_renderer__host_render__view__host__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__view__host__impl.cc index 25ba5bca058c..a53376840222 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__view__host__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__view__host__impl.cc @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/render_view_host_impl.cc.orig 2023-03-10 11:01:21 UTC +--- content/browser/renderer_host/render_view_host_impl.cc.orig 2023-06-05 19:39:05 UTC +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -250,7 +250,7 @@ void RenderViewHostImpl::GetPlatformSpecificPrefs( +@@ -272,7 +272,7 @@ void RenderViewHostImpl::GetPlatformSpecificPrefs( display::win::ScreenWin::GetSystemMetricsInDIP(SM_CYVSCROLL); prefs->arrow_bitmap_width_horizontal_scroll_bar_in_dips = display::win::ScreenWin::GetSystemMetricsInDIP(SM_CXHSCROLL); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) prefs->system_font_family_name = gfx::Font().GetFontName(); #elif BUILDFLAG(IS_FUCHSIA) // Make Blink's "focus ring" invisible. The focus ring is a hairline border diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc index 2fb0506b2936..3a8bb36ec638 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc @@ -1,47 +1,47 @@ ---- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2023-05-05 12:12:41 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2023-06-05 19:39:05 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -119,7 +119,7 @@ +@@ -121,7 +121,7 @@ #include "ui/gfx/gdi_util.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "content/browser/accessibility/browser_accessibility_auralinux.h" #include "ui/base/ime/linux/text_edit_command_auralinux.h" #include "ui/linux/linux_ui.h" -@@ -452,7 +452,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge +@@ -454,7 +454,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge return ToBrowserAccessibilityWin(manager->GetBrowserAccessibilityRoot()) ->GetCOM(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BrowserAccessibilityManager* manager = host()->GetOrCreateRootBrowserAccessibilityManager(); if (manager && manager->GetBrowserAccessibilityRoot()) -@@ -1597,7 +1597,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { +@@ -1620,7 +1620,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { return GetTextInputManager() && GetTextInputManager()->should_do_learning(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool RenderWidgetHostViewAura::SetCompositionFromExistingText( const gfx::Range& range, const std::vector& ui_ime_text_spans) { -@@ -2429,7 +2429,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { +@@ -2452,7 +2452,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { } bool RenderWidgetHostViewAura::NeedsMouseCapture() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) return NeedsInputGrab(); #else return false; -@@ -2606,7 +2606,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit +@@ -2628,7 +2628,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit if (!target_host) return; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* linux_ui = ui::LinuxUi::instance(); std::vector commands; if (!event.skip_in_browser && linux_ui && event.os_event && diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h index 4c0b07e87272..c4b63b039113 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/render_widget_host_view_aura.h.orig 2023-01-13 08:56:02 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.h.orig 2023-06-05 19:39:05 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.h -@@ -244,7 +244,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura +@@ -246,7 +246,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura ukm::SourceId GetClientSourceForMetrics() const override; bool ShouldDoLearning() override; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool SetCompositionFromExistingText( const gfx::Range& range, const std::vector& ui_ime_text_spans) override; diff --git a/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.cc b/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.cc new file mode 100644 index 000000000000..47ee9e6f4fde --- /dev/null +++ b/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.cc @@ -0,0 +1,56 @@ +--- content/browser/utility_process_host.cc.orig 2023-06-05 19:39:05 UTC ++++ content/browser/utility_process_host.cc +@@ -59,7 +59,7 @@ + #include "content/browser/v8_snapshot_files.h" + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "base/files/file_util.h" + #include "base/files/scoped_file.h" + #include "base/pickle.h" +@@ -69,7 +69,7 @@ + #include "media/capture/capture_switches.h" + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "base/task/sequenced_task_runner.h" + #include "components/viz/host/gpu_client.h" + #include "media/capture/capture_switches.h" +@@ -80,7 +80,7 @@ namespace content { + + namespace { + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + base::ScopedFD PassNetworkContextParentDirs( + std::vector network_context_parent_dirs) { + base::Pickle pickle; +@@ -129,7 +129,7 @@ UtilityProcessHost::UtilityProcessHost(std::unique_ptr + started_(false), + name_(u"utility process"), + file_data_(std::make_unique()), +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + gpu_client_(nullptr, base::OnTaskRunnerDeleter(nullptr)), + #endif + client_(std::move(client)) { +@@ -409,7 +409,7 @@ bool UtilityProcessHost::StartProcess() { + file_data_->files_to_preload.merge(GetV8SnapshotFilesToPreload()); + #endif // BUILDFLAG(IS_POSIX) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // The network service should have access to the parent directories + // necessary for its usage. + if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork) { +@@ -420,7 +420,7 @@ bool UtilityProcessHost::StartProcess() { + } + #endif // BUILDFLAG(IS_LINUX) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (metrics_name_ == video_capture::mojom::VideoCaptureService::Name_) { + if (!base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableVideoCaptureUseGpuMemoryBuffer) && diff --git a/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.h b/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.h new file mode 100644 index 000000000000..0f06fc4324de --- /dev/null +++ b/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.h @@ -0,0 +1,20 @@ +--- content/browser/utility_process_host.h.orig 2023-06-05 19:39:05 UTC ++++ content/browser/utility_process_host.h +@@ -39,7 +39,7 @@ namespace base { + class Thread; + } // namespace base + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + namespace viz { + class GpuClient; + } // namespace viz +@@ -210,7 +210,7 @@ class CONTENT_EXPORT UtilityProcessHost + std::vector pending_run_service_callbacks_; + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + std::unique_ptr gpu_client_; + #endif + diff --git a/www/ungoogled-chromium/files/patch-content_browser_utility__process__host__receiver__bindings.cc b/www/ungoogled-chromium/files/patch-content_browser_utility__process__host__receiver__bindings.cc index ce16cb77b122..c117ed5b3248 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_utility__process__host__receiver__bindings.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_utility__process__host__receiver__bindings.cc @@ -1,20 +1,33 @@ ---- content/browser/utility_process_host_receiver_bindings.cc.orig 2022-10-01 07:40:07 UTC +--- content/browser/utility_process_host_receiver_bindings.cc.orig 2023-06-05 19:39:05 UTC +++ content/browser/utility_process_host_receiver_bindings.cc -@@ -10,7 +10,7 @@ +@@ -10,12 +10,12 @@ #include "content/public/browser/content_browser_client.h" #include "content/public/common/content_client.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/services/font/public/mojom/font_service.mojom.h" // nogncheck #include "content/browser/font_service.h" // nogncheck #endif -@@ -19,7 +19,7 @@ namespace content { + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "components/viz/host/gpu_client.h" + #include "content/public/browser/gpu_client.h" + #endif +@@ -24,13 +24,13 @@ namespace content { void UtilityProcessHost::BindHostReceiver( mojo::GenericPendingReceiver receiver) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (auto font_receiver = receiver.As()) { ConnectToFontService(std::move(font_receiver)); return; + } + #endif +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (auto gpu_receiver = receiver.As()) { + gpu_client_ = + content::CreateGpuClient(std::move(gpu_receiver), base::DoNothing()); diff --git a/www/ungoogled-chromium/files/patch-content_browser_utility__sandbox__delegate.cc b/www/ungoogled-chromium/files/patch-content_browser_utility__sandbox__delegate.cc index d376630e8ee6..ce459dcf52f6 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_utility__sandbox__delegate.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_utility__sandbox__delegate.cc @@ -1,32 +1,32 @@ ---- content/browser/utility_sandbox_delegate.cc.orig 2023-03-10 11:01:21 UTC +--- content/browser/utility_sandbox_delegate.cc.orig 2023-06-05 19:39:05 UTC +++ content/browser/utility_sandbox_delegate.cc @@ -64,13 +64,13 @@ UtilitySandboxedProcessLauncherDelegate:: #if BUILDFLAG(ENABLE_PPAPI) sandbox_type_ == sandbox::mojom::Sandbox::kPpapi || #endif -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kVideoCapture || #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoDecoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoEncoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -117,10 +117,10 @@ ZygoteCommunication* UtilitySandboxedProcessLauncherDe +@@ -125,10 +125,10 @@ ZygoteCommunication* UtilitySandboxedProcessLauncherDe // unsandboxed zygote and then apply their actual sandboxes in the forked // process upon startup. if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork || -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoDecoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoEncoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS_ASH) diff --git a/www/ungoogled-chromium/files/patch-content_browser_webui_web__ui__main__frame__observer.cc b/www/ungoogled-chromium/files/patch-content_browser_webui_web__ui__main__frame__observer.cc index 524549f024b8..cc5c177de3d1 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_webui_web__ui__main__frame__observer.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_webui_web__ui__main__frame__observer.cc @@ -1,38 +1,38 @@ ---- content/browser/webui/web_ui_main_frame_observer.cc.orig 2023-03-10 11:01:21 UTC +--- content/browser/webui/web_ui_main_frame_observer.cc.orig 2023-06-05 19:39:05 UTC +++ content/browser/webui/web_ui_main_frame_observer.cc @@ -13,7 +13,7 @@ #include "content/public/browser/navigation_handle.h" #include "content/public/browser/web_ui_controller.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/feature_list.h" #include "base/functional/callback_helpers.h" #include "base/logging.h" @@ -31,7 +31,7 @@ namespace content { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Remove the pieces of the URL we don't want to send back with the error // reports. In particular, do not send query or fragments as those can have // privacy-sensitive information in them. @@ -55,7 +55,7 @@ WebUIMainFrameObserver::WebUIMainFrameObserver(WebUIIm WebUIMainFrameObserver::~WebUIMainFrameObserver() = default; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void WebUIMainFrameObserver::OnDidAddMessageToConsole( RenderFrameHost* source_frame, blink::mojom::ConsoleMessageLevel log_level, -@@ -163,7 +163,7 @@ void WebUIMainFrameObserver::ReadyToCommitNavigation( +@@ -167,7 +167,7 @@ void WebUIMainFrameObserver::ReadyToCommitNavigation( // TODO(crbug.com/1129544) This is currently disabled due to Windows DLL // thunking issues. Fix & re-enable. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) MaybeEnableWebUIJavaScriptErrorReporting(navigation_handle); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) } diff --git a/www/ungoogled-chromium/files/patch-content_common_BUILD.gn b/www/ungoogled-chromium/files/patch-content_common_BUILD.gn index a0a1c2246642..5e8ecceb8e98 100644 --- a/www/ungoogled-chromium/files/patch-content_common_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-content_common_BUILD.gn @@ -1,21 +1,21 @@ ---- content/common/BUILD.gn.orig 2023-05-05 12:12:41 UTC +--- content/common/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ content/common/BUILD.gn -@@ -430,6 +430,9 @@ if (is_linux || is_chromeos) { +@@ -432,6 +432,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" ] + } } } -@@ -475,7 +478,7 @@ mojom("mojo_bindings") { +@@ -477,7 +480,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_gpu_BUILD.gn b/www/ungoogled-chromium/files/patch-content_gpu_BUILD.gn index cb6eda53fcdc..98b2322a6551 100644 --- a/www/ungoogled-chromium/files/patch-content_gpu_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-content_gpu_BUILD.gn @@ -1,20 +1,20 @@ ---- content/gpu/BUILD.gn.orig 2023-05-05 12:12:41 UTC +--- content/gpu/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ content/gpu/BUILD.gn -@@ -102,6 +102,17 @@ target(link_target_type, "gpu_sources") { +@@ -104,6 +104,17 @@ target(link_target_type, "gpu_sources") { } } + if (is_bsd) { + sources -= [ + "gpu_sandbox_hook_linux.cc", + "gpu_sandbox_hook_linux.h", + ] + sources += [ + "gpu_sandbox_hook_bsd.cc", + "gpu_sandbox_hook_bsd.h", + ] + } + if (is_chromeos_ash) { deps += [ "//components/services/font/public/cpp", diff --git a/www/ungoogled-chromium/files/patch-content_gpu_gpu__main.cc b/www/ungoogled-chromium/files/patch-content_gpu_gpu__main.cc index b55e76685d6f..4456035712b1 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-04-08 11:38:38 UTC +--- content/gpu/gpu_main.cc.orig 2023-06-05 19:39:05 UTC +++ content/gpu/gpu_main.cc -@@ -89,7 +89,7 @@ +@@ -90,7 +90,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" -@@ -110,7 +110,7 @@ namespace content { +@@ -112,7 +112,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&); -@@ -172,7 +172,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel +@@ -175,7 +175,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_); -@@ -270,7 +270,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -285,7 +285,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 -@@ -405,7 +405,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -420,7 +420,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__blink__platform__impl.cc b/www/ungoogled-chromium/files/patch-content_ppapi__plugin_ppapi__blink__platform__impl.cc index 116b24c26313..9bbe853d18ec 100644 --- a/www/ungoogled-chromium/files/patch-content_ppapi__plugin_ppapi__blink__platform__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_ppapi__plugin_ppapi__blink__platform__impl.cc @@ -1,29 +1,29 @@ ---- content/ppapi_plugin/ppapi_blink_platform_impl.cc.orig 2022-10-01 07:40:07 UTC +--- content/ppapi_plugin/ppapi_blink_platform_impl.cc.orig 2023-06-05 19:39:05 UTC +++ content/ppapi_plugin/ppapi_blink_platform_impl.cc @@ -20,7 +20,7 @@ #if BUILDFLAG(IS_MAC) #include "content/child/child_process_sandbox_support_impl_mac.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/child/child_process_sandbox_support_impl_linux.h" #include "mojo/public/cpp/bindings/pending_remote.h" #endif @@ -35,7 +35,7 @@ typedef struct CGFont* CGFontRef; namespace content { PpapiBlinkPlatformImpl::PpapiBlinkPlatformImpl() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::PendingRemote font_service; ChildThread::Get()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); -@@ -53,7 +53,7 @@ PpapiBlinkPlatformImpl::~PpapiBlinkPlatformImpl() { +@@ -54,7 +54,7 @@ PpapiBlinkPlatformImpl::~PpapiBlinkPlatformImpl() { void PpapiBlinkPlatformImpl::Shutdown() {} blink::WebSandboxSupport* PpapiBlinkPlatformImpl::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 return nullptr; diff --git a/www/ungoogled-chromium/files/patch-content_ppapi__plugin_ppapi__blink__platform__impl.h b/www/ungoogled-chromium/files/patch-content_ppapi__plugin_ppapi__blink__platform__impl.h index 294f436373ff..d416329fe5b2 100644 --- a/www/ungoogled-chromium/files/patch-content_ppapi__plugin_ppapi__blink__platform__impl.h +++ b/www/ungoogled-chromium/files/patch-content_ppapi__plugin_ppapi__blink__platform__impl.h @@ -1,25 +1,11 @@ ---- content/ppapi_plugin/ppapi_blink_platform_impl.h.orig 2022-10-01 07:40:07 UTC +--- content/ppapi_plugin/ppapi_blink_platform_impl.h.orig 2023-06-05 19:39:05 UTC +++ content/ppapi_plugin/ppapi_blink_platform_impl.h -@@ -12,7 +12,7 @@ - #include "build/build_config.h" - #include "content/child/blink_platform_impl.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" - #include "third_party/skia/include/core/SkRefCnt.h" - #endif -@@ -38,11 +38,11 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImp +@@ -33,7 +33,7 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImp blink::WebString DefaultLocale() override; private: -#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 - --#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_public_browser_render__process__host.h b/www/ungoogled-chromium/files/patch-content_public_browser_render__process__host.h index 78bc6c9e9a16..af38ae6b439a 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-05-05 12:12:41 UTC +--- content/public/browser/render_process_host.h.orig 2023-06-05 19:39:05 UTC +++ content/public/browser/render_process_host.h @@ -54,7 +54,7 @@ - #include "content/public/browser/android/child_process_importance.h" + #include "services/network/public/mojom/attribution.mojom-forward.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) @@ -651,7 +651,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_common_content__features.cc b/www/ungoogled-chromium/files/patch-content_public_common_content__features.cc index 7dc3ade1b6f0..5b8bb01919c5 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,50 @@ ---- content/public/common/content_features.cc.orig 2023-05-05 12:12:41 UTC +--- content/public/common/content_features.cc.orig 2023-06-05 19:39:05 UTC +++ content/public/common/content_features.cc -@@ -39,7 +39,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, +@@ -44,7 +44,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 -@@ -51,7 +51,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, +@@ -56,7 +56,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 -@@ -541,7 +541,7 @@ BASE_FEATURE(kGetDisplayMediaSetAutoSelectAllScreens, +@@ -549,7 +549,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 -@@ -1392,7 +1392,7 @@ BASE_FEATURE(kWebAssemblyTiering, +@@ -1414,7 +1414,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 -@@ -1450,7 +1450,11 @@ BASE_FEATURE(kWebUICodeCache, +@@ -1472,7 +1472,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 aefa049053ed..9ea023ce4b37 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,11 @@ ---- content/public/common/content_features.h.orig 2023-04-08 11:38:38 UTC +--- content/public/common/content_features.h.orig 2023-06-05 19:39:05 UTC +++ content/public/common/content_features.h -@@ -115,7 +115,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kFractionalScrollO +@@ -117,7 +117,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); 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 a4fb7f7699d0..6c4a004d291a 100644 --- a/www/ungoogled-chromium/files/patch-content_public_common_content__switches.cc +++ b/www/ungoogled-chromium/files/patch-content_public_common_content__switches.cc @@ -1,20 +1,20 @@ ---- content/public/common/content_switches.cc.orig 2023-05-05 12:12:41 UTC +--- content/public/common/content_switches.cc.orig 2023-06-05 19:39:05 UTC +++ content/public/common/content_switches.cc -@@ -371,6 +371,8 @@ const char kEnableIsolatedWebAppsInRenderer[] = +@@ -367,6 +367,8 @@ const char kEnableIsolatedWebAppsInRenderer[] = // builds. const char kEnableLogging[] = "enable-logging"; +const char kDisableUnveil[] = "disable-unveil"; + // Enables the type, downlinkMax attributes of the NetInfo API. Also, enables // triggering of change attribute of the NetInfo API when there is a change in // the connection type. -@@ -1003,7 +1005,7 @@ const char kEnableAutomation[] = "enable-automation"; +@@ -1012,7 +1014,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 78b56a1dcaae..8a729ec25444 100644 --- a/www/ungoogled-chromium/files/patch-content_public_common_content__switches.h +++ b/www/ungoogled-chromium/files/patch-content_public_common_content__switches.h @@ -1,19 +1,19 @@ ---- content/public/common/content_switches.h.orig 2023-05-05 12:12:41 UTC +--- content/public/common/content_switches.h.orig 2023-06-05 19:39:05 UTC +++ content/public/common/content_switches.h -@@ -117,6 +117,7 @@ CONTENT_EXPORT extern const char kEnableGpuMemoryBuffe +@@ -116,6 +116,7 @@ CONTENT_EXPORT extern const char kEnableGpuMemoryBuffe CONTENT_EXPORT extern const char kEnableIsolatedWebAppsInRenderer[]; CONTENT_EXPORT extern const char kEnableLCDText[]; CONTENT_EXPORT extern const char kEnableLogging[]; +CONTENT_EXPORT extern const char kDisableUnveil[]; CONTENT_EXPORT extern const char kEnableNetworkInformationDownlinkMax[]; CONTENT_EXPORT extern const char kEnableCanvas2DLayers[]; CONTENT_EXPORT extern const char kEnablePluginPlaceholderTesting[]; -@@ -268,7 +269,7 @@ CONTENT_EXPORT extern const char kRendererWaitForJavaD +@@ -268,7 +269,7 @@ CONTENT_EXPORT extern const char kUserLevelMemoryPress // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT extern const char kEnableSpeechDispatcher[]; CONTENT_EXPORT extern const char kLLVMProfileFile[]; #endif diff --git a/www/ungoogled-chromium/files/patch-content_renderer_render__process__impl.cc b/www/ungoogled-chromium/files/patch-content_renderer_render__process__impl.cc index 13e938797246..3b5d1901215c 100644 --- a/www/ungoogled-chromium/files/patch-content_renderer_render__process__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_renderer_render__process__impl.cc @@ -1,20 +1,20 @@ ---- content/renderer/render_process_impl.cc.orig 2023-05-05 12:12:41 UTC +--- content/renderer/render_process_impl.cc.orig 2023-06-05 19:39:05 UTC +++ content/renderer/render_process_impl.cc -@@ -46,7 +46,7 @@ +@@ -45,7 +45,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 -@@ -231,7 +231,7 @@ RenderProcessImpl::RenderProcessImpl() +@@ -221,7 +221,7 @@ RenderProcessImpl::RenderProcessImpl() v8::V8::SetFlagsFromString(kSABPerContextFlag, sizeof(kSABPerContextFlag)); } -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_64) if (base::FeatureList::IsEnabled(features::kWebAssemblyTrapHandler)) { base::CommandLine* const command_line = base::CommandLine::ForCurrentProcess(); diff --git a/www/ungoogled-chromium/files/patch-content_renderer_render__thread__impl.cc b/www/ungoogled-chromium/files/patch-content_renderer_render__thread__impl.cc index 4c6f7f88c9a1..2257bc77d1c5 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-05-05 12:12:41 UTC +--- content/renderer/render_thread_impl.cc.orig 2023-06-05 19:39:05 UTC +++ content/renderer/render_thread_impl.cc @@ -202,6 +202,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_BSD) +#include #else #include #endif -@@ -1059,7 +1061,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1061,7 +1063,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) && -@@ -1068,7 +1070,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1070,7 +1072,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: gpu::kGpuFeatureStatusEnabled); const bool enable_video_encode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled(media::kVaapiVideoEncodeLinux) && #else !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoEncode) && -@@ -1856,7 +1858,7 @@ std::unique_ptr RenderThreadImpl::Create +@@ -1848,7 +1850,7 @@ std::unique_ptr RenderThreadImpl::Create bool enable_video_encode_accelerator) { mojo::PendingRemote vea_provider; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(media::kUseOutOfProcessVideoEncoding)) { BindHostReceiver(vea_provider.InitWithNewPipeAndPassReceiver()); } else { diff --git a/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc b/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc index 61a2f1c090c0..66b959c753ed 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,38 +1,45 @@ ---- content/renderer/renderer_blink_platform_impl.cc.orig 2023-05-05 12:12:41 UTC +--- content/renderer/renderer_blink_platform_impl.cc.orig 2023-06-05 19:39:05 UTC +++ content/renderer/renderer_blink_platform_impl.cc @@ -114,7 +114,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 -@@ -180,7 +180,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -178,13 +178,13 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( + sudden_termination_disables_(0), + is_locked_to_site_(false), main_thread_scheduler_(main_thread_scheduler) { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + sk_sp font_loader; + #endif + // RenderThread may not exist in some tests. if (RenderThreadImpl::current()) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::PendingRemote font_service; RenderThreadImpl::current()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); -@@ -190,7 +190,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(); -@@ -248,7 +248,7 @@ void RendererBlinkPlatformImpl::SetThreadType(base::Pl +@@ -251,7 +251,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 946157f30eb4..7364ac39bb01 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,29 +1,11 @@ ---- content/renderer/renderer_blink_platform_impl.h.orig 2023-05-05 12:12:41 UTC +--- content/renderer/renderer_blink_platform_impl.h.orig 2023-06-05 19:39:05 UTC +++ content/renderer/renderer_blink_platform_impl.h -@@ -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 -@@ -242,7 +242,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi +@@ -239,7 +239,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 -@@ -262,7 +262,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 e6f89cd16bbe..f456f9df202a 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-05-05 12:12:41 UTC +--- content/shell/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ content/shell/BUILD.gn -@@ -981,7 +981,7 @@ group("content_shell_crash_test") { +@@ -991,7 +991,7 @@ group("content_shell_crash_test") { if (is_win) { data_deps += [ "//build/win:copy_cdb_to_output" ] } - if (is_posix) { + if (is_posix && !is_bsd) { data_deps += [ "//third_party/breakpad:dump_syms", "//third_party/breakpad:minidump_stackwalk", diff --git a/www/ungoogled-chromium/files/patch-content_test_BUILD.gn b/www/ungoogled-chromium/files/patch-content_test_BUILD.gn index b185b25ee8cb..7f18bf7fdab2 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-05-05 12:12:41 UTC +--- content/test/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ content/test/BUILD.gn -@@ -2149,7 +2149,7 @@ static_library("run_all_unittests") { +@@ -2164,7 +2164,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" ] } } -@@ -3194,7 +3194,7 @@ test("content_unittests") { +@@ -3214,7 +3214,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 6106c0112de9..03574fe6a02f 100644 --- a/www/ungoogled-chromium/files/patch-content_utility_services.cc +++ b/www/ungoogled-chromium/files/patch-content_utility_services.cc @@ -1,63 +1,81 @@ ---- content/utility/services.cc.orig 2023-05-05 12:12:41 UTC +--- content/utility/services.cc.orig 2023-06-05 19:39:05 UTC +++ content/utility/services.cc @@ -65,7 +65,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" @@ -88,7 +88,7 @@ extern sandbox::TargetServices* g_utility_target_servi #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) #include "media/mojo/services/stable_video_decoder_factory_process_service.h" // nogncheck #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && -@@ -216,7 +216,7 @@ auto RunAudio(mojo::PendingReceiver receiver) { + auto service = std::make_unique( + std::move(receiver), base::SingleThreadTaskRunner::GetCurrentDefault()); +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) { + mojo::PendingRemote remote_gpu; + content::UtilityThread::Get()->BindHostReceiver( +@@ -337,7 +337,7 @@ auto RunOOPArcVideoAcceleratorFactoryService( #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) auto RunStableVideoDecoderFactoryProcessService( mojo::PendingReceiver< -@@ -331,7 +331,7 @@ auto RunStableVideoDecoderFactoryProcessService( +@@ -348,7 +348,7 @@ auto RunStableVideoDecoderFactoryProcessService( #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && // (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) auto RunVideoEncodeAcceleratorProviderFactory( mojo::PendingReceiver receiver) { -@@ -389,13 +389,13 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -406,13 +406,13 @@ void RegisterMainThreadServices(mojo::ServiceFactory& #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) services.Add(RunStableVideoDecoderFactoryProcessService); #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && // (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) services.Add(RunVideoEncodeAcceleratorProviderFactory); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.cc b/www/ungoogled-chromium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.cc index fbf6aa5f98c6..0679599ade9b 100644 --- a/www/ungoogled-chromium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.cc @@ -1,29 +1,29 @@ ---- content/utility/utility_blink_platform_with_sandbox_support_impl.cc.orig 2022-10-01 07:40:07 UTC +--- content/utility/utility_blink_platform_with_sandbox_support_impl.cc.orig 2023-06-05 19:39:05 UTC +++ content/utility/utility_blink_platform_with_sandbox_support_impl.cc @@ -9,7 +9,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 @@ -17,7 +17,7 @@ namespace content { UtilityBlinkPlatformWithSandboxSupportImpl:: UtilityBlinkPlatformWithSandboxSupportImpl() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::PendingRemote font_service; UtilityThread::Get()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); -@@ -34,7 +34,7 @@ UtilityBlinkPlatformWithSandboxSupportImpl:: +@@ -35,7 +35,7 @@ UtilityBlinkPlatformWithSandboxSupportImpl:: blink::WebSandboxSupport* UtilityBlinkPlatformWithSandboxSupportImpl::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 return nullptr; diff --git a/www/ungoogled-chromium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.h b/www/ungoogled-chromium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.h index ed290fb75c47..7a4d7ae5fc7c 100644 --- a/www/ungoogled-chromium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.h +++ b/www/ungoogled-chromium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.h @@ -1,24 +1,11 @@ ---- content/utility/utility_blink_platform_with_sandbox_support_impl.h.orig 2022-10-01 07:40:07 UTC +--- content/utility/utility_blink_platform_with_sandbox_support_impl.h.orig 2023-06-05 19:39:05 UTC +++ content/utility/utility_blink_platform_with_sandbox_support_impl.h -@@ -10,7 +10,7 @@ - #include "build/build_config.h" - #include "third_party/blink/public/platform/platform.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 -@@ -38,10 +38,10 @@ class UtilityBlinkPlatformWithSandboxSupportImpl : pub +@@ -33,7 +33,7 @@ class UtilityBlinkPlatformWithSandboxSupportImpl : pub blink::WebSandboxSupport* GetSandboxSupport() override; private: -#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 --#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_utility_utility__main.cc b/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc index 26f77e6c5054..533b1d1deaed 100644 --- a/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc +++ b/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc @@ -1,94 +1,102 @@ ---- content/utility/utility_main.cc.orig 2023-05-05 12:12:41 UTC +--- content/utility/utility_main.cc.orig 2023-06-05 19:39:05 UTC +++ content/utility/utility_main.cc @@ -31,7 +31,7 @@ #include "third_party/icu/source/common/unicode/unistr.h" #include "third_party/icu/source/i18n/unicode/timezone.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "base/file_descriptor_store.h" + #include "base/files/file_util.h" + #include "base/pickle.h" +@@ -39,7 +39,9 @@ #include "content/utility/speech/speech_recognition_sandbox_hook_linux.h" #include "gpu/config/gpu_info_collector.h" #include "media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h" -@@ -42,15 +42,21 @@ - #if BUILDFLAG(ENABLE_PRINTING) - #include "printing/sandbox/print_backend_sandbox_hook_linux.h" - #endif +#if !BUILDFLAG(IS_BSD) #include "sandbox/policy/linux/sandbox_linux.h" +#endif #include "services/audio/audio_sandbox_hook_linux.h" #include "services/network/network_sandbox_hook_linux.h" + // gn check is not smart enough to realize that this include only applies to +@@ -51,10 +53,14 @@ + #endif #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + #if BUILDFLAG(IS_CHROMEOS_ASH) #include "chromeos/ash/components/assistant/buildflags.h" #include "chromeos/ash/services/ime/ime_sandbox_hook.h" -@@ -62,7 +68,7 @@ +@@ -66,7 +72,7 @@ #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if (BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))) #include "components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h" // nogncheck #endif -@@ -83,10 +89,10 @@ namespace content { +@@ -87,7 +93,7 @@ namespace content { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + std::vector GetNetworkContextsParentDirectories() { + base::MemoryMappedFile::Region region; + base::ScopedFD read_pipe_fd = base::FileDescriptorStore::GetInstance().TakeFD( +@@ -115,7 +121,7 @@ std::vector GetNetworkContextsParentDirec + bool ShouldUseAmdGpuPolicy(sandbox::mojom::Sandbox sandbox_type) { const bool obtain_gpu_info = -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoDecoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoEncoding; -@@ -168,7 +174,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -197,7 +203,7 @@ int UtilityMain(MainFunctionParams parameters) { } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Initializes the sandbox before any threads are created. // TODO(jorgelo): move this after GTK initialization when we enable a strict // Seccomp-BPF policy. -@@ -196,7 +202,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -226,7 +232,7 @@ int UtilityMain(MainFunctionParams parameters) { pre_sandbox_hook = base::BindOnce(&screen_ai::ScreenAIPreSandboxHook); break; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) case sandbox::mojom::Sandbox::kHardwareVideoDecoding: pre_sandbox_hook = base::BindOnce(&media::HardwareVideoDecodingPreSandboxHook); -@@ -223,6 +229,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -253,6 +259,7 @@ int UtilityMain(MainFunctionParams parameters) { default: break; } +#if !BUILDFLAG(IS_BSD) if (!sandbox::policy::IsUnsandboxedSandboxType(sandbox_type) && (parameters.zygote_child || !pre_sandbox_hook.is_null())) { sandbox::policy::SandboxLinux::Options sandbox_options; -@@ -231,6 +238,11 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -261,6 +268,11 @@ int UtilityMain(MainFunctionParams parameters) { sandbox::policy::Sandbox::Initialize( sandbox_type, std::move(pre_sandbox_hook), sandbox_options); } +#else + sandbox::policy::Sandbox::Initialize( + sandbox_type, std::move(pre_sandbox_hook), + sandbox::policy::SandboxLinux::Options()); +#endif #elif BUILDFLAG(IS_WIN) g_utility_target_services = parameters.sandbox_info->target_services; #endif diff --git a/www/ungoogled-chromium/files/patch-extensions_browser_api_messaging_message__service.cc b/www/ungoogled-chromium/files/patch-extensions_browser_api_messaging_message__service.cc index 813b6df3b3de..b3e05047eedd 100644 --- a/www/ungoogled-chromium/files/patch-extensions_browser_api_messaging_message__service.cc +++ b/www/ungoogled-chromium/files/patch-extensions_browser_api_messaging_message__service.cc @@ -1,20 +1,20 @@ ---- extensions/browser/api/messaging/message_service.cc.orig 2023-04-08 11:38:38 UTC +--- extensions/browser/api/messaging/message_service.cc.orig 2023-06-05 19:39:05 UTC +++ extensions/browser/api/messaging/message_service.cc -@@ -70,7 +70,7 @@ namespace { +@@ -71,7 +71,7 @@ namespace { const char kReceivingEndDoesntExistError[] = "Could not establish connection. Receiving end does not exist."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kMissingPermissionError[] = "Access to native messaging requires nativeMessaging permission."; const char kProhibitedByPoliciesError[] = -@@ -464,7 +464,7 @@ void MessageService::OpenChannelToNativeApp( +@@ -483,7 +483,7 @@ void MessageService::OpenChannelToNativeApp( return; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool has_permission = extension->permissions_data()->HasAPIPermission( mojom::APIPermissionID::kNativeMessaging); if (!has_permission) { diff --git a/www/ungoogled-chromium/files/patch-extensions_browser_api_networking__private_networking__private__delegate__factory.cc b/www/ungoogled-chromium/files/patch-extensions_browser_api_networking__private_networking__private__delegate__factory.cc index 6e83a4bfbcac..831cbe4d462b 100644 --- a/www/ungoogled-chromium/files/patch-extensions_browser_api_networking__private_networking__private__delegate__factory.cc +++ b/www/ungoogled-chromium/files/patch-extensions_browser_api_networking__private_networking__private__delegate__factory.cc @@ -1,20 +1,20 @@ ---- extensions/browser/api/networking_private/networking_private_delegate_factory.cc.orig 2023-04-08 11:38:38 UTC +--- extensions/browser/api/networking_private/networking_private_delegate_factory.cc.orig 2023-06-05 19:39:05 UTC +++ extensions/browser/api/networking_private/networking_private_delegate_factory.cc @@ -14,7 +14,7 @@ #include "extensions/browser/api/networking_private/networking_private_chromeos.h" #elif BUILDFLAG(IS_CHROMEOS_LACROS) #include "extensions/browser/api/networking_private/networking_private_lacros.h" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "extensions/browser/api/networking_private/networking_private_linux.h" #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) #include "components/wifi/wifi_service.h" -@@ -68,7 +68,7 @@ KeyedService* NetworkingPrivateDelegateFactory::BuildS +@@ -66,7 +66,7 @@ KeyedService* NetworkingPrivateDelegateFactory::BuildS delegate = new NetworkingPrivateChromeOS(browser_context); #elif BUILDFLAG(IS_CHROMEOS_LACROS) delegate = new NetworkingPrivateLacros(browser_context); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) delegate = new NetworkingPrivateLinux(); #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) std::unique_ptr wifi_service(wifi::WiFiService::Create()); diff --git a/www/ungoogled-chromium/files/patch-extensions_browser_extension__prefs.cc b/www/ungoogled-chromium/files/patch-extensions_browser_extension__prefs.cc deleted file mode 100644 index 6c863d6cd584..000000000000 --- a/www/ungoogled-chromium/files/patch-extensions_browser_extension__prefs.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- extensions/browser/extension_prefs.cc.orig 2023-04-08 11:38:38 UTC -+++ extensions/browser/extension_prefs.cc -@@ -2228,7 +2228,7 @@ void ExtensionPrefs::RegisterProfilePrefs( - registry->RegisterListPref( - pref_names::kExtendedBackgroundLifetimeForPortConnectionsToUrls); - #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 - registry->RegisterBooleanPref( diff --git a/www/ungoogled-chromium/files/patch-extensions_browser_pref__names.cc b/www/ungoogled-chromium/files/patch-extensions_browser_pref__names.cc deleted file mode 100644 index 08f329f1568b..000000000000 --- a/www/ungoogled-chromium/files/patch-extensions_browser_pref__names.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- extensions/browser/pref_names.cc.orig 2023-04-08 11:38:38 UTC -+++ extensions/browser/pref_names.cc -@@ -53,7 +53,7 @@ const char kManifestV2Availability[] = "extensions.man - const char kPinnedExtensions[] = "extensions.pinned_extensions"; - const char kStorageGarbageCollect[] = "extensions.storage.garbagecollect"; - #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 - const char kChromeAppsWebViewPermissiveBehaviorAllowed[] = diff --git a/www/ungoogled-chromium/files/patch-extensions_browser_pref__names.h b/www/ungoogled-chromium/files/patch-extensions_browser_pref__names.h deleted file mode 100644 index ebbeb863a885..000000000000 --- a/www/ungoogled-chromium/files/patch-extensions_browser_pref__names.h +++ /dev/null @@ -1,11 +0,0 @@ ---- extensions/browser/pref_names.h.orig 2023-04-08 11:38:38 UTC -+++ extensions/browser/pref_names.h -@@ -114,7 +114,7 @@ extern const char kPinnedExtensions[]; - extern const char kStorageGarbageCollect[]; - - #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-extensions_common_api_runtime.json b/www/ungoogled-chromium/files/patch-extensions_common_api_runtime.json index 25d2f7e49c70..7db752467ee0 100644 --- a/www/ungoogled-chromium/files/patch-extensions_common_api_runtime.json +++ b/www/ungoogled-chromium/files/patch-extensions_common_api_runtime.json @@ -1,12 +1,12 @@ ---- extensions/common/api/runtime.json.orig 2022-10-01 07:40:07 UTC +--- extensions/common/api/runtime.json.orig 2023-06-05 19:39:05 UTC +++ extensions/common/api/runtime.json -@@ -86,7 +86,8 @@ +@@ -89,7 +89,8 @@ "cros", "linux", "openbsd", - "fuchsia" + "fuchsia", + "freebsd" ] }, { diff --git a/www/ungoogled-chromium/files/patch-extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc b/www/ungoogled-chromium/files/patch-extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc index 08572bb07099..ab47510758ef 100644 --- a/www/ungoogled-chromium/files/patch-extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc +++ b/www/ungoogled-chromium/files/patch-extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc @@ -1,11 +1,11 @@ ---- extensions/shell/browser/api/runtime/shell_runtime_api_delegate.cc.orig 2023-04-08 11:38:38 UTC +--- extensions/shell/browser/api/runtime/shell_runtime_api_delegate.cc.orig 2023-06-05 19:39:05 UTC +++ extensions/shell/browser/api/runtime/shell_runtime_api_delegate.cc @@ -44,7 +44,7 @@ void ShellRuntimeAPIDelegate::OpenURL(const GURL& unin bool ShellRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) { #if BUILDFLAG(IS_CHROMEOS_ASH) - info->os = api::runtime::PLATFORM_OS_CROS; + info->os = api::runtime::PlatformOs::kCros; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - info->os = api::runtime::PLATFORM_OS_LINUX; + info->os = api::runtime::PlatformOs::kLinux; #endif return true; diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc index 5dd5d8c5504b..63a7515628e4 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/gles2_cmd_decoder.cc.orig 2023-05-05 12:12:41 UTC +--- gpu/command_buffer/service/gles2_cmd_decoder.cc.orig 2023-06-05 19:39:05 UTC +++ gpu/command_buffer/service/gles2_cmd_decoder.cc -@@ -3491,7 +3491,7 @@ GLES2Decoder* GLES2Decoder::Create( +@@ -3492,7 +3492,7 @@ GLES2Decoder* GLES2Decoder::Create( } // Allow linux to run fuzzers. -#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return new GLES2DecoderImpl(client, command_buffer_service, outputter, group); #else LOG(FATAL) << "Validating command decoder is not supported."; diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc index 8fe737572c80..a22318b3a5df 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-05-05 12:12:41 UTC +--- gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig 2023-06-05 19:39:05 UTC +++ gpu/command_buffer/service/shared_image/external_vk_image_backing.cc -@@ -39,7 +39,7 @@ +@@ -43,7 +43,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 -@@ -573,7 +573,7 @@ std::unique_ptr ExternalVkIma +@@ -592,7 +592,7 @@ std::unique_ptr ExternalVkIma WGPUDevice wgpuDevice, 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 = 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 index 80b265ba5a04..568f29f895b9 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc.orig 2023-05-05 12:12:41 UTC +--- gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc.orig 2023-06-05 19:39:05 UTC +++ gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc -@@ -192,7 +192,7 @@ bool ExternalVkImageBackingFactory::IsSupported( +@@ -201,7 +201,7 @@ bool ExternalVkImageBackingFactory::IsSupported( + return false; + } - // 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: + if (format.IsLegacyMultiplanar()) { + // ExternalVkImageBacking doesn't work properly with external sampler + // multi-planar formats on Linux, see https://crbug.com/1394888. diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc index 7fabfb4d1bd8..1b9626c71933 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc.orig 2023-05-05 12:12:41 UTC +--- gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc.orig 2023-06-05 19:39:05 UTC +++ gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc -@@ -198,7 +198,7 @@ bool WrappedSkImageBacking::Initialize() { +@@ -209,7 +209,7 @@ bool WrappedSkImageBacking::Initialize(const std::stri constexpr GrRenderable is_renderable = GrRenderable::kYes; constexpr GrProtected is_protected = GrProtected::kNo; -#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) +#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // Blue for single-planar and magenta-ish for multi-planar. SkColor4f fallback_color = format().is_single_plane() ? SkColors::kBlue : SkColors::kWhite; diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc index 850d6a5bfd81..af1288f6e5ae 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-05-05 12:12:41 UTC +--- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2023-06-05 19:39:05 UTC +++ gpu/command_buffer/service/webgpu_decoder_impl.cc -@@ -1238,7 +1238,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( +@@ -1231,7 +1231,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 68f6a1750744..c54155e68aa4 100644 --- a/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__init.cc +++ b/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__init.cc @@ -1,74 +1,74 @@ ---- gpu/ipc/service/gpu_init.cc.orig 2023-05-05 12:12:41 UTC +--- gpu/ipc/service/gpu_init.cc.orig 2023-06-05 19:39:05 UTC +++ gpu/ipc/service/gpu_init.cc -@@ -330,7 +330,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -334,7 +334,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 -@@ -367,7 +367,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -371,7 +371,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. -@@ -444,7 +444,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -442,7 +442,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 -@@ -530,7 +530,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -528,7 +528,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; -@@ -665,7 +665,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -672,7 +672,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. -@@ -719,7 +719,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -726,7 +726,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } } } -#if BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE)) if (!gl_disabled && !gl_use_swiftshader_ && std::getenv("RUNNING_UNDER_RR")) { // https://rr-project.org/ is a Linux-only record-and-replay debugger that -@@ -869,7 +869,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -867,7 +867,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 -@@ -933,7 +933,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c - - InitializePlatformOverlaySettings(&gpu_info_, gpu_feature_info_); +@@ -937,7 +937,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c + } + } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Driver may create a compatibility profile context when collect graphics // information on Linux platform. Try to collect graphics information // based on core profile context after disabling platform extensions. diff --git a/www/ungoogled-chromium/files/patch-headless_lib_browser_headless__web__contents__impl.cc b/www/ungoogled-chromium/files/patch-headless_lib_browser_headless__web__contents__impl.cc index 858339727fdd..62dfd2c2729f 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 2023-02-11 09:11:04 UTC +--- headless/lib/browser/headless_web_contents_impl.cc.orig 2023-06-05 19:39:05 UTC +++ headless/lib/browser/headless_web_contents_impl.cc -@@ -61,7 +61,7 @@ namespace headless { +@@ -60,7 +60,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-media_BUILD.gn b/www/ungoogled-chromium/files/patch-media_BUILD.gn index 91b3b2603e9a..83f16b213dda 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-04-08 11:38:38 UTC +--- media/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ media/BUILD.gn -@@ -94,6 +94,9 @@ config("media_config") { +@@ -93,6 +93,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 175e32ce622e..7465c23af991 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-04-08 11:38:38 UTC +--- media/audio/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ media/audio/BUILD.gn -@@ -266,9 +266,20 @@ source_set("audio") { +@@ -270,9 +270,20 @@ source_set("audio") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !use_sndio) { sources += [ "linux/audio_manager_linux.cc" ] } + + if (use_sndio) { + libs += [ "sndio" ] + sources += [ + "sndio/audio_manager_sndio.cc", + "sndio/sndio_input.cc", + "sndio/sndio_input.h", + "sndio/sndio_output.cc", + "sndio/sndio_output.h" + ] + } if (use_alsa) { libs += [ "asound" ] diff --git a/www/ungoogled-chromium/files/patch-media_base_cdm__promise__adapter.cc b/www/ungoogled-chromium/files/patch-media_base_cdm__promise__adapter.cc new file mode 100644 index 000000000000..d9eba107a71e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-media_base_cdm__promise__adapter.cc @@ -0,0 +1,14 @@ +--- media/base/cdm_promise_adapter.cc.orig 2023-06-05 19:39:05 UTC ++++ media/base/cdm_promise_adapter.cc +@@ -95,9 +95,11 @@ void CdmPromiseAdapter::Clear(ClearReason reason) { + // Reject all outstanding promises. + DCHECK(thread_checker_.CalledOnValidThread()); + for (auto& [promise_id, promise] : promises_) { ++#if defined(__clang__) && (__clang_major__ >= 16) + TRACE_EVENT_NESTABLE_ASYNC_END1( + "media", "CdmPromise", TRACE_ID_WITH_SCOPE("CdmPromise", promise_id), + "status", "cleared"); ++#endif + promise->reject(CdmPromise::Exception::INVALID_STATE_ERROR, + ToSystemCode(reason), "Operation aborted."); + } 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 4faeaae1e4c9..9fb06a64dc53 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,47 @@ ---- media/base/media_switches.cc.orig 2023-05-05 12:12:41 UTC +--- media/base/media_switches.cc.orig 2023-06-05 19:39:05 UTC +++ media/base/media_switches.cc -@@ -12,7 +12,7 @@ - #include "components/system_media_controls/linux/buildflags/buildflags.h" +@@ -15,7 +15,7 @@ + #include "gpu/config/gpu_finch_features.h" #include "media/media_buildflags.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/cpu.h" #endif -@@ -604,7 +604,7 @@ BASE_FEATURE(kFallbackAfterDecodeError, +@@ -620,7 +620,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 -@@ -652,7 +652,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 @@ -636,7 +636,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM for (size_t i = 0; i < num_planes; ++i) planes[i].stride = gpu_memory_buffer->stride(i); uint64_t modifier = gfx::NativePixmapHandle::kNoModifier; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (gpu_memory_buffer->GetType() == gfx::NATIVE_PIXMAP) { const auto gmb_handle = gpu_memory_buffer->CloneHandle(); if (gmb_handle.is_null() || @@ -682,7 +682,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM return frame; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // static scoped_refptr VideoFrame::WrapExternalDmabufs( const VideoFrameLayout& layout, @@ -902,7 +902,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_; -@@ -1302,7 +1302,7 @@ const gpu::MailboxHolder& VideoFrame::mailbox_holder( +@@ -1305,7 +1305,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); -@@ -1415,7 +1415,7 @@ VideoFrame::VideoFrame(const VideoFrameLayout& layout, +@@ -1418,7 +1418,7 @@ VideoFrame::VideoFrame(const VideoFrameLayout& layout, storage_type_(storage_type), visible_rect_(Intersection(visible_rect, gfx::Rect(layout.coded_size()))), natural_size_(natural_size), -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) dmabuf_fds_(base::MakeRefCounted()), #endif timestamp_(timestamp), diff --git a/www/ungoogled-chromium/files/patch-media_base_video__frame.h b/www/ungoogled-chromium/files/patch-media_base_video__frame.h index b84788309a79..396fe5a65a5b 100644 --- a/www/ungoogled-chromium/files/patch-media_base_video__frame.h +++ b/www/ungoogled-chromium/files/patch-media_base_video__frame.h @@ -1,47 +1,47 @@ ---- media/base/video_frame.h.orig 2023-05-05 12:12:41 UTC +--- media/base/video_frame.h.orig 2023-06-05 19:39:05 UTC +++ media/base/video_frame.h @@ -44,7 +44,7 @@ #include "base/mac/scoped_cftyperef.h" - #endif // BUILDFLAG(IS_MAC) + #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/files/scoped_file.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -113,7 +113,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte STORAGE_UNOWNED_MEMORY = 2, // External, non owned data pointers. STORAGE_OWNED_MEMORY = 3, // VideoFrame has allocated its own data buffer. STORAGE_SHMEM = 4, // Backed by read-only shared memory. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // TODO(mcasas): Consider turning this type into STORAGE_NATIVE // based on the idea of using this same enum value for both DMA // buffers on Linux and CVPixelBuffers on Mac (which currently use @@ -316,7 +316,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte ReleaseMailboxAndGpuMemoryBufferCB mailbox_holder_and_gmb_release_cb, base::TimeDelta timestamp); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Wraps provided dmabufs // (https://www.kernel.org/doc/html/latest/driver-api/dma-buf.html) with a // VideoFrame. The frame will take ownership of |dmabuf_fds|, and will -@@ -604,7 +604,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -599,7 +599,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // mailbox, the caller must wait for the included sync point. const gpu::MailboxHolder& mailbox_holder(size_t texture_index) const; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Returns a vector containing the backing DmaBufs for this frame. The number // of returned DmaBufs will be equal or less than the number of planes of // the frame. If there are less, this means that the last FD contains the -@@ -822,7 +822,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -817,7 +817,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // GPU memory buffer, if this frame is STORAGE_GPU_MEMORY_BUFFER. std::unique_ptr gpu_memory_buffer_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) class DmabufHolder; // Dmabufs for the frame, used when storage is STORAGE_DMABUFS. Size is either diff --git a/www/ungoogled-chromium/files/patch-media_gpu_buffer__validation.cc b/www/ungoogled-chromium/files/patch-media_gpu_buffer__validation.cc index 19eacc9fd1bd..26c5fe14fc16 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_buffer__validation.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_buffer__validation.cc @@ -1,29 +1,29 @@ ---- media/gpu/buffer_validation.cc.orig 2022-10-01 07:40:07 UTC +--- media/gpu/buffer_validation.cc.orig 2023-06-05 19:39:05 UTC +++ media/gpu/buffer_validation.cc @@ -15,7 +15,7 @@ #include "ui/gfx/geometry/size.h" #include "ui/gfx/gpu_memory_buffer.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -23,7 +23,7 @@ namespace media { bool GetFileSize(const int fd, size_t* size) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (fd < 0) { VLOG(1) << "Invalid file descriptor"; return false; -@@ -73,7 +73,7 @@ bool VerifyGpuMemoryBufferHandle( +@@ -76,7 +76,7 @@ bool VerifyGpuMemoryBufferHandle( VLOG(1) << "Unsupported: " << pixel_format; return false; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const size_t num_planes = media::VideoFrame::NumPlanes(pixel_format); if (num_planes != gmb_handle.native_pixmap_handle.planes.size() || num_planes == 0) { diff --git a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc index c8e52226d1c4..cacab6d33678 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,37 +1,37 @@ ---- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2023-04-08 11:38:38 UTC +--- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2023-06-05 19:39:05 UTC +++ media/gpu/chromeos/video_decoder_pipeline.cc -@@ -213,7 +213,7 @@ std::unique_ptr VideoDecoderPipeline::Cr +@@ -212,7 +212,7 @@ std::unique_ptr VideoDecoderPipeline::Cr #if BUILDFLAG(USE_VAAPI) create_decoder_function_cb = base::BindOnce(&VaapiVideoDecoder::Create); #elif BUILDFLAG(USE_V4L2_CODEC) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) create_decoder_function_cb = base::BindOnce(&V4L2VideoDecoder::Create); #else return nullptr; -@@ -860,14 +860,14 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -909,14 +909,14 @@ VideoDecoderPipeline::PickDecoderOutputFormat( } } -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_VAAPI) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_VAAPI) // Linux should always use a custom allocator (to allocate buffers using // libva) and a PlatformVideoFramePool. CHECK(allocator.has_value()); CHECK(main_frame_pool_->AsPlatformVideoFramePool()); main_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator( *allocator); -#elif BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_V4L2_CODEC) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_V4L2_CODEC) // Linux w/ V4L2 should not use a custom allocator // Only tested with video_decode_accelerator_tests // TODO(wenst@) Test with full Chromium Browser -@@ -997,7 +997,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1046,7 +1046,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( << " VideoFrames"; auxiliary_frame_pool_->set_parent_task_runner(decoder_task_runner_); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auxiliary_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator( *allocator); #endif diff --git a/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc b/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc index 7badccbeb805..84980d160bcc 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc @@ -1,11 +1,11 @@ ---- media/gpu/vaapi/vaapi_video_decoder.cc.orig 2023-05-05 12:12:41 UTC +--- media/gpu/vaapi/vaapi_video_decoder.cc.orig 2023-06-05 19:39:05 UTC +++ media/gpu/vaapi/vaapi_video_decoder.cc -@@ -771,7 +771,7 @@ void VaapiVideoDecoder::ApplyResolutionChangeWithScree +@@ -776,7 +776,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 2acf9928c4b2..ddc16d25617e 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-02-11 09:11:04 UTC +--- media/gpu/vaapi/vaapi_wrapper.cc.orig 2023-06-05 19:39:05 UTC +++ media/gpu/vaapi/vaapi_wrapper.cc -@@ -755,7 +755,7 @@ VADisplayState::VADisplayState() - bool VADisplayState::Initialize() { - base::AutoLock auto_lock(va_lock_); +@@ -1609,7 +1609,7 @@ VADisplayStateHandle VADisplayStateSingleton::GetHandl + return {}; + } -#if BUILDFLAG(IS_OZONE) && BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_OZONE) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) // TODO(crbug.com/1116701): add vaapi support for other Ozone platforms on // Linux. See comment in OzonePlatform::PlatformProperties::supports_vaapi // for more details. This will also require revisiting everything that's diff --git a/www/ungoogled-chromium/files/patch-media_media__options.gni b/www/ungoogled-chromium/files/patch-media_media__options.gni index 7c4b0c992874..2dc273604c7f 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-05-05 12:12:41 UTC +--- media/media_options.gni.orig 2023-06-05 19:39:05 UTC +++ media/media_options.gni -@@ -186,12 +186,15 @@ declare_args() { +@@ -173,12 +173,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_apple && + if (is_posix && !is_android && !is_apple && !is_bsd && (!is_castos || (target_cpu == "x86" || target_cpu == "x64") || is_cast_audio_only)) { use_alsa = true -@@ -207,6 +210,10 @@ declare_args() { +@@ -194,6 +197,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 c0d51d9e50c4..04f96f590cbb 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,20 @@ ---- media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.cc.orig 2023-04-08 11:38:38 UTC +--- media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.cc.orig 2023-06-05 19:39:05 UTC +++ media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.cc -@@ -39,7 +39,7 @@ gfx::GpuMemoryBufferHandle GetVideoFrameGpuMemoryBuffe - 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 -@@ -751,7 +751,7 @@ const gfx::GpuMemoryBufferId& StructTraits< +@@ -724,7 +724,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, -@@ -772,7 +772,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_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h b/www/ungoogled-chromium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h index 45d6aaba4cf5..e1845f782438 100644 --- a/www/ungoogled-chromium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h +++ b/www/ungoogled-chromium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h @@ -1,11 +1,11 @@ ---- media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h.orig 2022-10-01 07:40:07 UTC +--- media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h.orig 2023-06-05 19:39:05 UTC +++ media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h -@@ -695,7 +695,7 @@ struct StructTraitsHasTextures(); -#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 -@@ -1157,7 +1157,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo +@@ -1183,7 +1183,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 &= -@@ -1176,7 +1176,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo +@@ -1202,7 +1202,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo gpu::SHARED_IMAGE_USAGE_DISPLAY_READ | gpu::SHARED_IMAGE_USAGE_SCANOUT; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1241537): Always add the flag once the // OzoneImageBacking is by default turned on. if (base::CommandLine::ForCurrentProcess()->HasSwitch( diff --git a/www/ungoogled-chromium/files/patch-mojo_public_tools_bindings_mojom.gni b/www/ungoogled-chromium/files/patch-mojo_public_tools_bindings_mojom.gni index 4505f05623ce..ebfbd92da529 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-05-05 12:12:41 UTC +--- mojo/public/tools/bindings/mojom.gni.orig 2023-06-05 19:39:05 UTC +++ mojo/public/tools/bindings/mojom.gni -@@ -732,6 +732,16 @@ template("mojom") { +@@ -744,6 +744,16 @@ template("mojom") { enabled_features += [ "is_apple" ] } + if (is_openbsd) { + enabled_features += [ "is_openbsd" ] + enabled_features += [ "is_bsd" ] + } + + if (is_freebsd) { + enabled_features += [ "is_freebsd" ] + enabled_features += [ "is_bsd" ] + } + action(parser_target_name) { allow_remote = true custom_processor = "mojom_parser" diff --git a/www/ungoogled-chromium/files/patch-net_BUILD.gn b/www/ungoogled-chromium/files/patch-net_BUILD.gn index 002b228eec99..253ba9340782 100644 --- a/www/ungoogled-chromium/files/patch-net_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-net_BUILD.gn @@ -1,83 +1,78 @@ ---- net/BUILD.gn.orig 2023-05-05 12:12:41 UTC +--- net/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ net/BUILD.gn @@ -107,7 +107,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" ] } -@@ -1221,6 +1221,15 @@ component("net") { +@@ -1233,6 +1233,19 @@ component("net") { deps += [ "//third_party/xdg_shared_mime_info" ] } + if (is_bsd) { + sources -= [ ++ "base/address_map_cache_linux.cc", ++ "base/address_map_cache_linux.h", ++ "base/address_map_linux.cc", ++ "base/address_map_linux.h", + "base/address_tracker_linux.cc", + "base/address_tracker_linux.h", + "base/network_change_notifier_linux.cc", + "base/network_interfaces_linux.cc", + ] + } + if (is_mac) { sources += [ "base/network_notification_thread_mac.cc", -@@ -1347,7 +1356,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", -@@ -1380,7 +1389,7 @@ component("net") { +@@ -1388,7 +1401,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", -@@ -2824,7 +2833,7 @@ test("net_unittests") { - sources += [ "proxy_resolution/proxy_config_service_linux_unittest.cc" ] +@@ -2849,7 +2862,7 @@ test("net_unittests") { + ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "base/address_tracker_linux_unittest.cc", "base/network_interfaces_linux_unittest.cc", -@@ -2895,6 +2904,10 @@ test("net_unittests") { +@@ -2917,6 +2930,10 @@ test("net_unittests") { "//url:buildflags", ] + if (is_bsd) { + deps += [ "//sandbox/policy" ] + } + if (enable_websockets) { deps += [ "//net/server:tests" ] } -@@ -2962,7 +2975,7 @@ test("net_unittests") { +@@ -2998,7 +3015,7 @@ test("net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "tools/quic/quic_simple_server_test.cc" ] } -@@ -3090,7 +3103,7 @@ test("net_unittests") { +@@ -3133,7 +3150,7 @@ test("net_unittests") { } # Use getifaddrs() on POSIX platforms, except Linux. - if (is_posix && !is_linux && !is_chromeos) { + if (is_posix && !is_linux && !is_chromeos && !is_bsd) { sources += [ "base/network_interfaces_getifaddrs_unittest.cc" ] } diff --git a/www/ungoogled-chromium/files/patch-net_base_network__change__notifier.cc b/www/ungoogled-chromium/files/patch-net_base_network__change__notifier.cc index 6ef6738db050..6083ac782e76 100644 --- a/www/ungoogled-chromium/files/patch-net_base_network__change__notifier.cc +++ b/www/ungoogled-chromium/files/patch-net_base_network__change__notifier.cc @@ -1,21 +1,21 @@ ---- net/base/network_change_notifier.cc.orig 2023-03-10 11:01:21 UTC +--- net/base/network_change_notifier.cc.orig 2023-06-05 19:39:05 UTC +++ net/base/network_change_notifier.cc @@ -37,7 +37,7 @@ #include "net/base/network_change_notifier_linux.h" #elif BUILDFLAG(IS_APPLE) #include "net/base/network_change_notifier_mac.h" -#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - #include "net/base/network_change_notifier_posix.h" + #include "net/base/network_change_notifier_passive.h" #elif BUILDFLAG(IS_FUCHSIA) #include "net/base/network_change_notifier_fuchsia.h" -@@ -327,6 +327,9 @@ std::unique_ptr NetworkChangeNo +@@ -329,6 +329,9 @@ std::unique_ptr NetworkChangeNo #elif BUILDFLAG(IS_FUCHSIA) return std::make_unique( /*require_wlan=*/false); +#elif BUILDFLAG(IS_BSD) + return std::make_unique( + /*dns_config_notifier*/nullptr); #else NOTIMPLEMENTED(); return nullptr; diff --git a/www/ungoogled-chromium/files/patch-net_base_network__change__notifier__posix.cc b/www/ungoogled-chromium/files/patch-net_base_network__change__notifier__passive.cc similarity index 58% rename from www/ungoogled-chromium/files/patch-net_base_network__change__notifier__posix.cc rename to www/ungoogled-chromium/files/patch-net_base_network__change__notifier__passive.cc index 6ed45e6e4b07..bac4c9341817 100644 --- a/www/ungoogled-chromium/files/patch-net_base_network__change__notifier__posix.cc +++ b/www/ungoogled-chromium/files/patch-net_base_network__change__notifier__passive.cc @@ -1,11 +1,11 @@ ---- net/base/network_change_notifier_posix.cc.orig 2022-10-01 07:40:07 UTC -+++ net/base/network_change_notifier_posix.cc -@@ -92,7 +92,7 @@ void NetworkChangeNotifierPosix::GetCurrentMaxBandwidt +--- net/base/network_change_notifier_passive.cc.orig 2023-06-05 19:39:05 UTC ++++ net/base/network_change_notifier_passive.cc +@@ -107,7 +107,7 @@ NetworkChangeNotifierPassive::GetAddressMapOwnerIntern NetworkChangeNotifier::NetworkChangeCalculatorParams - NetworkChangeNotifierPosix::NetworkChangeCalculatorParamsPosix() { + NetworkChangeNotifierPassive::NetworkChangeCalculatorParamsPassive() { NetworkChangeCalculatorParams params; -#if BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Delay values arrived at by simple experimentation and adjusted so as to // produce a single signal when switching between network connections. params.ip_address_offline_delay_ = base::Milliseconds(4000); diff --git a/www/ungoogled-chromium/files/patch-net_cert_cert__verifier.cc b/www/ungoogled-chromium/files/patch-net_cert_cert__verifier.cc index 17fbb34a2730..49d2c4238998 100644 --- a/www/ungoogled-chromium/files/patch-net_cert_cert__verifier.cc +++ b/www/ungoogled-chromium/files/patch-net_cert_cert__verifier.cc @@ -1,11 +1,11 @@ ---- net/cert/cert_verifier.cc.orig 2023-05-05 12:12:41 UTC +--- net/cert/cert_verifier.cc.orig 2023-06-05 19:39:05 UTC +++ net/cert/cert_verifier.cc -@@ -91,7 +91,7 @@ std::unique_ptr CertVerifier::CreateDefa - #if BUILDFLAG(CHROME_ROOT_STORE_ONLY) - verify_proc = CertVerifyProc::CreateBuiltinWithChromeRootStore( - std::move(cert_net_fetcher)); +@@ -40,7 +40,7 @@ class DefaultCertVerifyProcFactory : public net::CertV + return CertVerifyProc::CreateBuiltinWithChromeRootStore( + std::move(cert_net_fetcher), impl_params.crl_set, + base::OptionalToPtr(impl_params.root_store_data)); -#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - verify_proc = - CertVerifyProc::CreateBuiltinVerifyProc(std::move(cert_net_fetcher)); + return CertVerifyProc::CreateBuiltinVerifyProc(std::move(cert_net_fetcher), + impl_params.crl_set); #else 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 4f90ccc1aff7..cb956b32f394 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 2023-05-05 12:12:41 UTC +--- net/cert/cert_verify_proc.cc.orig 2023-06-05 19:39:05 UTC +++ net/cert/cert_verify_proc.cc -@@ -413,7 +413,7 @@ base::Value::Dict CertVerifyParams( +@@ -409,7 +409,7 @@ base::Value::Dict CertVerifyParams( } // namespace -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY)) // static scoped_refptr CertVerifyProc::CreateSystemVerifyProc( diff --git a/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc.h b/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc.h index 70e76620a1db..3d22e0581db1 100644 --- a/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc.h +++ b/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc.h @@ -1,11 +1,11 @@ ---- net/cert/cert_verify_proc.h.orig 2023-05-05 12:12:41 UTC +--- net/cert/cert_verify_proc.h.orig 2023-06-05 19:39:05 UTC +++ net/cert/cert_verify_proc.h -@@ -68,7 +68,7 @@ class NET_EXPORT CertVerifyProc +@@ -75,7 +75,7 @@ class NET_EXPORT CertVerifyProc kMaxValue = kChainLengthOne }; -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY)) // Creates and returns a CertVerifyProc that uses the system verifier. // |cert_net_fetcher| may not be used, depending on the implementation. diff --git a/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc__unittest.cc b/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc__unittest.cc index ccc2cec06b46..4ff3744bba1c 100644 --- a/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc__unittest.cc +++ b/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc__unittest.cc @@ -1,20 +1,20 @@ ---- net/cert/cert_verify_proc_unittest.cc.orig 2023-05-05 12:12:41 UTC +--- net/cert/cert_verify_proc_unittest.cc.orig 2023-06-05 19:39:05 UTC +++ net/cert/cert_verify_proc_unittest.cc -@@ -222,7 +222,7 @@ scoped_refptr CreateCertVerifyProc( - case CERT_VERIFY_PROC_WIN: - return base::MakeRefCounted(); +@@ -214,7 +214,7 @@ scoped_refptr CreateCertVerifyProc( + case CERT_VERIFY_PROC_IOS: + return base::MakeRefCounted(std::move(crl_set)); #endif -#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case CERT_VERIFY_PROC_BUILTIN: return CreateCertVerifyProcBuiltin(std::move(cert_net_fetcher), - CreateSslSystemTrustStore()); -@@ -252,7 +252,7 @@ constexpr CertVerifyProcType kAllCertVerifiers[] = { + std::move(crl_set), +@@ -243,7 +243,7 @@ constexpr CertVerifyProcType kAllCertVerifiers[] = { + CERT_VERIFY_PROC_ANDROID, + #elif BUILDFLAG(IS_IOS) CERT_VERIFY_PROC_IOS, - #elif BUILDFLAG(IS_WIN) - CERT_VERIFY_PROC_WIN, -#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) CERT_VERIFY_PROC_BUILTIN, #endif #if BUILDFLAG(CHROME_ROOT_STORE_SUPPORTED) diff --git a/www/ungoogled-chromium/files/patch-net_cert_test__root__certs__unittest.cc b/www/ungoogled-chromium/files/patch-net_cert_test__root__certs__unittest.cc index 8951f4c4c9ee..98da2e2ee384 100644 --- a/www/ungoogled-chromium/files/patch-net_cert_test__root__certs__unittest.cc +++ b/www/ungoogled-chromium/files/patch-net_cert_test__root__certs__unittest.cc @@ -1,11 +1,11 @@ ---- net/cert/test_root_certs_unittest.cc.orig 2023-05-05 12:12:41 UTC +--- net/cert/test_root_certs_unittest.cc.orig 2023-06-05 19:39:05 UTC +++ net/cert/test_root_certs_unittest.cc -@@ -43,7 +43,7 @@ scoped_refptr CreateCertVerifyProc() { - #if BUILDFLAG(CHROME_ROOT_STORE_ONLY) +@@ -46,7 +46,7 @@ scoped_refptr CreateCertVerifyProc() { return CertVerifyProc::CreateBuiltinWithChromeRootStore( - /*cert_net_fetcher=*/nullptr); + /*cert_net_fetcher=*/nullptr, CRLSet::BuiltinCRLSet().get(), + /*root_store_data=*/nullptr); -#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - return CertVerifyProc::CreateBuiltinVerifyProc(/*cert_net_fetcher=*/nullptr); + return CertVerifyProc::CreateBuiltinVerifyProc(/*cert_net_fetcher=*/nullptr, + CRLSet::BuiltinCRLSet().get()); #else - return CertVerifyProc::CreateSystemVerifyProc(/*cert_net_fetcher=*/nullptr); diff --git a/www/ungoogled-chromium/files/patch-net_proxy__resolution_proxy__config__service__linux.cc b/www/ungoogled-chromium/files/patch-net_proxy__resolution_proxy__config__service__linux.cc index 98b0d9d0d8d8..49d389a33626 100644 --- a/www/ungoogled-chromium/files/patch-net_proxy__resolution_proxy__config__service__linux.cc +++ b/www/ungoogled-chromium/files/patch-net_proxy__resolution_proxy__config__service__linux.cc @@ -1,40 +1,40 @@ ---- net/proxy_resolution/proxy_config_service_linux.cc.orig 2023-01-13 08:56:02 UTC +--- net/proxy_resolution/proxy_config_service_linux.cc.orig 2023-06-05 19:39:05 UTC +++ net/proxy_resolution/proxy_config_service_linux.cc @@ -6,7 +6,9 @@ #include #include -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) #include +#endif #include #include @@ -504,6 +506,7 @@ bool SettingGetterImplGSettings::CheckVersion( } #endif // defined(USE_GIO) -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) // Converts |value| from a decimal string to an int. If there was a failure // parsing, returns |default_value|. int StringToIntOrDefault(base::StringPiece value, int default_value) { @@ -1032,6 +1035,7 @@ class SettingGetterImplKDE : public ProxyConfigService // events on. scoped_refptr file_task_runner_; }; +#endif } // namespace -@@ -1248,9 +1252,11 @@ ProxyConfigServiceLinux::Delegate::Delegate( - case base::nix::DESKTOP_ENVIRONMENT_KDE3: +@@ -1249,9 +1253,11 @@ ProxyConfigServiceLinux::Delegate::Delegate( case base::nix::DESKTOP_ENVIRONMENT_KDE4: case base::nix::DESKTOP_ENVIRONMENT_KDE5: -+#if !defined(OS_BSD) + case base::nix::DESKTOP_ENVIRONMENT_KDE6: ++#if !BUILDFLAG(IS_BSD) setting_getter_ = std::make_unique(env_var_getter_.get()); break; +#endif case base::nix::DESKTOP_ENVIRONMENT_XFCE: case base::nix::DESKTOP_ENVIRONMENT_LXQT: case base::nix::DESKTOP_ENVIRONMENT_OTHER: diff --git a/www/ungoogled-chromium/files/patch-net_socket_tcp__socket__posix.cc b/www/ungoogled-chromium/files/patch-net_socket_tcp__socket__posix.cc index 01369b17f12e..3396175965ff 100644 --- a/www/ungoogled-chromium/files/patch-net_socket_tcp__socket__posix.cc +++ b/www/ungoogled-chromium/files/patch-net_socket_tcp__socket__posix.cc @@ -1,20 +1,20 @@ ---- net/socket/tcp_socket_posix.cc.orig 2023-04-08 11:38:38 UTC +--- net/socket/tcp_socket_posix.cc.orig 2023-06-05 19:39:05 UTC +++ net/socket/tcp_socket_posix.cc -@@ -99,6 +99,17 @@ bool SetTCPKeepAlive(int fd, bool enable, int delay) { +@@ -98,6 +98,17 @@ bool SetTCPKeepAlive(int fd, bool enable, int delay) { PLOG(ERROR) << "Failed to set TCP_KEEPALIVE on fd: " << fd; return false; } +#elif BUILDFLAG(IS_FREEBSD) + // Set seconds until first TCP keep alive. + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &delay, sizeof(delay))) { + PLOG(ERROR) << "Failed to set TCP_KEEPIDLE on fd: " << fd; + return false; + } + // Set seconds between TCP keep alives. + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &delay, sizeof(delay))) { + PLOG(ERROR) << "Failed to set TCP_KEEPINTVL on fd: " << fd; + return false; + } #endif } 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 86f069e2a1cd..11d5df3a8a82 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 2023-05-05 12:12:41 UTC +--- net/socket/udp_socket_posix.cc.orig 2023-06-05 19:39:05 UTC +++ net/socket/udp_socket_posix.cc -@@ -576,7 +576,7 @@ int UDPSocketPosix::SetDoNotFragment() { +@@ -575,7 +575,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 { -@@ -597,7 +597,7 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { +@@ -596,7 +596,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. -@@ -910,7 +910,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address) +@@ -909,7 +909,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_tools_cert__verify__tool_cert__verify__comparision__tool.cc b/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__comparision__tool.cc index 479760338c97..4a88afd68296 100644 --- a/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__comparision__tool.cc +++ b/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__comparision__tool.cc @@ -1,29 +1,29 @@ ---- net/tools/cert_verify_tool/cert_verify_comparision_tool.cc.orig 2023-05-05 12:12:41 UTC +--- net/tools/cert_verify_tool/cert_verify_comparision_tool.cc.orig 2023-06-05 19:39:05 UTC +++ net/tools/cert_verify_tool/cert_verify_comparision_tool.cc @@ -35,7 +35,7 @@ #include "net/url_request/url_request_context_builder.h" #include "net/url_request/url_request_context_getter.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "net/proxy_resolution/proxy_config.h" #include "net/proxy_resolution/proxy_config_service_fixed.h" #endif @@ -55,7 +55,7 @@ void SetUpOnNetworkThread( base::WaitableEvent* initialization_complete_event) { net::URLRequestContextBuilder url_request_context_builder; url_request_context_builder.set_user_agent(GetUserAgent()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux, use a fixed ProxyConfigService, since the default one // depends on glib. // -@@ -127,7 +127,7 @@ class CertVerifyImpl { +@@ -126,7 +126,7 @@ class CertVerifyImpl { std::unique_ptr CreateCertVerifyImplFromName( base::StringPiece impl_name, scoped_refptr cert_net_fetcher) { -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY)) if (impl_name == "platform") { return std::make_unique( diff --git a/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc b/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc index 0ebcd42b7dac..13ea3098199c 100644 --- a/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc +++ b/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc @@ -1,38 +1,38 @@ ---- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2023-05-05 12:12:41 UTC +--- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2023-06-05 19:39:05 UTC +++ net/tools/cert_verify_tool/cert_verify_tool.cc @@ -31,7 +31,7 @@ #include "net/url_request/url_request_context_builder.h" #include "net/url_request/url_request_context_getter.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "net/proxy_resolution/proxy_config.h" #include "net/proxy_resolution/proxy_config_service_fixed.h" #endif @@ -61,7 +61,7 @@ void SetUpOnNetworkThread( base::WaitableEvent* initialization_complete_event) { net::URLRequestContextBuilder url_request_context_builder; url_request_context_builder.set_user_agent(GetUserAgent()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux, use a fixed ProxyConfigService, since the default one // depends on glib. // -@@ -222,7 +222,7 @@ std::unique_ptr CreateCertVerifyImplFr - base::StringPiece impl_name, +@@ -223,7 +223,7 @@ std::unique_ptr CreateCertVerifyImplFr scoped_refptr cert_net_fetcher, + scoped_refptr crl_set, RootStoreType root_store_type) { -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY)) if (impl_name == "platform") { if (root_store_type != RootStoreType::kSystem) { -@@ -535,7 +535,7 @@ int main(int argc, char** argv) { +@@ -537,7 +537,7 @@ int main(int argc, char** argv) { std::string impls_str = command_line.GetSwitchValueASCII("impls"); if (impls_str.empty()) { // Default value. -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY)) impls_str = "platform,"; #endif diff --git a/www/ungoogled-chromium/files/patch-remoting_codec_webrtc__video__encoder__vpx.cc b/www/ungoogled-chromium/files/patch-remoting_codec_webrtc__video__encoder__vpx.cc index a7153cd06e6a..128eaed8bc11 100644 --- a/www/ungoogled-chromium/files/patch-remoting_codec_webrtc__video__encoder__vpx.cc +++ b/www/ungoogled-chromium/files/patch-remoting_codec_webrtc__video__encoder__vpx.cc @@ -1,11 +1,11 @@ ---- remoting/codec/webrtc_video_encoder_vpx.cc.orig 2022-10-01 07:40:07 UTC +--- remoting/codec/webrtc_video_encoder_vpx.cc.orig 2023-06-05 19:39:05 UTC +++ remoting/codec/webrtc_video_encoder_vpx.cc -@@ -89,7 +89,7 @@ void SetVp8CodecParameters(vpx_codec_enc_cfg_t* config +@@ -88,7 +88,7 @@ void SetVp8CodecParameters(vpx_codec_enc_cfg_t* config const webrtc::DesktopSize& size) { SetCommonCodecParameters(config, size); -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_BSD) || BUILDFLAG(IS_LINUX)) && !BUILDFLAG(IS_CHROMEOS_LACROS) // On Linux, using too many threads for VP8 encoding has been linked to high // CPU usage on machines that are under stress. See http://crbug.com/1151148. // 5/3/2022 update: Perf testing has shown that doubling the number of threads 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 4e12b7c0965a..09be0c205199 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 2023-02-11 09:11:04 UTC +--- remoting/host/chromoting_host_services_client.cc.orig 2023-06-05 19:39:05 UTC +++ remoting/host/chromoting_host_services_client.cc -@@ -51,7 +51,7 @@ mojo::PendingRemote Con +@@ -64,7 +64,7 @@ mojo::PendingRemote Con } // namespace -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // static constexpr char -@@ -129,7 +129,7 @@ bool ChromotingHostServicesClient::EnsureSessionServic +@@ -142,7 +142,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_desktop__capturer__wrapper.cc b/www/ungoogled-chromium/files/patch-remoting_host_desktop__capturer__wrapper.cc index 528146942376..9715247c22b3 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_desktop__capturer__wrapper.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_desktop__capturer__wrapper.cc @@ -1,20 +1,29 @@ ---- remoting/host/desktop_capturer_wrapper.cc.orig 2023-04-08 11:38:38 UTC +--- remoting/host/desktop_capturer_wrapper.cc.orig 2023-06-05 19:39:05 UTC +++ remoting/host/desktop_capturer_wrapper.cc @@ -13,7 +13,7 @@ #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "remoting/host/linux/wayland_desktop_capturer.h" #include "remoting/host/linux/wayland_utils.h" #endif +@@ -32,7 +32,7 @@ void DesktopCapturerWrapper::CreateCapturer( + const webrtc::DesktopCaptureOptions& options) { + DCHECK(!capturer_); -@@ -100,7 +100,7 @@ void DesktopCapturerWrapper::OnCaptureResult( +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (IsRunningWayland()) { + capturer_ = std::make_unique(options); + } else { +@@ -109,7 +109,7 @@ void DesktopCapturerWrapper::OnCaptureResult( bool DesktopCapturerWrapper::SupportsFrameCallbacks() { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return capturer_ && IsRunningWayland(); #else return false; diff --git a/www/ungoogled-chromium/files/patch-remoting_host_host__attributes.cc b/www/ungoogled-chromium/files/patch-remoting_host_host__attributes.cc index 7330a9544c39..34b59bebe2df 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_host__attributes.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_host__attributes.cc @@ -1,11 +1,11 @@ ---- remoting/host/host_attributes.cc.orig 2023-03-10 11:01:21 UTC +--- remoting/host/host_attributes.cc.orig 2023-06-05 19:39:05 UTC +++ remoting/host/host_attributes.cc -@@ -108,7 +108,7 @@ std::string GetHostAttributes() { - media::InitializeMediaFoundation()) { +@@ -105,7 +105,7 @@ std::string GetHostAttributes() { + if (media::InitializeMediaFoundation()) { result.push_back("HWEncoder"); } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) result.push_back("HWEncoder"); #endif diff --git a/www/ungoogled-chromium/files/patch-remoting_host_it2me_it2me__host.cc b/www/ungoogled-chromium/files/patch-remoting_host_it2me_it2me__host.cc index 2a58c5b212a8..e3e9be034544 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_it2me_it2me__host.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_it2me_it2me__host.cc @@ -1,29 +1,29 @@ ---- remoting/host/it2me/it2me_host.cc.orig 2023-03-10 11:01:21 UTC +--- remoting/host/it2me/it2me_host.cc.orig 2023-06-05 19:39:05 UTC +++ remoting/host/it2me/it2me_host.cc -@@ -43,7 +43,7 @@ +@@ -44,7 +44,7 @@ #include "remoting/signaling/signaling_id_util.h" #include "services/network/public/cpp/shared_url_loader_factory.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/linux/wayland_manager.h" #include "remoting/host/linux/wayland_utils.h" #endif // BUILDFLAG(IS_LINUX) -@@ -144,7 +144,7 @@ void It2MeHost::Connect( +@@ -111,7 +111,7 @@ void It2MeHost::Connect( OnPolicyUpdate(std::move(policies)); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsRunningWayland()) { WaylandManager::Get()->Init(host_context_->ui_task_runner()); } -@@ -283,7 +283,7 @@ void It2MeHost::ConnectOnNetworkThread( +@@ -251,7 +251,7 @@ void It2MeHost::ConnectOnNetworkThread( // Set up the desktop environment options. DesktopEnvironmentOptions options(DesktopEnvironmentOptions::CreateDefault()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsRunningWayland()) { options.desktop_capture_options()->set_prefer_cursor_embedded(true); } diff --git a/www/ungoogled-chromium/files/patch-sandbox_linux_BUILD.gn b/www/ungoogled-chromium/files/patch-sandbox_linux_BUILD.gn index 08be31bc28d1..14f1f4bd9b05 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_linux_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-sandbox_linux_BUILD.gn @@ -1,35 +1,35 @@ ---- sandbox/linux/BUILD.gn.orig 2023-02-11 09:11:04 UTC +--- sandbox/linux/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ sandbox/linux/BUILD.gn @@ -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 - compile_syscall_broker = is_linux || is_chromeos + compile_syscall_broker = (is_linux || is_chromeos) && !is_bsd # On Android, use plain GTest. use_base_test_suite = is_linux || is_chromeos -@@ -385,6 +385,17 @@ component("sandbox_services") { +@@ -386,6 +386,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", + ] + } } source_set("sandbox_services_headers") { diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_features.cc b/www/ungoogled-chromium/files/patch-sandbox_policy_features.cc index 5a455436d974..11530b34c387 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_features.cc +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_features.cc @@ -1,14 +1,14 @@ ---- sandbox/policy/features.cc.orig 2022-12-02 17:56:32 UTC +--- sandbox/policy/features.cc.orig 2023-06-05 19:39:05 UTC +++ sandbox/policy/features.cc @@ -15,7 +15,11 @@ namespace sandbox::policy::features { - // (Only causes an effect when feature kNetworkService is enabled.) + // (Only causes an effect when feature kNetworkServiceInProcess is disabled.) BASE_FEATURE(kNetworkServiceSandbox, "NetworkServiceSandbox", +#if BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT); +#else base::FEATURE_DISABLED_BY_DEFAULT); +#endif - #endif // !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_FUCHSIA) - #if BUILDFLAG(IS_WIN) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + // Enables a fine-grained seccomp-BPF syscall filter for the network service. diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_switches.cc b/www/ungoogled-chromium/files/patch-sandbox_policy_switches.cc index a3eee09db0c9..04aed5f6e535 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-03-10 11:01:21 UTC +--- sandbox/policy/switches.cc.orig 2023-06-05 19:39:05 UTC +++ sandbox/policy/switches.cc @@ -54,10 +54,10 @@ const char kFileUtilSandbox[] = "file_util"; 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 +@@ -96,7 +96,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-sandbox_policy_switches.h b/www/ungoogled-chromium/files/patch-sandbox_policy_switches.h index c1cc59774933..2c5478b4bfcb 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_switches.h +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_switches.h @@ -1,25 +1,25 @@ ---- sandbox/policy/switches.h.orig 2023-03-10 11:01:21 UTC +--- sandbox/policy/switches.h.orig 2023-06-05 19:39:05 UTC +++ sandbox/policy/switches.h @@ -57,10 +57,10 @@ SANDBOX_POLICY_EXPORT extern const char kFileUtilSandb SANDBOX_POLICY_EXPORT extern const char kMirroringSandbox[]; #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) SANDBOX_POLICY_EXPORT extern const char kHardwareVideoDecodingSandbox[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) SANDBOX_POLICY_EXPORT extern const char kHardwareVideoEncodingSandbox[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -82,7 +82,8 @@ SANDBOX_POLICY_EXPORT extern const char kDisableSetuid +@@ -81,7 +81,8 @@ SANDBOX_POLICY_EXPORT extern const char kDisableSetuid SANDBOX_POLICY_EXPORT extern const char kGpuSandboxAllowSysVShm[]; SANDBOX_POLICY_EXPORT extern const char kGpuSandboxFailuresFatal[]; SANDBOX_POLICY_EXPORT extern const char kNoSandbox[]; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +SANDBOX_POLICY_EXPORT extern const char kDisableUnveil[]; +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) SANDBOX_POLICY_EXPORT extern const char kNoZygoteSandbox[]; #endif #if BUILDFLAG(IS_WIN) diff --git a/www/ungoogled-chromium/files/patch-services_cert__verifier_cert__verifier__creation.cc b/www/ungoogled-chromium/files/patch-services_cert__verifier_cert__verifier__creation.cc index 341635383b90..af1795bef2c1 100644 --- a/www/ungoogled-chromium/files/patch-services_cert__verifier_cert__verifier__creation.cc +++ b/www/ungoogled-chromium/files/patch-services_cert__verifier_cert__verifier__creation.cc @@ -1,28 +1,28 @@ ---- services/cert_verifier/cert_verifier_creation.cc.orig 2023-05-05 12:12:41 UTC +--- services/cert_verifier/cert_verifier_creation.cc.orig 2023-06-05 19:39:05 UTC +++ services/cert_verifier/cert_verifier_creation.cc -@@ -12,7 +12,7 @@ +@@ -14,7 +14,7 @@ #include "net/cert_net/cert_net_fetcher_url_request.h" #include "net/net_buildflags.h" -#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "net/cert/cert_verify_proc_builtin.h" #include "net/cert/internal/system_trust_store.h" #endif -@@ -90,7 +90,7 @@ class OldDefaultCertVerifyProcFactory : public net::Ce +@@ -114,7 +114,7 @@ class CertVerifyProcFactoryImpl : public net::CertVeri user_slot_restriction_ ? crypto::ScopedPK11Slot(PK11_ReferenceSlot( user_slot_restriction_.get())) : nullptr)); -#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) verify_proc = net::CreateCertVerifyProcBuiltin( - std::move(cert_net_fetcher), net::CreateSslSystemTrustStore()); - #else -@@ -225,6 +225,7 @@ std::unique_ptr Cr + std::move(cert_net_fetcher), std::move(crl_set), + net::CreateSslSystemTrustStore()); +@@ -215,6 +215,7 @@ std::unique_ptr Cr bool IsUsingCertNetFetcher() { #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || \ + BUILDFLAG(IS_BSD) || \ BUILDFLAG(TRIAL_COMPARISON_CERT_VERIFIER_SUPPORTED) || \ BUILDFLAG(CHROME_ROOT_STORE_SUPPORTED) return true; 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 d58efb80902c..5edfc63e516f 100644 --- a/www/ungoogled-chromium/files/patch-services_device_geolocation_location__arbitrator.cc +++ b/www/ungoogled-chromium/files/patch-services_device_geolocation_location__arbitrator.cc @@ -1,11 +1,11 @@ ---- services/device/geolocation/location_arbitrator.cc.orig 2023-03-10 11:01:21 UTC +--- services/device/geolocation/location_arbitrator.cc.orig 2023-06-05 19:39:05 UTC +++ services/device/geolocation/location_arbitrator.cc -@@ -159,7 +159,7 @@ LocationArbitrator::NewNetworkLocationProvider( +@@ -162,7 +162,7 @@ LocationArbitrator::NewNetworkLocationProvider( std::unique_ptr LocationArbitrator::NewSystemLocationProvider() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) return nullptr; #else return device::NewSystemLocationProvider(main_task_runner_, diff --git a/www/ungoogled-chromium/files/patch-services_device_public_mojom_BUILD.gn b/www/ungoogled-chromium/files/patch-services_device_public_mojom_BUILD.gn index b511720d5f6f..50b0729e330f 100644 --- a/www/ungoogled-chromium/files/patch-services_device_public_mojom_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-services_device_public_mojom_BUILD.gn @@ -1,11 +1,11 @@ ---- services/device/public/mojom/BUILD.gn.orig 2023-05-05 12:12:41 UTC +--- services/device/public/mojom/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ services/device/public/mojom/BUILD.gn -@@ -97,7 +97,7 @@ mojom("device_service") { +@@ -94,7 +94,7 @@ mojom("device_service") { enable_js_fuzzing = false enabled_features = [] - if ((is_linux || is_chromeos) && use_udev) { + if ((is_linux || is_chromeos) && !is_bsd && use_udev) { enabled_features += [ "enable_input_device_manager" ] } diff --git a/www/ungoogled-chromium/files/patch-services_network_BUILD.gn b/www/ungoogled-chromium/files/patch-services_network_BUILD.gn index cd776ec0d661..c621302fc2c2 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-05-05 12:12:41 UTC +--- services/network/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ services/network/BUILD.gn -@@ -333,7 +333,6 @@ if (is_linux || is_chromeos) { +@@ -362,7 +362,6 @@ if (is_linux || is_chromeos) { ] deps = [ "//base:base", - "//sandbox/linux:sandbox_services", "//sandbox/policy:policy", ] } diff --git a/www/ungoogled-chromium/files/patch-services_network_network__sandbox__hook__linux.cc b/www/ungoogled-chromium/files/patch-services_network_network__sandbox__hook__linux.cc index 5874a1c894e5..c62f214e7902 100644 --- a/www/ungoogled-chromium/files/patch-services_network_network__sandbox__hook__linux.cc +++ b/www/ungoogled-chromium/files/patch-services_network_network__sandbox__hook__linux.cc @@ -1,36 +1,37 @@ ---- services/network/network_sandbox_hook_linux.cc.orig 2023-05-05 12:12:41 UTC +--- services/network/network_sandbox_hook_linux.cc.orig 2023-06-05 19:39:05 UTC +++ services/network/network_sandbox_hook_linux.cc -@@ -8,11 +8,14 @@ - #include "base/rand_util.h" - #include "base/system/sys_info.h" +@@ -14,11 +14,14 @@ + #include "sandbox/policy/features.h" + #include "third_party/abseil-cpp/absl/types/optional.h" -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) using sandbox::syscall_broker::BrokerFilePermission; using sandbox::syscall_broker::MakeBrokerCommandSet; +#endif namespace network { -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) sandbox::syscall_broker::BrokerCommandSet GetNetworkBrokerCommandSet() { return MakeBrokerCommandSet({ sandbox::syscall_broker::COMMAND_ACCESS, -@@ -30,8 +33,10 @@ std::vector GetNetworkFilePermis - // TODO(tsepez): remove universal permission under filesystem root. - return {BrokerFilePermission::ReadWriteCreateRecursive("/")}; +@@ -102,9 +105,11 @@ void LoadNetworkLibraries() { + } } + #endif // BUILDFLAG(IS_CHROMEOS) +#endif - bool NetworkPreSandboxHook(sandbox::policy::SandboxLinux::Options options) { -+#if !defined(OS_BSD) - auto* instance = sandbox::policy::SandboxLinux::GetInstance(); - - instance->StartBrokerProcess( -@@ -39,6 +44,7 @@ bool NetworkPreSandboxHook(sandbox::policy::SandboxLin + bool NetworkPreSandboxHook(std::vector network_context_parent_dirs, + sandbox::policy::SandboxLinux::Options options) { ++#if !BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_CHROMEOS) + LoadNetworkLibraries(); + #endif +@@ -117,6 +122,7 @@ bool NetworkPreSandboxHook(std::vector ne + GetNetworkBrokerCommandSet(), + GetNetworkFilePermissions(std::move(network_context_parent_dirs)), sandbox::policy::SandboxLinux::PreSandboxHook(), options); - - instance->EngageNamespaceSandboxIfPossible(); +#endif + return true; } - diff --git a/www/ungoogled-chromium/files/patch-services_network_network__service.cc b/www/ungoogled-chromium/files/patch-services_network_network__service.cc index 13927ece4195..08cc1199ed6c 100644 --- a/www/ungoogled-chromium/files/patch-services_network_network__service.cc +++ b/www/ungoogled-chromium/files/patch-services_network_network__service.cc @@ -1,11 +1,11 @@ ---- services/network/network_service.cc.orig 2023-05-05 12:12:41 UTC +--- services/network/network_service.cc.orig 2023-06-05 19:39:05 UTC +++ services/network/network_service.cc -@@ -89,7 +89,7 @@ +@@ -88,7 +88,7 @@ #include "third_party/boringssl/src/include/openssl/cpu.h" #endif -#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || \ +#if ((BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD)) || \ BUILDFLAG(IS_CHROMEOS_LACROS) #include "components/os_crypt/sync/key_storage_config_linux.h" diff --git a/www/ungoogled-chromium/files/patch-services_network_public_cpp_BUILD.gn b/www/ungoogled-chromium/files/patch-services_network_public_cpp_BUILD.gn new file mode 100644 index 000000000000..ef7667ab6c5c --- /dev/null +++ b/www/ungoogled-chromium/files/patch-services_network_public_cpp_BUILD.gn @@ -0,0 +1,11 @@ +--- services/network/public/cpp/BUILD.gn.orig 2023-06-05 19:39:05 UTC ++++ services/network/public/cpp/BUILD.gn +@@ -469,7 +469,7 @@ component("cpp_base") { + sources += [ "transferable_directory_fuchsia.cc" ] + } + +- if (is_linux) { ++ if (is_linux && !is_bsd) { + sources += [ + "network_interface_change_listener_mojom_traits.cc", + "network_interface_change_listener_mojom_traits.h", diff --git a/www/ungoogled-chromium/files/patch-services_network_public_mojom_BUILD.gn b/www/ungoogled-chromium/files/patch-services_network_public_mojom_BUILD.gn new file mode 100644 index 000000000000..de569e16d5b4 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-services_network_public_mojom_BUILD.gn @@ -0,0 +1,25 @@ +--- services/network/public/mojom/BUILD.gn.orig 2023-06-05 19:39:05 UTC ++++ services/network/public/mojom/BUILD.gn +@@ -460,11 +460,11 @@ mojom("url_loader_base") { + } + + enabled_features = [] +- if (is_android || is_chromeos || is_linux) { ++ if (!is_bsd && (is_android || is_chromeos || is_linux)) { + enabled_features += [ "network_change_notifier_in_browser" ] + } + +- if (is_linux) { ++ if (is_linux && !is_bsd) { + # TODO(crbug.com/1431866): Remove this once is_linux in the mojom IDL does + # not include lacros. + enabled_features += [ "use_network_interface_change_listener" ] +@@ -1377,7 +1377,7 @@ mojom("mojom") { + } + } + +- if (is_linux) { ++ if (is_linux && !is_bsd) { + # TODO(crbug.com/1431866): Remove this once is_linux in the mojom IDL does + # not include lacros. + enabled_features += [ "use_network_interface_change_listener" ] diff --git a/www/ungoogled-chromium/files/patch-services_network_shared__dictionary_shared__dictionary__writer__in__memory.h b/www/ungoogled-chromium/files/patch-services_network_shared__dictionary_shared__dictionary__writer__in__memory.h new file mode 100644 index 000000000000..d6f461dd64b4 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-services_network_shared__dictionary_shared__dictionary__writer__in__memory.h @@ -0,0 +1,11 @@ +--- services/network/shared_dictionary/shared_dictionary_writer_in_memory.h.orig 2023-06-05 19:39:05 UTC ++++ services/network/shared_dictionary/shared_dictionary_writer_in_memory.h +@@ -5,6 +5,8 @@ + #ifndef SERVICES_NETWORK_SHARED_DICTIONARY_SHARED_DICTIONARY_WRITER_IN_MEMORY_H_ + #define SERVICES_NETWORK_SHARED_DICTIONARY_SHARED_DICTIONARY_WRITER_IN_MEMORY_H_ + ++#include ++ + #include "base/component_export.h" + #include "base/functional/callback.h" + #include "crypto/secure_hash.h" diff --git a/www/ungoogled-chromium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn b/www/ungoogled-chromium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn index 3d8227e0461f..629622a00376 100644 --- a/www/ungoogled-chromium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn @@ -1,16 +1,16 @@ ---- services/resource_coordinator/public/cpp/memory_instrumentation/BUILD.gn.orig 2023-04-08 11:38:38 UTC +--- services/resource_coordinator/public/cpp/memory_instrumentation/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ services/resource_coordinator/public/cpp/memory_instrumentation/BUILD.gn -@@ -33,8 +33,12 @@ component("memory_instrumentation") { +@@ -29,8 +29,12 @@ component("memory_instrumentation") { sources += [ "os_metrics_win.cc" ] } - if (is_android || is_linux || is_chromeos) { + if ((is_android || is_linux || is_chromeos) && !is_bsd) { sources += [ "os_metrics_linux.cc" ] + } + + if (is_bsd) { + sources += [ "os_metrics_bsd.cc" ] } if (is_fuchsia) { diff --git a/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.cc b/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.cc new file mode 100644 index 000000000000..611e37c882e7 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.cc @@ -0,0 +1,38 @@ +--- services/video_capture/video_capture_service_impl.cc.orig 2023-06-05 19:39:05 UTC ++++ services/video_capture/video_capture_service_impl.cc +@@ -43,7 +43,7 @@ + #include "services/video_capture/lacros/device_factory_adapter_lacros.h" + #endif // BUILDFLAG(IS_CHROMEOS_LACROS) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "media/capture/capture_switches.h" + #include "services/viz/public/cpp/gpu/context_provider_command_buffer.h" + #endif // BUILDFLAG(IS_LINUX) +@@ -109,7 +109,7 @@ class VideoCaptureServiceImpl::GpuDependenciesContext + this}; + }; + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Intended usage of this class is to create viz::Gpu in utility process and + // connect to viz::GpuClient of browser process, which will call to Gpu service. + // Also, this class holds the viz::ContextProvider to listen and monitor Gpu +@@ -256,7 +256,7 @@ void VideoCaptureServiceImpl::LazyInitializeGpuDepende + if (!gpu_dependencies_context_) + gpu_dependencies_context_ = std::make_unique(); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) { + if (!viz_gpu_context_provider_) { + viz_gpu_context_provider_ = +@@ -344,7 +344,7 @@ void VideoCaptureServiceImpl::OnGpuInfoUpdate(const CH + } + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void VideoCaptureServiceImpl::SetVizGpu(std::unique_ptr viz_gpu) { + viz_gpu_ = std::move(viz_gpu); + } diff --git a/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.h b/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.h new file mode 100644 index 000000000000..a3fe47e898ac --- /dev/null +++ b/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.h @@ -0,0 +1,29 @@ +--- services/video_capture/video_capture_service_impl.h.orig 2023-06-05 19:39:05 UTC ++++ services/video_capture/video_capture_service_impl.h +@@ -24,7 +24,7 @@ + #include "services/video_capture/ash/video_capture_device_factory_ash.h" + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "services/viz/public/cpp/gpu/gpu.h" + #endif // BUILDFLAG(IS_LINUX) + +@@ -62,7 +62,7 @@ class VideoCaptureServiceImpl : public mojom::VideoCap + #if BUILDFLAG(IS_WIN) + void OnGpuInfoUpdate(const CHROME_LUID& luid) override; + #endif +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void SetVizGpu(std::unique_ptr viz_gpu); + #endif // BUILDFLAG(IS_LINUX) + private: +@@ -87,7 +87,7 @@ class VideoCaptureServiceImpl : public mojom::VideoCap + factory_receivers_ash_; + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + class VizGpuContextProvider; + std::unique_ptr viz_gpu_context_provider_; + std::unique_ptr viz_gpu_; diff --git a/www/ungoogled-chromium/files/patch-third__party_angle_BUILD.gn b/www/ungoogled-chromium/files/patch-third__party_angle_BUILD.gn index 4e9e9ab1e63b..5889a0f96464 100644 --- a/www/ungoogled-chromium/files/patch-third__party_angle_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-third__party_angle_BUILD.gn @@ -1,29 +1,29 @@ ---- third_party/angle/BUILD.gn.orig 2023-05-05 12:12:41 UTC +--- third_party/angle/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ third_party/angle/BUILD.gn -@@ -286,7 +286,6 @@ config("extra_warnings") { +@@ -292,7 +292,6 @@ config("extra_warnings") { "-Wtautological-type-limit-compare", "-Wundefined-reinterpret-cast", "-Wunneeded-internal-declaration", - "-Wunused-but-set-variable", "-Wsuggest-destructor-override", "-Wsuggest-override", -@@ -457,7 +456,7 @@ template("angle_common_lib") { +@@ -463,7 +462,7 @@ template("angle_common_lib") { all_dependent_configs = [ ":angle_disable_pool_alloc" ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { libs = [ "dl" ] } -@@ -612,6 +611,9 @@ angle_static_library("angle_gpu_info_util") { +@@ -618,6 +617,9 @@ angle_static_library("angle_gpu_info_util") { "Xi", "Xext", ] + if (is_bsd) { + libs += [ "GL" ] + } } if (angle_use_wayland && angle_has_build) { diff --git a/www/ungoogled-chromium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__internal.h b/www/ungoogled-chromium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__internal.h index f7319d70bd1b..900efc7c4dcb 100644 --- a/www/ungoogled-chromium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__internal.h +++ b/www/ungoogled-chromium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__internal.h @@ -1,16 +1,16 @@ ---- third_party/angle/src/gpu_info_util/SystemInfo_internal.h.orig 2022-10-01 07:40:07 UTC +--- third_party/angle/src/gpu_info_util/SystemInfo_internal.h.orig 2023-06-05 19:39:05 UTC +++ third_party/angle/src/gpu_info_util/SystemInfo_internal.h -@@ -14,6 +14,13 @@ +@@ -15,6 +15,13 @@ namespace angle { +#if defined(__OpenBSD__) || defined(__FreeBSD__) +bool CollectMesaCardInfo(std::vector *devices); +#if defined(__FreeBSD__) +bool GetPCIDevicesFreeBSD(std::vector *devices); +#endif +#endif + // Defined in SystemInfo_libpci when GPU_INFO_USE_LIBPCI is defined. bool GetPCIDevicesWithLibPCI(std::vector *devices); // Defined in SystemInfo_x11 when GPU_INFO_USE_X11 is defined. 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 1aa9f77f8b13..29dcf585e079 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-04-08 11:38:38 UTC +--- third_party/angle/src/libANGLE/Display.cpp.orig 2023-06-05 19:39:05 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" +@@ -57,7 +57,7 @@ + # include "libANGLE/renderer/gl/cgl/DisplayCGL.h" + # elif ANGLE_ENABLE_EAGL + # include "libANGLE/renderer/gl/eagl/DisplayEAGL.h" -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # include "libANGLE/renderer/gl/egl/DisplayEGL.h" # if defined(ANGLE_USE_X11) # include "libANGLE/renderer/gl/glx/DisplayGLX.h" -@@ -346,7 +346,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di - impl = rx::CreateDisplayCGLOrEAGL(state); +@@ -352,7 +352,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di + impl = new rx::DisplayEAGL(state); break; -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_GBM) if (platformType == 0) { -@@ -387,7 +387,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -393,7 +393,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) -@@ -436,7 +436,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -442,7 +442,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()) { -@@ -2046,7 +2046,7 @@ static ClientExtensions GenerateClientExtensions() +@@ -2050,7 +2050,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_src_libANGLE_formatutils.cpp b/www/ungoogled-chromium/files/patch-third__party_angle_src_libANGLE_formatutils.cpp index 2c12397f7975..8122cb9b1592 100644 --- a/www/ungoogled-chromium/files/patch-third__party_angle_src_libANGLE_formatutils.cpp +++ b/www/ungoogled-chromium/files/patch-third__party_angle_src_libANGLE_formatutils.cpp @@ -1,11 +1,11 @@ ---- third_party/angle/src/libANGLE/formatutils.cpp.orig 2023-05-05 12:12:41 UTC +--- third_party/angle/src/libANGLE/formatutils.cpp.orig 2023-06-05 19:39:05 UTC +++ third_party/angle/src/libANGLE/formatutils.cpp -@@ -1485,7 +1485,7 @@ static InternalFormatInfoMap BuildInternalFormatInfoMa +@@ -1473,7 +1473,7 @@ static InternalFormatInfoMap BuildInternalFormatInfoMa AddYUVFormat(&map, GL_G8_B8R8_2PLANE_420_UNORM_ANGLE, true, 8, 8, 8, 0, 0, GL_G8_B8R8_2PLANE_420_UNORM_ANGLE, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, NeverSupported, NeverSupported); AddYUVFormat(&map, GL_G8_B8_R8_3PLANE_420_UNORM_ANGLE, true, 8, 8, 8, 0, 0, GL_G8_B8_R8_3PLANE_420_UNORM_ANGLE, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, NeverSupported, NeverSupported); -#if defined(ANGLE_PLATFORM_LINUX) +#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) // From GL_OES_required_internalformat // The |shared| bit shouldn't be 2. But given this hits assertion when bits // are checked, it's fine to have this bit set as 2 as a workaround. 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 51299e14502f..fa94740ff58c 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-02-11 09:11:04 UTC +--- third_party/angle/util/BUILD.gn.orig 2023-06-05 19:39:05 UTC +++ third_party/angle/util/BUILD.gn -@@ -292,7 +292,7 @@ foreach(is_shared_library, +@@ -302,7 +302,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 a4de03788b01..a9efe428513d 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-05-05 12:12:41 UTC +--- third_party/blink/public/platform/platform.h.orig 2023-06-05 19:39:05 UTC +++ third_party/blink/public/platform/platform.h -@@ -343,7 +343,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -344,7 +344,7 @@ class BLINK_PLATFORM_EXPORT Platform { return nullptr; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // This is called after the thread is created, so the embedder // can initiate an IPC to change its thread type (on Linux we can't // increase the nice value, so we need to ask the browser process). This diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc index 9eba5fcc5466..ef0eba8cdaa7 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc @@ -1,35 +1,35 @@ ---- third_party/blink/renderer/controller/blink_initializer.cc.orig 2023-05-05 12:12:41 UTC +--- third_party/blink/renderer/controller/blink_initializer.cc.orig 2023-06-05 19:39:05 UTC +++ third_party/blink/renderer/controller/blink_initializer.cc @@ -78,12 +78,12 @@ #include "third_party/blink/renderer/controller/private_memory_footprint_provider.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/controller/memory_usage_monitor_posix.h" #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/controller/highest_pmf_reporter.h" #include "third_party/blink/renderer/controller/user_level_memory_pressure_signal_generator.h" #endif @@ -231,7 +231,7 @@ void BlinkInitializer::RegisterInterfaces(mojo::Binder main_thread_task_runner); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) binders.Add( ConvertToBaseRepeatingCallback( CrossThreadBindRepeating(&MemoryUsageMonitorPosix::Bind)), @@ -270,7 +270,7 @@ void BlinkInitializer::RegisterMemoryWatchers(Platform #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Start reporting the highest private memory footprint after the first // navigation. HighestPmfReporter::Initialize(main_thread_task_runner); diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc index 437d68cf18d9..a17fa6ddcf33 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-05-05 12:12:41 UTC +--- third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2023-06-05 19:39:05 UTC +++ third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -6458,7 +6458,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { +@@ -6455,7 +6455,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { } #if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // TODO(crbug.com/1090246): Fix these tests on Fuchsia and re-enable. // TODO(crbug.com/1317375): Build these tests on all platforms. #define MAYBE_SelectRangeStaysHorizontallyAlignedWhenMoved \ -@@ -6866,7 +6866,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc +@@ -6864,7 +6864,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc TEST_F(CompositedSelectionBoundsTest, LargeSelectionNoScroll) { RunTest("composited_selection_bounds_large_selection_noscroll.html"); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if !BUILDFLAG(IS_ANDROID) TEST_F(CompositedSelectionBoundsTest, Input) { web_view_helper_.GetWebView()->GetSettings()->SetDefaultFontSize(16); diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc index 5ec31c3b78d8..4b984b9e892f 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/core/inspector/inspector_memory_agent.cc.orig 2022-10-01 07:40:07 UTC +--- third_party/blink/renderer/core/inspector/inspector_memory_agent.cc.orig 2023-06-05 19:39:05 UTC +++ third_party/blink/renderer/core/inspector/inspector_memory_agent.cc -@@ -190,7 +190,7 @@ InspectorMemoryAgent::GetSamplingProfileById(uint32_t +@@ -189,7 +189,7 @@ InspectorMemoryAgent::GetSamplingProfileById(uint32_t Vector InspectorMemoryAgent::Symbolize( const WebVector& addresses) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // TODO(alph): Move symbolization to the client. Vector addresses_to_symbolize; for (size_t i = 0; i < addresses.size(); i++) { diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc index f6bb415a2d55..496beb1f187f 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/layout/layout_view.cc.orig 2023-04-08 11:38:38 UTC +--- third_party/blink/renderer/core/layout/layout_view.cc.orig 2023-06-05 19:39:05 UTC +++ third_party/blink/renderer/core/layout/layout_view.cc -@@ -67,7 +67,7 @@ +@@ -66,7 +66,7 @@ #include "ui/display/screen_info.h" #include "ui/gfx/geometry/quad_f.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/platform/fonts/font_cache.h" #endif -@@ -365,7 +365,7 @@ void LayoutView::UpdateLayout() { - DCHECK(!layout_state_); - LayoutState root_layout_state(*this); +@@ -305,7 +305,7 @@ void LayoutView::UpdateLayout() { + fragmentation_context_.Clear(); + } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The font code in FontPlatformData does not have a direct connection to the // document, the frame or anything from which we could retrieve the device // scale factor. After using zoom for DSF, the GraphicsContext does only ever diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_ng_grid_ng__grid__layout__algorithm.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_ng_grid_ng__grid__layout__algorithm.cc index 646d58eec798..013ca2a0b0a9 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_ng_grid_ng__grid__layout__algorithm.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_ng_grid_ng__grid__layout__algorithm.cc @@ -1,34 +1,49 @@ ---- third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.orig 2023-05-05 12:12:41 UTC +--- third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.orig 2023-06-05 19:39:05 UTC +++ third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc -@@ -516,8 +516,15 @@ wtf_size_t NGGridLayoutAlgorithm::BuildGridSizingSubtr +@@ -520,8 +520,15 @@ wtf_size_t NGGridLayoutAlgorithm::BuildGridSizingSubtr row_auto_repetitions); bool has_nested_subgrid = false; +#if defined(__clang__) && (__clang_major__ >= 16) auto& [grid_items, layout_data, subtree_size] = - sizing_tree->CreateSizingData(); + sizing_tree->CreateSizingData(opt_subgrid_data); +#else -+ auto& sizing_data = sizing_tree->CreateSizingData(); ++ auto& sizing_data = sizing_tree->CreateSizingData(opt_subgrid_data); + auto& layout_data = sizing_data.layout_data; + auto& grid_items = sizing_data.grid_items; + auto& subtree_size = sizing_data.subtree_size; +#endif if (!must_ignore_children) { // Construct grid items that are not subgridded. -@@ -1540,8 +1547,15 @@ void NGGridLayoutAlgorithm::InitializeTrackSizes( - NGGridSizingTree* sizing_tree) const { - DCHECK(sizing_tree && current_grid_index < sizing_tree->Size()); +@@ -650,8 +657,14 @@ NGGridSizingTree NGGridLayoutAlgorithm::BuildGridSizin + NGGridSizingTree sizing_tree; + + if (const auto* layout_subtree = ConstraintSpace().GridLayoutSubtree()) { ++#if defined(__clang__) && (__clang_major__ >= 16) + auto& [grid_items, layout_data, subtree_size] = + sizing_tree.CreateSizingData(); ++#else ++ auto& sizing_data = sizing_tree.CreateSizingData(); ++ auto& layout_data = sizing_data.layout_data; ++ auto& grid_items = sizing_data.grid_items; ++#endif + + const auto& node = Node(); + grid_items = +@@ -1640,8 +1653,15 @@ void NGGridLayoutAlgorithm::InitializeTrackSizes( + const absl::optional& opt_track_direction) const { + DCHECK(sizing_subtree); +#if defined(__clang__) && (__clang_major__ >= 16) auto& [grid_items, layout_data, subtree_size] = - sizing_tree->At(current_grid_index); + sizing_subtree.SubtreeRootData(); +#else -+ auto& sizing_data = sizing_tree->At(current_grid_index); ++ auto& sizing_data = sizing_subtree.SubtreeRootData(); + auto& layout_data = sizing_data.layout_data; + auto& grid_items = sizing_data.grid_items; + auto& subtree_size = sizing_data.subtree_size; +#endif auto InitAndCacheTrackSizes = [&](GridTrackSizingDirection track_direction) { InitializeTrackCollection(opt_subgrid_data, track_direction, &layout_data); diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_features.gni b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_features.gni index 6cf7643628ce..7399ed3eb028 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_features.gni +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_features.gni @@ -1,9 +1,11 @@ ---- third_party/blink/renderer/modules/ml/webnn/features.gni.orig 2023-05-05 12:12:41 UTC +--- third_party/blink/renderer/modules/ml/webnn/features.gni.orig 2023-06-05 19:39:05 UTC +++ third_party/blink/renderer/modules/ml/webnn/features.gni -@@ -7,5 +7,5 @@ declare_args() { +@@ -7,7 +7,7 @@ declare_args() { # This enables building WebNN with XNNPACK. Currently only available for # Windows and Linux on x64 or x86. build_webnn_with_xnnpack = - (is_linux || is_win) && (current_cpu == "x64" || current_cpu == "x86") + !is_bsd && (is_win && (current_cpu == "x64" || current_cpu == "x86")) - } + + # This build flag enables WebNN on ChromeOS platform to access hardware + # acceleration by using ModelLoader mojo interface. diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc index 17d35c07c938..7258676af5a2 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-05-05 12:12:41 UTC +--- third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc.orig 2023-06-05 19:39:05 UTC +++ third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc -@@ -180,7 +180,7 @@ class SharedXnnpackContext : public ThreadSafeRefCount +@@ -183,7 +183,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 254698e2c935..339322af2c03 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-05-05 12:12:41 UTC +--- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2023-06-05 19:39:05 UTC +++ third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -6233,7 +6233,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid +@@ -6226,7 +6226,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