diff --git a/www/ungoogled-chromium/Makefile b/www/ungoogled-chromium/Makefile index 1a930779307c..a0cfb163962b 100644 --- a/www/ungoogled-chromium/Makefile +++ b/www/ungoogled-chromium/Makefile @@ -1,409 +1,411 @@ PORTNAME= ungoogled-chromium -PORTVERSION= 130.0.6723.91 -PORTREVISION= 1 +PORTVERSION= 131.0.6778.69 PULSEMV= 16 PULSEV= ${PULSEMV}.1 UGVERSION= ${DISTVERSION}-1 CATEGORIES= www wayland MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ https://nerd.hu/distfiles/:external \ https://freedesktop.org/software/pulseaudio/releases/:pulseaudio -DISTFILES= chromium-${DISTVERSION}${EXTRACT_SUFX} \ +DISTFILES= chromium-${DISTVERSION}${EXTRACT_SUFX}:external \ ungoogled-chromium-${UGVERSION}.tar.gz:external \ pulseaudio-${PULSEV}.tar.gz:pulseaudio +# unofficial distfiles +DISTFILES+= chrome-gn-${PORTVERSION}-src.tar.xz: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} \ bindgen:devel/rust-bindgen-cli \ gperf:devel/gperf \ flock:sysutils/flock \ node:www/node \ rustc:lang/rust \ xcb-proto>0:x11/xcb-proto \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ ${LOCALBASE}/share/usbids/usb.ids:misc/usbids \ ${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib@${PY_FLAVOR} \ ${LOCALBASE}/include/va/va.h:multimedia/libva \ ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri \ ${LOCALBASE}/libdata/pkgconfig/Qt5Core.pc:devel/qt5-core \ ${LOCALBASE}/libdata/pkgconfig/Qt5Widgets.pc:x11-toolkits/qt5-widgets LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-core \ libatspi.so:accessibility/at-spi2-core \ libspeechd.so:accessibility/speech-dispatcher \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libepoll-shim.so:devel/libepoll-shim \ libevent.so:devel/libevent \ libffi.so:devel/libffi \ libicuuc.so:devel/icu \ libjsoncpp.so:devel/jsoncpp \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libcairo.so:graphics/cairo \ libdrm.so:graphics/libdrm \ libexif.so:graphics/libexif \ libpng.so:graphics/png \ libwebp.so:graphics/webp \ libdav1d.so:multimedia/dav1d \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libfontconfig.so:x11-fonts/fontconfig \ libwayland-client.so:graphics/wayland \ libxkbcommon.so:x11/libxkbcommon \ libxshmfence.so:x11/libxshmfence RUN_DEPENDS= xdg-open:devel/xdg-utils \ noto-basic>0:x11-fonts/noto-basic USES= bison compiler:c++17-lang cpe desktop-file-utils gl gmake gnome \ iconv:wchar_t jpeg localbase:ldflags ninja perl5 pkgconfig \ python:build qt:5 shebangfix tar:xz xorg CPE_VENDOR= google CPE_PRODUCT= chrome USE_GL= gbm gl USE_GNOME= atk dconf gdkpixbuf2 glib20 gtk30 libxml2 libxslt USE_LDCONFIG= ${DATADIR} USE_PERL5= build USE_XORG= x11 xcb xcomposite xcursor xext xdamage xfixes xi \ xorgproto xrandr xrender xscrnsaver xtst USE_QT= buildtools:build -SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper buildtools/linux64/clang-format +SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper MAKE_ARGS= -C out/${BUILDTYPE} ALL_TARGET= chrome BINARY_ALIAS= python3=${PYTHON_CMD} \ moc=${PREFIX}/bin/moc-qt5 # TODO bz@ : install libwidevinecdm.so (see third_party/widevine/cdm/BUILD.gn) # # Run "./out/${BUILDTYPE}/gn args out/${BUILDTYPE} --list" for all variables. # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= enable_widevine=true \ fatal_linker_warnings=false \ icu_use_data_file=false \ is_clang=true \ optimize_webui=true \ toolkit_views=true \ use_allocator_shim=false \ use_aura=true \ use_custom_libcxx=true \ use_custom_libunwind=true \ use_lld=true \ use_partition_alloc=true \ use_partition_alloc_as_malloc=false \ use_sysroot=false \ use_system_freetype=false \ use_system_harfbuzz=true \ use_system_libffi=true \ use_system_libjpeg=true \ use_udev=false \ extra_cxxflags="${CXXFLAGS} -I${LOCALBASE}/include/libepoll-shim ${PINCLUDES}" \ extra_ldflags="${LDFLAGS}" \ ffmpeg_branding="${FFMPEG_BRAND}" # sync with flags.gni GN_ARGS+= build_with_tflite_lib=false \ chrome_pgo_phase=0 \ clang_use_chrome_plugins=false \ disable_fieldtrial_testing_config=true \ enable_backup_ref_ptr_support=false \ enable_log_error_not_reached=true \ enable_hangout_services_extension=false \ enable_mdns=false \ enable_nacl=false \ enable_reading_list=false \ enable_remoting=false \ enable_reporting=false \ enable_service_discovery=false \ exclude_unwind_tables=true \ google_api_key="" \ google_default_client_id="" \ google_default_client_secret="" \ safe_browsing_mode=0 \ treat_warnings_as_errors=false \ use_official_google_api_keys=false \ use_unofficial_version_number=false # TODO: investigate building with these options: # use_system_minigbm GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles SUB_FILES= ungoogled-chromium.desktop ungoogled-chromium SUB_LIST+= COMMENT="${COMMENT}" OPTIONS_DEFINE= CODECS CUPS DEBUG DRIVER KERBEROS LTO PIPEWIRE TEST WIDEVINE OPTIONS_DEFAULT= CODECS CUPS DRIVER KERBEROS PIPEWIRE SNDIO ALSA PULSEAUDIO OPTIONS_EXCLUDE_aarch64=LTO OPTIONS_GROUP= AUDIO OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO OPTIONS_RADIO= KERBEROS OPTIONS_RADIO_KERBEROS= HEIMDAL HEIMDAL_BASE MIT OPTIONS_SUB= yes CODECS_DESC= Compile and enable patented codecs like H.264 DRIVER_DESC= Install chromedriver HEIMDAL_BASE_DESC= Heimdal Kerberos (base) HEIMDAL_DESC= Heimdal Kerberos (security/heimdal) MIT_DESC= MIT Kerberos (security/krb5) ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \ alsa-lib>=1.1.1_1:audio/alsa-lib ALSA_VARS= GN_ARGS+=use_alsa=true ALSA_VARS_OFF= GN_ARGS+=use_alsa=false CODECS_VARS= GN_ARGS+=proprietary_codecs=true \ FFMPEG_BRAND="Chrome" CODECS_VARS_OFF= GN_ARGS+=proprietary_codecs=false \ FFMPEG_BRAND="Chromium" CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_VARS= GN_ARGS+=use_cups=true CUPS_VARS_OFF= GN_ARGS+=use_cups=false DEBUG_BUILD_DEPENDS= esbuild:devel/esbuild DEBUG_VARS= BUILDTYPE=Debug \ GN_ARGS+=is_debug=true \ GN_ARGS+=is_component_build=false \ GN_ARGS+=symbol_level=1 \ GN_BOOTSTRAP_FLAGS+=--debug \ WANTSPACE="21 GB" DEBUG_VARS_OFF= BUILDTYPE=Release \ GN_ARGS+=blink_symbol_level=0 \ GN_ARGS+=is_debug=false \ GN_ARGS+=is_official_build=true \ GN_ARGS+=symbol_level=0 \ WANTSPACE="14 GB" DRIVER_MAKE_ARGS= chromedriver HEIMDAL_LIB_DEPENDS= libkrb.so.26:security/heimdal KERBEROS_VARS= GN_ARGS+=use_kerberos=true KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false LTO_VARS= GN_ARGS+=use_thin_lto=true \ GN_ARGS+=thin_lto_enable_optimizations=true \ WANTSPACE="14 GB" LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false MIT_LIB_DEPENDS= libkrb.so.3:security/krb5 PIPEWIRE_DESC= Screen capture via PipeWire PIPEWIRE_LIB_DEPENDS= libpipewire-0.3.so:multimedia/pipewire PIPEWIRE_VARS= GN_ARGS+=rtc_use_pipewire=true \ GN_ARGS+=rtc_link_pipewire=true PIPEWIRE_VARS_OFF= GN_ARGS+=rtc_use_pipewire=false \ GN_ARGS+=rtc_link_pipewire=false PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true \ PINCLUDES="-I${WRKDIR}/pulseaudio-${PULSEV}/src -DPA_MAJOR=${PULSEMV}" PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_VARS= GN_ARGS+=use_sndio=true SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false WIDEVINE_DESC= Depend on foreign-cdm to enable playback of DRM content WIDEVINE_RUN_DEPENDS= foreign-cdm>0:www/foreign-cdm .include "Makefile.tests" -TEST_DISTFILES= chromium-${DISTVERSION}-testdata${EXTRACT_SUFX} +TEST_DISTFILES= chromium-${DISTVERSION}-testdata${EXTRACT_SUFX}: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 LLVM_DEFAULT= 18 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} # - swiftshader/lib/{libEGL.so,libGLESv2.so} is x86 only # - map ffmpeg target to ${ARCH} .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " FFMPEG_TARGET= arm64 .elif ${ARCH} == amd64 BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" FFMPEG_TARGET= x64 .elif ${ARCH} == i386 BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" FFMPEG_TARGET= ia32 .endif FFMPEG_BDIR= ${WRKSRC}/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} # rust RUSTC_VERSION!= rustc -V 2>/dev/null || true MAKE_ENV+= RUSTC_BOOTSTRAP=1 GN_ARGS+= enable_rust=true \ rust_sysroot_absolute="${LOCALBASE}" \ rustc_version="${RUSTC_VERSION}" 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} 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 \ + dav1d flac fontconfig harfbuzz-ng icu libdrm libevent libpng \ libusb libwebp libxml libxslt openh264 opus || ${FALSE} # Chromium uses an unreleased version of FFmpeg, so configure it cd ${WRKSRC}/media/ffmpeg && \ ${PYTHON_CMD} 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 touch ${WRKDIR}/pulseaudio-${PULSEV}/src/pulse/version.h @${REINPLACE_CMD} -e 's|$${LOCALBASE}|${LOCALBASE}|;s|$${MODCLANG_VERSION}|${LLVM_DEFAULT}|' \ ${WRKSRC}/build/rust/rust_bindgen.gni do-configure: # GN generator bootstrapping and generating ninja files cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \ READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn \ gen --args='${GN_ARGS}' out/${BUILDTYPE} # Setup nodejs dependency @${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin/node # Setup buildtools/freebsd @${MKDIR} ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/buildtools/linux64/clang-format ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/out/${BUILDTYPE}/gn ${WRKSRC}/buildtools/freebsd ${LN} -sf /usr/bin/strip ${WRKSRC}/buildtools/freebsd/strip do-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_MAN} ${WRKSRC}/chrome/app/resources/manpage.1.in \ ${STAGEDIR}${PREFIX}/share/man/man1/ungoogled-chromium.1 @${SED} -i "" -e 's,\@\@PACKAGE\@\@,chromium,g;s,\@\@MENUNAME\@\@,Chromium Web Browser,g' \ ${STAGEDIR}${PREFIX}/share/man/man1/ungoogled-chromium.1 ${CP} ${WRKSRC}/chrome/app/theme/chromium/product_logo_22_mono.png ${WRKSRC}/chrome/app/theme/chromium/product_logo_22.png .for s in 22 24 48 64 128 256 @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps ${INSTALL_DATA} ${WRKSRC}/chrome/app/theme/chromium/product_logo_${s}.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/ungoogled-chromium.png .endfor ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.png ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.pak ${STAGEDIR}${DATADIR} .for d in protoc mksnapshot ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor .for d in snapshot_blob.bin v8_context_snapshot.bin ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chrome \ ${STAGEDIR}${DATADIR}/ungoogled-chromium cd ${WRKSRC}/out/${BUILDTYPE} && \ ${COPYTREE_SHARE} "locales resources" ${STAGEDIR}${DATADIR} @${MKDIR} ${STAGEDIR}${DESKTOPDIR} ${INSTALL_DATA} ${WRKDIR}/ungoogled-chromium.desktop \ ${STAGEDIR}${DESKTOPDIR} ${INSTALL_SCRIPT} ${WRKDIR}/ungoogled-chromium ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/chrome/tools/build/linux/chrome-wrapper \ ${STAGEDIR}${DATADIR} # ANGLE, EGL, Vk .for f in libEGL.so libGLESv2.so libVkICD_mock_icd.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvulkan.so.1 \ ${STAGEDIR}${DATADIR}/libvulkan.so .if ${BUILDTYPE} == Debug ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libVkLayer_khronos_validation.so ${STAGEDIR}${DATADIR} .endif # SwiftShader .if ${ARCH} != aarch64 ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvk_swiftshader.so ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/vk_swiftshader_icd.json ${STAGEDIR}${DATADIR} .endif post-install-DEBUG-on: ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/*.so \ ${STAGEDIR}${DATADIR} ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/character_data_generator \ ${STAGEDIR}${DATADIR} post-install-DRIVER-on: ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver \ ${STAGEDIR}${PREFIX}/bin/ungoogled-chromedriver do-test-TEST-on: .for t in ${TEST_TARGETS} cd ${WRKSRC}/out/${BUILDTYPE} && ${SETENV} LC_ALL=en_US.UTF-8 \ ./${t} --gtest_filter=-${EXCLUDE_${t}:ts:} || ${TRUE} .endfor .include diff --git a/www/ungoogled-chromium/distinfo b/www/ungoogled-chromium/distinfo index e5dfbada20fc..7f606750ff47 100644 --- a/www/ungoogled-chromium/distinfo +++ b/www/ungoogled-chromium/distinfo @@ -1,9 +1,11 @@ -TIMESTAMP = 1730535656 -SHA256 (chromium-130.0.6723.91.tar.xz) = c2f13de70f2dcf61c930dcfe54ee118e584962afd03ecde19e3be48b3d86bec0 -SIZE (chromium-130.0.6723.91.tar.xz) = 6624503880 -SHA256 (ungoogled-chromium-130.0.6723.91-1.tar.gz) = 381af49c15f3afdf6373b8ee0309e3df5d5062e52cc647c6346e4c224b7223cf -SIZE (ungoogled-chromium-130.0.6723.91-1.tar.gz) = 1247258 +TIMESTAMP = 1731759520 +SHA256 (chromium-131.0.6778.69.tar.xz) = 9a3454710aacb495275da698e4d9efe785ed8a492713faa2d5dd90d58e111875 +SIZE (chromium-131.0.6778.69.tar.xz) = 4507189692 +SHA256 (ungoogled-chromium-131.0.6778.69-1.tar.gz) = 84820f9d9167d0d3ef440d1ca32890ab3af9e0723b28b3151f7ce2d71d826dbe +SIZE (ungoogled-chromium-131.0.6778.69-1.tar.gz) = 1251967 SHA256 (pulseaudio-16.1.tar.gz) = 027266c62f2a84422ac45fa721a649508f0f1628fb1fd9242315ac54ce2d7c92 SIZE (pulseaudio-16.1.tar.gz) = 2763111 -SHA256 (chromium-130.0.6723.91-testdata.tar.xz) = 66b4b339da273c53416165112d385a171fe6af79c87174a1f7951ba31c507cef -SIZE (chromium-130.0.6723.91-testdata.tar.xz) = 281380152 +SHA256 (chrome-gn-131.0.6778.69-src.tar.xz) = b8c2afac409532ada5aa8d42e12762bdb284865bb2af49551a12e75ccccee0ab +SIZE (chrome-gn-131.0.6778.69-src.tar.xz) = 762288 +SHA256 (chromium-131.0.6778.69-testdata.tar.xz) = f2c0320296f022cd92f6c3b00e8b710f3b5fa13aca38968da338cfdce209e25c +SIZE (chromium-131.0.6778.69-testdata.tar.xz) = 282547888 diff --git a/www/ungoogled-chromium/files/patch-.gn b/www/ungoogled-chromium/files/patch-.gn new file mode 100644 index 000000000000..ef44a14a6092 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-.gn @@ -0,0 +1,9 @@ +--- .gn.orig 2024-11-16 12:20:41 UTC ++++ .gn +@@ -172,4 +172,6 @@ exec_script_whitelist = + + "//tools/grit/grit_rule.gni", + "//tools/gritsettings/BUILD.gn", ++ ++ "//third_party/icu/BUILD.gn", + ] diff --git a/www/ungoogled-chromium/files/patch-BUILD.gn b/www/ungoogled-chromium/files/patch-BUILD.gn index f8344d825382..edf2d6216a5a 100644 --- a/www/ungoogled-chromium/files/patch-BUILD.gn +++ b/www/ungoogled-chromium/files/patch-BUILD.gn @@ -1,89 +1,89 @@ ---- BUILD.gn.orig 2024-10-27 06:40:35 UTC +--- BUILD.gn.orig 2024-11-16 12:20:41 UTC +++ BUILD.gn @@ -66,7 +66,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) @@ -98,7 +98,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", -@@ -437,7 +436,7 @@ group("gn_all") { +@@ -444,7 +443,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", -@@ -620,6 +619,15 @@ group("gn_all") { +@@ -626,6 +625,15 @@ group("gn_all") { } } + if (is_bsd) { + deps -= [ + "//third_party/breakpad:dump_syms($host_system_allocator_toolchain)", + "//third_party/breakpad:microdump_stackwalk($host_system_allocator_toolchain)", + "//third_party/breakpad:minidump_dump($host_system_allocator_toolchain)", + "//third_party/breakpad:minidump_stackwalk($host_system_allocator_toolchain)", + ] + } + if (is_mac) { deps += [ "//third_party/breakpad:dump_syms($host_system_allocator_toolchain)", -@@ -668,7 +676,7 @@ group("gn_all") { +@@ -674,7 +682,7 @@ group("gn_all") { } } - if (!is_fuchsia) { + if (!is_fuchsia && !is_bsd) { # The official builders use this binary from the default toolchain's # output directory after building in order to upload the symbols of that # binary. They build the binary like `ninja symupload` which requires the -@@ -1150,7 +1158,7 @@ if (use_blink && !is_cronet_build) { +@@ -1160,7 +1168,7 @@ if (use_blink && !is_cronet_build) { ] } - if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos) { + if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos && !is_bsd) { script_test("chrome_wpt_tests") { script = "//third_party/blink/tools/run_wpt_tests.py" args = _common_web_test_options + [ "--product=chrome" ] -@@ -1243,7 +1251,7 @@ if (use_blink && !is_cronet_build) { +@@ -1253,7 +1261,7 @@ if (use_blink && !is_cronet_build) { data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ] } - if (!is_win && !is_android) { + if (!is_win && !is_android && !is_bsd) { # Using the default toolchain for this tool, as it's run during tests not # during the build. This places a symlink in the root_build_dir for scrips # to use. -@@ -1257,7 +1265,7 @@ if (use_blink && !is_cronet_build) { +@@ -1267,7 +1275,7 @@ if (use_blink && !is_cronet_build) { data_deps += [ "//third_party/breakpad:dump_syms" ] } - if (is_linux || is_chromeos) { + if ((is_linux && !is_bsd) || is_chromeos) { # Using the default toolchain for this tool, as it's run during tests not # during the build. This places a symlink in the root_build_dir for scrips # to use. -@@ -1721,7 +1729,7 @@ group("chromium_builder_perf") { +@@ -1731,7 +1739,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_system_allocator_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 1c2910d676fb..5e93da9d4c58 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 2023-09-17 07:59:53 UTC +--- ash/display/mirror_window_controller.cc.orig 2024-11-16 12:20:41 UTC +++ ash/display/mirror_window_controller.cc -@@ -294,7 +294,11 @@ void MirrorWindowController::UpdateWindow( +@@ -295,7 +295,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 a10650663c1c..1d6b774b9f90 100644 --- a/www/ungoogled-chromium/files/patch-base_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-base_BUILD.gn @@ -1,150 +1,150 @@ ---- base/BUILD.gn.orig 2024-10-27 06:40:35 UTC +--- base/BUILD.gn.orig 2024-11-16 12:20:41 UTC +++ base/BUILD.gn -@@ -1101,11 +1101,26 @@ component("base") { +@@ -1097,11 +1097,26 @@ 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", + "epoll-shim", + ] + } + + if (is_freebsd) { + libs += [ + "execinfo", + "util", + ] + } + if (use_allocator_shim) { if (is_apple) { sources += [ "allocator/early_zone_registration_apple.h" ] -@@ -1125,7 +1140,7 @@ component("base") { +@@ -1121,7 +1136,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" ] } -@@ -2102,6 +2117,22 @@ component("base") { +@@ -2113,6 +2128,22 @@ component("base") { ] } + if (is_openbsd) { + sources += [ + "process/process_handle_openbsd.cc", + "process/process_iterator_openbsd.cc", + "process/process_metrics_openbsd.cc", + "system/sys_info_openbsd.cc", + ] + } else if (is_freebsd) { + sources += [ + "process/process_handle_freebsd.cc", + "process/process_iterator_freebsd.cc", + "process/process_metrics_freebsd.cc", + "system/sys_info_freebsd.cc", + ] + } + # iOS if (is_ios) { sources += [ -@@ -2246,6 +2277,33 @@ component("base") { +@@ -2257,6 +2288,33 @@ component("base") { } } + if (is_bsd) { + sources -= [ + "files/file_path_watcher_inotify.cc", + "files/scoped_file_linux.cc", + "process/set_process_title_linux.cc", + "process/set_process_title_linux.h", + "system/sys_info_linux.cc", + "process/process_iterator_linux.cc", + "process/process_linux.cc", + "process/process_metrics_linux.cc", + "process/process_handle_linux.cc", + "profiler/stack_copier_signal.cc", + "profiler/stack_copier_signal.h", + "profiler/thread_delegate_posix.cc", + "profiler/thread_delegate_posix.h", + "threading/platform_thread_linux.cc", + "stack_canary_linux.cc", + "stack_canary_linux.h", + ] + sources += [ + "files/file_path_watcher_kqueue.cc", + "files/file_path_watcher_kqueue.h", + "files/file_path_watcher_bsd.cc", + "threading/platform_thread_bsd.cc", + ] + } + if (use_blink) { sources += [ "files/file_path_watcher.cc", -@@ -2572,7 +2630,7 @@ buildflag_header("protected_memory_buildflags") { +@@ -2583,7 +2641,7 @@ buildflag_header("protected_memory_buildflags") { header = "protected_memory_buildflags.h" header_dir = "base/memory" - protected_memory_enabled = !is_component_build && is_clang && + protected_memory_enabled = !is_openbsd && !is_component_build && is_clang && (is_win || is_linux || is_android || is_mac) flags = [ "PROTECTED_MEMORY_ENABLED=$protected_memory_enabled" ] -@@ -3055,7 +3113,7 @@ if (is_apple) { +@@ -3068,7 +3126,7 @@ if (is_apple) { } } -if (!is_nacl && (is_linux || is_chromeos)) { +if (!is_nacl && !is_bsd && (is_linux || is_chromeos)) { # This test must compile with -fstack-protector-all source_set("stack_canary_linux_unittests") { testonly = true -@@ -3717,7 +3775,7 @@ test("base_unittests") { +@@ -3744,7 +3802,7 @@ test("base_unittests") { ] } - if (is_linux || is_chromeos) { + if (!is_bsd && (is_linux || is_chromeos)) { sources += [ "debug/proc_maps_linux_unittest.cc", "files/scoped_file_linux_unittest.cc", -@@ -3744,7 +3802,7 @@ test("base_unittests") { +@@ -3771,7 +3829,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", -@@ -3755,7 +3813,7 @@ test("base_unittests") { +@@ -3782,7 +3840,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" ] } -@@ -3942,7 +4000,7 @@ test("base_unittests") { +@@ -3972,7 +4030,7 @@ test("base_unittests") { deps += [ ":base_profiler_test_support_library" ] } - if (is_fuchsia || is_linux || is_chromeos) { + if ((is_fuchsia || is_linux || is_chromeos) && !is_bsd) { sources += [ "debug/elf_reader_unittest.cc", "debug/test_elf_image_builder.cc", diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni index ece62b16f6fe..aa6915a6d4e6 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,20 +1,20 @@ ---- base/allocator/partition_allocator/partition_alloc.gni.orig 2024-10-27 06:40:35 UTC +--- base/allocator/partition_allocator/partition_alloc.gni.orig 2024-11-16 12:20:41 UTC +++ base/allocator/partition_allocator/partition_alloc.gni -@@ -31,7 +31,7 @@ if (is_nacl) { - use_large_empty_slot_span_ring = is_mac +@@ -38,7 +38,7 @@ if (is_nacl) { + use_large_empty_slot_span_ring = true has_memory_tagging = - current_cpu == "arm64" && is_clang && !is_asan && (is_linux || is_android) + current_cpu == "arm64" && is_clang && !is_asan && !is_bsd && (is_linux || is_android) declare_args() { # Causes all the allocations to be routed via allocator_shim.cc. Usually, -@@ -391,7 +391,7 @@ assert(!use_asan_backup_ref_ptr || use_raw_ptr_hookabl +@@ -429,7 +429,7 @@ assert(!use_asan_backup_ref_ptr || use_raw_ptr_hookabl # dependencies that use partition_allocator are compiled in AOSP against a # version of glibc that does not include pkeys syscall numbers. is_pkeys_available = - (is_linux || is_chromeos) && current_cpu == "x64" && !is_cronet_build + !is_bsd && (is_linux || is_chromeos) && current_cpu == "x64" && !is_cronet_build declare_args() { enable_pkeys = is_pkeys_available } diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn index f9cd4c9b00f5..04c0eb734f78 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig 2024-10-27 06:40:35 UTC +--- base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig 2024-11-16 12:20:41 UTC +++ base/allocator/partition_allocator/src/partition_alloc/BUILD.gn -@@ -858,7 +858,7 @@ if (is_clang_or_gcc) { +@@ -863,7 +863,7 @@ if (is_clang_or_gcc) { configs -= [ partition_alloc_enable_arc_config ] } } - if (is_chromeos || is_linux) { + if ((is_chromeos || is_linux) && !is_bsd) { shim_headers += [ "shim/allocator_shim_override_cpp_symbols.h", "shim/allocator_shim_override_glibc_weak_symbols.h", diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.cc index 5fcf9c65d4dc..39ba62e634ad 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.cc @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc.orig 2024-08-26 14:40:28 UTC +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc.orig 2024-11-16 12:20:41 UTC +++ base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc -@@ -9,7 +9,7 @@ - #include "partition_alloc/page_allocator.h" +@@ -38,7 +38,7 @@ uint32_t SecTaskGetCodeSignStatus(SecTaskRef task) API + #endif // PA_BUILDFLAG(IS_MAC) #if PA_BUILDFLAG(HAS_MEMORY_TAGGING) || \ - (defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT == 1)) + (defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT == 1) && !PA_BUILDFLAG(IS_BSD)) struct __ifunc_arg_t; #include "partition_alloc/aarch64_support.h" diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h index 9a2f4c31d8a0..f176f6f99139 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h @@ -1,16 +1,16 @@ ---- base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h.orig 2024-10-27 06:40:35 UTC +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h.orig 2024-11-16 12:20:41 UTC +++ base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h -@@ -412,8 +412,12 @@ bool TryRecommitSystemPagesInternal( +@@ -302,8 +302,12 @@ bool TryRecommitSystemPagesInternal( void DiscardSystemPagesInternal(uintptr_t address, size_t length) { void* ptr = reinterpret_cast(address); -#if PA_BUILDFLAG(IS_APPLE) +#if PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_BSD) +#if PA_BUILDFLAG(IS_BSD) + int ret = madvise(ptr, length, MADV_FREE); +#else int ret = madvise(ptr, length, MADV_FREE_REUSABLE); +#endif if (ret) { // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED. ret = madvise(ptr, length, MADV_DONTNEED); diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h index f0ad0e9ffc99..34845e15a632 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h @@ -1,20 +1,20 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig 2024-10-27 06:40:35 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig 2024-11-16 12:20:41 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h -@@ -168,7 +168,7 @@ constexpr bool kUseLazyCommit = false; +@@ -170,7 +170,7 @@ constexpr bool kUseLazyCommit = false; // This may be required on more platforms in the future. #define PA_CONFIG_HAS_ATFORK_HANDLER() \ (PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_LINUX) || \ - PA_BUILDFLAG(IS_CHROMEOS)) + PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD)) // Enable shadow metadata. // -@@ -231,7 +231,7 @@ constexpr bool kUseLazyCommit = false; +@@ -233,7 +233,7 @@ constexpr bool kUseLazyCommit = false; // Also enabled on ARM64 macOS and iOS, as the 16kiB pages on this platform lead // to larger slot spans. #if PA_BUILDFLAG(IS_LINUX) || \ - (PA_BUILDFLAG(IS_APPLE) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)) + (PA_BUILDFLAG(IS_APPLE) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)) || PA_BUILDFLAG(IS_BSD) #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() 1 #else #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() 0 diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc index 6455a432d0f3..f9654e0437f2 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc @@ -1,29 +1,29 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig 2024-10-27 06:40:35 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig 2024-11-16 12:20:41 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_root.cc @@ -44,7 +44,7 @@ #include "wow64apiset.h" #endif -#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) +#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD) #include - #endif - -@@ -290,7 +290,7 @@ void PartitionAllocMallocInitOnce() { + #if PA_CONFIG(ENABLE_SHADOW_METADATA) + #include +@@ -293,7 +293,7 @@ void PartitionAllocMallocInitOnce() { return; } -#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) +#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || PA_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. -@@ -1110,7 +1110,7 @@ void PartitionRoot::Init(PartitionOptions opts) { +@@ -1113,7 +1113,7 @@ void PartitionRoot::Init(PartitionOptions opts) { // apple OSes. PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) || (internal::SystemPageSize() == (size_t{1} << 14))); -#elif PA_BUILDFLAG(IS_LINUX) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64) +#elif (PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_BSD)) && PA_BUILDFLAG(PA_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 is only // supported on Linux on AArch64. diff --git a/www/ungoogled-chromium/files/patch-base_compiler__specific.h b/www/ungoogled-chromium/files/patch-base_compiler__specific.h index 58bf4796179a..40f6de02cc8a 100644 --- a/www/ungoogled-chromium/files/patch-base_compiler__specific.h +++ b/www/ungoogled-chromium/files/patch-base_compiler__specific.h @@ -1,20 +1,11 @@ ---- base/compiler_specific.h.orig 2024-10-27 06:40:35 UTC +--- base/compiler_specific.h.orig 2024-11-16 12:20:41 UTC +++ base/compiler_specific.h -@@ -257,7 +257,7 @@ - // - // In some cases it's desirable to remove this, e.g. on hot functions, or if - // we have purposely changed the reference canary. --#if defined(COMPILER_GCC) || defined(__clang__) -+#if (defined(COMPILER_GCC) || defined(__clang__)) && !defined(__OpenBSD__) && !defined(__FreeBSD__) - #if HAS_ATTRIBUTE(__no_stack_protector__) - #define NO_STACK_PROTECTOR __attribute__((__no_stack_protector__)) +@@ -683,7 +683,7 @@ inline constexpr bool AnalyzerAssumeTrue(bool arg) { + #if __has_cpp_attribute(clang::preserve_most) && \ + (defined(ARCH_CPU_ARM64) || defined(ARCH_CPU_X86_64)) && \ + !defined(COMPONENT_BUILD) && \ +- !(BUILDFLAG(IS_WIN) && defined(ARCH_CPU_ARM64)) ++ !((BUILDFLAG(IS_WIN) || BUILDFLAG(IS_OPENBSD)) && defined(ARCH_CPU_ARM64)) + #define PRESERVE_MOST [[clang::preserve_most]] #else -@@ -388,7 +388,7 @@ inline constexpr bool AnalyzerAssumeTrue(bool arg) { - // See https://clang.llvm.org/docs/AttributeReference.html#preserve-most for - // more details. - #if (defined(ARCH_CPU_ARM64) || defined(ARCH_CPU_X86_64)) && \ -- !(BUILDFLAG(IS_WIN) && defined(ARCH_CPU_ARM64)) && \ -+ !((BUILDFLAG(IS_WIN) || BUILDFLAG(IS_OPENBSD)) && defined(ARCH_CPU_ARM64)) && \ - !defined(COMPONENT_BUILD) && defined(__clang__) && \ - __clang_major__ >= 17 && HAS_ATTRIBUTE(preserve_most) - #define PRESERVE_MOST __attribute__((preserve_most)) + #define PRESERVE_MOST diff --git a/www/ungoogled-chromium/files/patch-base_debug_stack__trace__posix.cc b/www/ungoogled-chromium/files/patch-base_debug_stack__trace__posix.cc index 2e1c02c41cb0..937e0b8a0cb5 100644 --- a/www/ungoogled-chromium/files/patch-base_debug_stack__trace__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_debug_stack__trace__posix.cc @@ -1,101 +1,101 @@ ---- base/debug/stack_trace_posix.cc.orig 2024-07-31 14:19:23 UTC +--- base/debug/stack_trace_posix.cc.orig 2024-11-16 12:20:41 UTC +++ base/debug/stack_trace_posix.cc @@ -46,7 +46,7 @@ // execinfo.h and backtrace(3) are really only present in glibc and in macOS // libc. #if BUILDFLAG(IS_APPLE) || \ - (defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__AIX)) + (defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__AIX) && !BUILDFLAG(IS_BSD)) #define HAVE_BACKTRACE #include #endif @@ -64,8 +64,10 @@ #include #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +#if !BUILDFLAG(IS_BSD) #include +#endif #include "base/debug/proc_maps_linux.h" #endif -@@ -307,7 +309,7 @@ void PrintToStderr(const char* output) { +@@ -322,7 +324,7 @@ void PrintToStderr(const char* output) { std::ignore = HANDLE_EINTR(write(STDERR_FILENO, output, strlen(output))); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void AlarmSignalHandler(int signal, siginfo_t* info, void* void_context) { // We have seen rare cases on AMD linux where the default signal handler // either does not run or a thread (Probably an AMD driver thread) prevents -@@ -324,7 +326,11 @@ void AlarmSignalHandler(int signal, siginfo_t* info, v +@@ -339,7 +341,11 @@ void AlarmSignalHandler(int signal, siginfo_t* info, v "Warning: Default signal handler failed to terminate process.\n"); PrintToStderr("Calling exit_group() directly to prevent timeout.\n"); // See: https://man7.org/linux/man-pages/man2/exit_group.2.html +#if BUILDFLAG(IS_BSD) + _exit(EXIT_FAILURE); +#else syscall(SYS_exit_group, EXIT_FAILURE); +#endif } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || // BUILDFLAG(IS_CHROMEOS) -@@ -541,7 +547,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf +@@ -537,7 +543,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf _exit(EXIT_FAILURE); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Set an alarm to trigger in case the default handler does not terminate // the process. See 'AlarmSignalHandler' for more details. struct sigaction action; -@@ -566,6 +572,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf +@@ -562,6 +568,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf // signals that do not re-raise autonomously), such as signals delivered via // kill() and asynchronous hardware faults such as SEGV_MTEAERR, which would // otherwise be lost when re-raising the signal via raise(). +#if !BUILDFLAG(IS_BSD) long retval = syscall(SYS_rt_tgsigqueueinfo, getpid(), syscall(SYS_gettid), info->si_signo, info); if (retval == 0) { -@@ -580,6 +587,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf +@@ -576,6 +583,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf if (errno != EPERM) { _exit(EXIT_FAILURE); } +#endif #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || // BUILDFLAG(IS_CHROMEOS) -@@ -769,6 +777,7 @@ class SandboxSymbolizeHelper { +@@ -772,6 +780,7 @@ class SandboxSymbolizeHelper { return -1; } +#if !BUILDFLAG(IS_BSD) // This class is copied from // third_party/crashpad/crashpad/util/linux/scoped_pr_set_dumpable.h. // It aims at ensuring the process is dumpable before opening /proc/self/mem. -@@ -861,11 +870,15 @@ class SandboxSymbolizeHelper { +@@ -864,11 +873,15 @@ class SandboxSymbolizeHelper { r.base = cur_base; } } +#endif // Parses /proc/self/maps in order to compile a list of all object file names // for the modules that are loaded in the current process. // Returns true on success. bool CacheMemoryRegions() { +#if BUILDFLAG(IS_BSD) + return false; +#else // Reads /proc/self/maps. std::string contents; if (!ReadProcMaps(&contents)) { -@@ -883,6 +896,7 @@ class SandboxSymbolizeHelper { +@@ -886,6 +899,7 @@ class SandboxSymbolizeHelper { is_initialized_ = true; return true; +#endif } // Opens all object files and caches their file descriptors. diff --git a/www/ungoogled-chromium/files/patch-base_files_drive__info.h b/www/ungoogled-chromium/files/patch-base_files_drive__info.h new file mode 100644 index 000000000000..5270a9f505fe --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_files_drive__info.h @@ -0,0 +1,11 @@ +--- base/files/drive_info.h.orig 2024-11-16 12:20:41 UTC ++++ base/files/drive_info.h +@@ -40,7 +40,7 @@ class BASE_EXPORT DriveInfo { + std::optional has_seek_penalty; + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Whether the drive is a removable drive. + // + // Note on macOS: that SSDs that are connected over USB that you can eject diff --git a/www/ungoogled-chromium/files/patch-base_files_drive__info__posix.cc b/www/ungoogled-chromium/files/patch-base_files_drive__info__posix.cc new file mode 100644 index 000000000000..04564f047eff --- /dev/null +++ b/www/ungoogled-chromium/files/patch-base_files_drive__info__posix.cc @@ -0,0 +1,11 @@ +--- base/files/drive_info_posix.cc.orig 2024-11-16 12:20:41 UTC ++++ base/files/drive_info_posix.cc +@@ -28,7 +28,7 @@ DriveInfo& DriveInfo::operator=(DriveInfo&&) = default + + std::optional GetFileDriveInfo(const FilePath& file_path) { + DriveInfo drive_info; +-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) ++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + drive_info.has_seek_penalty = false; + return drive_info; + #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc b/www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc index b88b2cf9ce3b..33f0c02fa8ad 100644 --- a/www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc @@ -1,55 +1,55 @@ ---- base/files/file_util_posix.cc.orig 2024-07-31 14:19:23 UTC +--- base/files/file_util_posix.cc.orig 2024-11-16 12:20:41 UTC +++ base/files/file_util_posix.cc -@@ -889,36 +889,33 @@ bool CreateNewTempDirectory(const FilePath::StringType +@@ -897,36 +897,33 @@ bool CreateNewTempDirectory(const FilePath::StringType bool CreateDirectoryAndGetError(const FilePath& full_path, File::Error* error) { ScopedBlockingCall scoped_blocking_call( FROM_HERE, BlockingType::MAY_BLOCK); // For call to mkdir(). + const FilePath kFileSystemRoot("/"); std::vector subpaths; // Collect a list of all parent directories. FilePath last_path = full_path; - subpaths.push_back(full_path); - for (FilePath path = full_path.DirName(); path.value() != last_path.value(); - path = path.DirName()) { + if (full_path != kFileSystemRoot) + subpaths.push_back(full_path); + for (FilePath path = full_path.DirName(); (path.value() != last_path.value() && + (path != kFileSystemRoot)); path = path.DirName()) { subpaths.push_back(path); last_path = path; } // Iterate through the parents and create the missing ones. for (const FilePath& subpath : base::Reversed(subpaths)) { - if (DirectoryExists(subpath)) { - continue; - } - if (mkdir(subpath.value().c_str(), 0700) == 0) { - continue; - } - // Mkdir failed, but it might have failed with EEXIST, or some other error - // due to the directory appearing out of thin air. This can occur if - // two processes are trying to create the same file system tree at the same - // time. Check to see if it exists and make sure it is a directory. - int saved_errno = errno; - if (!DirectoryExists(subpath)) { - if (error) { - *error = File::OSErrorToFileError(saved_errno); + if (!PathExists(subpath)) { + if ((mkdir(subpath.value().c_str(), 0700) == -1) && + ((full_path != subpath) ? (errno != ENOENT) : (-1))) { + int saved_errno = errno; + if (error) + *error = File::OSErrorToFileError(saved_errno); + return false; } - errno = saved_errno; - return false; + } else if (!DirectoryExists(subpath)) { + if (error) + *error = File::OSErrorToFileError(ENOTDIR); + return false; } } return true; diff --git a/www/ungoogled-chromium/files/patch-base_files_file__util__unittest.cc b/www/ungoogled-chromium/files/patch-base_files_file__util__unittest.cc index 54e2f66d512e..805e4f127f10 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 2024-10-27 06:40:35 UTC +--- base/files/file_util_unittest.cc.orig 2024-11-16 12:20:41 UTC +++ base/files/file_util_unittest.cc -@@ -3886,7 +3886,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { +@@ -3928,7 +3928,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"; -@@ -4608,7 +4608,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles +@@ -4665,7 +4665,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_logging__unittest.cc b/www/ungoogled-chromium/files/patch-base_logging__unittest.cc index fe358cd525a1..478226044d7d 100644 --- a/www/ungoogled-chromium/files/patch-base_logging__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_logging__unittest.cc @@ -1,31 +1,31 @@ ---- base/logging_unittest.cc.orig 2024-06-22 08:49:42 UTC +--- base/logging_unittest.cc.orig 2024-11-16 12:20:41 UTC +++ base/logging_unittest.cc @@ -41,7 +41,7 @@ #include "base/posix/eintr_wrapper.h" #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) #include #endif -@@ -579,14 +579,18 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo +@@ -585,14 +585,18 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo // need the arch-specific boilerplate below, which is inspired by breakpad. // At the same time, on OSX, ucontext.h is deprecated but si_addr works fine. uintptr_t crash_addr = 0; -#if BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FREEBSD) crash_addr = reinterpret_cast(info->si_addr); #else // OS_* ucontext_t* context = reinterpret_cast(context_ptr); #if defined(ARCH_CPU_X86) crash_addr = static_cast(context->uc_mcontext.gregs[REG_EIP]); #elif defined(ARCH_CPU_X86_64) +#if BUILDFLAG(IS_OPENBSD) + crash_addr = static_cast(context->sc_rip); +#else crash_addr = static_cast(context->uc_mcontext.gregs[REG_RIP]); +#endif #elif defined(ARCH_CPU_ARMEL) crash_addr = static_cast(context->uc_mcontext.arm_pc); #elif defined(ARCH_CPU_ARM64) diff --git a/www/ungoogled-chromium/files/patch-base_process_launch.h b/www/ungoogled-chromium/files/patch-base_process_launch.h index 22bae88597cc..9454688589b4 100644 --- a/www/ungoogled-chromium/files/patch-base_process_launch.h +++ b/www/ungoogled-chromium/files/patch-base_process_launch.h @@ -1,11 +1,11 @@ ---- base/process/launch.h.orig 2024-10-27 06:40:35 UTC +--- base/process/launch.h.orig 2024-11-16 12:20:41 UTC +++ base/process/launch.h -@@ -237,7 +237,7 @@ struct BASE_EXPORT LaunchOptions { +@@ -241,7 +241,7 @@ struct BASE_EXPORT LaunchOptions { bool clear_environment = false; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If non-zero, start the process using clone(), using flags as provided. // Unlike in clone, clone_flags may not contain a custom termination signal // that is sent to the parent when the child dies. The termination signal will 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 793776b01dd7..cd5337658623 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 2024-08-26 14:40:28 UTC +--- base/system/sys_info.cc.orig 2024-11-16 12:20:41 UTC +++ base/system/sys_info.cc -@@ -223,7 +223,7 @@ std::string SysInfo::HardwareModelName() { +@@ -229,7 +229,7 @@ std::string SysInfo::SocManufacturer() { #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 e66bf11b1c04..f6c1ad34fcc7 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 2024-05-23 20:04:36 UTC +--- base/system/sys_info.h.orig 2024-11-16 12:20:41 UTC +++ base/system/sys_info.h -@@ -325,6 +325,8 @@ class BASE_EXPORT SysInfo { +@@ -331,6 +331,8 @@ class BASE_EXPORT SysInfo { static void ResetCpuSecurityMitigationsEnabledForTesting(); #endif + static uint64_t MaxSharedMemorySize(); + private: friend class test::ScopedAmountOfPhysicalMemoryOverride; FRIEND_TEST_ALL_PREFIXES(SysInfoTest, AmountOfAvailablePhysicalMemory); -@@ -337,7 +339,7 @@ class BASE_EXPORT SysInfo { +@@ -343,7 +345,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_threading_hang__watcher.cc b/www/ungoogled-chromium/files/patch-base_threading_hang__watcher.cc index 8ac8e1148011..4866483c2e52 100644 --- a/www/ungoogled-chromium/files/patch-base_threading_hang__watcher.cc +++ b/www/ungoogled-chromium/files/patch-base_threading_hang__watcher.cc @@ -1,11 +1,11 @@ ---- base/threading/hang_watcher.cc.orig 2024-07-31 14:19:23 UTC +--- base/threading/hang_watcher.cc.orig 2024-11-16 12:20:41 UTC +++ base/threading/hang_watcher.cc -@@ -354,7 +354,7 @@ void HangWatcher::InitializeOnMainThread(ProcessType p +@@ -352,7 +352,7 @@ void HangWatcher::InitializeOnMainThread(ProcessType p bool enable_hang_watcher = base::FeatureList::IsEnabled(kEnableHangWatcher); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) if (is_zygote_child) { enable_hang_watcher = enable_hang_watcher && diff --git a/www/ungoogled-chromium/files/patch-build_config_clang_BUILD.gn b/www/ungoogled-chromium/files/patch-build_config_clang_BUILD.gn index ab33fad7be58..d5177f93318b 100644 --- a/www/ungoogled-chromium/files/patch-build_config_clang_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-build_config_clang_BUILD.gn @@ -1,16 +1,16 @@ ---- build/config/clang/BUILD.gn.orig 2024-10-27 06:40:35 UTC +--- build/config/clang/BUILD.gn.orig 2024-11-16 12:20:41 UTC +++ build/config/clang/BUILD.gn -@@ -236,7 +236,12 @@ template("clang_lib") { +@@ -210,7 +210,12 @@ template("clang_lib") { # Adds a dependency on the Clang runtime library clang_rt.builtins. clang_lib("compiler_builtins") { - if (is_mac) { + if (is_bsd) { + # Since there's no Rust in the toolchain, there's no concern that we'll use + # the Rust stdlib's intrinsics here. + # + # Don't define libname which makes this target do nothing. + } else if (is_mac) { libname = "osx" } else if (is_ios) { if (target_environment == "simulator") { 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 bc8fceb20f3b..a3b5e3ecf6df 100644 --- a/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-build_config_compiler_BUILD.gn @@ -1,141 +1,142 @@ ---- build/config/compiler/BUILD.gn.orig 2024-10-27 06:40:35 UTC +--- build/config/compiler/BUILD.gn.orig 2024-11-16 12:20:41 UTC +++ build/config/compiler/BUILD.gn @@ -199,7 +199,7 @@ declare_args() { # This greatly reduces the size of debug builds, at the cost of # debugging information which is required by some specialized # debugging tools. - simple_template_names = is_clang && !is_nacl && !is_win && !is_apple + simple_template_names = is_clang && !is_nacl && !is_win && !is_apple && !is_bsd } declare_args() { @@ -256,13 +256,16 @@ config("default_include_dirs") { # 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", "-Wl,--strip-all" ] + } } # compiler --------------------------------------------------------------------- @@ -508,6 +511,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ if (use_icf && (!is_apple || use_lld)) { @@ -561,7 +568,7 @@ config("compiler") { ldflags += [ "-Wl,-z,keep-text-section-prefix" ] } - if (is_clang && !is_nacl) { + if (is_clang && !is_nacl && !is_bsd) { cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] if (save_reproducers_on_lld_crash && use_lld) { ldflags += [ -@@ -1217,7 +1224,7 @@ config("compiler_cpu_abi") { +@@ -1220,7 +1227,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" ] -@@ -1232,7 +1239,7 @@ config("compiler_cpu_abi") { +@@ -1235,7 +1242,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" ] -@@ -1567,7 +1574,7 @@ config("compiler_deterministic") { +@@ -1570,7 +1577,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", -@@ -1625,7 +1632,7 @@ config("compiler_deterministic") { +@@ -1628,7 +1635,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 && current_os != "zos") { update_args = [ "--print-revision", -@@ -1955,9 +1962,6 @@ config("default_warnings") { - - # TODO(crbug.com/40286317): Evaluate and possibly enable. - "-Wno-vla-extension", +@@ -1952,9 +1959,6 @@ config("default_warnings") { + cflags += [ + # TODO(crbug.com/330524456): -Wcast-function-type is under -Wextra now. + "-Wno-cast-function-type", - - # TODO(crbug.com/40284799): Fix and re-enable. - "-Wno-thread-safety-reference-return", ] cflags_cc += [ -@@ -1965,17 +1969,11 @@ config("default_warnings") { +@@ -1962,18 +1966,12 @@ config("default_warnings") { "-Wenum-compare-conditional", ] - if (!is_nacl) { + if (!is_nacl && !is_openbsd) { cflags_cc += [ # TODO(crbug.com/41486292): Fix and re-enable. "-Wno-c++11-narrowing-const-reference", ] -- + - # TODO(crbug.com/344680447): Fix and re-enable. - cflags_cc += [ "-Wno-missing-template-arg-list-after-template-kw" ] - - # TODO(crbug.com/356172342): Fix and re-enable. - cflags_cc += [ "-Wno-dangling-assignment-gsl" ] - } - } - -@@ -2709,7 +2707,7 @@ config("afdo_optimize_size") { +- + if (llvm_force_head_revision) { + # TODO(crbug.com/373130005): Fix and re-enable. + cflags_cc += [ "-Wno-deprecated-literal-operator" ] +@@ -2711,7 +2709,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. -@@ -2736,7 +2734,7 @@ config("afdo") { +@@ -2738,7 +2736,7 @@ config("afdo") { cflags += [ "-Wno-backend-plugin" ] inputs = [ _clang_sample_profile ] } - } else if (auto_profile_path != "" && is_a_target_toolchain) { + } else if (auto_profile_path != "" && is_a_target_toolchain && !is_bsd) { cflags = [ "-fauto-profile=${auto_profile_path}" ] inputs = [ auto_profile_path ] } -@@ -2913,7 +2911,7 @@ config("symbols") { +@@ -2915,7 +2913,7 @@ config("symbols") { cflags += [ "-gomit-unreferenced-methods" ] } - if (is_clang && (!is_nacl || is_nacl_saigo)) { + if (is_clang && (!is_nacl || is_nacl_saigo) && !is_bsd) { if (is_apple) { # TODO(crbug.com/40117949): 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 40fa0ef76936..16beb3e26059 100644 --- a/www/ungoogled-chromium/files/patch-build_config_rust.gni +++ b/www/ungoogled-chromium/files/patch-build_config_rust.gni @@ -1,13 +1,13 @@ ---- build/config/rust.gni.orig 2024-10-27 06:40:35 UTC +--- build/config/rust.gni.orig 2024-11-16 12:20:41 UTC +++ build/config/rust.gni -@@ -277,6 +277,10 @@ if (is_linux || is_chromeos) { +@@ -321,6 +321,10 @@ if (is_linux || is_chromeos) { } } +if (is_bsd) { + rust_abi_target = string_replace(rust_abi_target, "linux-gnu", current_os) +} + assert(!toolchain_has_rust || rust_abi_target != "") # This variable is passed to the Rust libstd build. diff --git a/www/ungoogled-chromium/files/patch-build_linux_unbundle_icu.gn b/www/ungoogled-chromium/files/patch-build_linux_unbundle_icu.gn index 993e55fbf2ca..ad3086ad0fcf 100644 --- a/www/ungoogled-chromium/files/patch-build_linux_unbundle_icu.gn +++ b/www/ungoogled-chromium/files/patch-build_linux_unbundle_icu.gn @@ -1,18 +1,52 @@ ---- build/linux/unbundle/icu.gn.orig 2024-08-26 14:40:28 UTC +--- build/linux/unbundle/icu.gn.orig 2024-11-16 12:20:41 UTC +++ build/linux/unbundle/icu.gn @@ -17,6 +17,15 @@ config("icu_config") { "USING_SYSTEM_ICU=1", "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC", + # As of icu 73 C++ nullptr, char16_t, override, final and noexcept are used + # instead of defines. These definitions can be removed when the bundled icu + # gets updated to 73. For more details, see: + # https://unicode-org.atlassian.net/browse/ICU-21833 and + # https://github.com/unicode-org/icu/commit/28643799377ecf654564f6f31854b02788cebe33 + "U_FINAL=final", + "U_NOEXCEPT=noexcept", + "U_OVERRIDE=override", + # U_EXPORT (defined in unicode/platform.h) is used to set public visibility # on classes through the U_COMMON_API and U_I18N_API macros (among others). # When linking against the system ICU library, we want its symbols to have +@@ -35,6 +44,18 @@ config("icu_config") { + # please see: https://crbug.com/822820 + "U_IMPORT=U_EXPORT", + ] ++ ++ _icu_version = exec_script(pkg_config_script, ++ common_pkg_config_args + pkg_config_args + [ ++ "icu-i18n", ++ "--version-as-components", ++ ], ++ "value") ++ ++ # Unbreak with icu 76 where private symbols are picked up ++ if (_icu_version[0] >= 76) { ++ defines += [ "U_HIDE_DRAFT_API" ] ++ } + } + + pkg_config("system_icui18n") { +@@ -46,6 +67,14 @@ pkg_config("system_icuuc") { + } + + source_set("icui18n") { ++ deps = [ ":icui18n_shim" ] ++ public_configs = [ ++ ":icu_config", ++ ":system_icui18n", ++ ] ++} ++ ++source_set("icui18n_hidden_visibility") { + deps = [ ":icui18n_shim" ] + public_configs = [ + ":icu_config", diff --git a/www/ungoogled-chromium/files/patch-cc_base_features.cc b/www/ungoogled-chromium/files/patch-cc_base_features.cc index 8b82450720a0..320e656df767 100644 --- a/www/ungoogled-chromium/files/patch-cc_base_features.cc +++ b/www/ungoogled-chromium/files/patch-cc_base_features.cc @@ -1,11 +1,11 @@ ---- cc/base/features.cc.orig 2024-10-27 06:40:35 UTC +--- cc/base/features.cc.orig 2024-11-16 12:20:41 UTC +++ cc/base/features.cc -@@ -78,7 +78,7 @@ const base::FeatureParam kDeferImplInvalidationFr +@@ -85,7 +85,7 @@ const base::FeatureParam kDeferImplInvalidationFr // be using a separate flag to control the launch on GL. BASE_FEATURE(kUseDMSAAForTiles, "UseDMSAAForTiles", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_app_chrome__main__delegate.cc index 415066053d07..fbb019028d06 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,147 +1,147 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/app/chrome_main_delegate.cc @@ -145,7 +145,7 @@ #include "components/about_ui/credit_utils.h" #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) #include "components/nacl/common/nacl_paths.h" #include "components/nacl/zygote/nacl_fork_delegate_linux.h" #endif @@ -189,17 +189,17 @@ #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) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/nix/scoped_xdg_activation_token_injector.h" #include "ui/linux/display_server_utils.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 -@@ -343,7 +343,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -342,7 +342,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 -@@ -428,7 +428,7 @@ bool HandleVersionSwitches(const base::CommandLine& co +@@ -427,7 +427,7 @@ bool HandleVersionSwitches(const base::CommandLine& co // TODO(crbug.com/40118868): 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) || -@@ -474,7 +474,7 @@ void SetCrashpadUploadConsentPostLogin() { +@@ -439,7 +439,7 @@ void HandleHelpSwitches(const base::CommandLine& comma } - #endif // BUILDFLAG(IS_CHROMEOS_LACROS) + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) void SIGTERMProfilingShutdown(int signal) { content::Profiling::Stop(); struct sigaction sigact; -@@ -556,7 +556,7 @@ std::optional AcquireProcessSingleton( +@@ -521,7 +521,7 @@ std::optional AcquireProcessSingleton( // process can be exited. ChromeProcessSingleton::CreateInstance(user_data_dir); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Read the xdg-activation token and set it in the command line for the // duration of the notification in order to ensure this is propagated to an // already running browser process if it exists. -@@ -640,7 +640,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -605,7 +605,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. -@@ -770,7 +770,7 @@ void RecordMainStartupMetrics(const StartupTimestamps& +@@ -698,7 +698,7 @@ void RecordMainStartupMetrics(const StartupTimestamps& #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Record the startup process creation time on supported platforms. On Android // this is recorded in ChromeMainDelegateAndroid. startup_metric_utils::GetCommon().RecordStartupProcessCreationTime( -@@ -964,7 +964,7 @@ std::optional ChromeMainDelegate::PostEarlyInitia +@@ -887,7 +887,7 @@ std::optional ChromeMainDelegate::PostEarlyInitia #if BUILDFLAG(IS_OZONE) // Initialize Ozone platform and add required feature flags as per platform's // properties. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ui::SetOzonePlatformForLinuxIfNeeded(*base::CommandLine::ForCurrentProcess()); #endif ui::OzonePlatform::PreEarlyInitialization(); -@@ -1168,7 +1168,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv +@@ -1091,7 +1091,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv const bool is_canary_dev = IsCanaryDev(); const bool emit_crashes = #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) is_canary_dev; #else false; -@@ -1318,7 +1318,7 @@ std::optional ChromeMainDelegate::BasicStartupCom +@@ -1241,7 +1241,7 @@ std::optional ChromeMainDelegate::BasicStartupCom // TODO(crbug.com/40118868): 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 -@@ -1348,7 +1348,7 @@ std::optional ChromeMainDelegate::BasicStartupCom +@@ -1271,7 +1271,7 @@ std::optional ChromeMainDelegate::BasicStartupCom #if BUILDFLAG(IS_CHROMEOS) chromeos::dbus_paths::RegisterPathProvider(); #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) nacl::RegisterPathProvider(); #endif -@@ -1725,7 +1725,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1634,7 +1634,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 && !command_line.HasSwitch(switches::kDisableCrashpadForTesting)) { -@@ -1821,13 +1821,13 @@ absl::variant Chrome +@@ -1723,13 +1723,13 @@ absl::variant Chrome #else #if BUILDFLAG(IS_MAC) || (BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && \ - !BUILDFLAG(IS_CHROMEOS)) + !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)) static const MainFunction kMainFunctions[] = { #if BUILDFLAG(IS_MAC) {switches::kRelauncherProcess, mac_relauncher::internal::RelauncherMain}, {switches::kCodeSignCloneCleanupProcess, code_sign_clone_manager::internal::ChromeCodeSignCloneCleanupMain}, -#elif BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // This entry is not needed on Linux, where the NaCl loader // process is launched via nacl_helper instead. {switches::kNaClLoaderProcess, NaClMain}, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_BUILD.gn b/www/ungoogled-chromium/files/patch-chrome_browser_BUILD.gn index 541c981cd004..2496e2ceeea2 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-chrome_browser_BUILD.gn @@ -1,16 +1,16 @@ ---- chrome/browser/BUILD.gn.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/BUILD.gn.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/BUILD.gn -@@ -6869,6 +6869,13 @@ static_library("browser") { +@@ -6948,6 +6948,13 @@ static_library("browser") { } } + if (is_bsd) { + sources -= [ + "metrics/bluetooth_metrics_provider.cc", + "metrics/bluetooth_metrics_provider.h", + ] + } + if (is_linux && use_dbus) { sources += [ "dbus_memory_pressure_evaluator_linux.cc", diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc b/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc index c7e58efd8b4b..cf51a1c5fd14 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc @@ -1,292 +1,328 @@ ---- chrome/browser/about_flags.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/about_flags.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/about_flags.cc -@@ -245,7 +245,7 @@ +@@ -247,7 +247,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 -@@ -338,7 +338,7 @@ +@@ -342,7 +342,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/public/ozone_switches.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -@@ -347,7 +347,7 @@ +@@ -351,7 +351,7 @@ #include "chrome/browser/win/mica_titlebar.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/profile_management/profile_management_features.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -@@ -357,7 +357,7 @@ +@@ -361,7 +361,7 @@ #include "components/user_education/common/user_education_features.h" // nogncheck #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/ui_features.h" #include "ui/base/ui_base_features.h" #endif -@@ -499,7 +499,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap +@@ -507,7 +507,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, -@@ -776,6 +776,26 @@ const FeatureEntry::FeatureVariation +@@ -784,6 +784,26 @@ const FeatureEntry::FeatureVariation std::size(kWebIdentityDigitalIdentityCredentialHighRiskDialogParam), nullptr}}; +#if BUILDFLAG(IS_BSD) +const FeatureEntry::FeatureParam kAudioBackendPulseAudio[] = { + { "audio-backend", "pulseaudio" }}; +const FeatureEntry::FeatureParam kAudioBackendSndio[] = { + { "audio-backend", "sndio" }}; +const FeatureEntry::FeatureParam kAudioBackendAlsa[] = { + { "audio-backend", "alsa" }}; +const FeatureEntry::FeatureVariation + kAudioBackendVariations[] = { + {"using PulseAudio by default if available", kAudioBackendPulseAudio, + std::size(kAudioBackendPulseAudio), + nullptr}, + {"using sndio by default if available", kAudioBackendSndio, + std::size(kAudioBackendSndio), + nullptr}, + {"using ALSA by default if available", kAudioBackendAlsa, + std::size(kAudioBackendAlsa), + nullptr}}; +#endif + const FeatureEntry::FeatureParam kClipboardMaximumAge60Seconds[] = { {"UIClipboardMaximumAge", "60"}}; const FeatureEntry::FeatureParam kClipboardMaximumAge90Seconds[] = { -@@ -1189,7 +1209,7 @@ const FeatureEntry::FeatureVariation kPageContentAnnot +@@ -1225,7 +1245,7 @@ const FeatureEntry::FeatureVariation kPageContentAnnot }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kHistoryEmbeddingsAtKeywordAcceleration[]{ {"AtKeywordAcceleration", "true"}, }; -@@ -1233,7 +1253,7 @@ const FeatureEntry::FeatureVariation +@@ -1269,7 +1289,7 @@ const FeatureEntry::FeatureVariation }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kShortcutBoostSingleUrl[] = { {"ShortcutBoostSearchScore", "0"}, {"ShortcutBoostNonTopHitThreshold", "0"}, -@@ -3679,7 +3699,7 @@ const flags_ui::FeatureEntry::FeatureVariation +@@ -1887,7 +1907,7 @@ const FeatureEntry::FeatureVariation kTabScrollingVari + #endif + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + const FeatureEntry::FeatureParam kTabstripDeclutterQuickModeParams[] = { + {"stale_threshold_duration", "10s"}, + {"declutter_timer_interval", "10s"}, +@@ -3636,7 +3656,7 @@ const flags_ui::FeatureEntry::FeatureVariation }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const flags_ui::FeatureEntry::FeatureParam kPwaNavigationCapturingDefaultOn[] = {{"link_capturing_state", "on_by_default"}}; const flags_ui::FeatureEntry::FeatureParam kPwaNavigationCapturingDefaultOff[] = -@@ -4929,7 +4949,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4160,7 +4180,7 @@ const FeatureEntry::FeatureVariation + std::size(kSecurePaymentConfirmationNetworkAndIssuerIcons_Rows), + nullptr}}; + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + const FeatureEntry::FeatureParam kTranslationAPI_SkipLanguagePackLimit[] = { + {"TranslationAPIAcceptLanguagesCheck", "false"}, + {"TranslationAPILimitLanguagePackCount", "false"}}; +@@ -4914,7 +4934,7 @@ const FeatureEntry kFeatureEntries[] = { }, #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { "fluent-overlay-scrollbars", flag_descriptions::kFluentOverlayScrollbarsName, -@@ -5341,7 +5361,7 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kWebAppUniversalInstallDescription, kOsDesktop, - FEATURE_VALUE_TYPE(features::kWebAppUniversalInstall)}, +@@ -5323,7 +5343,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kDesktopPWAsSyncChangesDescription, kOsDesktop, + FEATURE_VALUE_TYPE(features::kWebAppDontAddExistingAppsToSync)}, #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"shortcuts-not-apps", flag_descriptions::kShortcutsNotAppsName, flag_descriptions::kShortcutsNotAppsDescription, kOsMac | kOsWin | kOsLinux, -@@ -5496,7 +5516,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5478,7 +5498,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kWebShare)}, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"pulseaudio-loopback-for-cast", flag_descriptions::kPulseaudioLoopbackForCastName, flag_descriptions::kPulseaudioLoopbackForCastDescription, kOsLinux, -@@ -5523,9 +5543,18 @@ const FeatureEntry kFeatureEntries[] = { - {"wayland-text-input-v3", flag_descriptions::kWaylandTextInputV3Name, - flag_descriptions::kWaylandTextInputV3Description, kOsLinux, - FEATURE_VALUE_TYPE(features::kWaylandTextInputV3)}, +@@ -5509,9 +5529,18 @@ const FeatureEntry kFeatureEntries[] = { + {"wayland-ui-scaling", flag_descriptions::kWaylandUiScalingName, + flag_descriptions::kWaylandUiScalingDescription, kOsLinux, + FEATURE_VALUE_TYPE(features::kWaylandUiScale)}, +#if BUILDFLAG(IS_BSD) + {"audio-backend", + flag_descriptions::kAudioBackendName, + flag_descriptions::kAudioBackendDescription, kOsLinux, + FEATURE_WITH_PARAMS_VALUE_TYPE( + media::kAudioBackend, + kAudioBackendVariations, + "AudioBackend")}, +#endif #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, -@@ -6474,7 +6503,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6423,7 +6452,7 @@ const FeatureEntry kFeatureEntries[] = { "MlUrlScoring")}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"omnibox-domain-suggestions", flag_descriptions::kOmniboxDomainSuggestionsName, flag_descriptions::kOmniboxDomainSuggestionsDescription, kOsDesktop, -@@ -6761,7 +6790,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6629,7 +6658,7 @@ const FeatureEntry kFeatureEntries[] = { "OrganicRepeatableQueries")}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"history-embeddings", flag_descriptions::kHistoryEmbeddingsName, flag_descriptions::kHistoryEmbeddingsDescription, kOsDesktop, FEATURE_WITH_PARAMS_VALUE_TYPE(history_embeddings::kHistoryEmbeddings, -@@ -7350,7 +7379,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7244,7 +7273,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(printing::features::kAddPrinterViaPrintscanmgr)}, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"cups-ipp-printing-backend", flag_descriptions::kCupsIppPrintingBackendName, flag_descriptions::kCupsIppPrintingBackendDescription, kOsDesktop, -@@ -8335,7 +8364,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8248,7 +8277,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kCooperativeSchedulingDescription, kOsAll, FEATURE_VALUE_TYPE(features::kCooperativeScheduling)}, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"enable-network-service-sandbox", flag_descriptions::kEnableNetworkServiceSandboxName, flag_descriptions::kEnableNetworkServiceSandboxDescription, -@@ -8359,7 +8388,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(media::kV4L2FlatStatefulVideoDecoder)}, - #endif +@@ -8264,7 +8293,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(media::kUseOutOfProcessVideoDecoding)}, + #endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"enable-family-link-extensions-permissions", flag_descriptions:: kEnableExtensionsPermissionsForSupervisedUsersOnDesktopName, -@@ -9193,7 +9222,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(ash::features::kWallpaperPerDesk)}, +@@ -9078,7 +9107,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(ash::features::kWallpaperGooglePhotosSharedAlbums)}, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"enable-get-all-screens-media", flag_descriptions::kGetAllScreensMediaName, flag_descriptions::kGetAllScreensMediaDescription, kOsCrOS | kOsLacros | kOsLinux, -@@ -9226,7 +9255,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9111,7 +9140,7 @@ const FeatureEntry kFeatureEntries[] = { #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { "ui-debug-tools", flag_descriptions::kUIDebugToolsName, -@@ -9754,7 +9783,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9612,7 +9641,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kRenderPassDrawnRect)}, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"media-session-enter-picture-in-picture", flag_descriptions::kMediaSessionEnterPictureInPictureName, flag_descriptions::kMediaSessionEnterPictureInPictureDescription, -@@ -10601,7 +10630,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10399,7 +10428,7 @@ const FeatureEntry kFeatureEntries[] = { kOsDesktop | kOsAndroid, FEATURE_VALUE_TYPE(features::kProcessPerSiteUpToMainFrameThreshold)}, -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"camera-mic-effects", flag_descriptions::kCameraMicEffectsName, flag_descriptions::kCameraMicEffectsDescription, static_cast(kOsMac | kOsWin | kOsLinux), -@@ -10639,7 +10668,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10430,7 +10459,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kSiteInstanceGroupsForDataUrls)}, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"site-search-settings-policy", flag_descriptions::kSiteSearchSettingsPolicyName, flag_descriptions::kSiteSearchSettingsPolicyDescription, kOsAll, -@@ -10768,7 +10797,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10555,7 +10584,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kHideIncognitoMediaMetadataDescription, kOsAll, FEATURE_VALUE_TYPE(media::kHideIncognitoMediaMetadata)}, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"third-party-profile-management", flag_descriptions::kThirdPartyProfileManagementName, flag_descriptions::kThirdPartyProfileManagementDescription, -@@ -10810,7 +10839,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10597,7 +10626,7 @@ const FeatureEntry kFeatureEntries[] = { #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"enable-user-navigation-capturing-pwa", flag_descriptions::kPwaNavigationCapturingName, flag_descriptions::kPwaNavigationCapturingDescription, -@@ -11735,7 +11764,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -11485,7 +11514,7 @@ const FeatureEntry kFeatureEntries[] = { kAuthenticateUsingUserConsentVerifierInteropApi)}, #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"sync-enable-bookmarks-in-transport-mode", flag_descriptions::kSyncEnableBookmarksInTransportModeName, flag_descriptions::kSyncEnableBookmarksInTransportModeDescription, -@@ -11825,7 +11854,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -11584,7 +11613,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"classify-url-on-process-response-event", flag_descriptions::kClassifyUrlOnProcessResponseEventName, flag_descriptions::kClassifyUrlOnProcessResponseEventDescription, -@@ -11834,7 +11863,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -11593,7 +11622,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"tab-organization", flag_descriptions::kTabOrganizationName, flag_descriptions::kTabOrganizationDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kTabOrganization)}, -@@ -11873,7 +11902,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -11638,7 +11667,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kLanguageDetectionAPIDescription, kOsAll, FEATURE_VALUE_TYPE(blink::features::kLanguageDetectionAPI)}, -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"supervised-profile-hide-guest", flag_descriptions::kSupervisedProfileHideGuestName, flag_descriptions::kSupervisedProfileHideGuestDescription, +@@ -11891,7 +11920,7 @@ const FeatureEntry kFeatureEntries[] = { + segmentation_platform::features::kSegmentationSurveyPage)}, + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + {"autofill-enable-buy-now-pay-later-for-affirm", + flag_descriptions::kAutofillEnableBuyNowPayLaterForAffirmName, + flag_descriptions::kAutofillEnableBuyNowPayLaterForAffirmDescription, +@@ -12026,7 +12055,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE( + autofill::features::kAutofillEnableCardInfoRuntimeRetrieval)}, + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + {"translation-api", flag_descriptions::kTranslationAPIName, + flag_descriptions::kTranslationAPIDescription, kOsMac | kOsWin | kOsLinux, + FEATURE_WITH_PARAMS_VALUE_TYPE(blink::features::kEnableTranslationAPI, 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 92f425172fd0..e0c089eac4da 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc @@ -1,38 +1,29 @@ ---- chrome/browser/browser_features.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/browser_features.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/browser_features.cc @@ -71,7 +71,7 @@ BASE_FEATURE(kClosedTabCache, "ClosedTabCache", base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables usage of os_crypt_async::SecretPortalKeyProvider. Once // `kSecretPortalKeyProviderUseForEncryption` is enabled, this flag cannot be // disabled without losing data. @@ -87,7 +87,7 @@ BASE_FEATURE(kDbusSecretPortal, BASE_FEATURE(kDestroyProfileOnBrowserClose, "DestroyProfileOnBrowserClose", #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT); #else base::FEATURE_DISABLED_BY_DEFAULT); -@@ -347,7 +347,7 @@ BASE_FEATURE(kSandboxExternalProtocolBlockedWarning, +@@ -268,7 +268,7 @@ BASE_FEATURE(kSandboxExternalProtocolBlockedWarning, "SandboxExternalProtocolBlockedWarning", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If true, encrypt new data with the key provided by SecretPortalKeyProvider. // Otherwise, it will only decrypt existing data. BASE_FEATURE(kSecretPortalKeyProviderUseForEncryption, -@@ -360,7 +360,7 @@ BASE_FEATURE(kSecretPortalKeyProviderUseForEncryption, - BASE_FEATURE(kSupportSearchSuggestionForPrerender2, - "SupportSearchSuggestionForPrerender2", - #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ -- BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+ BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT); - #else - base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.h b/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.h index 7db5d84792d9..49cae8833b8f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.h @@ -1,20 +1,20 @@ ---- chrome/browser/browser_features.h.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/browser_features.h.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/browser_features.h -@@ -29,7 +29,7 @@ BASE_DECLARE_FEATURE(kCertificateTransparencyAskBefore +@@ -38,7 +38,7 @@ BASE_DECLARE_FEATURE(kCertificateTransparencyAskBefore BASE_DECLARE_FEATURE(kCertVerificationNetworkTime); BASE_DECLARE_FEATURE(kClosedTabCache); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kDbusSecretPortal); #endif -@@ -143,7 +143,7 @@ BASE_DECLARE_FEATURE(kRestartNetworkServiceUnsandboxed +@@ -117,7 +117,7 @@ BASE_DECLARE_FEATURE(kRestartNetworkServiceUnsandboxed BASE_DECLARE_FEATURE(kSandboxExternalProtocolBlocked); BASE_DECLARE_FEATURE(kSandboxExternalProtocolBlockedWarning); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kSecretPortalKeyProviderUseForEncryption); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc index 19fd59fa4b57..04dd83dfad4e 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,56 +1,56 @@ ---- chrome/browser/browser_process_impl.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/browser_process_impl.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/browser_process_impl.cc -@@ -238,7 +238,7 @@ +@@ -239,7 +239,7 @@ #include "chrome/browser/ui/profiles/profile_picker.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 -@@ -257,7 +257,7 @@ +@@ -258,7 +258,7 @@ #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_features.h" #include "components/os_crypt/async/browser/secret_portal_key_provider.h" #endif -@@ -1135,7 +1135,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySim +@@ -1136,7 +1136,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySim GoogleUpdateSettings::GetCollectStatsConsent()); registry->RegisterBooleanPref(prefs::kDevToolsRemoteDebuggingAllowed, true); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) os_crypt_async::SecretPortalKeyProvider::RegisterLocalPrefs(registry); #endif } -@@ -1310,7 +1310,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { +@@ -1311,7 +1311,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 -@@ -1404,7 +1404,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { - } +@@ -1398,7 +1398,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { + features::kUseAppBoundEncryptionProviderForEncryption)))); #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(features::kDbusSecretPortal)) { providers.emplace_back( /*precedence=*/10u, -@@ -1635,7 +1635,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1628,7 +1628,7 @@ void BrowserProcessImpl::Unpin() { // Mac is currently not supported. // TODO(crbug.com/40118868): 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__field__trials.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__field__trials.cc index f3e5313c2dc9..656c989d3c75 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__field__trials.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__field__trials.cc @@ -1,20 +1,20 @@ ---- chrome/browser/chrome_browser_field_trials.cc.orig 2024-08-26 14:40:28 UTC +--- chrome/browser/chrome_browser_field_trials.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/chrome_browser_field_trials.cc -@@ -48,7 +48,7 @@ +@@ -49,7 +49,7 @@ #include "chrome/browser/ui/startup/default_browser_prompt/default_browser_prompt_trial.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/nix/xdg_util.h" #include "ui/base/ui_base_features.h" #endif // BUILDFLAG(IS_LINUX) -@@ -155,7 +155,7 @@ void ChromeBrowserFieldTrials::RegisterSyntheticTrials +@@ -135,7 +135,7 @@ void ChromeBrowserFieldTrials::RegisterSyntheticTrials #endif } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Linux/Desktop platform variants, such as ozone/wayland, some features // might need to be disabled as per OzonePlatform's runtime properties. // OzonePlatform selection and initialization, in turn, depend on Chrome flags diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__field__trials.h b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__field__trials.h index 8c6661db7236..7367fe8f22b1 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__field__trials.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__field__trials.h @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_browser_field_trials.h.orig 2024-08-26 14:40:28 UTC +--- chrome/browser/chrome_browser_field_trials.h.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/chrome_browser_field_trials.h -@@ -34,7 +34,7 @@ class ChromeBrowserFieldTrials : public variations::Pl +@@ -33,7 +33,7 @@ class ChromeBrowserFieldTrials : public variations::Pl const variations::EntropyProviders& entropy_providers, base::FeatureList* feature_list) override; void RegisterSyntheticTrials() override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void RegisterFeatureOverrides(base::FeatureList* feature_list) override; #endif 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 bf191d45af72..5839ff2cb6ea 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,88 +1,88 @@ ---- chrome/browser/chrome_browser_interface_binders.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -128,12 +128,12 @@ +@@ -129,12 +129,12 @@ #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) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/app_settings/web_app_settings_ui.h" + #include "chrome/browser/ui/webui/on_device_translation_internals/on_device_translation_internals_ui.h" #include "ui/webui/resources/cr_components/app_management/app_management.mojom.h" - #endif -@@ -221,7 +221,7 @@ +@@ -224,7 +224,7 @@ #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "chrome/browser/companion/visual_query/visual_query_suggestions_service_factory.h" #include "chrome/browser/ui/web_applications/sub_apps_service_impl.h" #include "chrome/browser/ui/webui/discards/discards.mojom.h" + #include "chrome/browser/ui/webui/discards/discards_ui.h" @@ -232,7 +232,7 @@ #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) -#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/ui/webui/whats_new/whats_new_ui.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -1049,7 +1049,7 @@ void PopulateChromeFrameBinders( +@@ -1055,7 +1055,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 (base::FeatureList::IsEnabled(blink::features::kDesktopPWAsSubApps) && !render_frame_host->GetParentOrOuterDocument()) { // The service binder will reject non-primary main frames, but we still need -@@ -1130,7 +1130,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1136,7 +1136,7 @@ void PopulateChromeWebUIFrameBinders( DataSharingInternalsUI>(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); -@@ -1141,7 +1141,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1147,7 +1147,7 @@ void PopulateChromeWebUIFrameBinders( policy::DlpInternalsUI>(map); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< app_management::mojom::PageHandlerFactory, WebAppSettingsUI>(map); - #endif -@@ -1227,14 +1227,14 @@ void PopulateChromeWebUIFrameBinders( + +@@ -1246,14 +1246,14 @@ void PopulateChromeWebUIFrameBinders( page_image_service::mojom::PageImageServiceHandler, HistoryUI, HistoryClustersSidePanelUI, NewTabPageUI, BookmarksSidePanelUI>(map); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder(map); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) RegisterWebUIControllerInterfaceBinder< browser_command::mojom::CommandHandlerFactory, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) WhatsNewUI, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) NewTabPageUI>(map); -@@ -1730,7 +1730,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1762,7 +1762,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 6807d8ef3977..113c97f8099d 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,118 +1,118 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/chrome_browser_main.cc @@ -249,15 +249,15 @@ // TODO(crbug.com/40118868): 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 -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/nix/xdg_util.h" #endif @@ -290,14 +290,14 @@ // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h" #include "chrome/browser/metrics/desktop_session_duration/touch_mode_stats_tracker.h" #include "chrome/browser/profiles/profile_activity_metrics_recorder.h" #include "ui/base/pointer/touch_ui_controller.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/headless/headless_mode_metrics.h" // nogncheck #include "chrome/browser/headless/headless_mode_util.h" // nogncheck #include "components/headless/select_file_dialog/headless_select_file_dialog.h" -@@ -369,14 +369,14 @@ +@@ -365,14 +365,14 @@ #endif // BUILDFLAG(IS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER) #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "sql/database.h" #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) namespace { #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) constexpr base::FilePath::CharType kMediaHistoryDatabaseName[] = FILE_PATH_LITERAL("Media History"); -@@ -541,7 +541,7 @@ void ProcessSingletonNotificationCallbackImpl( +@@ -537,7 +537,7 @@ void ProcessSingletonNotificationCallbackImpl( } #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Set the global activation token sent as a command line switch by another // browser process. This also removes the switch after use to prevent any side // effects of leaving it in the command line after this point. -@@ -1119,7 +1119,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1115,7 +1115,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 . -@@ -1167,7 +1167,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1163,7 +1163,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) metrics::DesktopSessionDurationTracker::Initialize(); ProfileActivityMetricsRecorder::Initialize(); TouchModeStatsTracker::Initialize( -@@ -1363,7 +1363,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1359,7 +1359,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Delete the media history database if it still exists. // TODO(crbug.com/40177301): Remove this. base::ThreadPool::PostTask( -@@ -1412,7 +1412,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1408,7 +1408,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* *UrlLanguageHistogramFactory::GetForBrowserContext(profile)); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode()) { headless::ReportHeadlessActionMetrics(); } -@@ -1524,7 +1524,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl( +@@ -1517,7 +1517,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl( // In headless mode provide alternate SelectFileDialog factory overriding // any platform specific SelectFileDialog implementation that may have been // set. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode()) { headless::HeadlessSelectFileDialogFactory::SetUp(); } -@@ -2068,7 +2068,7 @@ bool ChromeBrowserMainParts::ProcessSingletonNotificat +@@ -2069,7 +2069,7 @@ bool ChromeBrowserMainParts::ProcessSingletonNotificat // Drop the request if headless mode is in effect or the request is from // a headless Chrome process. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode() || command_line.HasSwitch(switches::kHeadless)) { return false; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc index 137e12f366cc..da03f14b721b 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc @@ -1,39 +1,39 @@ ---- chrome/browser/chrome_browser_main_linux.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/chrome_browser_main_linux.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/chrome_browser_main_linux.cc @@ -25,7 +25,7 @@ #include "device/bluetooth/dbus/bluez_dbus_thread_manager.h" #include "ui/base/l10n/l10n_util.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/ozone/public/ozone_platform.h" #endif -@@ -84,7 +84,9 @@ void ChromeBrowserMainPartsLinux::PostCreateMainMessag +@@ -72,7 +72,9 @@ void ChromeBrowserMainPartsLinux::PostCreateMainMessag #endif // BUILDFLAG(IS_CHROMEOS) #if !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_BSD) bluez::BluezDBusManager::Initialize(nullptr /* system_bus */); +#endif // Set up crypt config. This needs to be done before anything starts the // network service, as the raw encryption key needs to be shared with the -@@ -110,7 +112,7 @@ void ChromeBrowserMainPartsLinux::PostCreateMainMessag +@@ -98,7 +100,7 @@ void ChromeBrowserMainPartsLinux::PostCreateMainMessag ChromeBrowserMainPartsPosix::PostCreateMainMessageLoop(); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() { ChromeBrowserMainPartsPosix::PostMainMessageLoopRun(); ui::OzonePlatform::GetInstance()->PostMainMessageLoopRun(); -@@ -170,7 +172,7 @@ void ChromeBrowserMainPartsLinux::CheckIfSanitizeCompl - #endif // BUILDFLAG(IS_CHROMEOS_ASH) +@@ -136,7 +138,7 @@ void ChromeBrowserMainPartsLinux::PostBrowserStart() { + #endif // (defined(USE_DBUS) && !BUILDFLAG(IS_CHROMEOS)) void ChromeBrowserMainPartsLinux::PostDestroyThreads() { -#if BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // No-op; per PostBrowserStart() comment, this is done elsewhere. #else bluez::BluezDBusManager::Shutdown(); 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 05d55b6a6695..41189f1134e3 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,162 +1,180 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -490,7 +490,7 @@ +@@ -497,7 +497,7 @@ #include "storage/browser/file_system/external_mount_points.h" // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/chrome_browser_main_linux.h" #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" #elif BUILDFLAG(IS_ANDROID) -@@ -607,12 +607,12 @@ +@@ -614,12 +614,12 @@ // TODO(crbug.com/40118868): 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 -@@ -623,7 +623,7 @@ +@@ -630,7 +630,7 @@ #include "chrome/browser/apps/link_capturing/web_app_link_capturing_delegate.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/chrome_browser_main_extra_parts_enterprise.h" #include "chrome/browser/enterprise/profile_management/oidc_auth_response_capture_navigation_throttle.h" #include "chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.h" -@@ -631,7 +631,7 @@ +@@ -639,7 +639,7 @@ #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) -@@ -646,7 +646,7 @@ +@@ -654,7 +654,7 @@ #include "chrome/browser/ui/views/lens/lens_side_panel_navigation_helper.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" -@@ -1606,7 +1606,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre +@@ -1575,7 +1575,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre #if BUILDFLAG(IS_CHROMEOS) registry->RegisterBooleanPref(prefs::kNativeClientForceAllowed, false); #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOutOfProcessSystemDnsResolutionEnabled, true); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) -@@ -1806,7 +1806,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1777,7 +1777,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) -@@ -1840,7 +1840,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1811,7 +1811,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo std::make_unique()); // TODO(crbug.com/40118868): 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 -@@ -1861,7 +1861,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1832,7 +1832,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()); -@@ -1880,7 +1880,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1851,7 +1851,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< enterprise_util::ChromeBrowserMainExtraPartsEnterprise>()); -@@ -2752,7 +2752,9 @@ void MaybeAppendBlinkSettingsSwitchForFieldTrial( +@@ -2724,7 +2724,9 @@ void MaybeAppendBlinkSettingsSwitchForFieldTrial( void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( base::CommandLine* command_line, int child_process_id) { +#ifdef notyet crash_keys::AppendStringAnnotationsCommandLineSwitch(command_line); +#endif #if BUILDFLAG(IS_MAC) std::unique_ptr client_info = GoogleUpdateSettings::LoadMetricsClientInfo(); -@@ -3102,7 +3104,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -3080,7 +3082,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin } } -#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)) { -@@ -4926,7 +4928,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -4931,7 +4933,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, -@@ -5511,7 +5513,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5052,7 +5054,7 @@ std::wstring ChromeContentBrowserClient::GetAppContain + case sandbox::mojom::Sandbox::kPrintCompositor: + case sandbox::mojom::Sandbox::kAudio: + case sandbox::mojom::Sandbox::kScreenAI: +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + case sandbox::mojom::Sandbox::kVideoEffects: + #endif + case sandbox::mojom::Sandbox::kSpeechRecognition: +@@ -5157,7 +5159,7 @@ bool ChromeContentBrowserClient::PreSpawnChild( + #if !BUILDFLAG(IS_ANDROID) + case sandbox::mojom::Sandbox::kScreenAI: + #endif +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + case sandbox::mojom::Sandbox::kVideoEffects: + #endif + case sandbox::mojom::Sandbox::kAudio: +@@ -5512,7 +5514,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); -@@ -5525,7 +5527,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5529,7 +5531,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); -@@ -5556,7 +5558,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5560,7 +5562,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); -@@ -7463,7 +7465,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS +@@ -7472,7 +7474,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS bool ChromeContentBrowserClient::ShouldRunOutOfProcessSystemDnsResolution() { // This enterprise policy is supported on Android, but the feature will not be // launched there. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // This is possibly called before `g_browser_process` is initialized. PrefService* local_state; if (g_browser_process) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.h b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.h index 8d5f1f0daca7..ca05ca09ae01 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.h @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_content_browser_client.h.orig 2024-10-01 07:26:23 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -525,7 +525,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -531,7 +531,7 @@ class ChromeContentBrowserClient : public content::Con bool IsPluginAllowedToUseDevChannelAPIs( content::BrowserContext* browser_context, const GURL& url) override; -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) void GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_component__updater_registration.cc b/www/ungoogled-chromium/files/patch-chrome_browser_component__updater_registration.cc new file mode 100644 index 000000000000..84a5b8227e45 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_component__updater_registration.cc @@ -0,0 +1,20 @@ +--- chrome/browser/component_updater/registration.cc.orig 2024-11-16 12:20:41 UTC ++++ chrome/browser/component_updater/registration.cc +@@ -80,7 +80,7 @@ + #include "media/base/media_switches.h" + #endif // !BUILDFLAG(IS_ANDROID) + +-#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/component_updater/translate_kit_component_installer.h" + #include "chrome/browser/component_updater/translate_kit_language_pack_component_installer.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +@@ -227,7 +227,7 @@ void RegisterComponentsForUpdate() { + + RegisterPlusAddressBlocklistComponent(cus); + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // TODO(crbug.com/364795294): Support other platforms. + RegisterTranslateKitComponent(cus, g_browser_process->local_state(), + /*force_install=*/false, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc index c9858fbb5d4b..e2f8acf9dbae 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc @@ -1,20 +1,20 @@ ---- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1767,7 +1767,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1782,7 +1782,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferredForFile( const base::FilePath& path) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) { return !download_prefs_->ShouldOpenPdfInSystemReader(); } -@@ -1884,7 +1884,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow +@@ -1896,7 +1896,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow content::CheckDownloadAllowedCallback check_download_allowed_cb) { DCHECK_CURRENTLY_ON(BrowserThread::UI); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Don't download pdf if it is a file URL, as that might cause an infinite // download loop if Chrome is not the system pdf viewer. if (url.SchemeIsFile() && download_prefs_->ShouldOpenPdfInSystemReader()) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc index 9b47034ff3ea..9e39268204a7 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc @@ -1,29 +1,29 @@ ---- chrome/browser/download/download_item_model.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/download/download_item_model.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/download/download_item_model.cc -@@ -787,7 +787,7 @@ bool DownloadItemModel::IsCommandChecked( +@@ -757,7 +757,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(); -@@ -835,7 +835,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand +@@ -805,7 +805,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand DownloadCommands::ALWAYS_OPEN_TYPE); DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(profile()); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (download_commands->CanOpenPdfInSystemViewer()) { prefs->SetShouldOpenPdfInSystemReader(!is_checked); SetShouldPreferOpeningInBrowser(is_checked); -@@ -1174,7 +1174,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe +@@ -1142,7 +1142,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (download_->GetOriginalMimeType() == "application/x-x509-user-cert") { SetShouldPreferOpeningInBrowser(true); return; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc index 0531b97d198a..7f186e195cf8 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc @@ -1,11 +1,11 @@ ---- chrome/browser/enterprise/connectors/connectors_service.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/enterprise/connectors/connectors_service.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/enterprise/connectors/connectors_service.cc -@@ -512,7 +512,7 @@ bool ConnectorsService::ConnectorsEnabled() const { +@@ -494,7 +494,7 @@ bool ConnectorsService::ConnectorsEnabled() const { Profile* profile = Profile::FromBrowserContext(context_); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On desktop, the guest profile is actually the primary OTR profile of // the "regular" guest profile. The regular guest profile is never used // directly by users. Also, user are not able to create child OTR profiles diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc index 68ce945541a9..4b2d77dc02f3 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc @@ -1,38 +1,38 @@ ---- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc.orig 2024-10-01 07:26:23 UTC +--- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc -@@ -59,7 +59,7 @@ +@@ -58,7 +58,7 @@ #include "base/strings/utf_string_conversions.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h" #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #include "components/device_signals/core/browser/signals_aggregator.h" -@@ -144,7 +144,7 @@ void UploadSecurityEventReport(base::Value::Dict event - std::move(report), std::move(upload_callback)); +@@ -143,7 +143,7 @@ void UploadSecurityEventReport(base::Value::Dict event + std::move(upload_callback)); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void PopulateSignals(base::Value::Dict event, policy::CloudPolicyClient* client, std::string name, -@@ -421,7 +421,7 @@ void RealtimeReportingClient::ReportPastEvent(const st +@@ -420,7 +420,7 @@ void RealtimeReportingClient::ReportPastEvent(const st /*include_profile_user_name=*/false); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void AddCrowdstrikeSignalsToEvent( base::Value::Dict& event, -@@ -480,7 +480,7 @@ void RealtimeReportingClient::ReportEventWithTimestamp +@@ -479,7 +479,7 @@ void RealtimeReportingClient::ReportEventWithTimestamp if (include_profile_user_name) { event.Set(kKeyProfileUserName, GetProfileUserName()); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) Profile* profile = Profile::FromBrowserContext(context_); device_signals::SignalsAggregator* signals_aggregator = enterprise_signals::SignalsAggregatorFactory::GetForProfile(profile); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn index 0c8e4d219591..c57d2fe86200 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_BUILD.gn @@ -1,13 +1,13 @@ ---- chrome/browser/extensions/BUILD.gn.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1494,6 +1494,10 @@ source_set("extensions") { +@@ -1434,6 +1434,10 @@ source_set("extensions") { deps += [ "//chrome/services/printing/public/mojom" ] } + if (is_bsd) { + sources -= [ "api/image_writer_private/removable_storage_provider_linux.cc" ] + } + if (enable_pdf) { deps += [ "//chrome/browser/pdf", diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc index 791f24ef22d4..c3972bb3b628 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc -@@ -41,7 +41,7 @@ +@@ -42,7 +42,7 @@ #include "pdf/buildflags.h" #include "printing/buildflags/buildflags.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h" #endif -@@ -116,7 +116,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt +@@ -107,7 +107,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt extensions::SettingsPrivateEventRouterFactory::GetInstance(); extensions::SettingsOverridesAPI::GetFactoryInstance(); extensions::SidePanelService::GetFactoryInstance(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extensions::SystemIndicatorManagerFactory::GetInstance(); #endif extensions::TabGroupsEventRouterFactory::GetInstance(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc index 9ee5f8d5a6db..3ce899235805 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc @@ -1,38 +1,47 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc -@@ -41,7 +41,7 @@ +@@ -42,7 +42,7 @@ #include "components/reporting/util/statusor.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include #include "base/strings/string_util.h" -@@ -115,7 +115,7 @@ api::enterprise_reporting_private::ContextInfo ToConte - return info; +@@ -117,7 +117,7 @@ api::enterprise_reporting_private::ContextInfo ToConte + } + + bool AllowClientCertificateReportingForUsers() { +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return base::FeatureList::IsEnabled( + enterprise_signals::features::kAllowClientCertificateReportingForUsers); + #else +@@ -130,7 +130,7 @@ bool IsProfilePrefManaged(Profile* profile, std::strin + return pref && pref->IsManaged(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) device_signals::SignalsAggregationRequest CreateAggregationRequest( device_signals::SignalName signal_name) { -@@ -177,7 +177,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: +@@ -192,7 +192,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: // getPersistentSecret -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) EnterpriseReportingPrivateGetPersistentSecretFunction:: EnterpriseReportingPrivateGetPersistentSecretFunction() = default; -@@ -603,7 +603,7 @@ void EnterpriseReportingPrivateEnqueueRecordFunction:: +@@ -630,7 +630,7 @@ void EnterpriseReportingPrivateEnqueueRecordFunction:: } #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // getFileSystemInfo diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_messaging_launch__context__posix.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_messaging_launch__context__posix.cc index 30bbcf9e848e..e74a7e93ee3c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_messaging_launch__context__posix.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_messaging_launch__context__posix.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/messaging/launch_context_posix.cc.orig 2024-08-26 14:40:28 UTC +--- chrome/browser/extensions/api/messaging/launch_context_posix.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/extensions/api/messaging/launch_context_posix.cc -@@ -86,7 +86,7 @@ std::optional LaunchConte +@@ -84,7 +84,7 @@ std::optional LaunchConte - // TODO(crbug.com/40118868): 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) + options.current_directory = command_line.GetProgram().DirName(); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Don't use no_new_privs mode, e.g. in case the host needs to use sudo. options.allow_new_privs = true; #endif 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 5753f969210d..987dbff7dfce 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc -@@ -636,7 +636,7 @@ void PasswordsPrivateDelegateImpl::OnFetchingFamilyMem +@@ -652,7 +652,7 @@ void PasswordsPrivateDelegateImpl::OnFetchingFamilyMem } void PasswordsPrivateDelegateImpl::OsReauthTimeoutCall() { -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) PasswordsPrivateEventRouter* router = PasswordsPrivateEventRouterFactory::GetForProfile(profile_); if (router) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc index b9db9c0ec9fe..08b68b8a6276 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,29 +1,29 @@ ---- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -191,7 +191,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -186,7 +186,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist (*s_allowlist)[autofill::prefs::kAutofillPaymentCardBenefits] = settings_api::PrefType::kBoolean; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) (*s_allowlist)[autofill::prefs::kAutofillPredictionImprovementsEnabled] = settings_api::PrefType::kBoolean; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -209,7 +209,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -204,7 +204,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist (*s_allowlist)[tab_groups::prefs::kAutoPinNewTabGroups] = settings_api::PrefType::kBoolean; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kUseCustomChromeFrame] = settings_api::PrefType::kBoolean; #endif -@@ -221,7 +221,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -216,7 +216,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist (*s_allowlist)[::prefs::kCurrentThemeID] = settings_api::PrefType::kString; (*s_allowlist)[::prefs::kPinnedActions] = settings_api::PrefType::kList; (*s_allowlist)[::prefs::kPolicyThemeColor] = settings_api::PrefType::kNumber; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kSystemTheme] = settings_api::PrefType::kNumber; #endif (*s_allowlist)[::prefs::kHomePage] = settings_api::PrefType::kUrl; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc index ff72316e93e1..2b30af350721 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/tabs/tabs_api.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/extensions/api/tabs/tabs_api.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/extensions/api/tabs/tabs_api.cc -@@ -862,7 +862,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio - // minimized. +@@ -872,7 +872,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio + // created as minimized. // TODO(crbug.com/40254339): Remove this workaround when linux is fixed. // TODO(crbug.com/40254339): Find a fix for wayland as well. -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) - if (new_window->initial_show_state() == ui::SHOW_STATE_MINIMIZED) { + if (new_window->initial_show_state() == + ui::mojom::WindowShowState::kMinimized) { new_window->window()->Minimize(); - } diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc index e932e7b72d73..7a61d512f5f8 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc @@ -1,29 +1,29 @@ ---- chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc -@@ -29,7 +29,7 @@ +@@ -28,7 +28,7 @@ #include "extensions/browser/process_manager.h" #include "extensions/common/error_utils.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "extensions/common/permissions/permissions_data.h" #endif -@@ -38,7 +38,7 @@ namespace { +@@ -37,7 +37,7 @@ namespace { bool CanEnableAudioDebugRecordingsFromExtension( const extensions::Extension* extension) { bool enabled_by_permissions = false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (extension) { enabled_by_permissions = extension->permissions_data()->active_permissions().HasAPIPermission( -@@ -576,7 +576,7 @@ void WebrtcLoggingPrivateStartEventLoggingFunction::Fi +@@ -575,7 +575,7 @@ void WebrtcLoggingPrivateStartEventLoggingFunction::Fi ExtensionFunction::ResponseAction WebrtcLoggingPrivateGetLogsDirectoryFunction::Run() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Unlike other WebrtcLoggingPrivate functions that take a RequestInfo object, // this function shouldn't be called by a component extension on behalf of // some web code. It returns a DirectoryEntry for use directly in the calling diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc index d00d884d6f1c..1ab2b66eb9e8 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/webstore_private/webstore_private_api.cc.orig 2024-10-01 07:26:23 UTC +--- chrome/browser/extensions/api/webstore_private/webstore_private_api.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/extensions/api/webstore_private/webstore_private_api.cc -@@ -903,7 +903,7 @@ void WebstorePrivateBeginInstallWithManifest3Function: +@@ -902,7 +902,7 @@ void WebstorePrivateBeginInstallWithManifest3Function: #if BUILDFLAG(IS_CHROMEOS) RequestExtensionApproval(contents); return; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Shows a parental permission dialog directly bypassing the extension // install dialog view. The parental permission dialog contains a superset // of data from the extension install dialog: requested extension diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc index 8d69483e5c7e..f85ff2b462e9 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/external_provider_impl.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/extensions/external_provider_impl.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/extensions/external_provider_impl.cc -@@ -816,7 +816,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -792,7 +792,7 @@ void ExternalProviderImpl::CreateExternalProviders( + + #endif // BUILDFLAG(IS_CHROMEOS) if (!profile->GetPrefs()->GetBoolean(pref_names::kBlockExternalExtensions)) { - // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) provider_list->push_back(std::make_unique( service, base::MakeRefCounted( -@@ -844,7 +844,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -820,7 +820,7 @@ void ExternalProviderImpl::CreateExternalProviders( bundled_extension_creation_flags)); // Define a per-user source of external extensions. -#if BUILDFLAG(IS_MAC) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if BUILDFLAG(IS_MAC) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ BUILDFLAG(CHROMIUM_BRANDING)) provider_list->push_back(std::make_unique( service, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc b/www/ungoogled-chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc index 0c5f3fd975e5..5052884d0c52 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc @@ -1,11 +1,11 @@ ---- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -323,7 +323,7 @@ const struct { +@@ -335,7 +335,7 @@ const struct { FILE_PATH_LITERAL("Library/Mobile Documents/com~apple~CloudDocs"), kDontBlockChildren}, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // On Linux also block access to devices via /dev. {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), kBlockAllChildren}, // And security sensitive data in /proc and /sys. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc index 4e48eb1e89e1..7e6210d7e77d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc @@ -1,129 +1,147 @@ ---- chrome/browser/flag_descriptions.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/flag_descriptions.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/flag_descriptions.cc -@@ -458,7 +458,7 @@ const char kIsolatedSandboxedIframesDescription[] = +@@ -475,7 +475,7 @@ const char kIsolatedSandboxedIframesDescription[] = "grouping when enabled is per-site."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kAutofillEnableAmountExtractionDesktopName[] = "Enable checkout amount extraction on Chrome desktop"; const char kAutofillEnableAmountExtractionDesktopDescription[] = -@@ -939,7 +939,7 @@ const char kDevicePostureDescription[] = +@@ -490,7 +490,7 @@ const char kAutofillEnableAndroidNKeyForFidoAuthentica + "authentication when autofilling server credit cards."; + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + const char kAutofillEnableBuyNowPayLaterForAffirmName[] = + "Enable buy now pay later on Autofill for Affirm"; + const char kAutofillEnableBuyNowPayLaterForAffirmDescription[] = +@@ -997,7 +997,7 @@ const char kDevicePostureDescription[] = "Enables Device Posture API (foldable devices)"; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kDocumentPictureInPictureAnimateResizeName[] = "Document Picture-in-Picture Animate Resize"; const char kDocumentPictureInPictureAnimateResizeDescription[] = -@@ -3523,7 +3523,7 @@ const char kShowAutofillTypePredictionsDescription[] = +@@ -3519,7 +3519,7 @@ const char kShowAutofillTypePredictionsDescription[] = "text."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kShowFeaturedEnterpriseSiteSearchName[] = "Show featured Enterprise site search engines in Omnibox"; const char kShowFeaturedEnterpriseSiteSearchDescription[] = -@@ -3555,7 +3555,7 @@ const char kSiteInstanceGroupsForDataUrlsDescription[] +@@ -3551,7 +3551,7 @@ const char kSiteInstanceGroupsForDataUrlsDescription[] "but in the same SiteInstanceGroup, and thus the same process."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kSiteSearchSettingsPolicyName[] = "Enable SiteSearchSettings policy"; const char kSiteSearchSettingsPolicyDescription[] = "Allow site search engines to be defined by the SiteSearchSettings policy."; -@@ -7916,7 +7916,7 @@ const char kBlinkExtensionDiagnosticsDescription[] = +@@ -3767,7 +3767,7 @@ const char kTranslateForceTriggerOnEnglishDescription[ + "Force the Translate Triggering on English pages experiment to be enabled " + "with the selected language model active."; + +-#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 kTranslationAPIName[] = "Experimental translation API"; + const char kTranslationAPIDescription[] = + "Eables the on-device language translation API. " +@@ -7828,7 +7828,7 @@ const char kBlinkExtensionDiagnosticsDescription[] = "Enable the experimental Diagnostics Blink Extension."; #endif // #if BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kGetAllScreensMediaName[] = "GetAllScreensMedia API"; const char kGetAllScreensMediaDescription[] = "When enabled, the getAllScreensMedia API for capturing multiple screens " -@@ -8152,7 +8152,7 @@ const char kV4L2FlatStatefulVideoDecoderDescription[] +@@ -8062,7 +8062,7 @@ const char kEnableArmHwdrmDescription[] = "Enable HW b // Linux ----------------------------------------------------------------------- -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kOzonePlatformHintChoiceDefault[] = "Default"; const char kOzonePlatformHintChoiceAuto[] = "Auto"; const char kOzonePlatformHintChoiceX11[] = "X11"; -@@ -8185,6 +8185,18 @@ const char kWaylandPerWindowScalingDescription[] = - const char kWaylandTextInputV3Name[] = "Wayland text-input-v3"; - const char kWaylandTextInputV3Description[] = - "Enable Wayland's text-input-v3 experimental support."; +@@ -8102,6 +8102,18 @@ const char kWaylandUiScalingDescription[] = + "Enable experimental support for text scaling in the Wayland backend " + "backed by full UI scaling. Requires #wayland-per-window-scaling to be " + "enabled too."; + +#if BUILDFLAG(IS_BSD) +const char kAudioBackendName[] = + "Audio Backend"; +const char kAudioBackendDescription[] = +#if BUILDFLAG(IS_OPENBSD) + "Select the desired audio backend to use. The default is sndio."; +#elif BUILDFLAG(IS_FREEBSD) + "Select the desired audio backend to use. The default will automatically " + "enumerate through the supported backends."; +#endif +#endif #endif // BUILDFLAG(IS_LINUX) - // All views-based platforms -------------------------------------------------- -@@ -8211,7 +8223,7 @@ const char kZeroCopyVideoCaptureDescription[] = + // Random platform combinations ----------------------------------------------- +@@ -8114,7 +8126,7 @@ const char kZeroCopyVideoCaptureDescription[] = #endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kFollowingFeedSidepanelName[] = "Following feed in the sidepanel"; const char kFollowingFeedSidepanelDescription[] = "Enables the following feed in the sidepanel."; -@@ -8224,7 +8236,7 @@ const char kTaskManagerDesktopRefreshDescription[] = +@@ -8131,7 +8143,7 @@ const char kTaskManagerDesktopRefreshDescription[] = "Enables a refreshed design for the Task Manager on Desktop platforms."; #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kEnableNetworkServiceSandboxName[] = "Enable the network service sandbox."; const char kEnableNetworkServiceSandboxDescription[] = -@@ -8256,7 +8268,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti +@@ -8163,7 +8175,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."; -@@ -8402,7 +8414,7 @@ const char kElementCaptureDescription[] = +@@ -8318,7 +8330,7 @@ const char kElementCaptureDescription[] = #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const char kUIDebugToolsName[] = "Debugging tools for UI"; const char kUIDebugToolsDescription[] = "Enables additional keyboard shortcuts to help debugging."; -@@ -8476,7 +8488,7 @@ const char kAutofillCaretExtractionDescription[] = - "Enables passing caret position via Autofill"; +@@ -8390,7 +8402,7 @@ const char kComposeUpfrontInputModesDescription[] = + "Enables upfront input modes in the Compose dialog"; #endif // BUILDFLAG(ENABLE_COMPOSE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const char kThirdPartyProfileManagementName[] = "Third party profile management"; const char kThirdPartyProfileManagementDescription[] = -@@ -8565,7 +8577,7 @@ const char kEnableCertManagementV2UIDescription[] = - "chrome://settings/certificates"; - #endif // BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI) +@@ -8493,7 +8505,7 @@ const char kOverlayScrollbarsOSSettingsDescription[] = + "Enable the os settings for overlay scrollbars on ChromeOS."; + #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const char kSupervisedProfileHideGuestName[] = "Supervised Profile Hide Guest"; const char kSupervisedProfileHideGuestDescription[] = "Hides Guest Profile entry points for supervised users"; 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 4cab9894f678..c36477a1315c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h @@ -1,120 +1,138 @@ ---- chrome/browser/flag_descriptions.h.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/flag_descriptions.h.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/flag_descriptions.h -@@ -297,7 +297,7 @@ extern const char kImprovedSigninUIOnDesktopName[]; +@@ -293,7 +293,7 @@ extern const char kImprovedSigninUIOnDesktopName[]; extern const char kImprovedSigninUIOnDesktopDescription[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kAutofillEnableAmountExtractionDesktopName[]; extern const char kAutofillEnableAmountExtractionDesktopDescription[]; #endif -@@ -715,7 +715,7 @@ extern const char kDevicePostureName[]; +@@ -302,7 +302,7 @@ extern const char kAutofillEnableAndroidNKeyForFidoAut + extern const char kAutofillEnableAndroidNKeyForFidoAuthenticationDescription[]; + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + extern const char kAutofillEnableBuyNowPayLaterForAffirmName[]; + extern const char kAutofillEnableBuyNowPayLaterForAffirmDescription[]; + +@@ -737,7 +737,7 @@ extern const char kDevicePostureName[]; extern const char kDevicePostureDescription[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kDocumentPictureInPictureAnimateResizeName[]; extern const char kDocumentPictureInPictureAnimateResizeDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || -@@ -2025,7 +2025,7 @@ extern const char kShowAutofillTypePredictionsName[]; +@@ -2001,7 +2001,7 @@ extern const char kShowAutofillTypePredictionsName[]; extern const char kShowAutofillTypePredictionsDescription[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kShowFeaturedEnterpriseSiteSearchName[]; extern const char kShowFeaturedEnterpriseSiteSearchDescription[]; -@@ -2047,7 +2047,7 @@ extern const char kSiteInstanceGroupsForDataUrlsName[] +@@ -2023,7 +2023,7 @@ extern const char kSiteInstanceGroupsForDataUrlsName[] extern const char kSiteInstanceGroupsForDataUrlsDescription[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kSiteSearchSettingsPolicyName[]; extern const char kSiteSearchSettingsPolicyDescription[]; -@@ -4579,7 +4579,7 @@ extern const char kBlinkExtensionDiagnosticsName[]; +@@ -2185,7 +2185,7 @@ extern const char kTouchTextEditingRedesignDescription + extern const char kTranslateForceTriggerOnEnglishName[]; + extern const char kTranslateForceTriggerOnEnglishDescription[]; + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + extern const char kTranslationAPIName[]; + extern const char kTranslationAPIDescription[]; + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +@@ -4517,7 +4517,7 @@ extern const char kBlinkExtensionDiagnosticsName[]; extern const char kBlinkExtensionDiagnosticsDescription[]; #endif // #if BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kGetAllScreensMediaName[]; extern const char kGetAllScreensMediaDescription[]; #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -4716,7 +4716,7 @@ extern const char kV4L2FlatStatefulVideoDecoderDescrip +@@ -4655,7 +4655,7 @@ extern const char kEnableArmHwdrmDescription[]; // Linux --------------------------------------------------------------------- -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kOzonePlatformHintChoiceDefault[]; extern const char kOzonePlatformHintChoiceAuto[]; extern const char kOzonePlatformHintChoiceX11[]; -@@ -4738,6 +4738,9 @@ extern const char kWaylandPerWindowScalingDescription[ +@@ -4680,6 +4680,9 @@ extern const char kWaylandTextInputV3Description[]; - extern const char kWaylandTextInputV3Name[]; - extern const char kWaylandTextInputV3Description[]; + extern const char kWaylandUiScalingName[]; + extern const char kWaylandUiScalingDescription[]; + +extern const char kAudioBackendName[]; +extern const char kAudioBackendDescription[]; #endif // BUILDFLAG(IS_LINUX) - // All views-based platforms -------------------------------------------------- -@@ -4767,7 +4770,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa + // Random platform combinations ----------------------------------------------- +@@ -4699,7 +4702,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa extern const char kWebBluetoothConfirmPairingSupportDescription[]; #endif // BUILDFLAG(IS_WIN) || 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[]; -@@ -4783,7 +4786,7 @@ extern const char kScreenlockReauthPromoCardDescriptio - #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +@@ -4721,7 +4724,7 @@ extern const char kScreenlockReauthPromoCardDescriptio + // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kFollowingFeedSidepanelName[]; extern const char kFollowingFeedSidepanelDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -4794,7 +4797,7 @@ extern const char kTaskManagerDesktopRefreshName[]; +@@ -4735,7 +4738,7 @@ extern const char kTaskManagerDesktopRefreshName[]; extern const char kTaskManagerDesktopRefreshDescription[]; #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kEnableNetworkServiceSandboxName[]; extern const char kEnableNetworkServiceSandboxDescription[]; -@@ -4891,7 +4894,7 @@ extern const char kElementCaptureDescription[]; +@@ -4832,7 +4835,7 @@ extern const char kElementCaptureDescription[]; #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kUIDebugToolsName[]; extern const char kUIDebugToolsDescription[]; #endif -@@ -4945,7 +4948,7 @@ extern const char kAutofillCaretExtractionName[]; - extern const char kAutofillCaretExtractionDescription[]; +@@ -4883,7 +4886,7 @@ extern const char kComposeUpfrontInputModesName[]; + extern const char kComposeUpfrontInputModesDescription[]; #endif // BUILDFLAG(ENABLE_COMPOSE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extern const char kThirdPartyProfileManagementName[]; extern const char kThirdPartyProfileManagementDescription[]; -@@ -5001,7 +5004,7 @@ extern const char kEnableCertManagementV2UIName[]; - extern const char kEnableCertManagementV2UIDescription[]; - #endif // BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI) +@@ -4949,7 +4952,7 @@ extern const char kOverlayScrollbarsOSSettingsName[]; + extern const char kOverlayScrollbarsOSSettingsDescription[]; + #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 kSupervisedProfileHideGuestName[]; extern const char kSupervisedProfileHideGuestDescription[]; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_headless_headless__mode__util.cc b/www/ungoogled-chromium/files/patch-chrome_browser_headless_headless__mode__util.cc index 1f1a21203bbb..630e9381ed1d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_headless_headless__mode__util.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_headless_headless__mode__util.cc @@ -1,20 +1,29 @@ ---- chrome/browser/headless/headless_mode_util.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/headless/headless_mode_util.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/headless/headless_mode_util.cc +@@ -10,7 +10,7 @@ + // New headless mode is available on Linux, Windows and Mac platforms. + // More platforms will be added later, so avoid function level clutter + // by providing stub implementations at the end of the file. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + + #include "base/base_switches.h" + #include "base/files/file_path.h" @@ -19,7 +19,7 @@ #include "chrome/common/chrome_switches.h" #include "content/public/common/content_switches.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/gl/gl_switches.h" // nogncheck #include "ui/ozone/public/ozone_switches.h" // nogncheck #endif // BUILDFLAG(IS_LINUX) -@@ -87,7 +87,7 @@ class HeadlessModeHandleImpl : public HeadlessModeHand - command_line->AppendSwitchPath(switches::kUserDataDir, GetUserDataDir()); +@@ -94,7 +94,7 @@ class HeadlessModeHandleImpl : public HeadlessModeHand + } } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Headless mode on Linux relies on ozone/headless platform. command_line->AppendSwitchASCII(::switches::kOzonePlatform, switches::kHeadless); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_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 80c6ed461d30..2a746fa5dfb5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc @@ -1,55 +1,55 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2024-10-01 07:26:23 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc @@ -88,8 +88,10 @@ // TODO(crbug.com/40118868): 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" @@ -113,7 +115,7 @@ #include "chromeos/crosapi/cpp/crosapi_constants.h" #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/pressure/pressure_metrics_reporter.h" #endif // BUILDFLAG(IS_LINUX) @@ -122,7 +124,7 @@ #include "components/user_manager/user_manager.h" #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/power_metrics/system_power_monitor.h" #endif -@@ -869,7 +871,7 @@ void RecordStartupMetrics() { +@@ -870,7 +872,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, -@@ -1177,11 +1179,11 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt +@@ -1182,11 +1184,11 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt } #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) pressure_metrics_reporter_ = std::make_unique(); #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::trace_event::TraceLog::GetInstance()->AddEnabledStateObserver( power_metrics::SystemPowerMonitor::GetInstance()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc index 671111dfc771..cffc30559253 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,88 +1,88 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -195,11 +195,11 @@ +@@ -196,11 +196,11 @@ #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 -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) #include "chrome/browser/metrics/chrome_metrics_service_crash_reporter.h" #endif -@@ -213,7 +213,7 @@ +@@ -214,7 +214,7 @@ #include "chrome/browser/metrics/power/power_metrics_provider_mac.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/bluetooth_metrics_provider.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -535,7 +535,7 @@ void ChromeMetricsServiceClient::RegisterPrefs(PrefReg +@@ -536,7 +536,7 @@ void ChromeMetricsServiceClient::RegisterPrefs(PrefReg #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) metrics::structured::StructuredMetricsService::RegisterPrefs(registry); #if !BUILDFLAG(IS_CHROMEOS_ASH) -@@ -707,7 +707,7 @@ void ChromeMetricsServiceClient::Initialize() { +@@ -708,7 +708,7 @@ void ChromeMetricsServiceClient::Initialize() { RegisterUKMProviders(); } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) metrics::structured::Recorder::GetInstance()->SetUiTaskRunner( base::SequencedTaskRunner::GetCurrentDefault()); #endif -@@ -758,7 +758,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -759,7 +759,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 +@@ -846,7 +846,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) metrics_service_->RegisterMetricsProvider( std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || -@@ -951,7 +951,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -954,7 +954,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) -@@ -1138,7 +1138,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1141,7 +1141,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) // This creates the DesktopProfileSessionDurationsServices if it didn't exist // already. metrics::DesktopProfileSessionDurationsServiceFactory::GetForBrowserContext( -@@ -1472,7 +1472,7 @@ void ChromeMetricsServiceClient::CreateStructuredMetri +@@ -1475,7 +1475,7 @@ void ChromeMetricsServiceClient::CreateStructuredMetri recorder = base::MakeRefCounted( cros_system_profile_provider_.get()); -#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Make sure that Structured Metrics recording delegates have been created // before the service is created. This is handled in other places for ChromeOS diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_net_profile__network__context__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_net_profile__network__context__service.cc index ebc98977dca3..af5e4e5b6d18 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_net_profile__network__context__service.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_net_profile__network__context__service.cc @@ -1,29 +1,29 @@ ---- chrome/browser/net/profile_network_context_service.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/net/profile_network_context_service.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/net/profile_network_context_service.cc -@@ -139,7 +139,7 @@ +@@ -141,7 +141,7 @@ #include "chromeos/startup/browser_params_proxy.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/client_certificates/certificate_provisioning_service_factory.h" #include "components/enterprise/client_certificates/core/certificate_provisioning_service.h" #include "components/enterprise/client_certificates/core/client_certificates_service.h" -@@ -259,7 +259,7 @@ void UpdateCookieSettings(Profile* profile, ContentSet +@@ -268,7 +268,7 @@ void UpdateCookieSettings(Profile* profile, ContentSet }); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr GetWrappedCertStore( Profile* profile, std::unique_ptr platform_store) { -@@ -985,7 +985,7 @@ ProfileNetworkContextService::CreateClientCertStore() +@@ -1140,7 +1140,7 @@ ProfileNetworkContextService::CreateClientCertStore() store = std::make_unique( std::move(certificate_provider), cert_db_initializer, std::move(store)); #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return GetWrappedCertStore(profile_, std::move(store)); #else return store; 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 d85cab8af7a5..fb0fe588d1c6 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,147 +1,147 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/net/system_network_context_manager.cc @@ -102,7 +102,7 @@ // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/common/chrome_paths_internal.h" #include "chrome/grit/branded_strings.h" #include "ui/base/l10n/l10n_util.h" @@ -146,7 +146,7 @@ SystemNetworkContextManager* g_system_network_context_ // received a failed launch for a sandboxed network service. bool g_previously_failed_to_launch_sandboxed_service = false; -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Whether kerberos library loading will work in the network service due to the // sandbox. bool g_network_service_will_allow_gssapi_library_load = false; @@ -154,7 +154,7 @@ bool g_network_service_will_allow_gssapi_library_load const char* kGssapiDesiredPref = #if BUILDFLAG(IS_CHROMEOS) prefs::kKerberosEnabled; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) prefs::kReceivedHttpAuthNegotiateHeader; #endif #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) @@ -200,7 +200,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) @@ -215,7 +215,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut local_state->GetString(prefs::kAuthAndroidNegotiateAccountType); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auth_dynamic_params->allow_gssapi_library_load = local_state->GetBoolean(kGssapiDesiredPref); #endif // BUILDFLAG(IS_CHROMEOS) @@ -225,7 +225,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut void OnNewHttpAuthDynamicParams( network::mojom::HttpAuthDynamicParamsPtr& params) { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // The kerberos library is incompatible with the network service sandbox, so // if library loading is now enabled, the network service needs to be // restarted. It will be restarted unsandboxed because is @@ -267,11 +267,11 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() if (g_previously_failed_to_launch_sandboxed_service) { return NetworkSandboxState::kDisabledBecauseOfFailedLaunch; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* local_state = g_browser_process->local_state(); #endif -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // The network service sandbox and the kerberos library are incompatible. // If kerberos is enabled by policy, disable the network service sandbox. if (g_network_service_will_allow_gssapi_library_load || @@ -287,7 +287,7 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() } #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (local_state && local_state->HasPrefPath(prefs::kNetworkServiceSandboxEnabled)) { return local_state->GetBoolean(prefs::kNetworkServiceSandboxEnabled) @@ -517,7 +517,7 @@ void SystemNetworkContextManager::DeleteInstance() { g_system_network_context_manager = nullptr; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) SystemNetworkContextManager::GssapiLibraryLoadObserver:: GssapiLibraryLoadObserver(SystemNetworkContextManager* owner) : owner_(owner) {} @@ -575,7 +575,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) @@ -589,7 +589,7 @@ SystemNetworkContextManager::SystemNetworkContextManag auth_pref_callback); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) pref_change_registrar_.Add(kGssapiDesiredPref, auth_pref_callback); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) @@ -660,7 +660,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) @@ -685,11 +685,11 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterListPref(prefs::kExplicitlyAllowedNetworkPorts); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kNetworkServiceSandboxEnabled, true); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kReceivedHttpAuthNegotiateHeader, false); #endif // BUILDFLAG(IS_LINUX) @@ -742,7 +742,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea OnNewHttpAuthDynamicParams(http_auth_dynamic_params); network_service->ConfigureHttpAuthPrefs(std::move(http_auth_dynamic_params)); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gssapi_library_loader_observer_.Install(network_service); #endif // BUILDFLAG(IS_LINUX) -@@ -969,7 +969,7 @@ bool SystemNetworkContextManager::IsNetworkSandboxEnab +@@ -965,7 +965,7 @@ bool SystemNetworkContextManager::IsNetworkSandboxEnab break; } -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!enabled) { g_network_service_will_allow_gssapi_library_load = true; } diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc index 3589660e12f8..97cb6af20d01 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc @@ -1,20 +1,20 @@ ---- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/password_manager/chrome_password_manager_client.cc -@@ -589,7 +589,7 @@ void ChromePasswordManagerClient:: +@@ -600,7 +600,7 @@ void ChromePasswordManagerClient:: bool ChromePasswordManagerClient::IsReauthBeforeFillingRequired( device_reauth::DeviceAuthenticator* authenticator) { #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!GetLocalStatePrefs() || !GetPrefs() || !authenticator) { return false; } -@@ -827,7 +827,7 @@ void ChromePasswordManagerClient::NotifyUserCredential +@@ -845,7 +845,7 @@ void ChromePasswordManagerClient::NotifyUserCredential } void ChromePasswordManagerClient::NotifyKeychainError() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) PasswordsClientUIDelegate* manage_passwords_ui_controller = PasswordsClientUIDelegateFromWebContents(web_contents()); manage_passwords_ui_controller->OnKeychainError(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc index 19ddd23faa88..416e35816f54 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,249 +1,249 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc @@ -245,19 +245,19 @@ #include "components/spellcheck/browser/pref_names.h" #endif // BUILDFLAG(ENABLE_SPELLCHECK) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/action.h" #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #include "components/device_signals/core/browser/pref_names.h" // nogncheck due to crbug.com/1125897 #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "components/enterprise/idle/idle_timeout_policy_handler.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/privacy_sandbox/privacy_sandbox_policy_handler.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) @@ -271,13 +271,13 @@ #endif // BUILDFLAG(ENTERPRISE_CLIENT_CERTIFICATES) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/battery_saver_policy_handler.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/search_engines/enterprise/site_search_policy_handler.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) -@@ -545,7 +545,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -551,7 +551,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { key::kDefaultDirectSocketsSetting, prefs::kManagedDefaultDirectSocketsSetting, base::Value::Type::INTEGER }, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kDeletingUndecryptablePasswordsEnabled, password_manager::prefs::kDeletingUndecryptablePasswordsEnabled, base::Value::Type::BOOLEAN }, -@@ -872,13 +872,13 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -881,13 +881,13 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kManagedDefaultGeolocationSetting, base::Value::Type::INTEGER }, #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ - || BUILDFLAG(IS_MAC) + || 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_MAC) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) { key::kFullscreenAllowed, prefs::kFullscreenAllowed, base::Value::Type::BOOLEAN }, -@@ -1706,7 +1706,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - base::Value::Type::INTEGER}, +@@ -1721,7 +1721,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 }, -@@ -1765,7 +1765,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1780,7 +1780,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kNetworkServiceSandboxEnabled, prefs::kNetworkServiceSandboxEnabled, base::Value::Type::BOOLEAN }, -@@ -1791,17 +1791,17 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1806,17 +1806,17 @@ 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) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kDefaultBrowserSettingEnabled, prefs::kDefaultBrowserSettingEnabled, base::Value::Type::BOOLEAN }, -@@ -1813,7 +1813,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1828,7 +1828,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = 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_CHROMEOS) + || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) { key::kAutoplayAllowed, prefs::kAutoplayAllowed, base::Value::Type::BOOLEAN }, -@@ -1911,7 +1911,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1926,7 +1926,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 }, -@@ -2028,7 +2028,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2037,7 +2037,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::LIST }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#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 }, -@@ -2107,7 +2107,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2116,7 +2116,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = ash::prefs::kUrlParameterToAutofillSAMLUsername, base::Value::Type::STRING }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) { key::kTabDiscardingExceptions, performance_manager::user_tuning::prefs::kManagedTabDiscardingExceptions, base::Value::Type::LIST }, -@@ -2136,7 +2136,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2145,7 +2145,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kUiAutomationProviderEnabled, base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kOutOfProcessSystemDnsResolutionEnabled, prefs::kOutOfProcessSystemDnsResolutionEnabled, base::Value::Type::BOOLEAN }, -@@ -2176,7 +2176,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2185,7 +2185,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::INTEGER }, #endif #if BUILDFLAG(ENABLE_EXTENSIONS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kExtensionInstallTypeBlocklist, extensions::pref_names::kExtensionInstallTypeBlocklist, base::Value::Type::LIST}, -@@ -2199,7 +2199,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2211,7 +2211,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { key::kTabCompareSettings, optimization_guide::prefs::kProductSpecificationsEnterprisePolicyAllowed, base::Value::Type::INTEGER}, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) { key::kChromeForTestingAllowed, prefs::kChromeForTestingAllowed, base::Value::Type::BOOLEAN }, -@@ -2335,7 +2335,7 @@ std::unique_ptr BuildH +@@ -2351,7 +2351,7 @@ std::unique_ptr BuildH // Policies for all platforms - End #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique( key::kMemorySaverModeSavings, performance_manager::user_tuning::prefs::kMemorySaverModeAggressiveness, -@@ -2351,7 +2351,7 @@ std::unique_ptr BuildH +@@ -2367,7 +2367,7 @@ std::unique_ptr BuildH // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) handlers->AddHandler( std::make_unique(chrome_schema)); -@@ -2550,7 +2550,7 @@ std::unique_ptr BuildH +@@ -2566,7 +2566,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( -@@ -2603,7 +2603,7 @@ std::unique_ptr BuildH +@@ -2619,7 +2619,7 @@ std::unique_ptr BuildH key::kBrowsingDataLifetime, browsing_data::prefs::kBrowsingDataLifetime, chrome_schema)); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique()); handlers->AddHandler(std::make_unique()); handlers->AddHandler( -@@ -3027,7 +3027,7 @@ std::unique_ptr BuildH +@@ -3050,7 +3050,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( -@@ -3035,7 +3035,7 @@ std::unique_ptr BuildH +@@ -3058,7 +3058,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)); -@@ -3053,7 +3053,7 @@ std::unique_ptr BuildH +@@ -3076,7 +3076,7 @@ std::unique_ptr BuildH first_party_sets::FirstPartySetsOverridesPolicyHandler>( key::kRelatedWebsiteSetsOverrides, chrome_schema))); #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) handlers->AddHandler(std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -@@ -3076,7 +3076,7 @@ std::unique_ptr BuildH +@@ -3099,7 +3099,7 @@ std::unique_ptr BuildH base::Value::Type::BOOLEAN))); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -3100,7 +3100,7 @@ std::unique_ptr BuildH +@@ -3123,7 +3123,7 @@ std::unique_ptr BuildH std::vector gen_ai_default_policies; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) gen_ai_default_policies.emplace_back( - key::kHelpMeWriteSettings, - optimization_guide::prefs::kComposeEnterprisePolicyAllowed); + key::kAutofillPredictionSettings, + optimization_guide::prefs:: diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_policy_device__management__service__configuration.cc b/www/ungoogled-chromium/files/patch-chrome_browser_policy_device__management__service__configuration.cc index 9f12bd84aa8f..0b5b5522f3ef 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_policy_device__management__service__configuration.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_policy_device__management__service__configuration.cc @@ -1,20 +1,11 @@ ---- chrome/browser/policy/device_management_service_configuration.cc.orig 2024-04-23 07:42:17 UTC +--- chrome/browser/policy/device_management_service_configuration.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/policy/device_management_service_configuration.cc -@@ -24,7 +24,7 @@ +@@ -23,7 +23,7 @@ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ - !BUILDFLAG(IS_ANDROID)) + !BUILDFLAG(IS_ANDROID)) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/common.h" #include "chrome/browser/enterprise/connectors/connectors_service.h" #endif -@@ -102,7 +102,7 @@ DeviceManagementServiceConfiguration::GetReportingConn - content::BrowserContext* context) const { - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ -- !BUILDFLAG(IS_ANDROID)) -+ !BUILDFLAG(IS_ANDROID)) || BUILDFLAG(IS_BSD) - auto* service = - enterprise_connectors::ConnectorsServiceFactory::GetForBrowserContext( - context); 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 7e34e8e1d7e5..1f202b98a245 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_prefs_browser__prefs.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_prefs_browser__prefs.cc @@ -1,75 +1,75 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/prefs/browser_prefs.cc @@ -310,7 +310,7 @@ #include "components/user_notes/user_notes_prefs.h" #endif // BUILDFLAG(IS_ANDROID) -#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/ui/webui/whats_new/whats_new_ui.h" #endif -@@ -488,18 +488,18 @@ +@@ -485,18 +485,18 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "components/device_signals/core/browser/pref_names.h" // nogncheck due to crbug.com/1125897 #endif // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/browser_switcher/browser_switcher_prefs.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #endif -@@ -534,7 +534,7 @@ +@@ -531,7 +531,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 -@@ -1674,7 +1674,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) +@@ -1749,7 +1749,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) on_device_translation::RegisterLocalStatePrefs(registry); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) WhatsNewUI::RegisterLocalStatePrefs(registry); #endif -@@ -1847,7 +1847,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) +@@ -1922,7 +1922,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) #endif // BUILDFLAG(ENABLE_PDF) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kChromeForTestingAllowed, true); #endif -@@ -2203,12 +2203,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -2276,12 +2276,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) device_signals::RegisterProfilePrefs(registry); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry); enterprise_signin::RegisterProfilePrefs(registry); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc b/www/ungoogled-chromium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc index a5e628166dbf..f6a851f6450c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc @@ -1,11 +1,11 @@ ---- chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/prefs/pref_service_incognito_allowlist.cc -@@ -198,7 +198,7 @@ const char* const kPersistentPrefNames[] = { +@@ -199,7 +199,7 @@ const char* const kPersistentPrefNames[] = { prefs::kShowFullscreenToolbar, #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Toggleing custom frames affects all open windows in the profile, hence // should be written to the regular profile when changed in incognito mode. prefs::kUseCustomChromeFrame, 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 d0e9bb86a6d8..f3574e884194 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc @@ -1,29 +1,29 @@ ---- chrome/browser/printing/print_backend_service_manager.cc.orig 2024-08-26 14:40:28 UTC +--- chrome/browser/printing/print_backend_service_manager.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/printing/print_backend_service_manager.cc @@ -36,7 +36,7 @@ #include "printing/printing_context.h" #include "printing/printing_features.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "content/public/common/content_switches.h" #endif -@@ -877,7 +877,7 @@ PrintBackendServiceManager::GetServiceFromBundle( +@@ -884,7 +884,7 @@ PrintBackendServiceManager::GetServiceFromBundle( host.BindNewPipeAndPassReceiver(), content::ServiceProcessHost::Options() .WithDisplayName(IDS_UTILITY_PROCESS_PRINT_BACKEND_SERVICE_NAME) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) .WithExtraCommandLineSwitches({switches::kMessageLoopTypeUi}) #endif .Pass()); -@@ -1054,7 +1054,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate +@@ -1061,7 +1061,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 std::nullopt; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc index c35225f618e1..4156a5cf2b15 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,113 +1,113 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -346,7 +346,7 @@ - #include "chromeos/constants/chromeos_features.h" +@@ -348,7 +348,7 @@ + #include "chrome/browser/profiles/gaia_info_update_service_factory.h" #endif -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/messaging_layer/util/manual_test_heartbeat_event_factory.h" #endif -@@ -439,18 +439,18 @@ +@@ -428,18 +428,18 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.h" #include "chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.h" #include "chrome/browser/enterprise/signals/user_permission_service_factory.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/idle_service_factory.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_switcher/browser_switcher_service_factory.h" #include "chrome/browser/enterprise/client_certificates/certificate_provisioning_service_factory.h" #include "chrome/browser/enterprise/client_certificates/certificate_store_factory.h" -@@ -704,7 +704,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -698,7 +698,7 @@ void ChromeBrowserMainExtraPartsProfiles:: DiceBoundSessionCookieServiceFactory::GetInstance(); #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) #endif // BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) browser_switcher::BrowserSwitcherServiceFactory::GetInstance(); #endif browser_sync::UserEventServiceFactory::GetInstance(); -@@ -837,7 +837,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -807,7 +807,7 @@ void ChromeBrowserMainExtraPartsProfiles:: enterprise_connectors::ConnectorsServiceFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) enterprise_connectors::DeviceTrustConnectorServiceFactory::GetInstance(); enterprise_connectors::DeviceTrustServiceFactory::GetInstance(); #endif -@@ -846,21 +846,21 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -816,21 +816,21 @@ void ChromeBrowserMainExtraPartsProfiles:: enterprise_connectors::ExtensionTelemetryEventRouterFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) enterprise_idle::IdleServiceFactory::GetInstance(); #endif - #if !BUILDFLAG(IS_CHROMEOS_ASH) + #if !BUILDFLAG(IS_CHROMEOS) enterprise_reporting::CloudProfileReportingServiceFactory::GetInstance(); #endif enterprise_reporting::LegacyTechServiceFactory::GetInstance(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_signals::SignalsAggregatorFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) enterprise_signals::UserPermissionServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_signin::EnterpriseSigninServiceFactory::GetInstance(); #endif #if BUILDFLAG(ENABLE_SESSION_SERVICE) -@@ -990,7 +990,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -953,7 +953,7 @@ void ChromeBrowserMainExtraPartsProfiles:: + #if BUILDFLAG(IS_ANDROID) + MerchantViewerDataManagerFactory::GetInstance(); #endif - // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) metrics::DesktopProfileSessionDurationsServiceFactory::GetInstance(); #endif -@@ -1091,7 +1091,7 @@ void ChromeBrowserMainExtraPartsProfiles:: + NavigationPredictorKeyedServiceFactory::GetInstance(); +@@ -1051,7 +1051,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if BUILDFLAG(IS_CHROMEOS) policy::PolicyCertServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) policy::ProfileTokenPolicyWebSigninServiceFactory::GetInstance(); policy::UserPolicyOidcSigninServiceFactory::GetInstance(); #endif -@@ -1140,7 +1140,7 @@ void ChromeBrowserMainExtraPartsProfiles:: - #if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_ANDROID) +@@ -1099,7 +1099,7 @@ void ChromeBrowserMainExtraPartsProfiles:: + #if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) ProfileStatisticsFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ProfileTokenWebSigninInterceptorFactory::GetInstance(); OidcAuthenticationSigninInterceptorFactory::GetInstance(); #endif -@@ -1159,7 +1159,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1118,7 +1118,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif ReduceAcceptLanguageFactory::GetInstance(); RendererUpdaterFactory::GetInstance(); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) reporting::ManualTestHeartbeatEventFactory::GetInstance(); #endif - #if BUILDFLAG(IS_CHROMEOS_LACROS) + #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 1ad63ee19b5e..5b07c3cf5312 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc @@ -1,40 +1,40 @@ ---- chrome/browser/profiles/profile_impl.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/profiles/profile_impl.cc -@@ -265,6 +265,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; -@@ -601,7 +605,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async - #else +@@ -571,7 +575,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async + policy_provider = GetUserCloudPolicyManagerAsh(); + #else // !BUILDFLAG(IS_CHROMEOS) { - #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() -@@ -883,7 +887,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) +@@ -853,7 +857,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 d4d3538cdf63..5b8fe68325ec 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,29 +1,29 @@ ---- chrome/browser/profiles/profiles_state.cc.orig 2024-07-31 14:19:23 UTC +--- chrome/browser/profiles/profiles_state.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/profiles/profiles_state.cc -@@ -195,7 +195,7 @@ bool IsGuestModeRequested(const base::CommandLine& com +@@ -189,7 +189,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. -@@ -242,7 +242,7 @@ bool IsGuestModeEnabled() { +@@ -225,7 +225,7 @@ bool IsGuestModeEnabled() { return false; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // If there are any supervised profiles, disable guest mode. if (base::FeatureList::IsEnabled( supervised_user::kHideGuestModeForSupervisedUsers) && -@@ -258,7 +258,7 @@ bool IsGuestModeEnabled() { +@@ -244,7 +244,7 @@ bool IsGuestModeEnabled() { } bool IsGuestModeEnabled(const Profile& profile) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled( supervised_user::kHideGuestModeForSupervisedUsers)) { ProfileAttributesEntry* profile_attributes = diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_chrome__password__protection__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_chrome__password__protection__service.cc new file mode 100644 index 000000000000..dc236f75cb77 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_chrome__password__protection__service.cc @@ -0,0 +1,11 @@ +--- chrome/browser/safe_browsing/chrome_password_protection_service.cc.orig 2024-11-16 12:20:41 UTC ++++ chrome/browser/safe_browsing/chrome_password_protection_service.cc +@@ -1249,7 +1249,7 @@ std::string ChromePasswordProtectionService::GetOrgani + ReusedPasswordAccountType password_type) const { + if (base::FeatureList::IsEnabled( + safe_browsing::kEnterprisePasswordReuseUiRefresh)) { +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return GetPrefs()->GetString(prefs::kEnterpriseCustomLabel); + #else + return std::string(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_screen__ai_screen__ai__install__state.cc b/www/ungoogled-chromium/files/patch-chrome_browser_screen__ai_screen__ai__install__state.cc index b4a9a7350e6a..f13c0fa60e44 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_screen__ai_screen__ai__install__state.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_screen__ai_screen__ai__install__state.cc @@ -1,20 +1,20 @@ ---- chrome/browser/screen_ai/screen_ai_install_state.cc.orig 2024-07-31 14:19:23 UTC +--- chrome/browser/screen_ai/screen_ai_install_state.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/screen_ai/screen_ai_install_state.cc -@@ -17,7 +17,7 @@ +@@ -16,7 +16,7 @@ #include "services/screen_ai/public/cpp/utilities.h" #include "ui/accessibility/accessibility_features.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/cpu.h" #include "base/files/file_util.h" #endif -@@ -27,7 +27,7 @@ const int kScreenAICleanUpDelayInDays = 30; +@@ -26,7 +26,7 @@ const int kScreenAICleanUpDelayInDays = 30; const char kMinExpectedVersion[] = "124.2"; bool IsDeviceCompatible() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #if defined(ARCH_CPU_X86_FAMILY) // Check if the CPU has the required instruction set to run the Screen AI // library. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_sessions_session__restore.cc b/www/ungoogled-chromium/files/patch-chrome_browser_sessions_session__restore.cc index e4c6a4cd8fb6..936323a52b1b 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_sessions_session__restore.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_sessions_session__restore.cc @@ -1,22 +1,20 @@ -diff --git chrome/browser/sessions/session_restore.cc chrome/browser/sessions/session_restore.cc 2024-11-02 08:11:27 UTC -index 04610ad2c0..175c381644 100644 ---- chrome/browser/sessions/session_restore.cc +--- chrome/browser/sessions/session_restore.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/sessions/session_restore.cc -@@ -103,7 +103,7 @@ +@@ -102,7 +102,7 @@ #include "chrome/browser/web_applications/web_app_registrar.h" #endif // BUILDFLAG(IS_CHROMEOS) -#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/ui/webui/whats_new/whats_new_fetcher.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -1081,7 +1081,7 @@ class SessionRestoreImpl : public BrowserListObserver { +@@ -1093,7 +1093,7 @@ class SessionRestoreImpl : public BrowserListObserver bool is_first_tab = true; for (const auto& startup_tab : startup_tabs) { const GURL& url = startup_tab.url; -#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 == whats_new::GetWebUIStartupURL()) { whats_new::StartWhatsNewFetch(browser); continue; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_classify__url__navigation__throttle.cc b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_classify__url__navigation__throttle.cc new file mode 100644 index 000000000000..99082746ea5b --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_classify__url__navigation__throttle.cc @@ -0,0 +1,11 @@ +--- chrome/browser/supervised_user/classify_url_navigation_throttle.cc.orig 2024-11-16 12:20:41 UTC ++++ chrome/browser/supervised_user/classify_url_navigation_throttle.cc +@@ -219,7 +219,7 @@ void ClassifyUrlNavigationThrottle::OnInterstitialResu + case SupervisedUserNavigationThrottle::kCancelWithInterstitial: { + CHECK(navigation_handle()); + // LINT.IfChange(cancel_with_interstitial) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + if (ShouldShowReAuthInterstitial(*navigation_handle(), is_main_frame)) { + // Show the re-authentication interstitial if the user signed out of + // the content area, as parent's approval requires authentication. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.cc b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.cc index 62cc09b3b909..658d0c1091dc 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.cc @@ -1,20 +1,20 @@ ---- chrome/browser/supervised_user/supervised_user_browser_utils.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/supervised_user/supervised_user_browser_utils.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/supervised_user/supervised_user_browser_utils.cc -@@ -42,7 +42,7 @@ +@@ -40,7 +40,7 @@ + #include "chrome/browser/ash/profiles/profile_helper.h" + #include "components/user_manager/user.h" #include "components/user_manager/user_type.h" - #elif BUILDFLAG(IS_CHROMEOS_LACROS) - #include "chromeos/startup/browser_params_proxy.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/supervised_user/supervised_user_verification_controller_client.h" - #include "chrome/browser/supervised_user/supervised_user_verification_page.h" - #endif -@@ -165,7 +165,7 @@ void AssertChildStatusOfTheUser(Profile* profile, bool + #include "chrome/browser/supervised_user/supervised_user_verification_page_blocked_sites.h" + #include "chrome/browser/supervised_user/supervised_user_verification_page_youtube.h" +@@ -158,7 +158,7 @@ void AssertChildStatusOfTheUser(Profile* profile, bool #endif } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - std::string CreateReauthenticationInterstitial( - content::NavigationHandle& navigation_handle, - SupervisedUserVerificationPage::VerificationPurpose verification_purpose) { + std::string CreateReauthenticationInterstitialForYouTube( + content::NavigationHandle& navigation_handle) { + content::WebContents* web_contents = navigation_handle.GetWebContents(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.h b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.h index bb0fbcb4c060..0efca2607b45 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.h @@ -1,20 +1,11 @@ ---- chrome/browser/supervised_user/supervised_user_browser_utils.h.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/supervised_user/supervised_user_browser_utils.h.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/supervised_user/supervised_user_browser_utils.h -@@ -11,7 +11,7 @@ - #include "content/public/browser/web_contents.h" - #include "url/gurl.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - #include "chrome/browser/supervised_user/supervised_user_verification_page.h" - #endif - -@@ -55,7 +55,7 @@ std::string GetAccountGivenName(Profile& profile); +@@ -52,7 +52,7 @@ std::string GetAccountGivenName(Profile& profile); // of the user. void AssertChildStatusOfTheUser(Profile* profile, bool is_child); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Returns the html content of the reauthentication interstitial for blocked // sites. This interstitial is associated with the given NavigationHandle. - std::string CreateReauthenticationInterstitial( + std::string CreateReauthenticationInterstitialForBlockedSites( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc index 90be44eacd79..3893f420cda2 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc @@ -1,20 +1,20 @@ ---- chrome/browser/supervised_user/supervised_user_extensions_manager.cc.orig 2024-10-01 07:26:23 UTC +--- chrome/browser/supervised_user/supervised_user_extensions_manager.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/supervised_user/supervised_user_extensions_manager.cc -@@ -359,7 +359,7 @@ void SupervisedUserExtensionsManager:: +@@ -357,7 +357,7 @@ void SupervisedUserExtensionsManager:: ActivateManagementPolicyAndUpdateRegistration() { SetActiveForSupervisedUsers(); UpdateManagementPolicyRegistration(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MaybeMarkExtensionsLocallyParentApproved(); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) } -@@ -477,7 +477,7 @@ bool SupervisedUserExtensionsManager::ShouldBlockExten +@@ -475,7 +475,7 @@ bool SupervisedUserExtensionsManager::ShouldBlockExten return false; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void SupervisedUserExtensionsManager:: MaybeMarkExtensionsLocallyParentApproved() { supervised_user::LocallyParentApprovedExtensionsMigrationState diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__google__auth__navigation__throttle.cc b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__google__auth__navigation__throttle.cc index a373844f9d56..2a711c38a71c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__google__auth__navigation__throttle.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__google__auth__navigation__throttle.cc @@ -1,20 +1,20 @@ ---- chrome/browser/supervised_user/supervised_user_google_auth_navigation_throttle.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/supervised_user/supervised_user_google_auth_navigation_throttle.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/supervised_user/supervised_user_google_auth_navigation_throttle.cc -@@ -29,7 +29,7 @@ - - #if BUILDFLAG(IS_ANDROID) +@@ -32,7 +32,7 @@ #include "chrome/browser/supervised_user/child_accounts/child_account_service_android.h" + #include "components/signin/public/identity_manager/identity_manager.h" + #include "ui/android/view_android.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/supervised_user/supervised_user_verification_controller_client.h" #include "chrome/browser/supervised_user/supervised_user_verification_page.h" #endif -@@ -145,7 +145,7 @@ SupervisedUserGoogleAuthNavigationThrottle::ShouldProc +@@ -148,7 +148,7 @@ SupervisedUserGoogleAuthNavigationThrottle::ShouldProc return content::NavigationThrottle::DEFER; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // When an unauthenticated supervised user tries to access YouTube, we force // re-authentication with an interstitial so that YouTube can be subject to // content restrictions. This interstitial is only available on Desktop diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__navigation__throttle.cc b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__navigation__throttle.cc index d0ec3cdb2211..ec6ea05fbb9f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__navigation__throttle.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__navigation__throttle.cc @@ -1,20 +1,20 @@ ---- chrome/browser/supervised_user/supervised_user_navigation_throttle.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/supervised_user/supervised_user_navigation_throttle.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/supervised_user/supervised_user_navigation_throttle.cc -@@ -201,7 +201,7 @@ void SupervisedUserNavigationThrottle::OnCheckDone( - } - } - +@@ -213,7 +213,7 @@ void SupervisedUserNavigationThrottle::OnInterstitialR + case kCancelWithInterstitial: { + CHECK(navigation_handle()); + // LINT.IfChange(cancel_with_interstitial) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - SupervisedUserVerificationPage::VerificationPurpose - GetVerificationPurposeFromFilteringReason( - supervised_user::FilteringBehaviorReason reason) { -@@ -235,7 +235,7 @@ void SupervisedUserNavigationThrottle::OnInterstitialR - Profile* profile = Profile::FromBrowserContext( - navigation_handle()->GetWebContents()->GetBrowserContext()); + if (supervised_user::ShouldShowReAuthInterstitial(*navigation_handle(), + is_main_frame)) { + // Show the re-authentication interstitial if the user signed out of +@@ -244,7 +244,7 @@ void SupervisedUserNavigationThrottle::OnInterstitialR + } + namespace supervised_user { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - supervised_user::ChildAccountService* child_account_service = - ChildAccountServiceFactory::GetForProfile(profile); - if (base::FeatureList::IsEnabled( + + bool ShouldShowReAuthInterstitial(content::NavigationHandle& navigation_handle, + bool is_main_frame) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__navigation__throttle.h b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__navigation__throttle.h new file mode 100644 index 000000000000..4a57c893abf7 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__navigation__throttle.h @@ -0,0 +1,11 @@ +--- chrome/browser/supervised_user/supervised_user_navigation_throttle.h.orig 2024-11-16 12:20:41 UTC ++++ chrome/browser/supervised_user/supervised_user_navigation_throttle.h +@@ -22,7 +22,7 @@ + class Profile; + + namespace supervised_user { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + bool ShouldShowReAuthInterstitial(content::NavigationHandle& navigation_handle, + bool is_main_frame); + #endif 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 4a232c1373c0..5ef5a3aab4cd 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,38 +1,38 @@ ---- chrome/browser/sync/sync_service_factory.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/sync/sync_service_factory.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/sync/sync_service_factory.cc -@@ -105,7 +105,7 @@ +@@ -109,7 +109,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_keyed_service.h" #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h" #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_utils.h" -@@ -153,7 +153,7 @@ syncer::DataTypeSet GetDisabledCommonDataTypes() { +@@ -157,7 +157,7 @@ syncer::DataTypeSet GetDisabledCommonDataTypes() { tab_groups::TabGroupSyncService* GetTabGroupSyncService(Profile* profile) { CHECK(profile); #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) tab_groups::TabGroupSyncService* service = tab_groups::SavedTabGroupUtils::GetServiceForProfile(profile); CHECK(service); -@@ -381,7 +381,7 @@ std::unique_ptr BuildSyncService( +@@ -395,7 +395,7 @@ std::unique_ptr BuildSyncService( // included in lacros-chrome 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)) syncer::SyncPrefs prefs(profile->GetPrefs()); local_sync_backend_enabled = prefs.IsLocalSyncEnabled(); base::UmaHistogramBoolean("Sync.Local.Enabled2", local_sync_backend_enabled); -@@ -517,7 +517,7 @@ SyncServiceFactory::SyncServiceFactory() +@@ -531,7 +531,7 @@ SyncServiceFactory::SyncServiceFactory() DependsOn(ProfilePasswordStoreFactory::GetInstance()); DependsOn(PowerBookmarkServiceFactory::GetInstance()); #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) DependsOn(tab_groups::SavedTabGroupServiceFactory::GetInstance()); #elif BUILDFLAG(IS_ANDROID) DependsOn(tab_groups::TabGroupSyncServiceFactory::GetInstance()); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_tab__group__sync_tab__group__sync__service__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_tab__group__sync_tab__group__sync__service__factory.cc index 0b9608eab0c7..be3bc4ad7711 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_tab__group__sync_tab__group__sync__service__factory.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_tab__group__sync_tab__group__sync__service__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/tab_group_sync/tab_group_sync_service_factory.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/tab_group_sync/tab_group_sync_service_factory.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/tab_group_sync/tab_group_sync_service_factory.cc -@@ -30,7 +30,7 @@ +@@ -31,7 +31,7 @@ #include "components/sync_device_info/device_info_sync_service.h" #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/tab_group_sync_delegate_desktop.h" #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || // BUILDFLAG(IS_WIN) -@@ -110,7 +110,7 @@ TabGroupSyncServiceFactory::BuildServiceInstanceForBro +@@ -89,7 +89,7 @@ TabGroupSyncServiceFactory::BuildServiceInstanceForBro std::unique_ptr delegate; #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (tab_groups::IsTabGroupSyncServiceDesktopMigrationEnabled()) { delegate = std::make_unique(service.get(), profile); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_actions_chrome__action__id.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_actions_chrome__action__id.h index 12fcb19a8249..a69c9abe1d63 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_actions_chrome__action__id.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_actions_chrome__action__id.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/actions/chrome_action_id.h.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/actions/chrome_action_id.h.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/actions/chrome_action_id.h -@@ -511,7 +511,7 @@ +@@ -513,7 +513,7 @@ IDC_CONTENT_CONTEXT_QUICK_ANSWERS_INLINE_ANSWER) \ E(kActionContentContextQuickAnswersInlineQuery, \ IDC_CONTENT_CONTEXT_QUICK_ANSWERS_INLINE_QUERY) -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define CHROME_PLATFORM_SPECIFIC_ACTION_IDS \ E(kUseSystemTitleBar, IDC_USE_SYSTEM_TITLE_BAR) \ E(kRestoreWindow, IDC_RESTORE_WINDOW) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc index 93ea8d721060..d9814300da90 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/autofill/payments/desktop_payments_window_manager.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/autofill/payments/desktop_payments_window_manager.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/autofill/payments/desktop_payments_window_manager.cc -@@ -48,7 +48,7 @@ gfx::Rect GetPopupSizeForVcn3ds() { +@@ -49,7 +49,7 @@ gfx::Rect GetPopupSizeForVcn3ds() { DesktopPaymentsWindowManager::DesktopPaymentsWindowManager( ContentAutofillClient* client) : client_(CHECK_DEREF(client)) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) scoped_observation_.Observe(BrowserList::GetInstance()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) } -@@ -108,7 +108,7 @@ void DesktopPaymentsWindowManager::WebContentsDestroye +@@ -109,7 +109,7 @@ void DesktopPaymentsWindowManager::WebContentsDestroye } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) void DesktopPaymentsWindowManager::OnBrowserSetLastActive(Browser* browser) { // If there is an ongoing payments window manager pop-up flow, and the // original tab's WebContents become active, activate the pop-up's diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser.h index 639a2a53fd39..8aedd3fae0d4 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/browser.h.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/browser.h.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/browser.h -@@ -300,7 +300,7 @@ class Browser : public TabStripModelObserver, +@@ -303,7 +303,7 @@ class Browser : public TabStripModelObserver, std::optional display_id; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // When the browser window is shown, the desktop environment is notified // using this ID. In response, the desktop will stop playing the "waiting // for startup" animation (if any). diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__command__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__command__controller.cc index 7cd6e815fb52..2c12c11255c5 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,80 +1,80 @@ ---- chrome/browser/ui/browser_command_controller.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/browser_command_controller.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/browser_command_controller.cc -@@ -128,7 +128,7 @@ +@@ -126,7 +126,7 @@ #include "components/user_manager/user_manager.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/base/ime/text_input_flags.h" #include "ui/linux/linux_ui.h" #endif -@@ -137,7 +137,7 @@ +@@ -135,7 +135,7 @@ #include "ui/ozone/public/ozone_platform.h" #endif -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/shortcuts/desktop_shortcuts_utils.h" #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -@@ -318,7 +318,7 @@ bool BrowserCommandController::IsReservedCommandOrKey( +@@ -316,7 +316,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(); -@@ -573,7 +573,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -571,7 +571,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo // TODO(crbug.com/40118868): 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; -@@ -585,7 +585,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -583,7 +583,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo break; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) case IDC_USE_SYSTEM_TITLE_BAR: { PrefService* prefs = profile()->GetPrefs(); prefs->SetBoolean(prefs::kUseCustomChromeFrame, -@@ -786,7 +786,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -787,7 +787,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo break; case IDC_CREATE_SHORTCUT: base::RecordAction(base::UserMetricsAction("CreateShortcut")); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(features::kShortcutsNotApps)) { chrome::CreateDesktopShortcutForActiveWebContents(browser_); } else { -@@ -1264,12 +1264,12 @@ void BrowserCommandController::InitCommandState() { +@@ -1266,12 +1266,12 @@ void BrowserCommandController::InitCommandState() { #endif // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) command_updater_.UpdateCommandEnabled(IDC_MINIMIZE_WINDOW, true); command_updater_.UpdateCommandEnabled(IDC_MAXIMIZE_WINDOW, true); command_updater_.UpdateCommandEnabled(IDC_RESTORE_WINDOW, true); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool use_system_title_bar = true; #if BUILDFLAG(IS_OZONE) use_system_title_bar = ui::OzonePlatform::GetInstance() -@@ -1601,7 +1601,7 @@ void BrowserCommandController::UpdateCommandsForTabSta +@@ -1603,7 +1603,7 @@ void BrowserCommandController::UpdateCommandsForTabSta bool can_create_web_app = web_app::CanCreateWebApp(browser_); command_updater_.UpdateCommandEnabled(IDC_INSTALL_PWA, can_create_web_app); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(features::kShortcutsNotApps)) { command_updater_.UpdateCommandEnabled( IDC_CREATE_SHORTCUT, shortcuts::CanCreateDesktopShortcut(browser_)); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__commands.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__commands.cc index 4b96d0dc9613..ef7ad6031644 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__commands.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__commands.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/browser_commands.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/browser_commands.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/browser_commands.cc -@@ -2031,7 +2031,7 @@ void OpenUpdateChromeDialog(Browser* browser) { +@@ -2030,7 +2030,7 @@ void OpenUpdateChromeDialog(Browser* browser) { } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) { UpgradeDetector::GetInstance()->NotifyOutdatedInstallNoAutoUpdate(); } else { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(features::kFewerUpdateConfirmations)) { chrome::AttemptRelaunch(); return; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__ui__prefs.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__ui__prefs.cc index 94886de4345f..256be1fe2c0e 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__ui__prefs.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__ui__prefs.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/browser_ui_prefs.cc.orig 2024-10-01 07:26:23 UTC +--- chrome/browser/ui/browser_ui_prefs.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/browser_ui_prefs.cc -@@ -74,7 +74,7 @@ void RegisterBrowserPrefs(PrefRegistrySimple* registry +@@ -72,7 +72,7 @@ void RegisterBrowserPrefs(PrefRegistrySimple* registry registry->RegisterIntegerPref(prefs::kDefaultBrowserDeclinedCount, 0); registry->RegisterTimePref(prefs::kDefaultBrowserFirstShownTime, base::Time()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) registry->RegisterStringPref(prefs::kEnterpriseCustomLabel, std::string()); registry->RegisterStringPref(prefs::kEnterpriseLogoUrl, std::string()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -@@ -184,7 +184,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistry +@@ -182,7 +182,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistry registry->RegisterDictionaryPref(prefs::kHttpsUpgradeFallbacks); registry->RegisterDictionaryPref(prefs::kHttpsUpgradeNavigations); registry->RegisterBooleanPref(prefs::kHttpsOnlyModeAutoEnabled, false); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) registry->RegisterStringPref(prefs::kEnterpriseLogoUrl, std::string()); registry->RegisterStringPref(prefs::kEnterpriseCustomLabel, std::string()); - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) + registry->RegisterStringPref(prefs::kEnterpriseLogoUrlForProfile, 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 f8507cb60015..9fa967e386f8 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,29 +1,29 @@ ---- chrome/browser/ui/chrome_pages.cc.orig 2024-08-26 14:40:28 UTC +--- chrome/browser/ui/chrome_pages.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/chrome_pages.cc @@ -86,7 +86,7 @@ #include "components/signin/public/identity_manager/identity_manager.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/web_applications/web_app_utils.h" #endif @@ -379,7 +379,7 @@ void ShowChromeTips(Browser* browser) { ShowSingletonTab(browser, GURL(kChromeTipsURL)); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void ShowChromeWhatsNew(Browser* browser) { ShowSingletonTab(browser, GURL(kChromeUIWhatsNewURL)); } -@@ -721,7 +721,7 @@ void ShowShortcutCustomizationApp(Profile* profile, +@@ -725,7 +725,7 @@ void ShowShortcutCustomizationApp(Profile* profile, #endif // BUILDFLAG(IS_CHROMEOS_ASH) } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void ShowWebAppSettingsImpl(Browser* browser, Profile* profile, const std::string& app_id, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.h index 2532acfa459d..60c9ecb72098 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 2024-10-01 07:26:23 UTC +--- chrome/browser/ui/chrome_pages.h.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/chrome_pages.h @@ -39,7 +39,7 @@ namespace signin { enum class ConsentLevel; } // namespace signin -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) namespace web_app { enum class AppSettingsPageEntryPoint; } // namespace web_app -@@ -174,7 +174,7 @@ void ShowShortcutCustomizationApp(Profile* profile, +@@ -176,7 +176,7 @@ void ShowShortcutCustomizationApp(Profile* profile, const std::string& category); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || 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_managed__ui.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_managed__ui.cc index cfca42a7cb2a..89b98797e244 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_managed__ui.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_managed__ui.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/managed_ui.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/managed_ui.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/managed_ui.cc -@@ -435,7 +435,7 @@ std::optional GetDeviceManagerIdentity() +@@ -439,7 +439,7 @@ std::optional GetDeviceManagerIdentity() g_browser_process->platform_part()->browser_policy_connector_ash(); return connector->GetEnterpriseDomainManager(); #else -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - std::string custom_management_label = - g_browser_process->local_state() - ? g_browser_process->local_state()->GetString( -@@ -469,7 +469,7 @@ std::optional GetAccountManagerIdentity(P + if (base::FeatureList::IsEnabled( + features::kEnterpriseManagementDisclaimerUsesCustomLabel)) { + std::string custom_management_label = +@@ -476,7 +476,7 @@ std::optional GetAccountManagerIdentity(P policy::EnterpriseManagementAuthority::CLOUD)) return std::nullopt; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - std::string custom_management_label = - profile->GetPrefs()->GetString(prefs::kEnterpriseCustomLabel); - if (!custom_management_label.empty()) { + if (base::FeatureList::IsEnabled( + features::kEnterpriseManagementDisclaimerUsesCustomLabel)) { + std::string custom_management_label = diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc index 6dce0900ad00..bf4b54bb42e2 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/passwords/manage_passwords_ui_controller.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/passwords/manage_passwords_ui_controller.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/passwords/manage_passwords_ui_controller.cc -@@ -93,7 +93,7 @@ namespace { +@@ -97,7 +97,7 @@ namespace { using Logger = autofill::SavePasswordProgressLogger; -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Should be kept in sync with constant declared in // bubble_controllers/relaunch_chrome_bubble_controller.cc. constexpr int kMaxNumberOfTimesKeychainErrorBubbleIsShown = 3; -@@ -513,7 +513,7 @@ void ManagePasswordsUIController::OnBiometricAuthBefor +@@ -517,7 +517,7 @@ void ManagePasswordsUIController::OnBiometricAuthBefor } void ManagePasswordsUIController::OnKeychainError() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) CHECK(!dialog_controller_); PrefService* prefs = Profile::FromBrowserContext(web_contents()->GetBrowserContext()) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_signin_signin__view__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_signin_signin__view__controller.cc index 11f35c5c5105..f784205fca12 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_signin_signin__view__controller.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_signin_signin__view__controller.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/signin/signin_view_controller.cc.orig 2024-08-26 14:40:28 UTC +--- chrome/browser/ui/signin/signin_view_controller.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/signin/signin_view_controller.cc -@@ -482,7 +482,7 @@ void SigninViewController::ShowModalManagedUserNoticeD - signin::SigninChoiceCallbackVariant process_user_choice_callback, - base::OnceClosure done_callback) { +@@ -479,7 +479,7 @@ void SigninViewController::ShowModalManagedUserNoticeD + std::unique_ptr + create_param) { #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::CreateManagedUserNoticeDelegate( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_signin_signin__view__controller__delegate.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_signin_signin__view__controller__delegate.h index e7a5df5acb19..2074de82bc32 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_signin_signin__view__controller__delegate.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_signin_signin__view__controller__delegate.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/signin/signin_view_controller_delegate.h.orig 2024-07-31 14:19:23 UTC +--- chrome/browser/ui/signin/signin_view_controller_delegate.h.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/signin/signin_view_controller_delegate.h -@@ -83,7 +83,7 @@ class SigninViewControllerDelegate { +@@ -85,7 +85,7 @@ class SigninViewControllerDelegate { #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) || BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Returns a platform-specific SigninViewContolllerDelegate instance that // displays the managed user notice modal dialog. The returned object // should delete itself when the window it's managing is closed. 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 395c11013e3b..00f68e42cf0a 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 2024-06-22 08:49:42 UTC +--- chrome/browser/ui/startup/bad_flags_prompt.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/startup/bad_flags_prompt.cc -@@ -106,7 +106,7 @@ const char* const kBadFlags[] = { +@@ -104,7 +104,7 @@ const char* const kBadFlags[] = { // TODO(crbug.com/40118868): 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 89665f9d3272..cd8c10265c94 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 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/startup/startup_browser_creator.cc -@@ -138,7 +138,7 @@ +@@ -139,7 +139,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" -@@ -963,7 +963,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -968,7 +968,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())) { -@@ -1080,7 +1080,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1069,7 +1069,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) && -@@ -1295,7 +1295,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1284,7 +1284,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 e57bf59f095c..8b62516dd957 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 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/tab_helpers.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/tab_helpers.cc -@@ -241,7 +241,7 @@ +@@ -240,7 +240,7 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || 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" -@@ -691,12 +691,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con +@@ -690,12 +690,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) metrics::DesktopSessionDurationObserver::CreateForWebContents(web_contents); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled( features::kHappinessTrackingSurveysForDesktopDemo) || base::FeatureList::IsEnabled(features::kTrustSafetySentimentSurvey) || diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.cc index b2997634729b..5d1582d03f3c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.cc @@ -1,31 +1,20 @@ -diff --git chrome/browser/ui/ui_features.cc chrome/browser/ui/ui_features.cc 2024-11-02 08:11:27 UTC -index c92ebcbca5..55b0da1030 100644 ---- chrome/browser/ui/ui_features.cc +--- chrome/browser/ui/ui_features.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/ui_features.cc -@@ -103,7 +103,7 @@ BASE_FEATURE(kAccessCodeCastUI, +@@ -104,7 +104,7 @@ BASE_FEATURE(kAccessCodeCastUI, base::FEATURE_ENABLED_BY_DEFAULT); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables the feature to remove the last confirmation dialog when relaunching // to update Chrome. BASE_FEATURE(kFewerUpdateConfirmations, -@@ -402,7 +402,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, -@@ -474,7 +474,7 @@ BASE_FEATURE(kStopLoadingAnimationForHiddenWindow, +@@ -446,7 +446,7 @@ BASE_FEATURE(kStopLoadingAnimationForHiddenWindow, "StopLoadingAnimationForHiddenWindow", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kUsePortalAccentColor, "UsePortalAccentColor", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h index 72ec0b2dea6a..f9647407e95b 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h @@ -1,31 +1,20 @@ -diff --git chrome/browser/ui/ui_features.h chrome/browser/ui/ui_features.h 2024-11-02 08:11:27 UTC -index 81800575fc..f14c478473 100644 ---- chrome/browser/ui/ui_features.h +--- chrome/browser/ui/ui_features.h.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/ui_features.h -@@ -78,7 +78,7 @@ bool IsExtensionMenuInRootAppMenu(); +@@ -76,7 +76,7 @@ bool IsExtensionMenuInRootAppMenu(); BASE_DECLARE_FEATURE(kAccessCodeCastUI); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kFewerUpdateConfirmations); #endif -@@ -266,7 +266,7 @@ bool IsToolbarPinningEnabled(); - - 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 -@@ -291,7 +291,7 @@ BASE_DECLARE_FEATURE(kViewsJSAppModalDialog); +@@ -279,7 +279,7 @@ BASE_DECLARE_FEATURE(kViewsJSAppModalDialog); BASE_DECLARE_FEATURE(kStopLoadingAnimationForHiddenWindow); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kUsePortalAccentColor); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc index c668c4b565bc..efab93715ed5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc -@@ -19,7 +19,7 @@ +@@ -20,7 +20,7 @@ #include "ui/gfx/image/image_skia.h" #include "ui/views/widget/widget.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/shell_integration_linux.h" #endif @@ -55,7 +55,7 @@ void ChromeNativeAppWindowViewsAura::OnBeforeWidgetIni const AppWindow::CreateParams& create_params, views::Widget::InitParams* init_params, views::Widget* widget) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::string app_name = web_app::GenerateApplicationNameFromAppId(app_window()->extension_id()); // Set up a custom WM_CLASS for app windows. This allows task switchers in diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h index ab43e251826c..c353ac2c955f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h @@ -1,16 +1,16 @@ ---- chrome/browser/ui/views/chrome_views_delegate.h.orig 2024-06-22 08:49:42 UTC +--- chrome/browser/ui/views/chrome_views_delegate.h.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/chrome_views_delegate.h -@@ -59,11 +59,11 @@ class ChromeViewsDelegate : public views::ViewsDelegat +@@ -61,11 +61,11 @@ class ChromeViewsDelegate : public views::ViewsDelegat base::OnceClosure callback) override; // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) bool WindowManagerProvidesTitleBar(bool maximized) override; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gfx::ImageSkia* GetDefaultWindowIcon() const override; #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc index 348438ab34bb..80412585facc 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,56 +1,56 @@ ---- chrome/browser/ui/views/frame/browser_frame.cc.orig 2024-10-01 07:26:23 UTC +--- chrome/browser/ui/views/frame/browser_frame.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/frame/browser_frame.cc -@@ -54,7 +54,7 @@ +@@ -55,7 +55,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 -@@ -89,7 +89,7 @@ class ThemeChangedObserver : public views::WidgetObser +@@ -90,7 +90,7 @@ class ThemeChangedObserver : public views::WidgetObser }; bool IsUsingLinuxSystemTheme(Profile* profile) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme(); #else return false; -@@ -184,7 +184,7 @@ void BrowserFrame::InitBrowserFrame() { +@@ -185,7 +185,7 @@ void BrowserFrame::InitBrowserFrame() { Init(std::move(params)); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) SelectNativeTheme(); #else SetNativeTheme(ui::NativeTheme::GetInstanceForNativeUi()); -@@ -370,7 +370,7 @@ void BrowserFrame::OnNativeWidgetWorkspaceChanged() { +@@ -372,7 +372,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() -@@ -564,7 +564,7 @@ void BrowserFrame::OnMenuClosed() { +@@ -566,7 +566,7 @@ void BrowserFrame::OnMenuClosed() { } void BrowserFrame::SelectNativeTheme() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Use the regular NativeTheme instance if running incognito mode, regardless // of system theme (gtk, qt etc). ui::NativeTheme* native_theme = ui::NativeTheme::GetInstanceForNativeUi(); -@@ -605,7 +605,7 @@ void BrowserFrame::OnTouchUiChanged() { +@@ -607,7 +607,7 @@ void BrowserFrame::OnTouchUiChanged() { 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 9acad1aeca9c..dd512c483d94 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,20 +1,20 @@ ---- chrome/browser/ui/views/frame/browser_frame.h.orig 2024-02-25 20:22:18 UTC +--- chrome/browser/ui/views/frame/browser_frame.h.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/frame/browser_frame.h -@@ -65,7 +65,7 @@ class BrowserFrame : public views::Widget, public view +@@ -66,7 +66,7 @@ class BrowserFrame : public views::Widget, public view ~BrowserFrame() override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Returns whether the frame is in a tiled state. bool tiled() const { return tiled_; } void set_tiled(bool tiled) { tiled_ = tiled; } -@@ -225,7 +225,7 @@ class BrowserFrame : public views::Widget, public view +@@ -226,7 +226,7 @@ class BrowserFrame : public views::Widget, public view // contents for smoother dragging. TabDragKind tab_drag_kind_ = TabDragKind::kNone; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool tiled_ = false; #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__linux.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__linux.cc index cc1287c2f2fb..e8b4882ed065 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__linux.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__linux.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/frame/browser_frame_view_linux.cc.orig 2024-04-23 07:42:17 UTC +--- chrome/browser/ui/views/frame/browser_frame_view_linux.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/frame/browser_frame_view_linux.cc -@@ -60,7 +60,7 @@ gfx::ShadowValues BrowserFrameViewLinux::GetShadowValu +@@ -70,7 +70,7 @@ gfx::ShadowValues BrowserFrameViewLinux::GetShadowValu void BrowserFrameViewLinux::PaintRestoredFrameBorder( gfx::Canvas* canvas) const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const bool tiled = frame()->tiled(); #else const bool tiled = false; -@@ -104,7 +104,7 @@ void BrowserFrameViewLinux::OnWindowButtonOrderingChan +@@ -125,7 +125,7 @@ int BrowserFrameViewLinux::NonClientHitTest(const gfx: } float BrowserFrameViewLinux::GetRestoredCornerRadiusDip() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const bool tiled = frame()->tiled(); #else const bool tiled = false; 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 7a25ecc84176..1580a9d7633d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/frame/browser_view.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/views/frame/browser_view.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -2350,7 +2350,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra +@@ -2371,7 +2371,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra // CrOS cleanup is done. // TODO(crbug.com/40118868): 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 8e41bb6d38d8..2d251ea9ece9 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 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc @@ -61,7 +61,7 @@ #include "ui/aura/window.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" #include "chrome/browser/ui/views/frame/browser_frame_view_paint_utils_linux.h" @@ -93,7 +93,7 @@ constexpr int kContentSettingIconSize = 16; // The height of the controls bar at the top of the window. constexpr int kTopControlsHeight = 34; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Frame border when window shadow is not drawn. constexpr int kFrameBorderThickness = 4; #endif @@ -188,7 +188,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()) { -@@ -591,7 +591,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow +@@ -590,7 +590,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow AddChildView(std::move(auto_pip_setting_overlay)); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* profile = browser_view->browser()->profile(); auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(profile); auto* theme_service_factory = ThemeServiceFactory::GetForProfile(profile); -@@ -813,7 +813,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( +@@ -812,7 +812,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))); -@@ -897,7 +897,7 @@ void PictureInPictureBrowserFrameView::RemovedFromWidg +@@ -896,7 +896,7 @@ void PictureInPictureBrowserFrameView::RemovedFromWidg BrowserNonClientFrameView::RemovedFromWidget(); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gfx::Insets PictureInPictureBrowserFrameView::RestoredMirroredFrameBorderInsets() const { auto border = FrameBorderInsets(); -@@ -1189,7 +1189,7 @@ void PictureInPictureBrowserFrameView::AnimationProgre +@@ -1188,7 +1188,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_) { -@@ -1344,7 +1344,7 @@ void PictureInPictureBrowserFrameView::UpdateTopBarVie +@@ -1343,7 +1343,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 bool tiled = frame()->tiled(); -@@ -1362,7 +1362,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor +@@ -1361,7 +1361,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor } gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return FrameBorderInsets(); #elif !BUILDFLAG(IS_CHROMEOS_ASH) return gfx::Insets(kResizeBorder); -@@ -1383,7 +1383,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie +@@ -1382,7 +1382,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie top_height + border_thickness.bottom()); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool PictureInPictureBrowserFrameView::ShouldDrawFrameShadow() const { return static_cast( frame()->native_browser_frame()) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_omnibox_omnibox__view__views.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_omnibox_omnibox__view__views.cc index cfc62ce0976e..97e210a10f67 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_omnibox_omnibox__view__views.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_omnibox_omnibox__view__views.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/omnibox/omnibox_view_views.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/views/omnibox/omnibox_view_views.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/omnibox/omnibox_view_views.cc -@@ -1992,7 +1992,7 @@ void OmniboxViewViews::MaybeAddSendTabToSelfItem( +@@ -1989,7 +1989,7 @@ void OmniboxViewViews::MaybeAddSendTabToSelfItem( } void OmniboxViewViews::OnPopupOpened() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // It's not great for promos to overlap the omnibox if the user opens the // drop-down after showing the promo. This especially causes issues on Mac and // Linux due to z-order/rendering issues, see crbug.com/1225046 and diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_passwords_password__bubble__view__base.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_passwords_password__bubble__view__base.cc index 1bf749fff082..d3e569660a39 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_passwords_password__bubble__view__base.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_passwords_password__bubble__view__base.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/passwords/password_bubble_view_base.cc.orig 2024-10-01 07:26:23 UTC +--- chrome/browser/ui/views/passwords/password_bubble_view_base.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/passwords/password_bubble_view_base.cc -@@ -41,7 +41,7 @@ +@@ -40,7 +40,7 @@ #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/views/controls/button/button.h" -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/views/passwords/password_relaunch_chrome_view.h" #endif -@@ -156,7 +156,7 @@ PasswordBubbleViewBase* PasswordBubbleViewBase::Create +@@ -155,7 +155,7 @@ PasswordBubbleViewBase* PasswordBubbleViewBase::Create } else if (model_state == password_manager::ui::NOTIFY_RECEIVED_SHARED_CREDENTIALS) { view = new SharedPasswordsNotificationView(web_contents, anchor_view); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) } else if (model_state == password_manager::ui::KEYCHAIN_ERROR_STATE) { view = new RelaunchChromeView( web_contents, anchor_view, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view.cc index 6fe2db7a2bc3..de7180d89ac6 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/profiles/profile_menu_view.cc.orig 2024-08-26 14:40:28 UTC +--- chrome/browser/ui/views/profiles/profile_menu_view.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/profiles/profile_menu_view.cc -@@ -82,7 +82,7 @@ +@@ -88,7 +88,7 @@ #include "ui/strings/grit/ui_strings.h" #include "ui/views/accessibility/view_accessibility.h" -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc index 51e2ee5120e6..88301c3d085a 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/profiles/profile_menu_view_base.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc -@@ -674,7 +674,7 @@ void ProfileMenuViewBase::SetProfileIdentityInfo( +@@ -693,7 +693,7 @@ void ProfileMenuViewBase::SetProfileIdentityInfo( + image_model, management_badge, this, + ProfileMenuViewBase::kIdentityImageSize, kIdentityImageBorder); - // TODO(crbug.com/40118868): Revisit once build flag switch of lacros-chrome is - // complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // crbug.com/1161166: Orca does not read the accessible window title of the // bubble, so we duplicate it in the top-level menu item. To be revisited // after considering other options, including fixes on the AT side. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc index 285750b12da0..d01de609675c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc @@ -1,47 +1,47 @@ ---- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc @@ -57,7 +57,7 @@ namespace { const int kModalDialogWidth = 448; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) const int kManagedUserNoticeConfirmationDialogWidth = 512; const int kManagedUserNoticeConfirmationDialogHeight = 576; const int kManagedUserNoticeConfirmationUpdatedDialogWidth = 780; -@@ -175,7 +175,7 @@ SigninViewControllerDelegateViews::CreateProfileCustom +@@ -179,7 +179,7 @@ SigninViewControllerDelegateViews::CreateProfileCustom #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) || BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // static std::unique_ptr SigninViewControllerDelegateViews::CreateManagedUserNoticeConfirmationWebView( @@ -338,7 +338,7 @@ SigninViewControllerDelegateViews::SigninViewControlle SetButtons(static_cast(ui::mojom::DialogButton::kNone)); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // On the local profile creation dialog, cancelling the dialog (for instance // through the VKEY_ESCAPE accelerator) should delete the profile. if (delete_profile_on_cancel) { @@ -427,7 +427,7 @@ void SigninViewControllerDelegateViews::DisplayModal() } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) void SigninViewControllerDelegateViews::DeleteProfileOnCancel() { ProfileAttributesEntry* entry = g_browser_process->profile_manager() -@@ -502,7 +502,7 @@ SigninViewControllerDelegate::CreateProfileCustomizati +@@ -504,7 +504,7 @@ SigninViewControllerDelegate::CreateProfileCustomizati #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) || BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // static SigninViewControllerDelegate* SigninViewControllerDelegate::CreateManagedUserNoticeDelegate( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h index 909389ac1f3b..8be52afa856f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h @@ -76,7 +76,7 @@ class SigninViewControllerDelegateViews #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) || BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) static std::unique_ptr CreateManagedUserNoticeConfirmationWebView( Browser* browser, -@@ -143,7 +143,7 @@ class SigninViewControllerDelegateViews +@@ -139,7 +139,7 @@ class SigninViewControllerDelegateViews InitializeSigninWebDialogUI initialize_signin_web_dialog_ui); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Deletes the ephemeral profile when cancelling the local profile creation // dialog. void DeleteProfileOnCancel(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab.cc index a784448f8a5e..03fb49a0ae46 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 2024-10-01 07:26:23 UTC +--- chrome/browser/ui/views/tabs/tab.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/tabs/tab.cc -@@ -626,7 +626,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& +@@ -628,7 +628,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& 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/41467565): 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 58a244b69bf1..50a1b3847151 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,47 +1,47 @@ ---- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/tabs/tab_drag_controller.cc -@@ -214,7 +214,7 @@ bool IsWindowDragUsingSystemDragDropAllowed() { +@@ -215,7 +215,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)) { -@@ -414,7 +414,7 @@ TabDragController::Liveness TabDragController::Init( +@@ -415,7 +415,7 @@ TabDragController::Liveness TabDragController::Init( // 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) ref->can_release_capture_ = false; #endif ref->start_point_in_screen_ = -@@ -1020,7 +1020,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon +@@ -1021,7 +1021,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon // TODO(crbug.com/40118868): 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. -@@ -2084,7 +2084,7 @@ void TabDragController::CompleteDrag() { +@@ -2085,7 +2085,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 -@@ -2530,7 +2530,7 @@ TabDragController::Liveness TabDragController::GetLoca +@@ -2534,7 +2534,7 @@ TabDragController::Liveness TabDragController::GetLoca } // TODO(crbug.com/40118868): 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 e3b805fcc329..05c750ee2cec 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 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc -@@ -375,7 +375,7 @@ TabHoverCardBubbleView::TabHoverCardBubbleView(Tab* ta +@@ -376,7 +376,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) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) set_accept_events(false); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc index 70f2fd8aac01..c473c4db7332 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/user_education/browser_user_education_service.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/views/user_education/browser_user_education_service.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/user_education/browser_user_education_service.cc -@@ -777,7 +777,7 @@ void MaybeRegisterChromeFeaturePromos( +@@ -845,7 +845,7 @@ void MaybeRegisterChromeFeaturePromos( "defaulted to saved for the first time."))); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // kIPHSupervisedUserProfileSigninFeature registry.RegisterFeature(std::move( FeaturePromoSpecification::CreateForCustomAction( -@@ -1003,7 +1003,7 @@ void MaybeRegisterChromeFeaturePromos( - FeaturePromoSpecification::AcceleratorInfo()) - .SetBubbleArrow(HelpBubbleArrow::kTopLeft))); +@@ -1085,7 +1085,7 @@ void MaybeRegisterChromeFeaturePromos( + "Triggered to inform users of the availability of the " + "new translate screen feature on the Lens Overlay."))); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // kIPHDesktopPWAsLinkCapturingLaunch: registry.RegisterFeature(std::move( FeaturePromoSpecification::CreateForCustomAction( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_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 b22b62990a4a..addc947ee94d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc @@ -1,83 +1,83 @@ ---- chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc @@ -516,7 +516,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; -@@ -2101,7 +2101,7 @@ void WebAppIntegrationTestDriver::DeletePlatformShortc +@@ -2109,7 +2109,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( -@@ -3428,7 +3428,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginEna +@@ -3452,7 +3452,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 -@@ -3443,7 +3443,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3467,7 +3467,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 -@@ -3453,7 +3453,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3477,7 +3477,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; } -@@ -3469,7 +3469,7 @@ void WebAppIntegrationTestDriver::CheckSiteHandlesFile +@@ -3493,7 +3493,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; } -@@ -4286,7 +4286,7 @@ base::FilePath WebAppIntegrationTestDriver::GetShortcu +@@ -4310,7 +4310,7 @@ base::FilePath WebAppIntegrationTestDriver::GetShortcu base::FilePath shortcut_dir, const std::string& app_name, const webapps::AppId& app_id) { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return override_registration_->test_override().GetShortcutPath( profile(), shortcut_dir, app_id, app_name); #else -@@ -4486,7 +4486,7 @@ bool WebAppIntegrationTestDriver::IsShortcutAndIconCre +@@ -4510,7 +4510,7 @@ bool WebAppIntegrationTestDriver::IsShortcutAndIconCre const webapps::AppId& id) { base::ScopedAllowBlockingForTesting allow_blocking; bool is_shortcut_and_icon_correct = false; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool is_shortcut_correct = override_registration_->test_override().IsShortcutCreated(profile, id, name); -@@ -4530,7 +4530,7 @@ bool WebAppIntegrationTestDriver::DoIconColorsMatch(Pr +@@ -4554,7 +4554,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; std::optional actual_color_install_icon_size = diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.cc index b491d0ee25a3..90b3a2c9586b 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc -@@ -573,7 +573,7 @@ void WebAppUiManagerImpl::MaybeShowIPHPromoForAppsLaun +@@ -583,7 +583,7 @@ void WebAppUiManagerImpl::MaybeShowIPHPromoForAppsLaun Browser* browser, 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) WebAppProvider* provider = WebAppProvider::GetForWebApps(profile); CHECK(provider); -@@ -799,7 +799,7 @@ void WebAppUiManagerImpl::ClearWebAppSiteDataIfNeeded( +@@ -809,7 +809,7 @@ void WebAppUiManagerImpl::ClearWebAppSiteDataIfNeeded( } } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void WebAppUiManagerImpl::ShowIPHPromoForAppsLaunchedViaLinkCapturing( const Browser* browser, const webapps::AppId& app_id, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.h index 7104f7505596..2bf846469419 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/web_applications/web_app_ui_manager_impl.h.orig 2024-04-23 07:42:17 UTC +--- chrome/browser/ui/web_applications/web_app_ui_manager_impl.h.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/web_applications/web_app_ui_manager_impl.h -@@ -222,7 +222,7 @@ class WebAppUiManagerImpl : public BrowserListObserver +@@ -227,7 +227,7 @@ class WebAppUiManagerImpl : public BrowserListObserver UninstallCompleteCallback uninstall_complete_callback, webapps::UninstallResultCode uninstall_code); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void ShowIPHPromoForAppsLaunchedViaLinkCapturing(const Browser* browser, const webapps::AppId& app_id, bool is_activated); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_app__settings_web__app__settings__ui.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_app__settings_web__app__settings__ui.h new file mode 100644 index 000000000000..143d7c4d1bc0 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_app__settings_web__app__settings__ui.h @@ -0,0 +1,18 @@ +--- chrome/browser/ui/webui/app_settings/web_app_settings_ui.h.orig 2024-11-16 12:20:41 UTC ++++ chrome/browser/ui/webui/app_settings/web_app_settings_ui.h +@@ -14,13 +14,13 @@ + #include "ui/webui/mojo_web_ui_controller.h" + #include "ui/webui/resources/cr_components/app_management/app_management.mojom-forward.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/common/webui_url_constants.h" + #include "content/public/browser/webui_config.h" + #include "content/public/common/url_constants.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) + class WebAppSettingsUI; + + class WebAppSettingsUIConfig diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_certificate__manager_certificate__manager__handler.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_certificate__manager_certificate__manager__handler.cc index 8a62c5fca023..b3d84bc98904 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_certificate__manager_certificate__manager__handler.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_certificate__manager_certificate__manager__handler.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/webui/certificate_manager/certificate_manager_handler.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/webui/certificate_manager/certificate_manager_handler.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/webui/certificate_manager/certificate_manager_handler.cc -@@ -154,7 +154,7 @@ CertificateManagerPageHandler::GetCertSource( +@@ -162,7 +162,7 @@ CertificateManagerPageHandler::GetCertSource( "distrusted_certs", cert_verifier::mojom::CertificateTrust::kDistrusted); break; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) case certificate_manager_v2::mojom::CertificateSource:: kProvisionedClientCert: source_ptr = CreateProvisionedClientCertSource(profile_); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.cc index 0a8e12db340b..34a22824c63e 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/webui/certificate_manager/client_cert_sources.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/webui/certificate_manager/client_cert_sources.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/webui/certificate_manager/client_cert_sources.cc -@@ -43,7 +43,7 @@ +@@ -51,7 +51,7 @@ #include "net/ssl/client_cert_store_mac.h" #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) #include "chrome/browser/enterprise/client_certificates/certificate_provisioning_service_factory.h" #include "components/enterprise/client_certificates/core/certificate_provisioning_service.h" #include "components/enterprise/client_certificates/core/client_certificates_service.h" -@@ -191,7 +191,7 @@ std::unique_ptr CreatePlatformC - #endif +@@ -195,7 +195,7 @@ std::unique_ptr CreatePlatformC } + #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // ClientCertStore implementation that always returns an empty list. The // CertificateProvisioningService implementation expects to wrap a platform // cert store, but here we only want to get results from the provisioning -@@ -673,7 +673,7 @@ CreatePlatformClientCertSource( +@@ -1056,7 +1056,7 @@ CreatePlatformClientCertSource( #endif } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr CreateProvisionedClientCertSource(Profile* profile) { return std::make_unique( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.h index ccad6b06a5cb..fa0063494245 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/webui/certificate_manager/client_cert_sources.h.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/webui/certificate_manager/client_cert_sources.h.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/webui/certificate_manager/client_cert_sources.h -@@ -18,7 +18,7 @@ CreatePlatformClientCertSource( +@@ -19,7 +19,7 @@ CreatePlatformClientCertSource( remote_client, Profile* profile); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr CreateProvisionedClientCertSource(Profile* profile); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__configs.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__configs.cc index 2864e565b8be..3d1a5f780951 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__configs.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__configs.cc @@ -1,33 +1,98 @@ ---- chrome/browser/ui/webui/chrome_web_ui_configs.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/webui/chrome_web_ui_configs.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/webui/chrome_web_ui_configs.cc -@@ -77,7 +77,7 @@ - #include "chrome/browser/ui/webui/certificate_manager/certificate_manager_ui.h" - #endif // BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI) +@@ -136,30 +136,30 @@ + #include "chrome/browser/ui/webui/conflicts/conflicts_ui.h" + #endif // BUILDFLAG(IS_WIN) + +-#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 // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#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/ui/webui/app_settings/web_app_settings_ui.h" + #include "chrome/browser/ui/webui/browser_switch/browser_switch_ui.h" #include "chrome/browser/ui/webui/whats_new/whats_new_ui.h" - #endif + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + + #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 // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || + // BUILDFLAG(IS_ANDROID) + + #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 // 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) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/webui/discards/discards_ui.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || + // BUILDFLAG(IS_CHROMEOS) +@@ -195,7 +195,7 @@ + #include "chrome/browser/ui/webui/signin/signin_error_ui.h" + #endif // !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_ANDROID) + +-#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/ui/webui/on_device_translation_internals/on_device_translation_internals_ui.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -148,10 +148,10 @@ void RegisterChromeWebUIConfigs() { +@@ -317,14 +317,14 @@ void RegisterChromeWebUIConfigs() { map.AddWebUIConfig(std::make_unique()); - #endif // !BUILDFLAG(IS_ANDROID) + #endif // BUILDFLAG(IS_ANDROID) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + map.AddWebUIConfig(std::make_unique()); + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) map.AddWebUIConfig(std::make_unique()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || - // BUILDFLAG(IS_OPENBSD) + // BUILDFLAG(IS_BSD) #if BUILDFLAG(ENABLE_EXTENSIONS) map.AddWebUIConfig(std::make_unique()); -@@ -165,7 +165,7 @@ void RegisterChromeWebUIConfigs() { - map.AddWebUIConfig(std::make_unique()); - #endif // BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI) +@@ -346,7 +346,7 @@ void RegisterChromeWebUIConfigs() { + map.AddWebUIConfig(std::make_unique()); + #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) + map.AddWebUIConfig(std::make_unique()); + map.AddWebUIConfig(std::make_unique()); map.AddWebUIConfig(std::make_unique()); +@@ -354,20 +354,20 @@ void RegisterChromeWebUIConfigs() { #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ +- BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + map.AddWebUIConfig(std::make_unique()); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || + // BUILDFLAG(IS_ANDROID) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + map.AddWebUIConfig( + std::make_unique()); + #endif // 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) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + map.AddWebUIConfig(std::make_unique()); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || + // BUILDFLAG(IS_CHROMEOS) 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 4f861fa54be2..106c0d1f2dc4 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,106 +1,40 @@ ---- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -177,7 +177,7 @@ - #include "chrome/browser/ui/webui/chromeos/chrome_url_disabled/chrome_url_disabled_ui.h" - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "chrome/browser/ui/webui/webui_js_error/webui_js_error_ui.h" - #endif - -@@ -202,22 +202,22 @@ +@@ -130,16 +130,16 @@ #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/commerce/product_specifications_ui.h" - #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 - -#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/ui/webui/whats_new/whats_new_ui.h" #endif -@@ -504,7 +504,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we - if (url.host_piece() == chrome::kChromeUIMobileSetupHost) - return &NewWebUI; - #endif // BUILDFLAG(IS_CHROMEOS_ASH) --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (url.host_piece() == chrome::kChromeUIWebUIJsErrorHost) - return &NewWebUI; - #endif -@@ -556,7 +556,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) -@@ -597,26 +597,26 @@ 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) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - if (url.host_piece() == chrome::kChromeUIWebAppSettingsHost) - return &NewWebUI; - #endif -@@ -854,7 +854,7 @@ base::RefCountedMemory* ChromeWebUIControllerFactory:: +@@ -462,7 +462,7 @@ base::RefCountedMemory* ChromeWebUIControllerFactory:: if (page_url.host_piece() == chrome::kChromeUINewTabPageHost) return NewTabPageUI::GetFaviconResourceBytes(scale_factor); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (page_url.host_piece() == chrome::kChromeUIWhatsNewHost) return WhatsNewUI::GetFaviconResourceBytes(scale_factor); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -882,7 +882,7 @@ base::RefCountedMemory* ChromeWebUIControllerFactory:: +@@ -490,7 +490,7 @@ base::RefCountedMemory* ChromeWebUIControllerFactory:: return ManagementUI::GetFaviconResourceBytes(scale_factor); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (page_url.host_piece() == commerce::kChromeUICompareHost) { return commerce::ProductSpecificationsUI::GetFaviconResourceBytes( scale_factor); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_internals_user__education_user__education__internals__page__handler__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_internals_user__education_user__education__internals__page__handler__impl.cc index 0c03c3bc205f..bce0c75e70c3 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_internals_user__education_user__education__internals__page__handler__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_internals_user__education_user__education__internals__page__handler__impl.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.cc.orig 2024-10-01 07:26:23 UTC +--- chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.cc -@@ -41,7 +41,7 @@ +@@ -44,7 +44,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/webui/resource_path.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/ui/browser_navigator.h" #include "chrome/browser/ui/browser_navigator_params.h" #include "net/base/url_util.h" -@@ -81,7 +81,7 @@ user_education::NewBadgeRegistry* GetNewBadgeRegistry( +@@ -84,7 +84,7 @@ user_education::NewBadgeRegistry* GetNewBadgeRegistry( } whats_new::WhatsNewRegistry* GetWhatsNewRegistry() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return g_browser_process->GetFeatures()->whats_new_registry(); #else return nullptr; -@@ -765,7 +765,7 @@ void UserEducationInternalsPageHandlerImpl::ClearWhats +@@ -767,7 +767,7 @@ void UserEducationInternalsPageHandlerImpl::ClearWhats } void UserEducationInternalsPageHandlerImpl::LaunchWhatsNewStaging() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) GURL url = net::AppendQueryParameter(GURL(chrome::kChromeUIWhatsNewURL), "staging", "true"); NavigateParams params(profile_, url, ui::PAGE_TRANSITION_TYPED); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_interstitials_interstitial__ui.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_interstitials_interstitial__ui.cc index 3e6225adc4f8..f90fc6f45ede 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_interstitials_interstitial__ui.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_interstitials_interstitial__ui.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/webui/interstitials/interstitial_ui.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/webui/interstitials/interstitial_ui.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/webui/interstitials/interstitial_ui.cc -@@ -71,7 +71,7 @@ +@@ -74,7 +74,7 @@ #include "components/security_interstitials/content/captive_portal_blocking_page.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/supervised_user/supervised_user_verification_controller_client.h" - #include "chrome/browser/supervised_user/supervised_user_verification_page.h" - #endif -@@ -291,7 +291,7 @@ std::unique_ptr CreateEnterpriseB - kRequestUrl)); + #include "chrome/browser/supervised_user/supervised_user_verification_page_blocked_sites.h" + #include "chrome/browser/supervised_user/supervised_user_verification_page_youtube.h" +@@ -309,7 +309,7 @@ std::unique_ptr CreateMana + kRequestUrl)); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - std::unique_ptr - CreateSupervisedUserVerificationPage(content::WebContents* web_contents, - bool is_main_frame) { -@@ -448,7 +448,7 @@ void InterstitialHTMLSource::StartDataRequest( + std::unique_ptr + CreateSupervisedUserVerificationPageForYouTube( + content::WebContents* web_contents, +@@ -467,7 +467,7 @@ void InterstitialHTMLSource::StartDataRequest( interstitial_delegate = CreateInsecureFormPage(web_contents); } else if (path_without_query == "/https_only") { interstitial_delegate = CreateHttpsOnlyModePage(web_contents); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) } else if (path_without_query == "/supervised-user-verify") { - interstitial_delegate = CreateSupervisedUserVerificationPage( + interstitial_delegate = CreateSupervisedUserVerificationPageForYouTube( web_contents, /*is_main_frame=*/true); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui.cc index e95b073cdd4d..1fbe2945be62 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui.cc @@ -1,16 +1,16 @@ ---- chrome/browser/ui/webui/management/management_ui.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/webui/management/management_ui.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/webui/management/management_ui.cc -@@ -108,11 +108,11 @@ content::WebUIDataSource* CreateAndAddManagementUIHtml +@@ -185,11 +185,11 @@ void ManagementUI::GetLocalizedStrings( IDS_MANAGEMENT_FILE_TRANSFER_VISIBLE_DATA}, {kManagementReportFileEvents, IDS_MANAGEMENT_REPORT_FILE_EVENTS}, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {kManagementScreenCaptureEvent, IDS_MANAGEMENT_SCREEN_CAPTURE_EVENT}, {kManagementScreenCaptureData, IDS_MANAGEMENT_SCREEN_CAPTURE_DATA}, #endif // BUILDFLAG(IS_CHROMEOS) || 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) {kManagementDeviceSignalsDisclosure, IDS_MANAGEMENT_DEVICE_SIGNALS_DISCLOSURE}, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui__constants.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui__constants.cc index 5cdb59082515..27ec06b6a1a5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui__constants.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui__constants.cc @@ -1,17 +1,17 @@ ---- chrome/browser/ui/webui/management/management_ui_constants.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/webui/management/management_ui_constants.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/webui/management/management_ui_constants.cc -@@ -88,12 +88,12 @@ const char kProfileReportingBrowser[] = "profileReport - const char kProfileReportingExtension[] = "profileReportingExtension"; +@@ -89,12 +89,12 @@ const char kProfileReportingExtension[] = "profileRepo const char kProfileReportingPolicy[] = "profileReportingPolicy"; + const char kProfileReportingLearnMore[] = "profileReportingLearnMore"; -#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) -#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 kManagementDeviceSignalsDisclosure[] = "managementDeviceSignalsDisclosure"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) 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 a0d52eb00c5a..e4dc0d28f757 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,29 +1,38 @@ ---- chrome/browser/ui/webui/management/management_ui_handler.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/webui/management/management_ui_handler.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/webui/management/management_ui_handler.cc @@ -57,7 +57,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/webui/web_ui_util.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/signals/user_permission_service_factory.h" #include "components/device_signals/core/browser/user_permission_service.h" // nogncheck #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -361,7 +361,7 @@ void ManagementUIHandler::AddReportingInfo(base::Value +@@ -345,7 +345,7 @@ void ManagementUIHandler::AddReportingInfo(base::Value report_sources->Append(std::move(data)); } - } + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + auto device_signal_data = GetDeviceSignalGrantedMessage(); + if (!device_signal_data.empty()) { + report_sources->Append(std::move(device_signal_data)); +@@ -367,7 +367,7 @@ void ManagementUIHandler::AddReportingInfo(base::Value + report_sources->Append(std::move(data)); + } + -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Insert the device signals consent disclosure at the end of browser - // reporting section. - auto* user_permission_service = GetUserPermissionService(); -@@ -547,7 +547,7 @@ policy::PolicyService* ManagementUIHandler::GetPolicyS + auto device_signal_data = GetDeviceSignalGrantedMessage(); + if (!device_signal_data.empty()) { + report_sources->Append(std::move(device_signal_data)); +@@ -551,7 +551,7 @@ policy::PolicyService* ManagementUIHandler::GetPolicyS ->policy_service(); } -#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::UserPermissionService* ManagementUIHandler::GetUserPermissionService() { return enterprise_signals::UserPermissionServiceFactory::GetForProfile( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui__handler.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui__handler.h index 5b38ad6235a2..cf1554004c8d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui__handler.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui__handler.h @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/management/management_ui_handler.h.orig 2024-06-22 08:49:42 UTC +--- chrome/browser/ui/webui/management/management_ui_handler.h.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/webui/management/management_ui_handler.h @@ -31,7 +31,7 @@ namespace policy { class PolicyService; } // namespace policy -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) namespace device_signals { class UserPermissionService; } // namespace device_signals @@ -72,7 +72,7 @@ class ManagementUIHandler : public content::WebUIMessa base::Value::List GetManagedWebsitesInfo(Profile* profile) const; base::Value::List GetApplicationsInfo(Profile* profile) const; virtual policy::PolicyService* GetPolicyService(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) virtual device_signals::UserPermissionService* GetUserPermissionService(); + base::Value::Dict GetDeviceSignalGrantedMessage(); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_password__manager_promo__cards__handler.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_password__manager_promo__cards__handler.cc index 9206460b67b6..4a82ea6f5769 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_password__manager_promo__cards__handler.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_password__manager_promo__cards__handler.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/password_manager/promo_cards_handler.cc.orig 2024-08-26 14:40:28 UTC +--- chrome/browser/ui/webui/password_manager/promo_cards_handler.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/webui/password_manager/promo_cards_handler.cc @@ -28,7 +28,7 @@ #include "chrome/browser/ui/webui/password_manager/promo_cards/web_password_manager_promo.h" #endif -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/password_manager/promo_cards/relaunch_chrome_promo.h" #endif -@@ -75,7 +75,7 @@ std::vector> Ge +@@ -81,7 +81,7 @@ std::vector> Ge .get())); #endif -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) promo_cards.push_back( std::make_unique(profile->GetPrefs())); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc index bf26240fc3d2..6091cd4f4b53 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/webui/searchbox/searchbox_handler.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/webui/searchbox/searchbox_handler.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/webui/searchbox/searchbox_handler.cc @@ -109,7 +109,7 @@ const char* kMacShareIconResourceName = #elif BUILDFLAG(IS_WIN) const char* kWinShareIconResourceName = "//resources/cr_components/searchbox/icons/win_share.svg"; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char* kLinuxShareIconResourceName = "//resources/cr_components/searchbox/icons/share.svg"; #else @@ -169,7 +169,7 @@ static void DefineChromeRefreshRealboxIcons() { #elif BUILDFLAG(IS_WIN) kWinShareIconResourceName = "//resources/cr_components/searchbox/icons/win_share_cr23.svg"; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) kLinuxShareIconResourceName = "//resources/cr_components/searchbox/icons/share_cr23.svg"; #else -@@ -646,7 +646,7 @@ std::string SearchboxHandler::ActionVectorIconToResour +@@ -654,7 +654,7 @@ std::string SearchboxHandler::ActionVectorIconToResour icon.name == omnibox::kShareWinChromeRefreshIcon.name) { return kWinShareIconResourceName; } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (icon.name == omnibox::kShareIcon.name || icon.name == omnibox::kShareLinuxChromeRefreshIcon.name) { return kLinuxShareIconResourceName; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc index ba3192473344..6871a4a61f12 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc @@ -1,56 +1,56 @@ ---- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -143,7 +143,7 @@ +@@ -147,7 +147,7 @@ #include "chrome/browser/ui/chrome_pages.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 -@@ -162,7 +162,7 @@ +@@ -166,7 +166,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 -@@ -286,7 +286,7 @@ void AddA11yStrings(content::WebUIDataSource* html_sou +@@ -291,7 +291,7 @@ void AddA11yStrings(content::WebUIDataSource* html_sou {"focusHighlightLabel", IDS_SETTINGS_ACCESSIBILITY_FOCUS_HIGHLIGHT_DESCRIPTION}, #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"overscrollHistoryNavigationTitle", IDS_SETTINGS_OVERSCROLL_HISTORY_NAVIGATION_TITLE}, {"overscrollHistoryNavigationSubtitle", -@@ -411,7 +411,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -547,7 +547,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht {"uiFeatureAlignLeft", IDS_SETTINGS_UI_FEATURE_ALIGN_LEFT}, {"uiFeatureAlignRight", IDS_SETTINGS_UI_FEATURE_ALIGN_RIGHT}, {"resetToDefault", IDS_SETTINGS_RESET_TO_DEFAULT}, -#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}, -@@ -419,7 +419,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -555,7 +555,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht {"classicTheme", IDS_SETTINGS_CLASSIC_THEME}, {"useClassicTheme", IDS_SETTINGS_USE_CLASSIC_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) -@@ -447,7 +447,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -583,7 +583,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht // TODO(crbug.com/40118868): 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_ui_webui_signin_profile__picker__handler.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_signin_profile__picker__handler.cc index a1f281a2a25a..cdeef18455fd 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_signin_profile__picker__handler.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_signin_profile__picker__handler.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/signin/profile_picker_handler.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/browser/ui/webui/signin/profile_picker_handler.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/webui/signin/profile_picker_handler.cc @@ -209,7 +209,7 @@ base::Value::Dict CreateProfileEntry(const ProfileAttr if (AccountInfo::IsManaged(entry->GetHostedDomain())) { profile_entry.Set("avatarBadge", "cr:domain"); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) } else if (base::FeatureList::IsEnabled( supervised_user::kShowKiteForSupervisedUsers) && entry->IsSupervised()) { -@@ -1224,7 +1224,7 @@ void ProfilePickerHandler::BeginFirstWebContentsProfil +@@ -1211,7 +1211,7 @@ void ProfilePickerHandler::BeginFirstWebContentsProfil } void ProfilePickerHandler::MaybeUpdateGuestMode() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (!base::FeatureList::IsEnabled( supervised_user::kHideGuestModeForSupervisedUsers)) { return; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_window__sizer_window__sizer.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_window__sizer_window__sizer.cc index 07c9bf338b68..49f1966d5c34 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_window__sizer_window__sizer.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_window__sizer_window__sizer.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/window_sizer/window_sizer.cc.orig 2024-10-01 07:26:23 UTC +--- chrome/browser/ui/window_sizer/window_sizer.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/ui/window_sizer/window_sizer.cc -@@ -209,7 +209,7 @@ void WindowSizer::GetBrowserWindowBoundsAndShowState( +@@ -214,7 +214,7 @@ void WindowSizer::GetBrowserWindowBoundsAndShowState( browser, window_bounds, show_state); } -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Linux has its own implementation, see WindowSizerLinux. // static void WindowSizer::GetBrowserWindowBoundsAndShowState( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc index 40a4195debd7..a738d28fda2d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/policy/web_app_policy_manager.cc.orig 2024-10-01 07:26:23 UTC +--- chrome/browser/web_applications/policy/web_app_policy_manager.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/web_applications/policy/web_app_policy_manager.cc -@@ -102,7 +102,7 @@ namespace web_app { +@@ -106,7 +106,7 @@ namespace web_app { BASE_FEATURE(kDesktopPWAsForceUnregisterOSIntegration, "DesktopPWAsForceUnregisterOSIntegration", -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc index f2b69bb2702a..b5b08f1990d5 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 2024-10-27 06:40:35 UTC +--- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/browser/webauthn/chrome_authenticator_request_delegate.cc -@@ -1143,7 +1143,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureDisc +@@ -1166,7 +1166,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureDisc g_observer->ConfiguringCable(request_type); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // No caBLEv1 on Linux. It tends to crash bluez. if (base::Contains(pairings_from_extension, device::CableDiscoveryData::Version::V1, diff --git a/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc b/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc index 33cf7b843e8e..46dff86dfe69 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc @@ -1,56 +1,56 @@ ---- chrome/common/chrome_features.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/common/chrome_features.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/common/chrome_features.cc -@@ -82,7 +82,7 @@ BASE_FEATURE(kUseAdHocSigningForWebAppShims, +@@ -83,7 +83,7 @@ BASE_FEATURE(kUseAdHocSigningForWebAppShims, #endif // BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || 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, +@@ -101,7 +101,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. -@@ -267,7 +267,7 @@ BASE_FEATURE(kDesktopPWAsElidedExtensionsMenu, +@@ -273,7 +273,7 @@ BASE_FEATURE(kDesktopPWAsElidedExtensionsMenu, BASE_FEATURE(kDesktopPWAsRunOnOsLogin, "DesktopPWAsRunOnOsLogin", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -299,7 +299,7 @@ BASE_FEATURE(kDesktopPWAsTabStripSettings, +@@ -305,7 +305,7 @@ BASE_FEATURE(kDesktopPWAsTabStripSettings, "DesktopPWAsTabStripSettings", base::FEATURE_DISABLED_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) // 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. -@@ -871,7 +871,7 @@ BASE_FEATURE(kKAnonymityServiceStorage, +@@ -867,7 +867,7 @@ BASE_FEATURE(kKAnonymityServiceStorage, "KAnonymityServiceStorage", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) BASE_FEATURE(kLinuxLowMemoryMonitor, "LinuxLowMemoryMonitor", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -884,7 +884,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit +@@ -880,7 +880,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 e2457d87db57..5b1d27e2bf0a 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 2024-10-27 06:40:35 UTC +--- chrome/common/chrome_features.h.orig 2024-11-16 12:20:41 UTC +++ chrome/common/chrome_features.h @@ -60,13 +60,13 @@ BASE_DECLARE_FEATURE(kUseAdHocSigningForWebAppShims); #endif // BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || 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) @@ -179,7 +179,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsPreventClose); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kChromeAppsDeprecation); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kShortcutsNotApps); -@@ -512,7 +512,7 @@ BASE_DECLARE_FEATURE(kKAnonymityServiceOHTTPRequests); +@@ -503,7 +503,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; -@@ -520,7 +520,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -511,7 +511,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam kLinuxLowMemoryMonitorCriticalLevel; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kListWebAppsSwitch); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths.cc b/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths.cc index 8fe404900671..854708756162 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__paths.cc @@ -1,88 +1,88 @@ ---- chrome/common/chrome_paths.cc.orig 2024-06-22 08:49:42 UTC +--- chrome/common/chrome_paths.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/common/chrome_paths.cc @@ -30,7 +30,7 @@ #include "base/apple/foundation_util.h" #endif -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) #include "components/policy/core/common/policy_paths.h" #endif @@ -52,14 +52,14 @@ namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The path to the external extension .json files. // /usr/share seems like a good choice, see: http://www.pathname.com/fhs/ const base::FilePath::CharType kFilepathSinglePrefExtensions[] = #if BUILDFLAG(GOOGLE_CHROME_BRANDING) - FILE_PATH_LITERAL("/usr/share/google-chrome/extensions"); + FILE_PATH_LITERAL("/usr/local/share/ungoogled-chromium/extensions"); #else - FILE_PATH_LITERAL("/usr/share/chromium/extensions"); + FILE_PATH_LITERAL("/usr/local/share/ungoogled-chromium/extensions"); #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -225,7 +225,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -219,7 +219,7 @@ bool PathProvider(int key, base::FilePath* result) { } break; case chrome::DIR_DEFAULT_DOWNLOADS_SAFE: -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!GetUserDownloadsDirectorySafe(&cur)) { return false; } -@@ -541,7 +541,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -535,7 +535,7 @@ bool PathProvider(int key, base::FilePath* result) { return false; } break; -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) case chrome::DIR_POLICY_FILES: { cur = base::FilePath(policy::kPolicyPath); break; -@@ -552,7 +552,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -546,7 +546,7 @@ bool PathProvider(int key, base::FilePath* result) { #if BUILDFLAG(IS_CHROMEOS_ASH) || \ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ BUILDFLAG(CHROMIUM_BRANDING)) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) case chrome::DIR_USER_EXTERNAL_EXTENSIONS: { if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur)) { return false; -@@ -561,7 +561,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -555,7 +555,7 @@ bool PathProvider(int key, base::FilePath* result) { break; } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: { cur = base::FilePath(kFilepathSinglePrefExtensions); break; -@@ -599,7 +599,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -593,7 +593,7 @@ bool PathProvider(int key, base::FilePath* result) { break; #if BUILDFLAG(ENABLE_EXTENSIONS) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) case chrome::DIR_NATIVE_MESSAGING: #if BUILDFLAG(IS_MAC) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) -@@ -613,9 +613,12 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -607,9 +607,12 @@ bool PathProvider(int key, base::FilePath* result) { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) cur = base::FilePath( FILE_PATH_LITERAL("/etc/opt/chrome/native-messaging-hosts")); +#elif BUILDFLAG(IS_FREEBSD) + cur = base::FilePath(FILE_PATH_LITERAL( + "/usr/local/etc/ungoogled-chromium/native-messaging-hosts")); #else cur = base::FilePath( - FILE_PATH_LITERAL("/etc/chromium/native-messaging-hosts")); + FILE_PATH_LITERAL("/etc/ungoogled-chromium/native-messaging-hosts")); #endif #endif // !BUILDFLAG(IS_MAC) break; diff --git a/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.cc b/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.cc index 16dd90ba4ce7..35ab69dbdb75 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,20 @@ ---- chrome/common/chrome_switches.cc.orig 2024-10-01 07:26:23 UTC +--- chrome/common/chrome_switches.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/common/chrome_switches.cc -@@ -886,14 +886,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- +@@ -892,7 +892,7 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const char kEnableNewAppMenuIcon[] = "enable-new-app-menu-icon"; // Causes the browser to launch directly in guest mode. - const char kGuest[] = "guest"; +@@ -902,7 +902,7 @@ const char kGuest[] = "guest"; + const char kForceNtpMobilePromo[] = "force-ntp-mobile-promo"; #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 65d940e024fd..0e6e34846a62 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,18 @@ ---- chrome/common/chrome_switches.h.orig 2024-10-01 07:26:23 UTC +--- chrome/common/chrome_switches.h.orig 2024-11-16 12:20:41 UTC +++ chrome/common/chrome_switches.h -@@ -275,12 +275,12 @@ extern const char kAllowNaClSocketAPI[]; +@@ -277,13 +277,13 @@ extern const char kAllowNaClSocketAPI[]; #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extern const char kEnableNewAppMenuIcon[]; extern const char kGuest[]; + extern const char kForceNtpMobilePromo[]; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extern const char kListApps[]; extern const char kProfileBaseName[]; extern const char kProfileManagementAttributes[]; diff --git a/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h b/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h index fd66a7bf4d9c..ab348da720ae 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_pref__names.h @@ -1,91 +1,91 @@ ---- chrome/common/pref_names.h.orig 2024-10-27 06:40:35 UTC +--- chrome/common/pref_names.h.orig 2024-11-16 12:20:41 UTC +++ chrome/common/pref_names.h -@@ -1379,7 +1379,7 @@ inline constexpr char kUseAshProxy[] = "lacros.proxy.u +@@ -1387,7 +1387,7 @@ inline constexpr char kUseAshProxy[] = "lacros.proxy.u // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Linux specific preference on whether we should match the system theme. inline constexpr char kSystemTheme[] = "extensions.theme.system_theme"; #endif -@@ -1552,7 +1552,7 @@ inline constexpr char kShowUpdatePromotionInfoBar[] = +@@ -1564,7 +1564,7 @@ inline constexpr char kShowUpdatePromotionInfoBar[] = "browser.show_update_promotion_info_bar"; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Boolean that is false if we should show window manager decorations. If // true, we draw a custom chrome frame (thicker title bar and blue border). inline constexpr char kUseCustomChromeFrame[] = "browser.custom_chrome_frame"; -@@ -2159,7 +2159,7 @@ inline constexpr char kDownloadDefaultDirectory[] = +@@ -2176,7 +2176,7 @@ inline constexpr char kDownloadDefaultDirectory[] = inline constexpr char kDownloadDirUpgraded[] = "download.directory_upgrade"; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) inline constexpr char kOpenPdfDownloadInSystemReader[] = "download.open_pdf_in_system_reader"; #endif -@@ -2602,14 +2602,14 @@ inline constexpr char kMediaStorageIdSalt[] = "media.s +@@ -2619,14 +2619,14 @@ inline constexpr char kMediaStorageIdSalt[] = "media.s inline constexpr char kMediaCdmOriginData[] = "media.cdm.origin_data"; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // A boolean pref to determine whether or not the network service is running // sandboxed. inline constexpr char kNetworkServiceSandboxEnabled[] = "net.network_service_sandbox"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Records whether the user has seen an HTTP auth "negotiate" header. inline constexpr char kReceivedHttpAuthNegotiateHeader[] = "net.received_http_auth_negotiate_headers"; -@@ -2687,7 +2687,7 @@ inline constexpr char kAmbientAuthenticationInPrivateM +@@ -2704,7 +2704,7 @@ inline constexpr char kAmbientAuthenticationInPrivateM inline constexpr char kBasicAuthOverHttpEnabled[] = "auth.basic_over_http_enabled"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Boolean that specifies whether OK-AS-DELEGATE flag from KDC is respected // along with kAuthNegotiateDelegateAllowlist. inline constexpr char kAuthNegotiateDelegateByKdcPolicy[] = -@@ -3228,7 +3228,7 @@ inline constexpr char kDeviceWeeklyScheduledSuspend[] +@@ -3245,7 +3245,7 @@ inline constexpr char kDeviceWeeklyScheduledSuspend[] #endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Defines administrator-set availability of Chrome for Testing. inline constexpr char kChromeForTestingAllowed[] = "chrome_for_testing.allowed"; #endif -@@ -3824,7 +3824,7 @@ inline constexpr char kFileOrDirectoryPickerWithoutGes +@@ -3836,7 +3836,7 @@ inline constexpr char kFileOrDirectoryPickerWithoutGes inline constexpr char kSandboxExternalProtocolBlocked[] = "profile.sandbox_external_protocol_blocked"; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Boolean that indicates if system notifications are allowed to be used in // place of Chrome notifications. inline constexpr char kAllowSystemNotifications[] = -@@ -4094,7 +4094,7 @@ inline constexpr char kLensDesktopNTPSearchEnabled[] = +@@ -4103,7 +4103,7 @@ inline constexpr char kLensDesktopNTPSearchEnabled[] = "policy.lens_desktop_ntp_search_enabled"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // A dict mapping the edition name with the major version it was shown. inline constexpr char kWhatsNewEditionUsed[] = "browser.whats_new.edition_used"; // A list containing the features of each module in order of when they -@@ -4188,7 +4188,7 @@ inline constexpr char kPrintingOAuth2AuthorizationServ +@@ -4197,7 +4197,7 @@ inline constexpr char kPrintingOAuth2AuthorizationServ "printing.oauth2_authorization_servers"; #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If this exists and is true, Chrome may run system DNS resolution out of the // network process. If false, Chrome will run system DNS resolution in the // network process. If non-existent, Chrome will decide where to run system DNS diff --git a/www/ungoogled-chromium/files/patch-chrome_common_url__constants.h b/www/ungoogled-chromium/files/patch-chrome_common_url__constants.h index b432d70ea455..e170b51e9bd7 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 2024-10-27 06:40:35 UTC +--- chrome/common/url_constants.h.orig 2024-11-16 12:20:41 UTC +++ chrome/common/url_constants.h -@@ -929,7 +929,7 @@ inline constexpr char kOutdatedPluginLearnMoreURL[] = +@@ -950,7 +950,7 @@ inline constexpr char kOutdatedPluginLearnMoreURL[] = inline constexpr char kPhoneHubPermissionLearnMoreURL[] = "https://support.9oo91e.qjz9zk/chromebook?p=multidevice"; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // "Learn more" URL for the chrome apps deprecation dialog. inline constexpr char kChromeAppsDeprecationLearnMoreURL[] = "https://support.9oo91e.qjz9zk/chrome?p=chrome_app_deprecation"; diff --git a/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.h b/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.h index 4b78cc55e2f6..d7cdd8c5ac2f 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,56 +1,56 @@ ---- chrome/common/webui_url_constants.h.orig 2024-10-27 06:40:35 UTC +--- chrome/common/webui_url_constants.h.orig 2024-11-16 12:20:41 UTC +++ chrome/common/webui_url_constants.h -@@ -581,24 +581,24 @@ inline constexpr char16_t kOsUISystemURL[] = u"os://sy +@@ -578,24 +578,24 @@ inline constexpr char16_t kOsUISystemURL[] = u"os://sy inline constexpr char kOsUIVersionURL[] = "os://version"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) inline constexpr char kChromeUIWebUIJsErrorHost[] = "webuijserror"; inline constexpr 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) inline constexpr char kChromeUIConnectorsInternalsHost[] = "connectors-internals"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) inline constexpr char kChromeUIDiscardsHost[] = "discards"; inline constexpr char kChromeUIDiscardsURL[] = "chrome://discards/"; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) inline constexpr char kChromeUIWebAppSettingsHost[] = "app-settings"; inline constexpr char kChromeUIWebAppSettingsURL[] = "chrome://app-settings/"; inline constexpr char kChromeUIWhatsNewHost[] = "whats-new"; -@@ -610,13 +610,13 @@ inline constexpr char kChromeUILinuxProxyConfigHost[] +@@ -607,13 +607,13 @@ inline constexpr char kChromeUILinuxProxyConfigHost[] #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) inline constexpr char kChromeUISandboxHost[] = "sandbox"; #endif // TODO(crbug.com/40118868): 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)) inline constexpr char kChromeUIBrowserSwitchHost[] = "browser-switch"; inline constexpr char kChromeUIBrowserSwitchURL[] = "chrome://browser-switch/"; -@@ -638,7 +638,7 @@ inline constexpr char kChromeUIProfilePickerStartupQue +@@ -635,7 +635,7 @@ inline constexpr char kChromeUIProfilePickerStartupQue inline constexpr char kChromeUIProfilePickerUrl[] = "chrome://profile-picker/"; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) inline constexpr char kChromeUITabModalConfirmDialogHost[] = diff --git a/www/ungoogled-chromium/files/patch-chrome_enterprise__companion_enterprise__companion__client.cc b/www/ungoogled-chromium/files/patch-chrome_enterprise__companion_enterprise__companion__client.cc index ea8e6e6edf92..85edfee3f387 100644 --- a/www/ungoogled-chromium/files/patch-chrome_enterprise__companion_enterprise__companion__client.cc +++ b/www/ungoogled-chromium/files/patch-chrome_enterprise__companion_enterprise__companion__client.cc @@ -1,11 +1,11 @@ ---- chrome/enterprise_companion/enterprise_companion_client.cc.orig 2024-10-01 07:26:23 UTC +--- chrome/enterprise_companion/enterprise_companion_client.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/enterprise_companion/enterprise_companion_client.cc -@@ -36,7 +36,7 @@ namespace { +@@ -37,7 +37,7 @@ namespace { #if BUILDFLAG(IS_MAC) constexpr char kServerName[] = MAC_BUNDLE_IDENTIFIER_STRING ".service"; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) constexpr char kServerName[] = "/run/" COMPANY_SHORTNAME_STRING "/" PRODUCT_FULLNAME_STRING "/service.sk"; #elif BUILDFLAG(IS_WIN) diff --git a/www/ungoogled-chromium/files/patch-chrome_updater_configurator.cc b/www/ungoogled-chromium/files/patch-chrome_updater_configurator.cc index 001df4d149eb..b5ef10706c7c 100644 --- a/www/ungoogled-chromium/files/patch-chrome_updater_configurator.cc +++ b/www/ungoogled-chromium/files/patch-chrome_updater_configurator.cc @@ -1,11 +1,11 @@ ---- chrome/updater/configurator.cc.orig 2024-10-27 06:40:35 UTC +--- chrome/updater/configurator.cc.orig 2024-11-16 12:20:41 UTC +++ chrome/updater/configurator.cc -@@ -69,7 +69,7 @@ Configurator::Configurator(scoped_refptr +@@ -70,7 +70,7 @@ Configurator::Configurator(scoped_refptr return std::nullopt; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) }()) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Linux creating the NetworkFetcherFactory requires performing blocking IO // to load an external library. This should be done when the configurator is // created. diff --git a/www/ungoogled-chromium/files/patch-chromecast_browser_cast__browser__main__parts.cc b/www/ungoogled-chromium/files/patch-chromecast_browser_cast__browser__main__parts.cc index 4c48ba90f7b2..02a120bc1782 100644 --- a/www/ungoogled-chromium/files/patch-chromecast_browser_cast__browser__main__parts.cc +++ b/www/ungoogled-chromium/files/patch-chromecast_browser_cast__browser__main__parts.cc @@ -1,38 +1,38 @@ ---- chromecast/browser/cast_browser_main_parts.cc.orig 2024-05-23 20:04:36 UTC +--- chromecast/browser/cast_browser_main_parts.cc.orig 2024-11-16 12:20:41 UTC +++ chromecast/browser/cast_browser_main_parts.cc @@ -94,7 +94,7 @@ #include "ui/ozone/public/ozone_platform.h" #endif // BUILDFLAG(IS_OZONE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include #include @@ -267,7 +267,7 @@ class CastViewsDelegate : public views::ViewsDelegate #endif // defined(USE_AURA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath GetApplicationFontsDir() { std::unique_ptr env(base::Environment::Create()); @@ -313,7 +313,7 @@ const DefaultCommandLineSwitch kDefaultSwitches[] = { - {cc::switches::kDisableThreadedAnimation, ""}, + {switches::kDisableThreadedAnimation, ""}, #endif // BUILDFLAG(IS_ANDROID) #endif // BUILDFLAG(IS_CAST_AUDIO_ONLY) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if defined(ARCH_CPU_X86_FAMILY) // This is needed for now to enable the x11 Ozone platform to work with // current Linux/NVidia OpenGL drivers. @@ -490,7 +490,7 @@ void CastBrowserMainParts::ToolkitInitialized() { views_delegate_ = std::make_unique(); #endif // defined(USE_AURA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath dir_font = GetApplicationFontsDir(); const FcChar8* dir_font_char8 = reinterpret_cast(dir_font.value().data()); diff --git a/www/ungoogled-chromium/files/patch-chromecast_cast__core_runtime_browser_runtime__application__service__impl.cc b/www/ungoogled-chromium/files/patch-chromecast_cast__core_runtime_browser_runtime__application__service__impl.cc index 3887b572eff0..ea17cb5afcf5 100644 --- a/www/ungoogled-chromium/files/patch-chromecast_cast__core_runtime_browser_runtime__application__service__impl.cc +++ b/www/ungoogled-chromium/files/patch-chromecast_cast__core_runtime_browser_runtime__application__service__impl.cc @@ -1,11 +1,11 @@ ---- chromecast/cast_core/runtime/browser/runtime_application_service_impl.cc.orig 2024-07-31 14:19:23 UTC +--- chromecast/cast_core/runtime/browser/runtime_application_service_impl.cc.orig 2024-11-16 12:20:41 UTC +++ chromecast/cast_core/runtime/browser/runtime_application_service_impl.cc -@@ -336,7 +336,7 @@ CastWebView::Scoped RuntimeApplicationServiceImpl::Cre - GetFlagEntry(feature::kCastCoreIsRemoteControlMode, - config_.extra_features(), /*default_value=*/false); - params->enabled_for_dev = IsEnabledForDev(); +@@ -346,7 +346,7 @@ CastWebView::Scoped RuntimeApplicationServiceImpl::Cre + params->force_720p_resolution = + GetFlagEntry(feature::kCastCoreForce720p, config_.extra_features(), + /*default_value=*/false); -#if BUILDFLAG(ENABLE_CAST_RECEIVER) && BUILDFLAG(IS_LINUX) +#if BUILDFLAG(ENABLE_CAST_RECEIVER) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) - // cast_receiver::ApplicationControlsImpl constructs an instance of - // url_rewrite::UrlRequestRewriteRulesManager. CastWebContentsImpl should NOT - // construct its own instance, or UrlRequestRulesReceiver will crash when a + // Starboard-based (linux) cast receivers may not render their UI at 720p, so + // we need to scale to the proper resolution. For example, a 4k TV may render + // the window at 1920x1080, so a scaling factor of 1.5 is necessary for a 720p diff --git a/www/ungoogled-chromium/files/patch-components_autofill_core_browser_payments__data__manager.cc b/www/ungoogled-chromium/files/patch-components_autofill_core_browser_payments__data__manager.cc index 243137d78814..b5d25308ac71 100644 --- a/www/ungoogled-chromium/files/patch-components_autofill_core_browser_payments__data__manager.cc +++ b/www/ungoogled-chromium/files/patch-components_autofill_core_browser_payments__data__manager.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/browser/payments_data_manager.cc.orig 2024-10-27 06:40:35 UTC +--- components/autofill/core/browser/payments_data_manager.cc.orig 2024-11-16 12:20:41 UTC +++ components/autofill/core/browser/payments_data_manager.cc -@@ -1054,7 +1054,7 @@ bool PaymentsDataManager::ShouldShowCardsFromAccountOp +@@ -1095,7 +1095,7 @@ bool PaymentsDataManager::ShouldShowCardsFromAccountOp // The feature is only for Linux, Windows, Mac, and Fuchsia. // TODO(crbug.com/40118868): 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) || \ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) // This option should only be shown for users that have not enabled the Sync // Feature and that have server credit cards available. 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 6c6390fb2edd..876c6495c590 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,20 +1,20 @@ ---- components/autofill/core/common/autofill_payments_features.cc.orig 2024-10-27 06:40:35 UTC +--- components/autofill/core/common/autofill_payments_features.cc.orig 2024-11-16 12:20:41 UTC +++ components/autofill/core/common/autofill_payments_features.cc @@ -8,7 +8,7 @@ namespace autofill::features { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) // When enabled, Chrome will extract the checkout amount from the checkout page // of the allowlisted merchant websites. -@@ -320,7 +320,7 @@ BASE_FEATURE(kAutofillSyncEwalletAccounts, +@@ -331,7 +331,7 @@ BASE_FEATURE(kAutofillSyncEwalletAccounts, bool ShouldShowImprovedUserConsentForCreditCardSave() { // TODO(crbug.com/40118868): 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_commerce_core_commerce__feature__list.cc b/www/ungoogled-chromium/files/patch-components_commerce_core_commerce__feature__list.cc index 30b11eb83ca1..b0c975c4c144 100644 --- a/www/ungoogled-chromium/files/patch-components_commerce_core_commerce__feature__list.cc +++ b/www/ungoogled-chromium/files/patch-components_commerce_core_commerce__feature__list.cc @@ -1,29 +1,29 @@ ---- components/commerce/core/commerce_feature_list.cc.orig 2024-10-27 06:40:35 UTC +--- components/commerce/core/commerce_feature_list.cc.orig 2024-11-16 12:20:41 UTC +++ components/commerce/core/commerce_feature_list.cc @@ -168,7 +168,7 @@ BASE_FEATURE(kPriceInsights, "PriceInsights", base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kPriceInsightsRegionLaunched, "PriceInsightsRegionLaunched", base::FEATURE_ENABLED_BY_DEFAULT); -@@ -246,7 +246,7 @@ const base::FeatureParam kDiscountOnShoppyPage{ +@@ -250,7 +250,7 @@ const base::FeatureParam kDiscountOnShoppyPage{ &kEnableDiscountInfoApi, kDiscountOnShoppyPageParam, false}; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kEnableDiscountInfoApiRegionLaunched, "EnableDiscountInfoApiRegionLaunched", base::FEATURE_ENABLED_BY_DEFAULT); -@@ -281,7 +281,7 @@ const base::FeatureParam kDeleteAllMerchantsOnCl +@@ -289,7 +289,7 @@ const base::FeatureParam kDeleteAllMerchantsOnCl BASE_FEATURE(kShoppingList, "ShoppingList", base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kShoppingListRegionLaunched, "ShoppingListRegionLaunched", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-components_device__signals_core_common_signals__features.cc b/www/ungoogled-chromium/files/patch-components_device__signals_core_common_signals__features.cc index e396dd18bb0a..43e736598f02 100644 --- a/www/ungoogled-chromium/files/patch-components_device__signals_core_common_signals__features.cc +++ b/www/ungoogled-chromium/files/patch-components_device__signals_core_common_signals__features.cc @@ -1,11 +1,11 @@ ---- components/device_signals/core/common/signals_features.cc.orig 2023-08-18 10:26:52 UTC +--- components/device_signals/core/common/signals_features.cc.orig 2024-11-16 12:20:41 UTC +++ components/device_signals/core/common/signals_features.cc -@@ -46,7 +46,7 @@ bool IsNewFunctionEnabled(NewEvFunction new_ev_functio +@@ -50,7 +50,7 @@ bool IsNewFunctionEnabled(NewEvFunction new_ev_functio } #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) // Enables the triggering of device signals consent dialog when conditions met // This feature also requires UnmanagedDeviceSignalsConsentFlowEnabled policy to // be enabled diff --git a/www/ungoogled-chromium/files/patch-components_device__signals_core_common_signals__features.h b/www/ungoogled-chromium/files/patch-components_device__signals_core_common_signals__features.h index 4dafc7ace51d..4c9c25450623 100644 --- a/www/ungoogled-chromium/files/patch-components_device__signals_core_common_signals__features.h +++ b/www/ungoogled-chromium/files/patch-components_device__signals_core_common_signals__features.h @@ -1,11 +1,11 @@ ---- components/device_signals/core/common/signals_features.h.orig 2023-08-18 10:26:52 UTC +--- components/device_signals/core/common/signals_features.h.orig 2024-11-16 12:20:41 UTC +++ components/device_signals/core/common/signals_features.h -@@ -28,7 +28,7 @@ enum class NewEvFunction { kFileSystemInfo, kSettings, +@@ -31,7 +31,7 @@ enum class NewEvFunction { kFileSystemInfo, kSettings, bool IsNewFunctionEnabled(NewEvFunction new_ev_function); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kDeviceSignalsConsentDialog); // Returns true if device signals consent dialog has been enabled for diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_event__constants.cc b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_event__constants.cc index a8aaca73b6af..63cda74a6657 100644 --- a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_event__constants.cc +++ b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_event__constants.cc @@ -1,11 +1,11 @@ ---- components/feature_engagement/public/event_constants.cc.orig 2022-10-01 07:40:07 UTC +--- components/feature_engagement/public/event_constants.cc.orig 2024-11-16 12:20:41 UTC +++ components/feature_engagement/public/event_constants.cc @@ -11,7 +11,7 @@ namespace feature_engagement { namespace events { #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) const char kNewTabOpened[] = "new_tab_opened"; const char kSixthTabOpened[] = "sixth_tab_opened"; - const char kTabGroupCreated[] = "tab_group_created"; + const char kReadingListItemAdded[] = "reading_list_item_added"; 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 94683e391397..c6e071b3cfe4 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,30 +1,30 @@ ---- components/feature_engagement/public/feature_constants.cc.orig 2024-10-27 06:40:35 UTC +--- components/feature_engagement/public/feature_constants.cc.orig 2024-11-16 12:20:41 UTC +++ components/feature_engagement/public/feature_constants.cc @@ -18,7 +18,7 @@ BASE_FEATURE(kIPHDemoMode, "IPH_DemoMode", base::FEATU 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) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) BASE_FEATURE(kEsbDownloadRowPromoFeature, "EsbDownloadRowPromo", -@@ -639,7 +639,8 @@ BASE_FEATURE(kDefaultBrowserTriggerCriteriaExperiment, +@@ -646,7 +646,8 @@ BASE_FEATURE(kDefaultBrowserTriggerCriteriaExperiment, #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(kIPHAutofillCreditCardBenefitFeature, "IPH_AutofillCreditCardBenefit", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -776,7 +777,7 @@ BASE_FEATURE(kIPHScalableIphGamingFeature, +@@ -786,7 +787,7 @@ BASE_FEATURE(kIPHScalableIphGamingFeature, base::FEATURE_DISABLED_BY_DEFAULT); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // This can be enabled by default, as the DesktopPWAsLinkCapturing // flag is needed for the IPH linked to this feature to work, and // use-cases to show the IPH are guarded by that flag. diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.h b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.h index 947edf0f3c6a..612986294373 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,30 +1,30 @@ ---- components/feature_engagement/public/feature_constants.h.orig 2024-10-27 06:40:35 UTC +--- components/feature_engagement/public/feature_constants.h.orig 2024-11-16 12:20:41 UTC +++ components/feature_engagement/public/feature_constants.h @@ -20,7 +20,7 @@ BASE_DECLARE_FEATURE(kIPHDemoMode); 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) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) BASE_DECLARE_FEATURE(kEsbDownloadRowPromoFeature); #endif -@@ -258,7 +258,8 @@ BASE_DECLARE_FEATURE(kDefaultBrowserTriggerCriteriaExp +@@ -261,7 +261,8 @@ BASE_DECLARE_FEATURE(kDefaultBrowserTriggerCriteriaExp #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(kIPHAutofillCreditCardBenefitFeature); BASE_DECLARE_FEATURE(kIPHAutofillDisabledVirtualCardSuggestionFeature); BASE_DECLARE_FEATURE(kIPHAutofillExternalAccountProfileSuggestionFeature); -@@ -309,7 +310,7 @@ BASE_DECLARE_FEATURE(kIPHScalableIphHelpAppBasedTenFea +@@ -313,7 +314,7 @@ BASE_DECLARE_FEATURE(kIPHScalableIphHelpAppBasedTenFea BASE_DECLARE_FEATURE(kIPHScalableIphGamingFeature); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kIPHDesktopPWAsLinkCapturingLaunch); BASE_DECLARE_FEATURE(kIPHToolbarManagementButtonFeature); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.cc b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.cc index 4cedcb910eac..4a890e1cf635 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,30 +1,30 @@ ---- components/feature_engagement/public/feature_list.cc.orig 2024-10-27 06:40:35 UTC +--- components/feature_engagement/public/feature_list.cc.orig 2024-11-16 12:20:41 UTC +++ components/feature_engagement/public/feature_list.cc -@@ -165,7 +165,7 @@ const base::Feature* const kAllFeatures[] = { +@@ -162,7 +162,7 @@ const base::Feature* const kAllFeatures[] = { &kIPHiOSLensOverlayEntrypointTipFeature, #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) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) &kEsbDownloadRowPromoFeature, #endif @@ -230,7 +230,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) &kIPHAutofillCreditCardBenefitFeature, &kIPHAutofillDisabledVirtualCardSuggestionFeature, &kIPHAutofillExternalAccountProfileSuggestionFeature, -@@ -281,7 +282,7 @@ const base::Feature* const kAllFeatures[] = { +@@ -282,7 +283,7 @@ const base::Feature* const kAllFeatures[] = { &kIPHScalableIphGamingFeature, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) &kIPHDesktopPWAsLinkCapturingLaunch, &kIPHToolbarManagementButtonFeature, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.h b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__list.h index 29aaca53e808..f1aefa685475 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,58 +1,58 @@ ---- components/feature_engagement/public/feature_list.h.orig 2024-10-27 06:40:35 UTC +--- components/feature_engagement/public/feature_list.h.orig 2024-11-16 12:20:41 UTC +++ components/feature_engagement/public/feature_list.h -@@ -288,7 +288,7 @@ DEFINE_VARIATION_PARAM(kIPHHomeCustomizationMenuFeatur +@@ -282,7 +282,7 @@ DEFINE_VARIATION_PARAM(kIPHHomeCustomizationMenuFeatur #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) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) DEFINE_VARIATION_PARAM(kEsbDownloadRowPromoFeature, "EsbDownloadRowPromo"); #endif -@@ -389,7 +389,8 @@ DEFINE_VARIATION_PARAM(kIPHTabGroupsSaveV2CloseGroupFe +@@ -388,7 +388,8 @@ DEFINE_VARIATION_PARAM(kIPHTabGroupsSaveV2CloseGroupFe // 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(kIPHAutofillCreditCardBenefitFeature, "IPH_AutofillCreditCardBenefit"); -@@ -481,7 +482,7 @@ DEFINE_VARIATION_PARAM(kIPHScalableIphHelpAppBasedTenF +@@ -482,7 +483,7 @@ DEFINE_VARIATION_PARAM(kIPHScalableIphHelpAppBasedTenF DEFINE_VARIATION_PARAM(kIPHScalableIphGamingFeature, "IPH_ScalableIphGaming"); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) DEFINE_VARIATION_PARAM(kIPHDesktopPWAsLinkCapturingLaunch, "IPH_DesktopPWAsLinkCapturingLaunch"); DEFINE_VARIATION_PARAM(kIPHToolbarManagementButtonFeature, -@@ -646,7 +647,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -644,7 +645,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation VARIATION_ENTRY(kIPHHomeCustomizationMenuFeature), VARIATION_ENTRY(kIPHiOSLensOverlayEntrypointTipFeature), #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) VARIATION_ENTRY(kIPHBatterySaverModeFeature), VARIATION_ENTRY(kIPHCompanionSidePanelFeature), VARIATION_ENTRY(kIPHCompanionSidePanelRegionSearchFeature), -@@ -701,7 +702,8 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -700,7 +701,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(kIPHAutofillCreditCardBenefitFeature), VARIATION_ENTRY(kIPHAutofillDisabledVirtualCardSuggestionFeature), VARIATION_ENTRY(kIPHAutofillExternalAccountProfileSuggestionFeature), -@@ -753,7 +755,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -752,7 +754,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation VARIATION_ENTRY(kIPHScalableIphGamingFeature), #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) VARIATION_ENTRY(kIPHDesktopPWAsLinkCapturingLaunch), VARIATION_ENTRY(kIPHToolbarManagementButtonFeature), #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-components_metrics_dwa_dwa__service.cc b/www/ungoogled-chromium/files/patch-components_metrics_dwa_dwa__service.cc new file mode 100644 index 000000000000..fd119f99e85d --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_metrics_dwa_dwa__service.cc @@ -0,0 +1,11 @@ +--- components/metrics/dwa/dwa_service.cc.orig 2024-11-16 12:20:41 UTC ++++ components/metrics/dwa/dwa_service.cc +@@ -88,7 +88,7 @@ void DwaService::RecordCoarseSystemInformation( + coarse_system_info->set_platform(::dwa::CoarseSystemInfo::PLATFORM_WINDOWS); + #elif BUILDFLAG(IS_MAC) + coarse_system_info->set_platform(::dwa::CoarseSystemInfo::PLATFORM_MACOS); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + coarse_system_info->set_platform(::dwa::CoarseSystemInfo::PLATFORM_LINUX); + #elif BUILDFLAG(IS_ANDROID) + // TODO(b/366276323): Populate set_platform using more granular diff --git a/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc b/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc deleted file mode 100644 index 56ceba2fc7d9..000000000000 --- a/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- components/network_session_configurator/browser/network_session_configurator.cc.orig 2024-10-27 06:40:35 UTC -+++ components/network_session_configurator/browser/network_session_configurator.cc -@@ -849,7 +849,7 @@ net::URLRequestContextBuilder::HttpCacheParams::Type C - // backport, having it behave differently than in stable would be a bigger - // problem. TODO: Does this work in later macOS releases? - #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - return net::URLRequestContextBuilder::HttpCacheParams::DISK_SIMPLE; - #else - return net::URLRequestContextBuilder::HttpCacheParams::DISK_BLOCKFILE; diff --git a/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc b/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc deleted file mode 100644 index 58792fdeecef..000000000000 --- a/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- components/network_session_configurator/browser/network_session_configurator_unittest.cc.orig 2024-10-27 06:40:35 UTC -+++ components/network_session_configurator/browser/network_session_configurator_unittest.cc -@@ -855,7 +855,7 @@ TEST_F(NetworkSessionConfiguratorTest, HostRules) { - - TEST_F(NetworkSessionConfiguratorTest, DefaultCacheBackend) { - #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - EXPECT_EQ(net::URLRequestContextBuilder::HttpCacheParams::DISK_SIMPLE, - ChooseCacheType()); - #else diff --git a/www/ungoogled-chromium/files/patch-components_optimization__guide_core_optimization__guide__features.cc b/www/ungoogled-chromium/files/patch-components_optimization__guide_core_optimization__guide__features.cc new file mode 100644 index 000000000000..9a2076dfb104 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_optimization__guide_core_optimization__guide__features.cc @@ -0,0 +1,11 @@ +--- components/optimization_guide/core/optimization_guide_features.cc.orig 2024-11-16 12:20:41 UTC ++++ components/optimization_guide/core/optimization_guide_features.cc +@@ -140,7 +140,7 @@ BASE_FEATURE(kOptimizationGuideModelExecution, + // Whether to use the on device model service in optimization guide. + BASE_FEATURE(kOptimizationGuideOnDeviceModel, + "OptimizationGuideOnDeviceModel", +-#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); diff --git a/www/ungoogled-chromium/files/patch-components_optimization__guide_core_optimization__guide__util.cc b/www/ungoogled-chromium/files/patch-components_optimization__guide_core_optimization__guide__util.cc index 4c9202219f7a..797c19bc0be2 100644 --- a/www/ungoogled-chromium/files/patch-components_optimization__guide_core_optimization__guide__util.cc +++ b/www/ungoogled-chromium/files/patch-components_optimization__guide_core_optimization__guide__util.cc @@ -1,11 +1,11 @@ ---- components/optimization_guide/core/optimization_guide_util.cc.orig 2024-07-31 14:19:23 UTC +--- components/optimization_guide/core/optimization_guide_util.cc.orig 2024-11-16 12:20:41 UTC +++ components/optimization_guide/core/optimization_guide_util.cc -@@ -35,7 +35,7 @@ optimization_guide::proto::Platform GetPlatform() { +@@ -37,7 +37,7 @@ optimization_guide::proto::Platform GetPlatform() { return optimization_guide::proto::PLATFORM_CHROMEOS; #elif BUILDFLAG(IS_ANDROID) return optimization_guide::proto::PLATFORM_ANDROID; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return optimization_guide::proto::PLATFORM_LINUX; #else return optimization_guide::proto::PLATFORM_UNDEFINED; diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.cc index e58d5c9530cd..fa87d3083d4a 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.cc +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.cc @@ -1,20 +1,20 @@ ---- components/password_manager/core/browser/features/password_features.cc.orig 2024-10-27 06:40:35 UTC +--- components/password_manager/core/browser/features/password_features.cc.orig 2024-11-16 12:20:41 UTC +++ components/password_manager/core/browser/features/password_features.cc -@@ -41,7 +41,7 @@ BASE_FEATURE(kClearUndecryptablePasswords, +@@ -45,7 +45,7 @@ BASE_FEATURE(kClearUndecryptablePasswords, BASE_FEATURE(kClearUndecryptablePasswordsOnSync, "ClearUndecryptablePasswordsInSync", #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -92,7 +92,7 @@ BASE_FEATURE(kPasswordManualFallbackAvailable, - "PasswordManualFallbackAvailable", +@@ -108,7 +108,7 @@ BASE_FEATURE(kReuseDetectionBasedOnPasswordHashes, + "ReuseDetectionBasedOnPasswordHashes", base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_FEATURE(kRestartToGainAccessToKeychain, "RestartToGainAccessToKeychain", #if BUILDFLAG(IS_MAC) diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.h b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.h index 9dcf38da91e7..03b01732965a 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.h +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_features_password__features.h @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/features/password_features.h.orig 2024-10-27 06:40:35 UTC +--- components/password_manager/core/browser/features/password_features.h.orig 2024-11-16 12:20:41 UTC +++ components/password_manager/core/browser/features/password_features.h -@@ -93,7 +93,7 @@ BASE_DECLARE_FEATURE(kPasswordManagerLogToTerminal); - // Enables triggering password suggestions through the context menu. - BASE_DECLARE_FEATURE(kPasswordManualFallbackAvailable); +@@ -106,7 +106,7 @@ BASE_DECLARE_FEATURE(kPasswordManualFallbackAvailable) + // Detects password reuse based on hashed password values. + BASE_DECLARE_FEATURE(kReuseDetectionBasedOnPasswordHashes); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables "Needs access to keychain, restart chrome" bubble and banner. BASE_DECLARE_FEATURE(kRestartToGainAccessToKeychain); #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager.cc index ceb227822cef..3885d4d9a9ed 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager.cc +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager.cc @@ -1,20 +1,20 @@ ---- components/password_manager/core/browser/password_manager.cc.orig 2024-10-01 07:26:23 UTC +--- components/password_manager/core/browser/password_manager.cc.orig 2024-11-16 12:20:41 UTC +++ components/password_manager/core/browser/password_manager.cc -@@ -414,7 +414,7 @@ void PasswordManager::RegisterProfilePrefs( +@@ -419,7 +419,7 @@ void PasswordManager::RegisterProfilePrefs( prefs::kAutofillableCredentialsAccountStoreLoginDatabase, false); #endif // BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) registry->RegisterBooleanPref(prefs::kPasswordSharingEnabled, true); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterIntegerPref(prefs::kRelaunchChromeBubbleDismissedCounter, 0); #endif -@@ -427,7 +427,7 @@ void PasswordManager::RegisterProfilePrefs( +@@ -432,7 +432,7 @@ void PasswordManager::RegisterProfilePrefs( #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_IOS) + BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kDeletingUndecryptablePasswordsEnabled, true); #endif diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager__client.h b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager__client.h index d563d935df33..94f8c0ba47d4 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager__client.h +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager__client.h @@ -1,20 +1,20 @@ ---- components/password_manager/core/browser/password_manager_client.h.orig 2024-10-27 06:40:35 UTC +--- components/password_manager/core/browser/password_manager_client.h.orig 2024-11-16 12:20:41 UTC +++ components/password_manager/core/browser/password_manager_client.h @@ -30,7 +30,7 @@ #include "net/cert/cert_status_flags.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/i18n/rtl.h" #include "components/password_manager/core/browser/password_cross_domain_confirmation_popup_controller.h" #include "ui/gfx/geometry/rect_f.h" -@@ -535,7 +535,7 @@ class PasswordManagerClient { +@@ -541,7 +541,7 @@ class PasswordManagerClient { CredentialsCallback callback); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Shows the bubble with the details of the `form`. virtual void OpenPasswordDetailsBubble( diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manual__fallback__flow.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manual__fallback__flow.cc index a85a7f093337..2bab7a5cac63 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manual__fallback__flow.cc +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manual__fallback__flow.cc @@ -1,29 +1,29 @@ ---- components/password_manager/core/browser/password_manual_fallback_flow.cc.orig 2024-10-27 06:40:35 UTC +--- components/password_manager/core/browser/password_manual_fallback_flow.cc.orig 2024-11-16 12:20:41 UTC +++ components/password_manager/core/browser/password_manual_fallback_flow.cc @@ -43,7 +43,7 @@ std::u16string GetUsernameFromLabel(const std::u16stri } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Returns the password form corresponding to the `payload` data. In most // cases there is only one such form stored, but having more than one or no // forms is also possible. If there is more than one form, showing any of them @@ -281,7 +281,7 @@ void PasswordManualFallbackFlow::DidAcceptSuggestion( } case autofill::SuggestionType::kViewPasswordDetails: { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::optional credentials = GetCorrespondingPasswordForm( suggestion.GetPayload(), -@@ -413,7 +413,7 @@ void PasswordManualFallbackFlow::EnsureCrossDomainPass +@@ -418,7 +418,7 @@ void PasswordManualFallbackFlow::EnsureCrossDomainPass const Suggestion::PasswordSuggestionDetails& payload, base::OnceClosure on_allowed) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (payload.is_cross_domain) { cross_domain_confirmation_popup_controller_ = password_client_->ShowCrossDomainConfirmationPopup( diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_stub__password__manager__client.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_stub__password__manager__client.cc index 0c4ef119b698..c99c468820e0 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_stub__password__manager__client.cc +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_stub__password__manager__client.cc @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/stub_password_manager_client.cc.orig 2024-10-27 06:40:35 UTC +--- components/password_manager/core/browser/stub_password_manager_client.cc.orig 2024-11-16 12:20:41 UTC +++ components/password_manager/core/browser/stub_password_manager_client.cc -@@ -187,7 +187,7 @@ version_info::Channel StubPasswordManagerClient::GetCh +@@ -190,7 +190,7 @@ version_info::Channel StubPasswordManagerClient::GetCh } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void StubPasswordManagerClient::OpenPasswordDetailsBubble( const password_manager::PasswordForm& form) {} diff --git a/www/ungoogled-chromium/files/patch-components_performance__manager_decorators_process__metrics__decorator.cc b/www/ungoogled-chromium/files/patch-components_performance__manager_decorators_process__metrics__decorator.cc new file mode 100644 index 000000000000..599e2770456d --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_performance__manager_decorators_process__metrics__decorator.cc @@ -0,0 +1,11 @@ +--- components/performance_manager/decorators/process_metrics_decorator.cc.orig 2024-11-16 12:20:41 UTC ++++ components/performance_manager/decorators/process_metrics_decorator.cc +@@ -264,7 +264,7 @@ void ProcessMetricsDecorator::DidGetMemoryUsage( + // RSS and PMF to each node proportionally to its V8 heap size. + uint64_t process_rss = process_dump_iter.os_dump().resident_set_kb; + process_node->set_resident_set_kb(process_rss); +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + process_node->set_private_swap_kb( + process_dump_iter.os_dump().private_footprint_swap_kb); + #endif 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 9b424e549daa..8a22f1ac2fdd 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 2024-10-27 06:40:35 UTC +--- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2024-11-16 12:20:41 UTC +++ components/policy/core/common/cloud/cloud_policy_client.cc -@@ -703,7 +703,7 @@ void CloudPolicyClient::FetchPolicy(PolicyFetchReason +@@ -720,7 +720,7 @@ void CloudPolicyClient::FetchPolicy(PolicyFetchReason fetch_request->set_invalidation_payload(invalidation_payload_); } } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Only set browser device identifier for CBCM Chrome cloud policy on // desktop. if (type_to_fetch.first == diff --git a/www/ungoogled-chromium/files/patch-components_safe__browsing_core_common_features.cc b/www/ungoogled-chromium/files/patch-components_safe__browsing_core_common_features.cc index 71a7e29fd223..5406ff98cf65 100644 --- a/www/ungoogled-chromium/files/patch-components_safe__browsing_core_common_features.cc +++ b/www/ungoogled-chromium/files/patch-components_safe__browsing_core_common_features.cc @@ -1,11 +1,11 @@ ---- components/safe_browsing/core/common/features.cc.orig 2024-10-27 06:40:35 UTC +--- components/safe_browsing/core/common/features.cc.orig 2024-11-16 12:20:41 UTC +++ components/safe_browsing/core/common/features.cc -@@ -237,7 +237,7 @@ BASE_FEATURE(kRippleForEnhancedProtection, +@@ -249,7 +249,7 @@ constexpr base::FeatureParam kRedWarningS BASE_FEATURE(kSafeBrowsingAsyncRealTimeCheck, "SafeBrowsingAsyncRealTimeCheck", #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) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/ungoogled-chromium/files/patch-components_search__engines_search__engine__choice_search__engine__choice__service.cc b/www/ungoogled-chromium/files/patch-components_search__engines_search__engine__choice_search__engine__choice__service.cc index 472d31534680..dfd67c6a8bf3 100644 --- a/www/ungoogled-chromium/files/patch-components_search__engines_search__engine__choice_search__engine__choice__service.cc +++ b/www/ungoogled-chromium/files/patch-components_search__engines_search__engine__choice_search__engine__choice__service.cc @@ -1,11 +1,11 @@ ---- components/search_engines/search_engine_choice/search_engine_choice_service.cc.orig 2024-10-27 06:40:35 UTC +--- components/search_engines/search_engine_choice/search_engine_choice_service.cc.orig 2024-11-16 12:20:41 UTC +++ components/search_engines/search_engine_choice/search_engine_choice_service.cc -@@ -594,7 +594,7 @@ void SearchEngineChoiceService::RegisterLocalStatePref +@@ -613,7 +613,7 @@ void SearchEngineChoiceService::RegisterLocalStatePref int SearchEngineChoiceService::GetCountryIdInternal() { // `country_codes::kCountryIDAtInstall` may not be set yet. -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Android, ChromeOS and Linux, `country_codes::kCountryIDAtInstall` is // computed asynchronously using platform-specific signals, and may not be // available yet. diff --git a/www/ungoogled-chromium/files/patch-components_search__engines_template__url__service.cc b/www/ungoogled-chromium/files/patch-components_search__engines_template__url__service.cc index fd88d47278b6..f056c9a8aee1 100644 --- a/www/ungoogled-chromium/files/patch-components_search__engines_template__url__service.cc +++ b/www/ungoogled-chromium/files/patch-components_search__engines_template__url__service.cc @@ -1,11 +1,11 @@ ---- components/search_engines/template_url_service.cc.orig 2024-10-27 06:40:35 UTC +--- components/search_engines/template_url_service.cc.orig 2024-11-16 12:20:41 UTC +++ components/search_engines/template_url_service.cc -@@ -3075,7 +3075,7 @@ bool TemplateURLService::MatchesDefaultSearchProvider( +@@ -3084,7 +3084,7 @@ bool TemplateURLService::MatchesDefaultSearchProvider( std::unique_ptr TemplateURLService::GetEnterpriseSiteSearchManager(PrefService* prefs) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled(omnibox::kSiteSearchSettingsPolicy) ? std::make_unique( prefs, base::BindRepeating( diff --git a/www/ungoogled-chromium/files/patch-components_services_on__device__translation_sandbox__hook.cc b/www/ungoogled-chromium/files/patch-components_services_on__device__translation_sandbox__hook.cc new file mode 100644 index 000000000000..1941090bdf77 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_services_on__device__translation_sandbox__hook.cc @@ -0,0 +1,43 @@ +--- components/services/on_device_translation/sandbox_hook.cc.orig 2024-11-16 12:20:41 UTC ++++ components/services/on_device_translation/sandbox_hook.cc +@@ -7,12 +7,15 @@ + #include "components/services/on_device_translation/translate_kit_client.h" + #include "sandbox/linux/syscall_broker/broker_command.h" + ++#if !BUILDFLAG(IS_BSD) + using sandbox::syscall_broker::BrokerFilePermission; + using sandbox::syscall_broker::MakeBrokerCommandSet; ++#endif + + namespace on_device_translation { + namespace { + ++#if !BUILDFLAG(IS_BSD) + // Gets the file permissions required by the TranslateKit + std::vector GetOnDeviceTranslationFilePermissions() { + std::vector permissions{ +@@ -21,6 +24,7 @@ std::vector GetOnDeviceTranslati + }; + return permissions; + } ++#endif + + } // namespace + +@@ -29,6 +33,7 @@ bool OnDeviceTranslationSandboxHook( + // Call `TranslateKitClient::Get()` to load libtranslatekit.so + TranslateKitClient::Get(); + ++#if !BUILDFLAG(IS_BSD) + auto* instance = sandbox::policy::SandboxLinux::GetInstance(); + instance->StartBrokerProcess(MakeBrokerCommandSet({ + sandbox::syscall_broker::COMMAND_OPEN, +@@ -36,7 +41,7 @@ bool OnDeviceTranslationSandboxHook( + GetOnDeviceTranslationFilePermissions(), + options); + instance->EngageNamespaceSandboxIfPossible(); +- ++#endif + return true; + } + diff --git a/www/ungoogled-chromium/files/patch-components_services_on__device__translation_sandbox__hook.h b/www/ungoogled-chromium/files/patch-components_services_on__device__translation_sandbox__hook.h new file mode 100644 index 000000000000..1bd75fffe1d8 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_services_on__device__translation_sandbox__hook.h @@ -0,0 +1,16 @@ +--- components/services/on_device_translation/sandbox_hook.h.orig 2024-11-16 12:20:41 UTC ++++ components/services/on_device_translation/sandbox_hook.h +@@ -5,7 +5,13 @@ + #ifndef COMPONENTS_SERVICES_ON_DEVICE_TRANSLATION_SANDBOX_HOOK_H_ + #define COMPONENTS_SERVICES_ON_DEVICE_TRANSLATION_SANDBOX_HOOK_H_ + ++#include "build/build_config.h" ++ ++#if BUILDFLAG(IS_BSD) ++#include "sandbox/policy/sandbox.h" ++#else + #include "sandbox/policy/linux/sandbox_linux.h" ++#endif + + namespace on_device_translation { + diff --git a/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_features.cc b/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_features.cc index 715f4cad20d2..77fc605401bc 100644 --- a/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_features.cc +++ b/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_features.cc @@ -1,45 +1,54 @@ ---- components/supervised_user/core/common/features.cc.orig 2024-10-27 06:40:35 UTC +--- components/supervised_user/core/common/features.cc.orig 2024-11-16 12:20:41 UTC +++ components/supervised_user/core/common/features.cc @@ -66,7 +66,7 @@ BASE_FEATURE(kUpdatedSupervisedUserExtensionApprovalSt "UpdatedSupervisedUserExtensionApprovalStrings", base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_FEATURE(kEnableExtensionsPermissionsForSupervisedUsersOnDesktop, "EnableExtensionsPermissionsForSupervisedUsersOnDesktop", base::FEATURE_DISABLED_BY_DEFAULT); @@ -81,7 +81,7 @@ bool IsSupervisedUserSkipParentApprovalToInstallExtens #if BUILDFLAG(IS_CHROMEOS) return base::FeatureList::IsEnabled( kEnableSupervisedUserSkipParentApprovalToInstallExtensions); -#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) bool skipParentApprovalEnabled = base::FeatureList::IsEnabled( kEnableSupervisedUserSkipParentApprovalToInstallExtensions); bool permissionExtensionsForSupervisedUsersEnabled = @@ -106,13 +106,13 @@ BASE_FEATURE(kSupervisedUserProfileSigninIPH, "SupervisedUserProfileSigninIPH", base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_FEATURE(kShowKiteForSupervisedUsers, "ShowKiteForSupervisedUsers", base::FEATURE_DISABLED_BY_DEFAULT); #endif -#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(kHideGuestModeForSupervisedUsers, "HideGuestModeForSupervisedUsers", base::FEATURE_DISABLED_BY_DEFAULT); @@ -122,7 +122,7 @@ BASE_FEATURE(kForceSafeSearchForUnauthenticatedSupervi "ForceSafeSearchForUnauthenticatedSupervisedUsers", base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_FEATURE(kForceSupervisedUserReauthenticationForYouTube, "ForceSupervisedUserReauthenticationForYouTube", base::FEATURE_DISABLED_BY_DEFAULT); +@@ -172,7 +172,7 @@ BASE_FEATURE(kReplaceSupervisionSystemCapabilitiesWith + + BASE_FEATURE(kFetchListFamilyMembersWithCapability, + "FetchListFamilyMembersWithCapability", +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT + #else + base::FEATURE_DISABLED_BY_DEFAULT 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 987177c7633d..776a89cbf97b 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 2024-10-27 06:40:35 UTC +--- components/viz/service/display/skia_renderer.cc.orig 2024-11-16 12:20:41 UTC +++ components/viz/service/display/skia_renderer.cc -@@ -1363,7 +1363,7 @@ void SkiaRenderer::ClearFramebuffer() { +@@ -1364,7 +1364,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 210f88586ff2..6f15c3094593 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 2024-10-27 06:40:35 UTC +--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2024-11-16 12:20:41 UTC +++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc @@ -113,7 +113,7 @@ RootCompositorFrameSinkImpl::Create( output_surface->SetNeedsSwapSizeNotifications( params->send_swap_size_notifications); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) // For X11, we need notify client about swap completion after resizing, so the // client can use it for synchronize with X11 WM. output_surface->SetNeedsSwapSizeNotifications(true); -@@ -793,7 +793,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw +@@ -792,7 +792,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw if (display_client_ && enable_swap_completion_callback_) { display_client_->DidCompleteSwapWithSize(pixel_size); } -#elif BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) if (display_client_ && pixel_size != last_swap_pixel_size_) { last_swap_pixel_size_ = pixel_size; display_client_->DidCompleteSwapWithNewSize(last_swap_pixel_size_); diff --git a/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn b/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn index ec62947c59f9..b3fddb8b7b0a 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn @@ -1,33 +1,33 @@ ---- content/browser/BUILD.gn.orig 2024-10-27 06:40:35 UTC +--- content/browser/BUILD.gn.orig 2024-11-16 12:20:41 UTC +++ content/browser/BUILD.gn -@@ -2434,6 +2434,14 @@ source_set("browser") { +@@ -2435,6 +2435,14 @@ source_set("browser") { ] } + if (is_bsd) { + sources += [ + "file_system_access/file_path_watcher/file_path_watcher_bsd.cc", + "file_system_access/file_path_watcher/file_path_watcher_kqueue.cc", + "file_system_access/file_path_watcher/file_path_watcher_kqueue.h", + ] + } + if (is_linux || is_chromeos) { sources += [ "child_process_launcher_helper_linux.cc", -@@ -2477,6 +2485,15 @@ source_set("browser") { +@@ -2478,6 +2486,15 @@ source_set("browser") { if (allow_oop_video_decoder) { sources += [ "media/stable_video_decoder_factory.cc" ] deps += [ "//media/mojo/mojom/stable:stable_video_decoder" ] + } + + if (is_bsd) { + sources -= [ + "file_system_access/file_path_watcher/file_path_watcher_inotify.cc", + "file_system_access/file_path_watcher/file_path_watcher_inotify.h", + "sandbox_ipc_linux.cc", + "sandbox_ipc_linux.h", + ] } if (is_chromeos) { diff --git a/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper.h b/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper.h index 3d19377a1691..600b34061227 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper.h +++ b/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper.h @@ -1,11 +1,11 @@ ---- content/browser/child_process_launcher_helper.h.orig 2024-10-01 07:26:23 UTC +--- content/browser/child_process_launcher_helper.h.orig 2024-11-16 12:20:41 UTC +++ content/browser/child_process_launcher_helper.h -@@ -293,7 +293,7 @@ class ChildProcessLauncherHelper +@@ -304,7 +304,7 @@ class ChildProcessLauncherHelper std::optional process_id_ = std::nullopt; #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The priority of the process. The state is stored to avoid changing the // setting repeatedly. std::optional priority_; diff --git a/www/ungoogled-chromium/files/patch-content_browser_gpu_compositor__util.cc b/www/ungoogled-chromium/files/patch-content_browser_gpu_compositor__util.cc index 0645c3ca4b51..359be2f9151b 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_gpu_compositor__util.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_gpu_compositor__util.cc @@ -1,20 +1,20 @@ ---- content/browser/gpu/compositor_util.cc.orig 2024-08-26 14:40:28 UTC +--- content/browser/gpu/compositor_util.cc.orig 2024-11-16 12:20:41 UTC +++ content/browser/gpu/compositor_util.cc @@ -153,7 +153,7 @@ std::vector GetGpuFeatureData( "video_decode", SafeGetFeatureStatus( gpu_feature_info, gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - !base::FeatureList::IsEnabled(media::kVaapiVideoDecodeLinux) || + !base::FeatureList::IsEnabled(media::kAcceleratedVideoDecodeLinux) || #endif // BUILDFLAG(IS_LINUX) command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode)), @@ -165,7 +165,7 @@ std::vector GetGpuFeatureData( "video_encode", SafeGetFeatureStatus( gpu_feature_info, gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - !base::FeatureList::IsEnabled(media::kVaapiVideoEncodeLinux)), + !base::FeatureList::IsEnabled(media::kAcceleratedVideoEncodeLinux)), #else command_line.HasSwitch(switches::kDisableAcceleratedVideoEncode)), 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 8fe062cac3ef..6ca3d2d1e4eb 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 2024-10-27 06:40:35 UTC +--- content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2024-11-16 12:20:41 UTC +++ content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1661,7 +1661,7 @@ void GpuDataManagerImplPrivate::RecordCompositingMode( +@@ -1672,7 +1672,7 @@ void GpuDataManagerImplPrivate::RecordCompositingMode( UMA_HISTOGRAM_ENUMERATION("GPU.CompositingMode", compositing_mode); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool GpuDataManagerImplPrivate::IsGpuMemoryBufferNV12Supported() { return is_gpu_memory_buffer_NV12_supported_; } diff --git a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.h b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.h index 16cf0f26b644..f963975cf5e5 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.h +++ b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.h @@ -1,20 +1,20 @@ ---- content/browser/gpu/gpu_data_manager_impl_private.h.orig 2024-08-26 14:40:28 UTC +--- content/browser/gpu/gpu_data_manager_impl_private.h.orig 2024-11-16 12:20:41 UTC +++ content/browser/gpu/gpu_data_manager_impl_private.h @@ -147,7 +147,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { void OnDisplayMetricsChanged(const display::Display& display, uint32_t changed_metrics); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool IsGpuMemoryBufferNV12Supported(); void SetGpuMemoryBufferNV12Supported(bool supported); #endif // BUILDFLAG(IS_LINUX) -@@ -303,7 +303,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { +@@ -311,7 +311,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { bool application_is_visible_ = true; bool disable_gpu_compositing_ = false; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool is_gpu_memory_buffer_NV12_supported_ = false; #endif // BUILDFLAG(IS_LINUX) }; 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 deleted file mode 100644 index f503d407e612..000000000000 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc +++ /dev/null @@ -1,55 +0,0 @@ ---- content/browser/renderer_host/render_process_host_impl.cc.orig 2024-10-27 06:40:35 UTC -+++ content/browser/renderer_host/render_process_host_impl.cc -@@ -221,7 +221,7 @@ - #include "third_party/blink/public/mojom/android_font_lookup/android_font_lookup.mojom.h" - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include - - #include "components/services/font/public/mojom/font_service.mojom.h" // nogncheck -@@ -1083,7 +1083,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; -@@ -1264,7 +1264,7 @@ RenderProcessHostImpl::IOThreadHostImpl::~IOThreadHost - - void RenderProcessHostImpl::IOThreadHostImpl::SetPid( - base::ProcessId child_pid) { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - child_thread_type_switcher_.SetPid(child_pid); - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) - } -@@ -3287,7 +3287,7 @@ void RenderProcessHostImpl::AppendRendererCommandLine( - base::TimeTicks::UnixEpoch().since_origin().InMicroseconds())); - } - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Append `kDisableVideoCaptureUseGpuMemoryBuffer` flag if there is no support - // for NV12 GPU memory buffer. - if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled() && -@@ -3343,6 +3343,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin - switches::kDisableSpeechAPI, - switches::kDisableThreadedCompositing, - switches::kDisableTouchDragDrop, -+ switches::kDisableUnveil, - switches::kDisableV8IdleTasks, - switches::kDisableVideoCaptureUseGpuMemoryBuffer, - switches::kDisableWebGLImageChromium, -@@ -5116,7 +5117,7 @@ uint64_t RenderProcessHostImpl::GetPrivateMemoryFootpr - // - Win: https://crbug.com/707022 . - uint64_t total_size = 0; - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - total_size = dump->platform_private_footprint->rss_anon_bytes + - dump->platform_private_footprint->vm_swap_bytes; - #elif BUILDFLAG(IS_APPLE) 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 374cec5bfcd4..2146bf606aed 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,29 +1,29 @@ ---- content/browser/renderer_host/render_process_host_impl.h.orig 2024-10-27 06:40:35 UTC +--- content/browser/renderer_host/render_process_host_impl.h.orig 2024-11-16 12:20:41 UTC +++ content/browser/renderer_host/render_process_host_impl.h @@ -102,7 +102,7 @@ #include "media/fuchsia_media_codec_provider_impl.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/browser/child_thread_type_switcher_linux.h" #include "media/mojo/mojom/video_encode_accelerator.mojom.h" #endif @@ -612,7 +612,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) -@@ -977,7 +977,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -973,7 +973,7 @@ class CONTENT_EXPORT RenderProcessHostImpl std::unique_ptr binders_; mojo::Receiver receiver_{this}; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::Remote video_encode_accelerator_factory_remote_; ChildThreadTypeSwitcher child_thread_type_switcher_; 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 85239f14e36b..4f4e93ae060b 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 2024-10-27 06:40:35 UTC +--- content/browser/renderer_host/render_view_host_impl.cc.orig 2024-11-16 12:20:41 UTC +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -275,7 +275,7 @@ void RenderViewHostImpl::GetPlatformSpecificPrefs( +@@ -274,7 +274,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) base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); if (command_line->HasSwitch(switches::kSystemFontFamily)) { prefs->system_font_family_name = diff --git a/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.cc b/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.cc index 8acfde2eb996..95b259afd440 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.cc @@ -1,72 +1,72 @@ ---- content/browser/utility_process_host.cc.orig 2024-10-27 06:40:35 UTC +--- content/browser/utility_process_host.cc.orig 2024-11-16 12:20:41 UTC +++ content/browser/utility_process_host.cc @@ -62,7 +62,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" -@@ -75,7 +75,7 @@ - #include "services/network/public/mojom/network_service.mojom.h" +@@ -76,7 +76,7 @@ #endif --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "base/task/sequenced_task_runner.h" #include "components/viz/host/gpu_client.h" #include "media/capture/capture_switches.h" -@@ -86,7 +86,7 @@ namespace content { +@@ -87,7 +87,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; -@@ -151,7 +151,7 @@ UtilityProcessHost::UtilityProcessHost(std::unique_ptr - started_(false), +@@ -153,7 +153,7 @@ UtilityProcessHost::UtilityProcessHost(std::unique_ptr name_(u"utility process"), file_data_(std::make_unique()), --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) allowed_gpu_(false), gpu_client_(nullptr, base::OnTaskRunnerDeleter(nullptr)), #endif -@@ -210,7 +210,7 @@ void UtilityProcessHost::SetPreloadLibraries( - #endif // BUILDFLAG(IS_WIN) +@@ -213,7 +213,7 @@ void UtilityProcessHost::SetPreloadLibraries( void UtilityProcessHost::SetAllowGpuClient() { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) allowed_gpu_ = true; #endif } -@@ -406,7 +406,7 @@ bool UtilityProcessHost::StartProcess() { +@@ -410,7 +410,7 @@ bool UtilityProcessHost::StartProcess() { file_data_->files_to_preload.merge(GetV8SnapshotFilesToPreload(*cmd_line)); #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) { -@@ -417,13 +417,13 @@ bool UtilityProcessHost::StartProcess() { +@@ -421,13 +421,13 @@ bool UtilityProcessHost::StartProcess() { } - #endif // BUILDFLAG(IS_LINUX) + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Pass `kVideoCaptureUseGpuMemoryBuffer` flag to video capture service only // when the video capture use GPU memory buffer enabled. if (metrics_name_ == video_capture::mojom::VideoCaptureService::Name_) { bool pass_gpu_buffer_flag = switches::IsVideoCaptureUseGpuMemoryBufferEnabled(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Check if NV12 GPU memory buffer supported at the same time. pass_gpu_buffer_flag = pass_gpu_buffer_flag && 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 index 6e063367c502..e830d3460b4f 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.h +++ b/www/ungoogled-chromium/files/patch-content_browser_utility__process__host.h @@ -1,20 +1,20 @@ ---- content/browser/utility_process_host.h.orig 2024-05-23 20:04:36 UTC +--- content/browser/utility_process_host.h.orig 2024-11-16 12:20:41 UTC +++ content/browser/utility_process_host.h -@@ -33,7 +33,7 @@ namespace base { - class Thread; +@@ -34,7 +34,7 @@ class Thread; } // namespace base --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) namespace viz { class GpuClient; } // namespace viz -@@ -200,7 +200,7 @@ class CONTENT_EXPORT UtilityProcessHost - }; +@@ -202,7 +202,7 @@ class CONTENT_EXPORT UtilityProcessHost LaunchState launch_state_ = LaunchState::kLaunchInProgress; --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) bool allowed_gpu_; 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 fb3d0f49a9e7..fbd89d6396f4 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,33 +1,35 @@ ---- content/browser/utility_process_host_receiver_bindings.cc.orig 2024-04-23 07:42:17 UTC +--- content/browser/utility_process_host_receiver_bindings.cc.orig 2024-11-16 12:20:41 UTC +++ content/browser/utility_process_host_receiver_bindings.cc -@@ -10,12 +10,12 @@ +@@ -10,13 +10,13 @@ #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 --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "components/viz/host/gpu_client.h" #include "content/public/browser/gpu_client.h" #endif -@@ -24,13 +24,13 @@ namespace content { +@@ -25,14 +25,14 @@ 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) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (allowed_gpu_) { // TODO(crbug.com/328099369) Remove once all clients get this directly. if (auto gpu_receiver = receiver.As()) { 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 a4b83e9e1809..03e40e2fd79e 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,28 +1,50 @@ ---- content/browser/utility_sandbox_delegate.cc.orig 2024-10-27 06:40:35 UTC +--- content/browser/utility_sandbox_delegate.cc.orig 2024-11-16 12:20:41 UTC +++ content/browser/utility_sandbox_delegate.cc @@ -76,10 +76,10 @@ UtilitySandboxedProcessLauncherDelegate:: #if BUILDFLAG(IS_FUCHSIA) sandbox_type_ == sandbox::mojom::Sandbox::kVideoCapture || #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoDecoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoEncoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -137,10 +137,10 @@ ZygoteCommunication* UtilitySandboxedProcessLauncherDe +@@ -93,10 +93,10 @@ UtilitySandboxedProcessLauncherDelegate:: + #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + sandbox_type_ == sandbox::mojom::Sandbox::kScreenAI || + #endif +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + sandbox_type_ == sandbox::mojom::Sandbox::kVideoEffects || + #endif +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + sandbox_type_ == sandbox::mojom::Sandbox::kOnDeviceTranslation || + #endif + sandbox_type_ == sandbox::mojom::Sandbox::kAudio || +@@ -142,10 +142,10 @@ ZygoteCommunication* UtilitySandboxedProcessLauncherDe // process upon startup. if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork || sandbox_type_ == sandbox::mojom::Sandbox::kOnDeviceModelExecution || -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoDecoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoEncoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS_ASH) +@@ -163,7 +163,7 @@ ZygoteCommunication* UtilitySandboxedProcessLauncherDe + #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + sandbox_type_ == sandbox::mojom::Sandbox::kScreenAI || + #endif +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + sandbox_type_ == sandbox::mojom::Sandbox::kVideoEffects || + sandbox_type_ == sandbox::mojom::Sandbox::kOnDeviceTranslation || + #endif // BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_input_input__device__change__observer.cc b/www/ungoogled-chromium/files/patch-content_browser_web__contents_slow__web__preference__cache.cc similarity index 68% rename from www/ungoogled-chromium/files/patch-content_browser_renderer__host_input_input__device__change__observer.cc rename to www/ungoogled-chromium/files/patch-content_browser_web__contents_slow__web__preference__cache.cc index ba10c72162f8..eb6db162575c 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_input_input__device__change__observer.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_web__contents_slow__web__preference__cache.cc @@ -1,29 +1,29 @@ ---- content/browser/renderer_host/input/input_device_change_observer.cc.orig 2022-10-01 07:40:07 UTC -+++ content/browser/renderer_host/input/input_device_change_observer.cc -@@ -9,7 +9,7 @@ +--- content/browser/web_contents/slow_web_preference_cache.cc.orig 2024-11-16 12:20:41 UTC ++++ content/browser/web_contents/slow_web_preference_cache.cc +@@ -16,7 +16,7 @@ #if BUILDFLAG(IS_WIN) #include "ui/events/devices/input_device_observer_win.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "ui/events/devices/device_data_manager.h" #elif BUILDFLAG(IS_ANDROID) - #include "ui/events/devices/input_device_observer_android.h" -@@ -21,7 +21,7 @@ InputDeviceChangeObserver::InputDeviceChangeObserver(R - render_view_host_impl_ = rvhi; + #include "ui/base/device_form_factor.h" +@@ -54,7 +54,7 @@ SlowWebPreferenceCache::SlowWebPreferenceCache() { + #if BUILDFLAG(IS_WIN) ui::InputDeviceObserverWin::GetInstance()->AddObserver(this); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ui::DeviceDataManager::GetInstance()->AddObserver(this); #elif BUILDFLAG(IS_ANDROID) ui::InputDeviceObserverAndroid::GetInstance()->AddObserver(this); -@@ -31,7 +31,7 @@ InputDeviceChangeObserver::InputDeviceChangeObserver(R - InputDeviceChangeObserver::~InputDeviceChangeObserver() { +@@ -64,7 +64,7 @@ SlowWebPreferenceCache::SlowWebPreferenceCache() { + SlowWebPreferenceCache::~SlowWebPreferenceCache() { #if BUILDFLAG(IS_WIN) ui::InputDeviceObserverWin::GetInstance()->RemoveObserver(this); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ui::DeviceDataManager::GetInstance()->RemoveObserver(this); #elif BUILDFLAG(IS_ANDROID) ui::InputDeviceObserverAndroid::GetInstance()->RemoveObserver(this); diff --git a/www/ungoogled-chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc b/www/ungoogled-chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc index 9b58774565a4..6dbf21e226f1 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc @@ -1,29 +1,29 @@ ---- content/browser/web_contents/web_contents_view_aura.cc.orig 2024-10-01 07:26:23 UTC +--- content/browser/web_contents/web_contents_view_aura.cc.orig 2024-11-16 12:20:41 UTC +++ content/browser/web_contents/web_contents_view_aura.cc @@ -174,7 +174,7 @@ class WebDragSourceAura : public content::WebContentsO raw_ptr window_; }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Fill out the OSExchangeData with a file contents, synthesizing a name if // necessary. void PrepareDragForFileContents(const DropData& drop_data, @@ -258,7 +258,7 @@ void PrepareDragData(const DropData& drop_data, if (!drop_data.download_metadata.empty()) PrepareDragForDownload(drop_data, provider, web_contents); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // We set the file contents before the URL because the URL also sets file // contents (to a .URL shortcut). We want to prefer file content data over // a shortcut so we add it first. -@@ -1324,7 +1324,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* +@@ -1326,7 +1326,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* // Linux window managers like to handle raise-on-click themselves. If we // raise-on-click manually, this may override user settings that prevent // focus-stealing. -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // It is possible for the web-contents to be destroyed while it is being // activated. Use a weak-ptr to track whether that happened or not. // More in https://crbug.com/1040725 diff --git a/www/ungoogled-chromium/files/patch-content_child_child__process.cc b/www/ungoogled-chromium/files/patch-content_child_child__process.cc index ebdc3ca2e873..78a499a17bbd 100644 --- a/www/ungoogled-chromium/files/patch-content_child_child__process.cc +++ b/www/ungoogled-chromium/files/patch-content_child_child__process.cc @@ -1,20 +1,20 @@ ---- content/child/child_process.cc.orig 2024-10-01 07:26:23 UTC +--- content/child/child_process.cc.orig 2024-11-16 12:20:41 UTC +++ content/child/child_process.cc -@@ -32,7 +32,7 @@ +@@ -31,7 +31,7 @@ #include "content/common/android/cpu_time_metrics.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/child/sandboxed_process_thread_type_handler.h" #endif -@@ -179,7 +179,7 @@ void ChildProcess::set_main_thread(ChildThreadImpl* th +@@ -178,7 +178,7 @@ void ChildProcess::set_main_thread(ChildThreadImpl* th main_thread_.reset(thread); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void ChildProcess::SetIOThreadType(base::ThreadType thread_type) { if (!io_thread_) { return; diff --git a/www/ungoogled-chromium/files/patch-content_common_features.cc b/www/ungoogled-chromium/files/patch-content_common_features.cc index 266a5e5d2b08..34b981116fa1 100644 --- a/www/ungoogled-chromium/files/patch-content_common_features.cc +++ b/www/ungoogled-chromium/files/patch-content_common_features.cc @@ -1,20 +1,20 @@ ---- content/common/features.cc.orig 2024-10-27 06:40:35 UTC +--- content/common/features.cc.orig 2024-11-16 12:20:41 UTC +++ content/common/features.cc @@ -143,7 +143,7 @@ BASE_FEATURE(kEnableBackForwardCacheForOngoingSubframe base::FEATURE_ENABLED_BY_DEFAULT); // Enables error reporting for JS errors inside DevTools frontend host -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kEnableDevToolsJsErrorReporting, "EnableDevToolsJsErrorReporting", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -299,7 +299,7 @@ BASE_FEATURE(kGroupNIKByJoiningOrigin, +@@ -306,7 +306,7 @@ BASE_FEATURE(kGroupNIKByJoiningOrigin, // process and having browser process handle adjusting thread properties (nice // value, c-group, latency sensitivity...) for children which have sandbox // restrictions. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kHandleChildThreadTypeChangesInBrowser, "HandleChildThreadTypeChangesInBrowser", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-content_common_features.h b/www/ungoogled-chromium/files/patch-content_common_features.h index 3b94d990072a..83320dcf1bb5 100644 --- a/www/ungoogled-chromium/files/patch-content_common_features.h +++ b/www/ungoogled-chromium/files/patch-content_common_features.h @@ -1,20 +1,20 @@ ---- content/common/features.h.orig 2024-10-27 06:40:35 UTC +--- content/common/features.h.orig 2024-11-16 12:20:41 UTC +++ content/common/features.h @@ -34,7 +34,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kDocumentPolicyNeg CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnableBackForwardCacheForScreenReader); CONTENT_EXPORT BASE_DECLARE_FEATURE( kEnableBackForwardCacheForOngoingSubframeNavigation); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnableDevToolsJsErrorReporting); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) CONTENT_EXPORT BASE_DECLARE_FEATURE(kEmbeddingRequiresOptIn); -@@ -76,7 +76,7 @@ CONTENT_EXPORT extern const base::FeatureParam +@@ -80,7 +80,7 @@ CONTENT_EXPORT extern const base::FeatureParam CONTENT_EXPORT BASE_DECLARE_FEATURE(kGpuInfoCollectionSeparatePrefetch); #endif CONTENT_EXPORT BASE_DECLARE_FEATURE(kGroupNIKByJoiningOrigin); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT BASE_DECLARE_FEATURE(kHandleChildThreadTypeChangesInBrowser); #endif #if BUILDFLAG(IS_ANDROID) 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 6257e53f7196..2275c95ebb6f 100644 --- a/www/ungoogled-chromium/files/patch-content_gpu_gpu__main.cc +++ b/www/ungoogled-chromium/files/patch-content_gpu_gpu__main.cc @@ -1,73 +1,73 @@ ---- content/gpu/gpu_main.cc.orig 2024-10-27 06:40:35 UTC +--- content/gpu/gpu_main.cc.orig 2024-11-16 12:20:41 UTC +++ content/gpu/gpu_main.cc @@ -95,10 +95,14 @@ #include "sandbox/win/src/sandbox.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/child/sandboxed_process_thread_type_handler.h" #include "content/common/gpu_pre_sandbox_hook_linux.h" +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif #include "sandbox/policy/sandbox_type.h" #endif @@ -117,7 +121,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&); @@ -175,7 +179,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel bool EnsureSandboxInitialized(gpu::GpuWatchdogThread* watchdog_thread, const gpu::GPUInfo* gpu_info, const gpu::GpuPreferences& gpu_prefs) override { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return StartSandboxLinux(watchdog_thread, gpu_info, gpu_prefs); #elif BUILDFLAG(IS_WIN) return StartSandboxWindows(sandbox_info_); -@@ -285,7 +289,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -293,7 +297,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 -@@ -308,7 +312,8 @@ int GpuMain(MainFunctionParams parameters) { +@@ -318,7 +322,8 @@ int GpuMain(MainFunctionParams parameters) { base::PlatformThread::SetName("CrGpuMain"); mojo::InterfaceEndpointClient::SetThreadNameSuffixForMetrics("GpuMain"); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +// XXX BSD +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) // Thread type delegate of the process should be registered before // thread type change below for the main thread and for thread pool in // ChildProcess constructor. -@@ -439,7 +444,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -449,7 +454,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) { -@@ -479,7 +484,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo +@@ -489,7 +494,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo sandbox_options.accelerated_video_encode_enabled = !gpu_prefs.disable_accelerated_video_encode; -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Video decoding of many video streams can use thousands of FDs as well as // Exo clients like Lacros. // See https://crbug.com/1417237 diff --git a/www/ungoogled-chromium/files/patch-content_public_browser_content__browser__client.cc b/www/ungoogled-chromium/files/patch-content_public_browser_content__browser__client.cc index 4f33ddda82f8..2300b0af6873 100644 --- a/www/ungoogled-chromium/files/patch-content_public_browser_content__browser__client.cc +++ b/www/ungoogled-chromium/files/patch-content_public_browser_content__browser__client.cc @@ -1,11 +1,11 @@ ---- content/public/browser/content_browser_client.cc.orig 2024-10-27 06:40:35 UTC +--- content/public/browser/content_browser_client.cc.orig 2024-11-16 12:20:41 UTC +++ content/public/browser/content_browser_client.cc -@@ -1330,7 +1330,7 @@ bool ContentBrowserClient::ShouldRunOutOfProcessSystem +@@ -1343,7 +1343,7 @@ bool ContentBrowserClient::ShouldRunOutOfProcessSystem // that can be adequately sandboxed. // Currently Android's network service will not run out of process or sandboxed, // so OutOfProcessSystemDnsResolution is not currently enabled on Android. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/ungoogled-chromium/files/patch-content_public_browser_service__process__host.cc b/www/ungoogled-chromium/files/patch-content_public_browser_service__process__host.cc index 700db717128b..4c50c47cafa4 100644 --- a/www/ungoogled-chromium/files/patch-content_public_browser_service__process__host.cc +++ b/www/ungoogled-chromium/files/patch-content_public_browser_service__process__host.cc @@ -1,11 +1,11 @@ ---- content/public/browser/service_process_host.cc.orig 2024-05-23 20:04:36 UTC +--- content/public/browser/service_process_host.cc.orig 2024-11-16 12:20:41 UTC +++ content/public/browser/service_process_host.cc -@@ -70,7 +70,7 @@ ServiceProcessHost::Options::WithPreloadedLibraries( - +@@ -71,7 +71,7 @@ ServiceProcessHost::Options::WithPreloadedLibraries( ServiceProcessHost::Options& ServiceProcessHost::Options::WithGpuClient( base::PassKey passkey) { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) allow_gpu_client = true; #endif return *this; 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 595a0ed6942f..faf3658b8f81 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,35 +1,35 @@ ---- content/public/common/content_features.cc.orig 2024-10-27 06:40:35 UTC +--- content/public/common/content_features.cc.orig 2024-11-16 12:20:41 UTC +++ content/public/common/content_features.cc @@ -65,7 +65,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, // TODO(crbug.com/40118868): Remove !IS_CHROMEOS_LACROS once lacros starts being // built with OS_CHROMEOS instead of OS_LINUX. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -1206,9 +1206,9 @@ BASE_FEATURE(kWebAssemblyTiering, +@@ -1218,9 +1218,9 @@ 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_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)) && \ + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) && \ defined(ARCH_CPU_ARM64)) base::FEATURE_ENABLED_BY_DEFAULT #else -@@ -1245,7 +1245,11 @@ BASE_FEATURE(kWebUICodeCache, +@@ -1257,7 +1257,11 @@ BASE_FEATURE(kWebUICodeCache, // Controls whether the WebUSB API is enabled: // https://wicg.github.io/webusb +#if BUILDFLAG(IS_BSD) +BASE_FEATURE(kWebUsb, "WebUSB", base::FEATURE_DISABLED_BY_DEFAULT); +#else BASE_FEATURE(kWebUsb, "WebUSB", base::FEATURE_ENABLED_BY_DEFAULT); +#endif // Controls whether the WebXR Device API is enabled. BASE_FEATURE(kWebXr, "WebXR", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-content_public_common_content__switches.cc b/www/ungoogled-chromium/files/patch-content_public_common_content__switches.cc index f0b1b8351160..e3bc46d65ec9 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 2024-10-27 06:40:35 UTC +--- content/public/common/content_switches.cc.orig 2024-11-16 12:20:41 UTC +++ content/public/common/content_switches.cc @@ -350,6 +350,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. -@@ -976,7 +978,7 @@ const char kPreventResizingContentsForTesting[] = +@@ -969,7 +971,7 @@ const char kPreventResizingContentsForTesting[] = // TODO(crbug.com/40118868): 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 27e526ec996f..3a9ff50f2086 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 2024-10-27 06:40:35 UTC +--- content/public/common/content_switches.h.orig 2024-11-16 12:20:41 UTC +++ content/public/common/content_switches.h @@ -110,6 +110,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[]; -@@ -266,7 +267,7 @@ CONTENT_EXPORT extern const char kPreventResizingConte +@@ -265,7 +266,7 @@ CONTENT_EXPORT extern const char kPreventResizingConte // TODO(crbug.com/40118868): 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__thread__impl.cc b/www/ungoogled-chromium/files/patch-content_renderer_render__thread__impl.cc index 2c6fa3bd9e19..ec9a16b0dee5 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 2024-10-27 06:40:35 UTC +--- content/renderer/render_thread_impl.cc.orig 2024-11-16 12:20:41 UTC +++ content/renderer/render_thread_impl.cc -@@ -215,6 +215,8 @@ +@@ -214,6 +214,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_BSD) +#include #else #include #endif -@@ -1022,7 +1024,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1017,7 +1019,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: kGpuStreamIdMedia, kGpuStreamPriorityMedia); const bool enable_video_decode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - base::FeatureList::IsEnabled(media::kVaapiVideoDecodeLinux) && + base::FeatureList::IsEnabled(media::kAcceleratedVideoDecodeLinux) && #endif // BUILDFLAG(IS_LINUX) !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) && -@@ -1031,7 +1033,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1026,7 +1028,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) && + base::FeatureList::IsEnabled(media::kAcceleratedVideoEncodeLinux) && #else !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoEncode) && -@@ -1815,7 +1817,7 @@ std::unique_ptr RenderThreadImpl::Create +@@ -1830,7 +1832,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.h b/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.h index 7bfd3200e9a7..f5da1b080d60 100644 --- a/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.h +++ b/www/ungoogled-chromium/files/patch-content_renderer_renderer__blink__platform__impl.h @@ -1,11 +1,11 @@ ---- content/renderer/renderer_blink_platform_impl.h.orig 2024-10-27 06:40:35 UTC +--- content/renderer/renderer_blink_platform_impl.h.orig 2024-11-16 12:20:41 UTC +++ content/renderer/renderer_blink_platform_impl.h -@@ -255,7 +255,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi +@@ -254,7 +254,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi void Collect3DContextInformation(blink::Platform::GraphicsInfo* gl_info, const gpu::GPUInfo& gpu_info) const; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) std::unique_ptr sandbox_support_; #endif diff --git a/www/ungoogled-chromium/files/patch-content_shell_BUILD.gn b/www/ungoogled-chromium/files/patch-content_shell_BUILD.gn index e33557660bb0..24c1a05e46d4 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 2024-10-27 06:40:35 UTC +--- content/shell/BUILD.gn.orig 2024-11-16 12:20:41 UTC +++ content/shell/BUILD.gn -@@ -1081,7 +1081,7 @@ group("content_shell_crash_test") { +@@ -1082,7 +1082,7 @@ group("content_shell_crash_test") { if (is_win) { data_deps += [ "//build/win:copy_cdb_to_output" ] } - if (is_posix) { + if (is_posix && !is_bsd) { data_deps += [ "//third_party/breakpad:dump_syms", "//third_party/breakpad:minidump_stackwalk", diff --git a/www/ungoogled-chromium/files/patch-content_shell_app_shell__main__delegate.cc b/www/ungoogled-chromium/files/patch-content_shell_app_shell__main__delegate.cc index d3e0b01044e8..0e6e118a04e8 100644 --- a/www/ungoogled-chromium/files/patch-content_shell_app_shell__main__delegate.cc +++ b/www/ungoogled-chromium/files/patch-content_shell_app_shell__main__delegate.cc @@ -1,11 +1,11 @@ ---- content/shell/app/shell_main_delegate.cc.orig 2024-08-26 14:40:28 UTC +--- content/shell/app/shell_main_delegate.cc.orig 2024-11-16 12:20:41 UTC +++ content/shell/app/shell_main_delegate.cc -@@ -276,7 +276,7 @@ void ShellMainDelegate::PreSandboxStartup() { +@@ -269,7 +269,7 @@ void ShellMainDelegate::PreSandboxStartup() { // Reporting for sub-processes will be initialized in ZygoteForked. if (process_type != switches::kZygoteProcess) { crash_reporter::InitializeCrashpad(process_type.empty(), process_type); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) crash_reporter::SetFirstChanceExceptionHandler( v8::TryHandleWebAssemblyTrapPosix); #endif diff --git a/www/ungoogled-chromium/files/patch-content_utility_services.cc b/www/ungoogled-chromium/files/patch-content_utility_services.cc index f8331b8b52ea..50de88ad370a 100644 --- a/www/ungoogled-chromium/files/patch-content_utility_services.cc +++ b/www/ungoogled-chromium/files/patch-content_utility_services.cc @@ -1,99 +1,92 @@ ---- content/utility/services.cc.orig 2024-10-27 06:40:35 UTC +--- content/utility/services.cc.orig 2024-11-16 12:20:41 UTC +++ content/utility/services.cc @@ -74,7 +74,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" @@ -102,7 +102,7 @@ extern sandbox::TargetServices* g_utility_target_servi #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) #include "content/common/features.h" #include "media/mojo/services/stable_video_decoder_factory_process_service.h" // nogncheck -@@ -120,13 +120,13 @@ extern sandbox::TargetServices* g_utility_target_servi +@@ -120,7 +120,7 @@ extern sandbox::TargetServices* g_utility_target_servi #endif // BUILDFLAG(ENABLE_ACCESSIBILITY_SERVICE) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ -- BUILDFLAG(ENABLE_VIDEO_EFFECTS) -+ BUILDFLAG(ENABLE_VIDEO_EFFECTS) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + #include "media/capture/capture_switches.h" #include "services/viz/public/cpp/gpu/gpu.h" #include "services/viz/public/mojom/gpu.mojom.h" - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || - // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(ENABLE_VIDEO_EFFECTS) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) - #include "media/capture/capture_switches.h" - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || - // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -244,7 +244,7 @@ auto RunAudio(mojo::PendingReceiver( std::move(receiver), base::SingleThreadTaskRunner::GetCurrentDefault()); --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #if BUILDFLAG(IS_CHROMEOS_ASH) { #else -@@ -395,7 +395,7 @@ auto RunOOPArcVideoAcceleratorFactoryService( +@@ -392,7 +392,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< -@@ -406,7 +406,7 @@ auto RunStableVideoDecoderFactoryProcessService( +@@ -403,7 +403,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) { -@@ -429,7 +429,7 @@ void RegisterIOThreadServices(mojo::ServiceFactory& se +@@ -426,7 +426,7 @@ void RegisterIOThreadServices(mojo::ServiceFactory& se // loop of type IO that can get notified when pipes have data. services.Add(RunNetworkService); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) if (base::FeatureList::IsEnabled( features::kRunStableVideoDecoderFactoryProcessServiceOnIOThread)) { -@@ -485,7 +485,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -482,7 +482,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) if (!base::FeatureList::IsEnabled( features::kRunStableVideoDecoderFactoryProcessServiceOnIOThread)) { -@@ -494,7 +494,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -491,7 +491,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && // (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) services.Add(RunVideoEncodeAcceleratorProviderFactory); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc b/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc index 281bf44f62b2..b670338431ef 100644 --- a/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc +++ b/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc @@ -1,128 +1,154 @@ ---- content/utility/utility_main.cc.orig 2024-10-27 06:40:35 UTC +--- content/utility/utility_main.cc.orig 2024-11-16 12:20:41 UTC +++ content/utility/utility_main.cc -@@ -36,17 +36,21 @@ - #include "services/screen_ai/buildflags/buildflags.h" +@@ -37,17 +37,21 @@ #include "services/tracing/public/cpp/trace_startup.h" + #include "services/video_effects/public/cpp/buildflags.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" #include "content/child/sandboxed_process_thread_type_handler.h" +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "content/common/gpu_pre_sandbox_hook_linux.h" +#endif #include "content/public/common/content_descriptor_keys.h" #include "content/utility/speech/speech_recognition_sandbox_hook_linux.h" #include "gpu/config/gpu_info_collector.h" #include "media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h" +#if !BUILDFLAG(IS_BSD) #include "sandbox/policy/linux/sandbox_linux.h" +#endif #include "services/audio/audio_sandbox_hook_linux.h" #include "services/network/network_sandbox_hook_linux.h" // gn check is not smart enough to realize that this include only applies to -@@ -58,10 +62,15 @@ +@@ -59,11 +63,16 @@ #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(ENABLE_VIDEO_EFFECTS) && BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#include "content/common/gpu_pre_sandbox_hook_bsd.h" +#endif + - #if BUILDFLAG(IS_CHROMEOS_ASH) - #include "chromeos/ash/components/assistant/buildflags.h" - #include "chromeos/ash/services/ime/ime_sandbox_hook.h" -@@ -73,7 +82,7 @@ ++#if BUILDFLAG(ENABLE_VIDEO_EFFECTS) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) + #include "services/video_effects/video_effects_sandbox_hook_linux.h" // nogncheck + #endif // BUILDFLAG(ENABLE_VIDEO_EFFECTS) && BUILDFLAG(IS_LINUX) + +@@ -78,7 +87,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 "services/screen_ai/public/cpp/utilities.h" // nogncheck #include "services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h" // nogncheck #endif -@@ -101,7 +110,7 @@ namespace content { +@@ -102,14 +111,14 @@ + sandbox::TargetServices* g_utility_target_services = nullptr; + #endif // BUILDFLAG(IS_WIN) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "components/services/on_device_translation/sandbox_hook.h" + #endif // BUILDFLAG(IS_LINUX) + 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( -@@ -128,9 +137,10 @@ std::vector GetNetworkContextsParentDirec +@@ -136,9 +145,10 @@ std::vector GetNetworkContextsParentDirec return dirs; } +#if !BUILDFLAG(IS_BSD) 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; -@@ -145,6 +155,7 @@ bool ShouldUseAmdGpuPolicy(sandbox::mojom::Sandbox san +@@ -153,6 +163,7 @@ bool ShouldUseAmdGpuPolicy(sandbox::mojom::Sandbox san return false; } +#endif #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) -@@ -242,7 +253,8 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -250,7 +261,8 @@ int UtilityMain(MainFunctionParams parameters) { CHECK(on_device_model::OnDeviceModelService::PreSandboxInit()); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +// XXX BSD +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) // Thread type delegate of the process should be registered before first // thread type change in ChildProcess constructor. It also needs to be // registered before the process has multiple threads, which may race with -@@ -254,7 +266,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -262,7 +274,7 @@ int UtilityMain(MainFunctionParams parameters) { } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Initializes the sandbox before any threads are created. // TODO(jorgelo): move this after GTK initialization when we enable a strict // Seccomp-BPF policy. -@@ -295,7 +307,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -292,7 +304,7 @@ int UtilityMain(MainFunctionParams parameters) { + pre_sandbox_hook = + base::BindOnce(&speech::SpeechRecognitionPreSandboxHook); + break; +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + case sandbox::mojom::Sandbox::kOnDeviceTranslation: + pre_sandbox_hook = base::BindOnce( + &on_device_translation::OnDeviceTranslationSandboxHook); +@@ -306,13 +318,13 @@ int UtilityMain(MainFunctionParams parameters) { + screen_ai::GetBinaryPathSwitch())); + break; + #endif +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) case sandbox::mojom::Sandbox::kVideoEffects: - // TODO(crbug.com/361128453): Implement this. - NOTREACHED() << "kVideoEffects sandbox not implemented."; + pre_sandbox_hook = + base::BindOnce(&video_effects::VideoEffectsPreSandboxHook); + break; + #endif // BUILDFLAG(IS_LINUX) -#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); -@@ -322,6 +334,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -339,6 +351,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_options.use_amd_specific_policies = -@@ -329,6 +342,11 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -346,6 +359,11 @@ int UtilityMain(MainFunctionParams parameters) { sandbox::policy::Sandbox::Initialize( sandbox_type, std::move(pre_sandbox_hook), sandbox_options); } +#else + sandbox::policy::Sandbox::Initialize( + sandbox_type, std::move(pre_sandbox_hook), + sandbox::policy::SandboxLinux::Options()); +#endif // Start the HangWatcher now that the sandbox is engaged, if it hasn't // already been started. diff --git a/www/ungoogled-chromium/files/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc b/www/ungoogled-chromium/files/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc index d3d1aed493ca..021b2a5ac231 100644 --- a/www/ungoogled-chromium/files/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc +++ b/www/ungoogled-chromium/files/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc @@ -1,11 +1,11 @@ ---- extensions/browser/api/api_browser_context_keyed_service_factories.cc.orig 2024-10-27 06:40:35 UTC +--- extensions/browser/api/api_browser_context_keyed_service_factories.cc.orig 2024-11-16 12:20:41 UTC +++ extensions/browser/api/api_browser_context_keyed_service_factories.cc -@@ -114,7 +114,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt +@@ -117,7 +117,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt #endif MessageService::GetFactoryInstance(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) NetworkingPrivateEventRouterFactory::GetInstance(); #endif OffscreenDocumentManager::GetFactory(); 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 9209cd8c034e..bd35defd52e6 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-10-13 13:20:35 UTC +--- extensions/browser/api/networking_private/networking_private_delegate_factory.cc.orig 2024-11-16 12:20:41 UTC +++ extensions/browser/api/networking_private/networking_private_delegate_factory.cc -@@ -14,7 +14,7 @@ +@@ -12,7 +12,7 @@ + + #if BUILDFLAG(IS_CHROMEOS) #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" -@@ -67,7 +67,7 @@ NetworkingPrivateDelegateFactory::BuildServiceInstance +@@ -63,7 +63,7 @@ NetworkingPrivateDelegateFactory::BuildServiceInstance + std::unique_ptr delegate; + #if BUILDFLAG(IS_CHROMEOS) delegate = std::make_unique(browser_context); - #elif BUILDFLAG(IS_CHROMEOS_LACROS) - delegate = std::make_unique(browser_context); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) delegate = std::make_unique(); #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) std::unique_ptr wifi_service(wifi::WiFiService::Create()); diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc index 6a32ac170e57..14be6424ef87 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/dawn_context_provider.cc.orig 2024-10-27 06:40:35 UTC +--- gpu/command_buffer/service/dawn_context_provider.cc.orig 2024-11-16 12:20:41 UTC +++ gpu/command_buffer/service/dawn_context_provider.cc -@@ -307,7 +307,7 @@ wgpu::BackendType DawnContextProvider::GetDefaultBacke +@@ -302,7 +302,7 @@ wgpu::BackendType DawnContextProvider::GetDefaultBacke return base::FeatureList::IsEnabled(features::kSkiaGraphiteDawnUseD3D12) ? wgpu::BackendType::D3D12 : wgpu::BackendType::D3D11; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) return wgpu::BackendType::Vulkan; #elif BUILDFLAG(IS_APPLE) return wgpu::BackendType::Metal; diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc index 26dce08e009d..848e0623a868 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 2024-10-01 07:26:23 UTC +--- gpu/command_buffer/service/gles2_cmd_decoder.cc.orig 2024-11-16 12:20:41 UTC +++ gpu/command_buffer/service/gles2_cmd_decoder.cc -@@ -2906,7 +2906,7 @@ GLES2Decoder* GLES2Decoder::Create( +@@ -2879,7 +2879,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 3d8119a3af0f..b9b4d3844c7c 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 2024-10-27 06:40:35 UTC +--- gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig 2024-11-16 12:20:41 UTC +++ gpu/command_buffer/service/shared_image/external_vk_image_backing.cc -@@ -59,7 +59,7 @@ +@@ -57,7 +57,7 @@ #include "ui/gl/gl_version_info.h" #include "ui/gl/scoped_binders.h" -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) #include "gpu/command_buffer/service/shared_image/external_vk_image_dawn_representation.h" #if BUILDFLAG(DAWN_ENABLE_BACKEND_OPENGLES) #include "gpu/command_buffer/service/shared_image/dawn_gl_texture_representation.h" -@@ -727,7 +727,7 @@ std::unique_ptr ExternalVkIma +@@ -704,7 +704,7 @@ std::unique_ptr ExternalVkIma wgpu::BackendType backend_type, std::vector view_formats, scoped_refptr context_state) { -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) auto wgpu_format = ToDawnFormat(format()); if (wgpu_format == wgpu::TextureFormat::Undefined) { diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc index bcf2abd1f253..48e51db3188a 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 2024-10-27 06:40:35 UTC +--- gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc.orig 2024-11-16 12:20:41 UTC +++ gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc -@@ -142,7 +142,7 @@ bool IsFormatSupported(viz::SharedImageFormat format, - } // namespace +@@ -176,7 +176,7 @@ bool IsFormatSupported(viz::SharedImageFormat format, - constexpr SharedImageUsageSet kSupportedUsage = + SharedImageUsageSet SupportedUsage() { + SharedImageUsageSet supported_usage = -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) - SHARED_IMAGE_USAGE_WEBGPU_READ | SHARED_IMAGE_USAGE_WEBGPU_WRITE | - SHARED_IMAGE_USAGE_WEBGPU_SWAP_CHAIN_TEXTURE | - SHARED_IMAGE_USAGE_WEBGPU_STORAGE_TEXTURE | + SHARED_IMAGE_USAGE_WEBGPU_READ | SHARED_IMAGE_USAGE_WEBGPU_WRITE | + SHARED_IMAGE_USAGE_WEBGPU_SWAP_CHAIN_TEXTURE | + SHARED_IMAGE_USAGE_WEBGPU_STORAGE_TEXTURE | diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc index 59aa658b637d..3933146c1d43 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/shared_image_manager.cc.orig 2024-10-27 06:40:35 UTC +--- gpu/command_buffer/service/shared_image/shared_image_manager.cc.orig 2024-11-16 12:20:41 UTC +++ gpu/command_buffer/service/shared_image/shared_image_manager.cc -@@ -603,7 +603,7 @@ bool SharedImageManager::SupportsScanoutImages() { +@@ -605,7 +605,7 @@ bool SharedImageManager::SupportsScanoutImages() { return true; #elif BUILDFLAG(IS_ANDROID) return base::AndroidHardwareBufferCompat::IsSupportAvailable(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - return ui::OzonePlatform::GetInstance() - ->GetPlatformRuntimeProperties() - .supports_native_pixmaps; + // We are in the process of tightening scanout support on Ozone to be guarded + // by overlays being supported rather than merely native pixmaps being + // supported, as native pixmap support doesn't always imply that those native 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 897e9fe974ef..faed57d50493 100644 --- a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc +++ b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc @@ -1,20 +1,20 @@ ---- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2024-10-27 06:40:35 UTC +--- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2024-11-16 12:20:41 UTC +++ gpu/command_buffer/service/webgpu_decoder_impl.cc -@@ -1309,7 +1309,7 @@ WGPUFuture WebGPUDecoderImpl::RequestAdapterImpl( +@@ -1390,7 +1390,7 @@ WGPUFuture WebGPUDecoderImpl::RequestAdapterImpl( force_fallback_adapter = true; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!shared_context_state_->GrContextIsVulkan() && !shared_context_state_->IsGraphiteDawnVulkan() && use_webgpu_adapter_ != WebGPUAdapterName::kOpenGLES) { -@@ -1978,7 +1978,7 @@ WebGPUDecoderImpl::AssociateMailboxDawn( +@@ -2075,7 +2075,7 @@ WebGPUDecoderImpl::AssociateMailboxDawn( } #if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_APPLE) && \ - !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX) + !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) if (usage & wgpu::TextureUsage::StorageBinding) { LOG(ERROR) << "AssociateMailbox: wgpu::TextureUsage::StorageBinding is NOT " "supported yet on this platform."; diff --git a/www/ungoogled-chromium/files/patch-gpu_config_gpu__control__list.cc b/www/ungoogled-chromium/files/patch-gpu_config_gpu__control__list.cc index 8962cd96c20d..2a3409933565 100644 --- a/www/ungoogled-chromium/files/patch-gpu_config_gpu__control__list.cc +++ b/www/ungoogled-chromium/files/patch-gpu_config_gpu__control__list.cc @@ -1,20 +1,20 @@ ---- gpu/config/gpu_control_list.cc.orig 2024-10-01 07:26:23 UTC +--- gpu/config/gpu_control_list.cc.orig 2024-11-16 12:20:41 UTC +++ gpu/config/gpu_control_list.cc -@@ -282,7 +282,7 @@ bool GpuControlList::More::GLVersionInfoMismatch( +@@ -277,7 +277,7 @@ bool GpuControlList::More::GLVersionInfoMismatch( GpuControlList::GLType GpuControlList::More::GetDefaultGLType() { #if BUILDFLAG(IS_CHROMEOS) return kGLTypeGL; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kGLTypeGL; #elif BUILDFLAG(IS_MAC) return kGLTypeGL; -@@ -819,7 +819,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { +@@ -848,7 +848,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { return kOsAndroid; #elif BUILDFLAG(IS_FUCHSIA) return kOsFuchsia; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kOsLinux; #elif BUILDFLAG(IS_MAC) return kOsMacosx; diff --git a/www/ungoogled-chromium/files/patch-gpu_config_gpu__finch__features.cc b/www/ungoogled-chromium/files/patch-gpu_config_gpu__finch__features.cc index 37a0c2fecd65..81212bd077a3 100644 --- a/www/ungoogled-chromium/files/patch-gpu_config_gpu__finch__features.cc +++ b/www/ungoogled-chromium/files/patch-gpu_config_gpu__finch__features.cc @@ -1,20 +1,12 @@ ---- gpu/config/gpu_finch_features.cc.orig 2024-10-27 06:40:35 UTC +--- gpu/config/gpu_finch_features.cc.orig 2024-11-16 12:20:41 UTC +++ gpu/config/gpu_finch_features.cc -@@ -150,7 +150,7 @@ const base::FeatureParam +@@ -147,7 +147,8 @@ const base::FeatureParam BASE_FEATURE(kDefaultEnableGpuRasterization, "DefaultEnableGpuRasterization", #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) -+ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT - #else - base::FEATURE_DISABLED_BY_DEFAULT -@@ -163,7 +163,7 @@ BASE_FEATURE(kCanvasOopRasterization, - "CanvasOopRasterization", - #if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_WIN) || \ - (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ ++ BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/ungoogled-chromium/files/patch-gpu_config_gpu__info__collector.cc b/www/ungoogled-chromium/files/patch-gpu_config_gpu__info__collector.cc index 6b0e78bd8600..c5d585fcfabc 100644 --- a/www/ungoogled-chromium/files/patch-gpu_config_gpu__info__collector.cc +++ b/www/ungoogled-chromium/files/patch-gpu_config_gpu__info__collector.cc @@ -1,11 +1,11 @@ ---- gpu/config/gpu_info_collector.cc.orig 2024-10-27 06:40:35 UTC +--- gpu/config/gpu_info_collector.cc.orig 2024-11-16 12:20:41 UTC +++ gpu/config/gpu_info_collector.cc -@@ -368,7 +368,7 @@ void ReportWebGPUAdapterMetrics(dawn::native::Instance +@@ -362,7 +362,7 @@ void ReportWebGPUAdapterMetrics(dawn::native::Instance void ReportWebGPUSupportMetrics(dawn::native::Instance* instance) { static BASE_FEATURE(kCollectWebGPUSupportMetrics, "CollectWebGPUSupportMetrics", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_DISABLED_BY_DEFAULT); #else base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__init.cc b/www/ungoogled-chromium/files/patch-gpu_ipc_service_gpu__init.cc index de58747ee5c3..3c03f85cb29e 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 2024-10-01 07:26:23 UTC +--- gpu/ipc/service/gpu_init.cc.orig 2024-11-16 12:20:41 UTC +++ gpu/ipc/service/gpu_init.cc @@ -387,7 +387,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 @@ -424,7 +424,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. @@ -528,7 +528,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL gpu_preferences_.gr_context_type = GrContextType::kGL; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The ContentSandboxHelper is currently the only one implementation of // GpuSandboxHelper and it has no dependency. Except on Linux where // VaapiWrapper checks the GL implementation to determine which display @@ -610,7 +610,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; -@@ -761,7 +761,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -766,7 +766,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. -@@ -816,7 +816,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -821,7 +821,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 -@@ -1001,7 +1001,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -1008,7 +1008,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 -@@ -1056,7 +1056,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -1063,7 +1063,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__content__browser__client.cc b/www/ungoogled-chromium/files/patch-headless_lib_browser_headless__content__browser__client.cc index 56c6ba065752..1fcc3ebb483e 100644 --- a/www/ungoogled-chromium/files/patch-headless_lib_browser_headless__content__browser__client.cc +++ b/www/ungoogled-chromium/files/patch-headless_lib_browser_headless__content__browser__client.cc @@ -1,20 +1,20 @@ ---- headless/lib/browser/headless_content_browser_client.cc.orig 2024-10-27 06:40:35 UTC +--- headless/lib/browser/headless_content_browser_client.cc.orig 2024-11-16 12:20:41 UTC +++ headless/lib/browser/headless_content_browser_client.cc @@ -56,7 +56,7 @@ #include "content/public/common/content_descriptors.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)) && defined(HEADLESS_USE_PREFS) +#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(HEADLESS_USE_PREFS) #include "components/os_crypt/sync/os_crypt.h" // nogncheck #include "content/public/browser/network_service_util.h" #endif -@@ -478,7 +478,7 @@ void HeadlessContentBrowserClient::HandleExplicitlyAll +@@ -488,7 +488,7 @@ void HeadlessContentBrowserClient::HandleExplicitlyAll void HeadlessContentBrowserClient::SetEncryptionKey( ::network::mojom::NetworkService* network_service) { -#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)) && defined(HEADLESS_USE_PREFS) +#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(HEADLESS_USE_PREFS) // The OSCrypt keys are process bound, so if network service is out of // process, send it the required key if it is available. if (content::IsOutOfProcessNetworkService() diff --git a/www/ungoogled-chromium/files/patch-headless_lib_headless__content__main__delegate.cc b/www/ungoogled-chromium/files/patch-headless_lib_headless__content__main__delegate.cc index e5192f972a27..e40c94cee97d 100644 --- a/www/ungoogled-chromium/files/patch-headless_lib_headless__content__main__delegate.cc +++ b/www/ungoogled-chromium/files/patch-headless_lib_headless__content__main__delegate.cc @@ -1,11 +1,11 @@ ---- headless/lib/headless_content_main_delegate.cc.orig 2024-10-01 07:26:23 UTC +--- headless/lib/headless_content_main_delegate.cc.orig 2024-11-16 12:20:41 UTC +++ headless/lib/headless_content_main_delegate.cc -@@ -406,7 +406,7 @@ void HeadlessContentMainDelegate::InitCrashReporter( +@@ -407,7 +407,7 @@ void HeadlessContentMainDelegate::InitCrashReporter( if (process_type != ::switches::kZygoteProcess) { g_headless_crash_client.Pointer()->set_crash_dumps_dir( command_line.GetSwitchValuePath(switches::kCrashDumpsDir)); -#if !BUILDFLAG(IS_WIN) +#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_BSD) crash_reporter::InitializeCrashpad(process_type.empty(), process_type); #endif // !BUILDFLAG(IS_WIN) crash_keys::SetSwitchesFromCommandLine(command_line, nullptr); diff --git a/www/ungoogled-chromium/files/patch-ipc_ipc__message__utils.cc b/www/ungoogled-chromium/files/patch-ipc_ipc__message__utils.cc index 21aa492bd87c..490702a9c6be 100644 --- a/www/ungoogled-chromium/files/patch-ipc_ipc__message__utils.cc +++ b/www/ungoogled-chromium/files/patch-ipc_ipc__message__utils.cc @@ -1,11 +1,11 @@ ---- ipc/ipc_message_utils.cc.orig 2024-08-26 14:40:28 UTC +--- ipc/ipc_message_utils.cc.orig 2024-11-16 12:20:41 UTC +++ ipc/ipc_message_utils.cc -@@ -400,7 +400,7 @@ void ParamTraits::Log(const param_type& +@@ -399,7 +399,7 @@ void ParamTraits::Log(const param_type& } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS)) void ParamTraits::Log(const param_type& p, std::string* l) { l->append(base::NumberToString(p)); 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 dda467b8b349..3bc09877dd84 100644 --- a/www/ungoogled-chromium/files/patch-media_base_media__switches.cc +++ b/www/ungoogled-chromium/files/patch-media_base_media__switches.cc @@ -1,114 +1,114 @@ ---- media/base/media_switches.cc.orig 2024-10-27 06:40:35 UTC +--- media/base/media_switches.cc.orig 2024-11-16 12:20:41 UTC +++ media/base/media_switches.cc @@ -21,7 +21,7 @@ #include "ui/gl/gl_features.h" #include "ui/gl/gl_utils.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/cpu.h" #endif @@ -375,8 +375,8 @@ BASE_FEATURE(kUseSCContentSharingPicker, "UseSCContentSharingPicker", base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_MAC) - -#if BUILDFLAG(IS_LINUX) + +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables system audio mirroring using pulseaudio. BASE_FEATURE(kPulseaudioLoopbackForCast, "PulseaudioLoopbackForCast", @@ -386,6 +386,28 @@ BASE_FEATURE(kPulseaudioLoopbackForCast, BASE_FEATURE(kPulseaudioLoopbackForScreenShare, "PulseaudioLoopbackForScreenShare", base::FEATURE_DISABLED_BY_DEFAULT); + +BASE_FEATURE(kAudioBackend, + "AudioBackend", + base::FEATURE_ENABLED_BY_DEFAULT); + +constexpr base::FeatureParam::Option + kAudioBackendOptions[] = { + {AudioBackend::kAuto, + "auto"}, + {AudioBackend::kPulseAudio, "pulseaudio"}, + {AudioBackend::kSndio, "sndio"}, + {AudioBackend::kAlsa, "alsa"}}; + +const base::FeatureParam + kAudioBackendParam{ + &kAudioBackend, "audio-backend", +#if BUILDFLAG(IS_OPENBSD) + AudioBackend::kSndio, +#elif BUILDFLAG(IS_FREEBSD) + AudioBackend::kAuto, +#endif + &kAudioBackendOptions}; #endif // BUILDFLAG(IS_LINUX) // When enabled, MediaCapabilities will check with GPU Video Accelerator -@@ -682,7 +704,7 @@ BASE_FEATURE(kFileDialogsBlockPictureInPicture, +@@ -674,7 +696,7 @@ BASE_FEATURE(kFileDialogsBlockPictureInPicture, // 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 -@@ -705,7 +727,7 @@ BASE_FEATURE(kGlobalMediaControlsUpdatedUI, +@@ -697,7 +719,7 @@ BASE_FEATURE(kGlobalMediaControlsUpdatedUI, // If enabled, users can request Media Remoting without fullscreen-in-tab. BASE_FEATURE(kMediaRemotingWithoutFullscreen, "MediaRemotingWithoutFullscreen", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -717,7 +739,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen, +@@ -709,7 +731,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen, BASE_FEATURE(kGlobalMediaControlsPictureInPicture, "GlobalMediaControlsPictureInPicture", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -746,7 +768,7 @@ BASE_FEATURE(kUnifiedAutoplay, +@@ -738,7 +760,7 @@ BASE_FEATURE(kUnifiedAutoplay, "UnifiedAutoplay", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Enable vaapi video decoding on linux. This is already enabled by default on - // chromeos, but needs an experiment on linux. - BASE_FEATURE(kVaapiVideoDecodeLinux, -@@ -846,7 +868,7 @@ BASE_FEATURE(kVSyncMjpegDecoding, + // Enable vaapi/v4l2 video decoding on linux. This is already enabled by default + // on chromeos, but needs an experiment on linux. + BASE_FEATURE(kAcceleratedVideoDecodeLinux, +@@ -838,7 +860,7 @@ BASE_FEATURE(kVSyncMjpegDecoding, "VSyncMjpegDecoding", base::FEATURE_DISABLED_BY_DEFAULT); #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Enables the new V4L2StatefulVideoDecoder instead of V4L2VideoDecoder. - // Owners: frkoenig@ch40m1um.qjz9zk, mcasas@ch40m1um.qjz9zk - // Expiry: When the |V4L2FlatVideoDecoder| flag handles stateful decoding on -@@ -1479,7 +1501,7 @@ BASE_FEATURE(kUseGTFOOutOfProcessVideoDecoding, + // Enable H264 temporal layer encoding with V4L2 HW encoder on ChromeOS. + BASE_FEATURE(kV4L2H264TemporalLayerHWEncoding, + "V4L2H264TemporalLayerHWEncoding", +@@ -1453,7 +1475,7 @@ BASE_FEATURE(kUseGTFOOutOfProcessVideoDecoding, base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Spawn utility processes to perform hardware encode acceleration instead of // using the GPU process. BASE_FEATURE(kUseOutOfProcessVideoEncoding, -@@ -1559,7 +1581,7 @@ BASE_FEATURE(kRecordWebAudioEngagement, +@@ -1533,7 +1555,7 @@ BASE_FEATURE(kRecordWebAudioEngagement, "RecordWebAudioEngagement", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Reduces the number of buffers needed in the output video frame pool to // populate the Renderer pipeline for hardware accelerated VideoDecoder in // non-low latency scenarios. diff --git a/www/ungoogled-chromium/files/patch-media_base_media__switches.h b/www/ungoogled-chromium/files/patch-media_base_media__switches.h index 726e65b0398f..97b99fa0129c 100644 --- a/www/ungoogled-chromium/files/patch-media_base_media__switches.h +++ b/www/ungoogled-chromium/files/patch-media_base_media__switches.h @@ -1,57 +1,57 @@ ---- media/base/media_switches.h.orig 2024-10-27 06:40:35 UTC +--- media/base/media_switches.h.orig 2024-11-16 12:20:41 UTC +++ media/base/media_switches.h -@@ -331,13 +331,25 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlatformHEVCEncoder +@@ -333,13 +333,25 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlatformHEVCEncoder MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlaybackSpeedButton); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMediaEngagementData); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMetadataSuspend); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForCast); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForScreenShare); + +enum class AudioBackend { + kAuto, + kPulseAudio, + kSndio, + kAlsa +}; + +MEDIA_EXPORT BASE_DECLARE_FEATURE(kAudioBackend); +MEDIA_EXPORT extern const base::FeatureParam< + AudioBackend> + kAudioBackendParam; #endif // BUILDFLAG(IS_LINUX) MEDIA_EXPORT BASE_DECLARE_FEATURE(kRecordMediaEngagementScores); MEDIA_EXPORT BASE_DECLARE_FEATURE(kRecordWebAudioEngagement); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kReduceHardwareVideoDecoderBuffers); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) MEDIA_EXPORT BASE_DECLARE_FEATURE(kResumeBackgroundVideo); -@@ -352,7 +364,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUnifiedAutoplay); +@@ -353,7 +365,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kSuspendMutedAudio); + MEDIA_EXPORT BASE_DECLARE_FEATURE(kUnifiedAutoplay); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseAndroidOverlayForSecureOnly); - MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseDecoderStreamForWebRTC); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseFakeDeviceForMediaStream); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinux); - MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinuxGL); - MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoEncodeLinux); -@@ -373,7 +385,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLay + MEDIA_EXPORT BASE_DECLARE_FEATURE(kAcceleratedVideoDecodeLinux); + MEDIA_EXPORT BASE_DECLARE_FEATURE(kAcceleratedVideoDecodeLinuxGL); + MEDIA_EXPORT BASE_DECLARE_FEATURE(kAcceleratedVideoEncodeLinux); +@@ -374,7 +386,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLay MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9SModeHWEncoding); MEDIA_EXPORT BASE_DECLARE_FEATURE(kVSyncMjpegDecoding); #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatefulVideoDecoder); MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2H264TemporalLayerHWEncoding); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -513,7 +525,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVide + MEDIA_EXPORT BASE_DECLARE_FEATURE(kVideoBlitColorAccuracy); +@@ -511,7 +523,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVide MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseGTFOOutOfProcessVideoDecoding); #endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoEncoding); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-media_base_video__frame.cc b/www/ungoogled-chromium/files/patch-media_base_video__frame.cc index e10fabfcf90e..c20b8309cf89 100644 --- a/www/ungoogled-chromium/files/patch-media_base_video__frame.cc +++ b/www/ungoogled-chromium/files/patch-media_base_video__frame.cc @@ -1,47 +1,65 @@ ---- media/base/video_frame.cc.orig 2024-10-27 06:40:35 UTC +--- media/base/video_frame.cc.orig 2024-11-16 12:20:41 UTC +++ media/base/video_frame.cc @@ -88,7 +88,7 @@ std::string VideoFrame::StorageTypeToString( return "OWNED_MEMORY"; case VideoFrame::STORAGE_SHMEM: return "SHMEM"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case VideoFrame::STORAGE_DMABUFS: return "DMABUFS"; #endif @@ -103,7 +103,7 @@ std::string VideoFrame::StorageTypeToString( // static bool VideoFrame::IsStorageTypeMappable(VideoFrame::StorageType storage_type) { return -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // This is not strictly needed but makes explicit that, at VideoFrame // level, DmaBufs are not mappable from userspace. storage_type != VideoFrame::STORAGE_DMABUFS && @@ -401,7 +401,7 @@ VideoFrame::CreateFrameForGpuMemoryBufferOrMappableSII : shared_image->GetStrideForVideoFrame(i); } uint64_t modifier = gfx::NativePixmapHandle::kNoModifier; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool is_native_buffer = gpu_memory_buffer ? (gpu_memory_buffer->GetType() != gfx::SHARED_MEMORY_BUFFER) -@@ -782,7 +782,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM +@@ -453,7 +453,7 @@ VideoFrame::CreateFrameForGpuMemoryBufferOrMappableSII + } + + // static +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + scoped_refptr VideoFrame::WrapOOPVDMailbox( + VideoPixelFormat format, + const gpu::Mailbox& mailbox, +@@ -769,7 +769,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, -@@ -1489,7 +1489,7 @@ scoped_refptr VideoFrame::shar +@@ -1261,7 +1261,7 @@ bool VideoFrame::IsMappable() const { + return IsStorageTypeMappable(storage_type_); + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + bool VideoFrame::HasOOPVDMailbox() const { + return wrapped_frame_ ? wrapped_frame_->HasOOPVDMailbox() + : !oopvd_mailbox_.IsZero(); +@@ -1490,7 +1490,7 @@ scoped_refptr VideoFrame::shar return wrapped_frame_ ? wrapped_frame_->shared_image() : shared_image_; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) size_t VideoFrame::NumDmabufFds() const { if (wrapped_frame_) { return wrapped_frame_->NumDmabufFds(); 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 5a16089d7c7f..68e53e0cedfb 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,74 @@ ---- media/base/video_frame.h.orig 2024-10-27 06:40:35 UTC +--- media/base/video_frame.h.orig 2024-11-16 12:20:41 UTC +++ media/base/video_frame.h @@ -50,7 +50,7 @@ #include "base/apple/scoped_cftyperef.h" #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) -@@ -116,7 +116,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -109,7 +109,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 -@@ -393,7 +393,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -240,7 +240,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte + base::TimeDelta timestamp, + bool zero_initialize_memory); + +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Wraps RegisteredMailboxFrameConverter mailbox with a VideoFrame. This is + // used only by ChromeOS/Linux's out-of-process video decoder. + // |mailbox_holder_release_cb| will be called with a sync token as the +@@ -386,7 +386,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 -@@ -711,7 +711,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -551,7 +551,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte + // visible_data() etc. + bool IsMappable() const; + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Returns true if `frame` has `oopvd_mailbox`. + bool HasOOPVDMailbox() const; + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +@@ -717,7 +717,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // wait for the included sync point. scoped_refptr shared_image() const; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // The number of 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 - // remaining planes. Should be > 0 for STORAGE_DMABUFS. -@@ -953,7 +953,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte + // Returns the OOPVD mailbox set by `WrapOOPVDMailbox`. + // Only valid to call if this is a NATIVE_TEXTURE frame. Before using the + // mailbox, the caller must wait for the included sync point. +@@ -966,7 +966,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte + // VideoFrame. + const uint8_t* data_[kMaxPlanes]; + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Native texture mailbox, if this frame HasOOPVDMailbox(). + gpu::Mailbox oopvd_mailbox_; + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +@@ -995,7 +995,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // GpuMemoryBuffers. Clients will set this flag while creating a VideoFrame. bool is_mappable_si_enabled_ = false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Dmabufs for the frame, used when storage is STORAGE_DMABUFS. Size is either // equal or less than the number of planes of the frame. If it is less, then 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 3587d2baa92a..54798293a8cd 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_buffer__validation.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_buffer__validation.cc @@ -1,46 +1,29 @@ ---- media/gpu/buffer_validation.cc.orig 2024-02-25 20:22:18 UTC +--- media/gpu/buffer_validation.cc.orig 2024-11-16 12:20:41 UTC +++ media/gpu/buffer_validation.cc -@@ -16,7 +16,7 @@ +@@ -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 #include -@@ -29,7 +29,7 @@ + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +@@ -23,7 +23,7 @@ namespace media { - namespace { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #ifndef I915_FORMAT_MOD_4_TILED_MTL_MC_CCS - // TODO(b/271455200): Remove this definition once drm_fourcc.h contains it. - /* -@@ -55,7 +55,7 @@ bool IsIntelMediaCompressedModifier(uint64_t modifier) - } // namespace - 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; -@@ -109,14 +109,14 @@ bool VerifyGpuMemoryBufferHandle( +@@ -77,7 +77,7 @@ bool VerifyGpuMemoryBufferHandle( VLOG(1) << "Unsupported: " << pixel_format; return false; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - const uint64_t modifier = gmb_handle.native_pixmap_handle.modifier; - const bool is_intel_media_compressed_buffer = - IsIntelMediaCompressedModifier(modifier); - const bool is_intel_media_compression_enabled = - #if BUILDFLAG(IS_CHROMEOS) - base::FeatureList::IsEnabled(features::kEnableIntelMediaCompression); --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - false; - #endif - + 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_libyuv__image__processor__backend.cc b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc index b5114d97b986..14f37d4e1f34 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc @@ -1,29 +1,29 @@ ---- media/gpu/chromeos/libyuv_image_processor_backend.cc.orig 2024-10-01 07:26:23 UTC +--- media/gpu/chromeos/libyuv_image_processor_backend.cc.orig 2024-11-16 12:20:41 UTC +++ media/gpu/chromeos/libyuv_image_processor_backend.cc @@ -53,7 +53,7 @@ static constexpr struct { #define CONV(in, out, trans, result) \ {Fourcc::in, Fourcc::out, Transform::trans, SupportResult::result} // Conversion. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) CONV(NV12, AR24, kConversion, Supported), #endif CONV(NV12, NV12, kConversion, Supported), -@@ -420,7 +420,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Fr +@@ -412,7 +412,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Fr fr->GetWritableVisibleData(VideoFrame::Plane::kUV)), \ fr->stride(VideoFrame::Plane::kUV) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define ARGB_DATA(fr) \ fr->GetWritableVisibleData(VideoFrame::Plane::kARGB), \ fr->stride(VideoFrame::Plane::kARGB) -@@ -582,7 +582,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Fr +@@ -574,7 +574,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Fr } } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (output->format() == PIXEL_FORMAT_ARGB) { if (input_config_.fourcc == Fourcc(Fourcc::NV12)) { return LIBYUV_FUNC(NV12ToARGB, Y_UV_DATA(input), diff --git a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_native__pixmap__frame__resource.cc b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_native__pixmap__frame__resource.cc deleted file mode 100644 index 1483e6743c75..000000000000 --- a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_native__pixmap__frame__resource.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- media/gpu/chromeos/native_pixmap_frame_resource.cc.orig 2024-08-26 14:40:28 UTC -+++ media/gpu/chromeos/native_pixmap_frame_resource.cc -@@ -176,7 +176,7 @@ scoped_refptr NativePixmapF - const bool is_intel_media_compression_enabled = - #if BUILDFLAG(IS_CHROMEOS) - base::FeatureList::IsEnabled(features::kEnableIntelMediaCompression); --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - false; - #endif - CHECK(!is_intel_media_compressed_buffer || diff --git a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc index 234a2e260c2e..d7fca55ad4c4 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc @@ -1,29 +1,11 @@ ---- media/gpu/chromeos/platform_video_frame_utils.cc.orig 2024-06-22 08:49:42 UTC +--- media/gpu/chromeos/platform_video_frame_utils.cc.orig 2024-11-16 12:20:41 UTC +++ media/gpu/chromeos/platform_video_frame_utils.cc -@@ -68,7 +68,7 @@ static std::unique_ptr CreateGbmDevice( +@@ -67,7 +67,7 @@ static std::unique_ptr CreateGbmDevice( const base::FilePath dev_path(FILE_PATH_LITERAL( base::StrCat({drm_node_file_prefix, base::NumberToString(i)}))); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_V4L2_CODEC) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_V4L2_CODEC) const bool is_render_node = base::Contains(drm_node_file_prefix, "render"); // TODO(b/313513760): don't guard base::File::FLAG_WRITE behind -@@ -196,7 +196,7 @@ class GbmDeviceWrapper { - const bool is_intel_media_compression_enabled = - #if BUILDFLAG(IS_CHROMEOS) - base::FeatureList::IsEnabled(features::kEnableIntelMediaCompression); --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - false; - #endif - if (is_intel_media_compression_enabled) { -@@ -350,7 +350,7 @@ scoped_refptr CreateVideoFrameFromGpuMemor - const bool is_intel_media_compression_enabled = - #if BUILDFLAG(IS_CHROMEOS) - base::FeatureList::IsEnabled(features::kEnableIntelMediaCompression); --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - false; - #endif - diff --git a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc index b598381a2d3a..484f4174c806 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,29 +1,29 @@ ---- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2024-08-26 14:40:28 UTC +--- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2024-11-16 12:20:41 UTC +++ media/gpu/chromeos/video_decoder_pipeline.cc -@@ -1096,7 +1096,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1095,7 +1095,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( } #endif -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_VAAPI) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_VAAPI) // Linux should always use a custom allocator (to allocate buffers using // libva) and a PlatformVideoFramePool. CHECK(allocator.has_value()); -@@ -1105,7 +1105,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1104,7 +1104,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( // VideoFrame::StorageType of VideoFrame::STORAGE_DMABUFS. main_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator( *allocator, VideoFrame::STORAGE_DMABUFS); -#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 -@@ -1287,7 +1287,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1286,7 +1286,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) // The custom allocator creates frames backed by NativePixmap, which uses a // VideoFrame::StorageType of VideoFrame::STORAGE_DMABUFS. auxiliary_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator( diff --git a/www/ungoogled-chromium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc b/www/ungoogled-chromium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc index 54fcc04f209c..81b5380cf778 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc @@ -1,11 +1,20 @@ ---- media/gpu/gpu_video_encode_accelerator_factory.cc.orig 2024-04-23 07:42:17 UTC +--- media/gpu/gpu_video_encode_accelerator_factory.cc.orig 2024-11-16 12:20:41 UTC +++ media/gpu/gpu_video_encode_accelerator_factory.cc @@ -118,7 +118,7 @@ std::vector GetVEAFactoryFunctions return vea_factory_functions; #if BUILDFLAG(USE_VAAPI) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - if (base::FeatureList::IsEnabled(kVaapiVideoEncodeLinux)) + if (base::FeatureList::IsEnabled(kAcceleratedVideoEncodeLinux)) { vea_factory_functions.push_back(base::BindRepeating(&CreateVaapiVEA)); - #else + } +@@ -126,7 +126,7 @@ std::vector GetVEAFactoryFunctions + vea_factory_functions.push_back(base::BindRepeating(&CreateVaapiVEA)); + #endif + #elif BUILDFLAG(USE_V4L2_CODEC) +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (base::FeatureList::IsEnabled(kAcceleratedVideoEncodeLinux)) { + vea_factory_functions.push_back(base::BindRepeating(&CreateV4L2VEA)); + } diff --git a/www/ungoogled-chromium/files/patch-media_mojo_mojom_video__frame__mojom__traits.cc b/www/ungoogled-chromium/files/patch-media_mojo_mojom_video__frame__mojom__traits.cc index ace76a4e25b4..c3f06ad07230 100644 --- a/www/ungoogled-chromium/files/patch-media_mojo_mojom_video__frame__mojom__traits.cc +++ b/www/ungoogled-chromium/files/patch-media_mojo_mojom_video__frame__mojom__traits.cc @@ -1,11 +1,29 @@ ---- media/mojo/mojom/video_frame_mojom_traits.cc.orig 2024-10-01 07:26:23 UTC +--- media/mojo/mojom/video_frame_mojom_traits.cc.orig 2024-11-16 12:20:41 UTC +++ media/mojo/mojom/video_frame_mojom_traits.cc @@ -27,7 +27,7 @@ #include "ui/gfx/mojom/color_space_mojom_traits.h" #include "ui/gfx/mojom/hdr_metadata_mojom_traits.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/posix/eintr_wrapper.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +@@ -152,7 +152,7 @@ media::mojom::VideoFrameDataPtr MakeVideoFrameData( + std::move(shared_image), std::move(mailbox_holder.sync_token), + std::move(mailbox_holder.texture_target), + std::move(input->ycbcr_info()))); +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + } else if (input->HasOOPVDMailbox()) { + return media::mojom::VideoFrameData::NewMailboxData( + media::mojom::MailboxVideoFrameData::New(input->oopvd_mailbox())); +@@ -353,7 +353,7 @@ bool StructTraits #include #include -@@ -57,7 +57,7 @@ class FakeGpuMemoryBufferImpl : public gpu::GpuMemoryB +@@ -63,7 +63,7 @@ class FakeGpuMemoryBufferImpl : public gpu::GpuMemoryB } // namespace -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::ScopedFD GetDummyFD() { base::ScopedFD fd(open("/dev/zero", O_RDWR)); DCHECK(fd.is_valid()); -@@ -87,7 +87,7 @@ FakeGpuMemoryBuffer::FakeGpuMemoryBuffer(const gfx::Si +@@ -102,7 +102,7 @@ FakeGpuMemoryBuffer::FakeGpuMemoryBuffer(const gfx::Si static base::AtomicSequenceNumber buffer_id_generator; handle_.id = gfx::GpuMemoryBufferId(buffer_id_generator.GetNext()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) for (size_t i = 0; i < VideoFrame::NumPlanes(video_pixel_format_); i++) { const gfx::Size plane_size_in_bytes = VideoFrame::PlaneSize(video_pixel_format_, i, size_); -@@ -149,7 +149,7 @@ gfx::GpuMemoryBufferHandle FakeGpuMemoryBuffer::CloneH +@@ -176,7 +176,7 @@ gfx::GpuMemoryBufferHandle FakeGpuMemoryBuffer::CloneH gfx::GpuMemoryBufferHandle handle; handle.type = gfx::NATIVE_PIXMAP; handle.id = handle_.id; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) handle.native_pixmap_handle = gfx::CloneHandleForIPC(handle_.native_pixmap_handle); #endif diff --git a/www/ungoogled-chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc b/www/ungoogled-chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc index 60f7ffee7b18..5eeff29d0594 100644 --- a/www/ungoogled-chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc +++ b/www/ungoogled-chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc @@ -1,29 +1,29 @@ ---- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2024-10-27 06:40:35 UTC +--- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2024-11-16 12:20:41 UTC +++ media/video/gpu_memory_buffer_video_frame_pool.cc -@@ -98,7 +98,7 @@ class GpuMemoryBufferVideoFramePool::PoolImpl - gpu::SHARED_IMAGE_USAGE_RASTER_READ | - 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/40194712): Always add the flag once the - // OzoneImageBacking is by default turned on. - if (base::CommandLine::ForCurrentProcess()->HasSwitch( -@@ -695,7 +695,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa +@@ -641,7 +641,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa } - bool is_software_backed_video_frame = !video_frame->HasTextures(); + bool is_software_backed_video_frame = !video_frame->HasSharedImage(); -#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 -@@ -1104,7 +1104,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo +@@ -1049,7 +1049,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo media::IOSurfaceIsWebGPUCompatible(handle.io_surface.get()); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) is_webgpu_compatible = handle.native_pixmap_handle.supports_zero_copy_webgpu_import; #endif +@@ -1236,7 +1236,7 @@ GpuMemoryBufferVideoFramePool::PoolImpl::GetOrCreateFr + si_usage |= 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/40194712): Always add the flag once the + // OzoneImageBacking is by default turned on. + if (base::CommandLine::ForCurrentProcess()->HasSwitch( diff --git a/www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter.cc b/www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter.cc index e6ff595ac9a8..9b42fffe1012 100644 --- a/www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter.cc +++ b/www/ungoogled-chromium/files/patch-media_video_video__encode__accelerator__adapter.cc @@ -1,20 +1,20 @@ ---- media/video/video_encode_accelerator_adapter.cc.orig 2024-10-01 07:26:23 UTC +--- media/video/video_encode_accelerator_adapter.cc.orig 2024-11-16 12:20:41 UTC +++ media/video/video_encode_accelerator_adapter.cc -@@ -164,7 +164,7 @@ VideoEncodeAccelerator::Config SetUpVeaConfig( - if (is_rgb) +@@ -160,7 +160,7 @@ VideoEncodeAccelerator::Config SetUpVeaConfig( config.input_format = PIXEL_FORMAT_I420; + } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (format != PIXEL_FORMAT_I420 || !VideoFrame::IsStorageTypeMappable(storage_type)) { // ChromeOS/Linux hardware video encoders supports I420 on-memory -@@ -550,7 +550,7 @@ void VideoEncodeAcceleratorAdapter::InitializeInternal - SetUpVeaConfig(profile_, options_, format, first_frame->storage_type(), - supported_rc_modes_, required_encoder_type_); +@@ -519,7 +519,7 @@ void VideoEncodeAcceleratorAdapter::InitializeInternal + profile_, options_, format, first_frame->storage_type(), + supported_rc_modes_, required_encoder_type_, is_gpu_supported_format); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Linux/ChromeOS require a special configuration to use dmabuf storage. // We need to keep sending frames the same way the first frame was sent. // Other platforms will happily mix GpuMemoryBuffer storage with regular diff --git a/www/ungoogled-chromium/files/patch-net_BUILD.gn b/www/ungoogled-chromium/files/patch-net_BUILD.gn index cf680c7472ef..165a702a4900 100644 --- a/www/ungoogled-chromium/files/patch-net_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-net_BUILD.gn @@ -1,78 +1,78 @@ ---- net/BUILD.gn.orig 2024-10-27 06:40:35 UTC +--- net/BUILD.gn.orig 2024-11-16 12:20:41 UTC +++ net/BUILD.gn -@@ -125,7 +125,7 @@ net_configs = [ +@@ -126,7 +126,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" ] } -@@ -1279,6 +1279,19 @@ component("net") { +@@ -1289,6 +1289,19 @@ component("net") { ] } + if (is_bsd) { + sources -= [ + "base/address_map_cache_linux.cc", + "base/address_map_cache_linux.h", + "base/address_map_linux.cc", + "base/address_map_linux.h", + "base/address_tracker_linux.cc", + "base/address_tracker_linux.h", + "base/network_change_notifier_linux.cc", + "base/network_interfaces_linux.cc", + ] + } + if (is_mac) { sources += [ "base/network_notification_thread_mac.cc", -@@ -1440,7 +1453,7 @@ component("net") { +@@ -1452,7 +1465,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", -@@ -2923,7 +2936,7 @@ target(_test_target_type, "net_unittests") { +@@ -2937,7 +2950,7 @@ target(_test_target_type, "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", -@@ -3016,6 +3029,10 @@ target(_test_target_type, "net_unittests") { +@@ -3030,6 +3043,10 @@ target(_test_target_type, "net_unittests") { ] } + if (is_bsd) { + deps += [ "//sandbox/policy" ] + } + if (enable_websockets) { sources += [ "server/http_connection_unittest.cc", -@@ -3082,7 +3099,7 @@ target(_test_target_type, "net_unittests") { +@@ -3096,7 +3113,7 @@ target(_test_target_type, "net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "tools/quic/quic_simple_server_test.cc" ] } -@@ -3221,7 +3238,7 @@ target(_test_target_type, "net_unittests") { +@@ -3235,7 +3252,7 @@ target(_test_target_type, "net_unittests") { } # Use getifaddrs() on POSIX platforms, except Linux. - if (is_posix && !is_linux && !is_chromeos) { + if (is_posix && !is_linux && !is_chromeos && !is_bsd) { sources += [ "base/network_interfaces_getifaddrs_unittest.cc" ] } diff --git a/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc.h b/www/ungoogled-chromium/files/patch-net_cert_cert__verify__proc.h index 1c168ac993f9..b73c2bec35b9 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 2024-10-27 06:40:35 UTC +--- net/cert/cert_verify_proc.h.orig 2024-11-16 12:20:41 UTC +++ net/cert/cert_verify_proc.h -@@ -178,7 +178,7 @@ class NET_EXPORT CertVerifyProc +@@ -186,7 +186,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_disk__cache_backend__experiment.h b/www/ungoogled-chromium/files/patch-net_disk__cache_backend__experiment.h new file mode 100644 index 000000000000..a14c4c97a938 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-net_disk__cache_backend__experiment.h @@ -0,0 +1,11 @@ +--- net/disk_cache/backend_experiment.h.orig 2024-11-16 12:20:41 UTC ++++ net/disk_cache/backend_experiment.h +@@ -14,7 +14,7 @@ namespace disk_cache { + // default. + constexpr bool IsSimpleBackendEnabledByDefaultPlatform() { + return BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC); ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD); + } + + // True if assigned to any of disk cache backend experiment groups. diff --git a/www/ungoogled-chromium/files/patch-pdf_pdfium_pdfium__engine.cc b/www/ungoogled-chromium/files/patch-pdf_pdfium_pdfium__engine.cc index de0f4b9980d4..66369f2860c6 100644 --- a/www/ungoogled-chromium/files/patch-pdf_pdfium_pdfium__engine.cc +++ b/www/ungoogled-chromium/files/patch-pdf_pdfium_pdfium__engine.cc @@ -1,20 +1,20 @@ ---- pdf/pdfium/pdfium_engine.cc.orig 2024-10-27 06:40:35 UTC +--- pdf/pdfium/pdfium_engine.cc.orig 2024-11-16 12:20:41 UTC +++ pdf/pdfium/pdfium_engine.cc -@@ -94,7 +94,7 @@ - #include "gin/public/cppgc.h" +@@ -99,7 +99,7 @@ + #include "ui/accessibility/ax_features.mojom-features.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "pdf/pdfium/pdfium_font_linux.h" #endif -@@ -523,7 +523,7 @@ void InitializeSDK(bool enable_v8, +@@ -528,7 +528,7 @@ void InitializeSDK(bool enable_v8, FPDF_InitLibraryWithConfig(&config); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) g_font_mapping_mode = font_mapping_mode; InitializeLinuxFontMapper(); #endif diff --git a/www/ungoogled-chromium/files/patch-printing_backend_print__backend__cups.cc b/www/ungoogled-chromium/files/patch-printing_backend_print__backend__cups.cc index 1c2aea52682b..9d96e35cf807 100644 --- a/www/ungoogled-chromium/files/patch-printing_backend_print__backend__cups.cc +++ b/www/ungoogled-chromium/files/patch-printing_backend_print__backend__cups.cc @@ -1,29 +1,29 @@ ---- printing/backend/print_backend_cups.cc.orig 2024-10-27 06:40:35 UTC +--- printing/backend/print_backend_cups.cc.orig 2024-11-16 12:20:41 UTC +++ printing/backend/print_backend_cups.cc @@ -33,7 +33,7 @@ #include "printing/mojom/print.mojom.h" #include "url/gurl.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "base/feature_list.h" #include "printing/backend/cups_connection.h" #include "printing/backend/print_backend_cups_ipp.h" @@ -63,7 +63,7 @@ int CaptureCupsDestCallback(void* data, unsigned flags return 1; // Keep going. } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // This may be removed when Amazon Linux 2 reaches EOL (30 Jun 2025). bool AreNewerCupsFunctionsAvailable() { - return cupsFindDestDefault && cupsFindDestSupported && ippValidateAttributes; -@@ -291,7 +291,7 @@ bool PrintBackendCUPS::IsValidPrinter(const std::strin + return cupsFindDestDefault && cupsFindDestSupported && cupsUserAgent && +@@ -292,7 +292,7 @@ bool PrintBackendCUPS::IsValidPrinter(const std::strin #if !BUILDFLAG(IS_CHROMEOS) scoped_refptr PrintBackend::CreateInstanceImpl( const std::string& locale) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (AreNewerCupsFunctionsAvailable() && base::FeatureList::IsEnabled(features::kCupsIppPrintingBackend)) { return base::MakeRefCounted(CupsConnection::Create()); diff --git a/www/ungoogled-chromium/files/patch-printing_print__settings.cc b/www/ungoogled-chromium/files/patch-printing_print__settings.cc index 7806f74e596c..fbb78d471ea6 100644 --- a/www/ungoogled-chromium/files/patch-printing_print__settings.cc +++ b/www/ungoogled-chromium/files/patch-printing_print__settings.cc @@ -1,38 +1,38 @@ ---- printing/print_settings.cc.orig 2023-10-13 13:20:35 UTC +--- printing/print_settings.cc.orig 2024-11-16 12:20:41 UTC +++ printing/print_settings.cc -@@ -320,7 +320,7 @@ PrintSettings& PrintSettings::operator=(const PrintSet +@@ -319,7 +319,7 @@ PrintSettings& PrintSettings::operator=(const PrintSet #endif is_modifiable_ = settings.is_modifiable_; pages_per_sheet_ = settings.pages_per_sheet_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) for (const auto& item : settings.advanced_settings_) advanced_settings_.emplace(item.first, item.second.Clone()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -350,7 +350,7 @@ bool PrintSettings::operator==(const PrintSettings& ot +@@ -349,7 +349,7 @@ bool PrintSettings::operator==(const PrintSettings& ot #endif is_modifiable_, requested_custom_margins_in_points_, pages_per_sheet_ -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) , advanced_settings_ #endif -@@ -374,7 +374,7 @@ bool PrintSettings::operator==(const PrintSettings& ot +@@ -373,7 +373,7 @@ bool PrintSettings::operator==(const PrintSettings& ot other.is_modifiable_, other.requested_custom_margins_in_points_, other.pages_per_sheet_ -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) , other.advanced_settings_ #endif -@@ -414,7 +414,7 @@ void PrintSettings::Clear() { +@@ -413,7 +413,7 @@ void PrintSettings::Clear() { #endif is_modifiable_ = true; pages_per_sheet_ = 1; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) advanced_settings_.clear(); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-printing_printing__context__linux.cc b/www/ungoogled-chromium/files/patch-printing_printing__context__linux.cc index 75c7a9945b89..1413673fdb01 100644 --- a/www/ungoogled-chromium/files/patch-printing_printing__context__linux.cc +++ b/www/ungoogled-chromium/files/patch-printing_printing__context__linux.cc @@ -1,38 +1,38 @@ ---- printing/printing_context_linux.cc.orig 2023-12-23 12:33:28 UTC +--- printing/printing_context_linux.cc.orig 2024-11-16 12:20:41 UTC +++ printing/printing_context_linux.cc @@ -23,7 +23,7 @@ #endif // Avoid using LinuxUi on Fuchsia. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui.h" #endif -@@ -68,7 +68,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSett +@@ -66,7 +66,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSett ResetSettings(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!ui::LinuxUi::instance()) return mojom::ResultCode::kSuccess; -@@ -84,7 +84,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSett +@@ -82,7 +82,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSett } gfx::Size PrintingContextLinux::GetPdfPaperSizeDeviceUnits() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (ui::LinuxUi::instance()) return ui::LinuxUi::instance()->GetPdfPaperSize(this); #endif -@@ -97,7 +97,7 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterS +@@ -95,7 +95,7 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterS DCHECK(!printer_settings.show_system_dialog); DCHECK(!in_print_job_); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!ui::LinuxUi::instance()) return mojom::ResultCode::kSuccess; diff --git a/www/ungoogled-chromium/files/patch-remoting_host_chromoting__host__context.cc b/www/ungoogled-chromium/files/patch-remoting_host_chromoting__host__context.cc index 4e2a5e4fb0f4..974b0ef92eeb 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_chromoting__host__context.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_chromoting__host__context.cc @@ -1,11 +1,11 @@ ---- remoting/host/chromoting_host_context.cc.orig 2023-08-18 10:26:52 UTC +--- remoting/host/chromoting_host_context.cc.orig 2024-11-16 12:20:41 UTC +++ remoting/host/chromoting_host_context.cc -@@ -294,7 +294,7 @@ std::unique_ptr ChromotingHostC +@@ -293,7 +293,7 @@ std::unique_ptr ChromotingHostC // on a UI thread. scoped_refptr input_task_runner = AutoThread::CreateWithType("ChromotingInputThread", ui_task_runner, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::MessagePumpType::UI); #else base::MessagePumpType::IO); diff --git a/www/ungoogled-chromium/files/patch-remoting_host_ipc__constants.cc b/www/ungoogled-chromium/files/patch-remoting_host_ipc__constants.cc index aea394d536f2..2f72c0b8c93f 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_ipc__constants.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_ipc__constants.cc @@ -1,20 +1,20 @@ ---- remoting/host/ipc_constants.cc.orig 2023-02-11 09:11:04 UTC +--- remoting/host/ipc_constants.cc.orig 2024-11-16 12:20:41 UTC +++ remoting/host/ipc_constants.cc @@ -17,7 +17,7 @@ namespace remoting { namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #if !defined(NDEBUG) // Use a different IPC name for debug builds so that we can run the host -@@ -68,7 +68,7 @@ GetChromotingHostServicesServerName() { +@@ -81,7 +81,7 @@ GetChromotingHostServicesServerName() { static const base::NoDestructor server_name( named_mojo_ipc_server::WorkingDirectoryIndependentServerNameFromUTF8( -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Linux host creates the socket file in /tmp, and it won't be // deleted until reboot, so we put username in the path in case // the user switches the host owner. diff --git a/www/ungoogled-chromium/files/patch-remoting_host_it2me_it2me__host.cc b/www/ungoogled-chromium/files/patch-remoting_host_it2me_it2me__host.cc index b5637436cd51..dcc9ae63f53c 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 2024-10-27 06:40:35 UTC +--- remoting/host/it2me/it2me_host.cc.orig 2024-11-16 12:20:41 UTC +++ remoting/host/it2me/it2me_host.cc -@@ -57,7 +57,7 @@ +@@ -58,7 +58,7 @@ #include "remoting/host/chromeos/features.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/linux/wayland_manager.h" #include "remoting/host/linux/wayland_utils.h" #endif // BUILDFLAG(IS_LINUX) -@@ -185,7 +185,7 @@ void It2MeHost::Connect( +@@ -184,7 +184,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()); } @@ -318,7 +318,7 @@ void It2MeHost::ConnectOnNetworkThread( // Set up the desktop environment options. DesktopEnvironmentOptions options(DesktopEnvironmentOptions::CreateDefault()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsRunningWayland()) { options.desktop_capture_options()->set_prefer_cursor_embedded(true); } diff --git a/www/ungoogled-chromium/files/patch-remoting_host_mojo__caller__security__checker.cc b/www/ungoogled-chromium/files/patch-remoting_host_mojo__caller__security__checker.cc new file mode 100644 index 000000000000..a0b6c61dcc38 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-remoting_host_mojo__caller__security__checker.cc @@ -0,0 +1,29 @@ +--- remoting/host/mojo_caller_security_checker.cc.orig 2024-11-16 12:20:41 UTC ++++ remoting/host/mojo_caller_security_checker.cc +@@ -37,7 +37,7 @@ + namespace remoting { + namespace { + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + constexpr auto kAllowedCallerProgramNames = + base::MakeFixedFlatSet({ + "remote-open-url", +@@ -98,7 +98,7 @@ bool IsTrustedMojoEndpoint( + return true; + #endif + +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + + // TODO: yuweih - see if it's possible to move away from PID-based security + // checks, which might be susceptible of PID reuse attacks. +@@ -122,7 +122,7 @@ bool IsTrustedMojoEndpoint( + base::FilePath::StringType program_name = + caller_process_image_path.BaseName().value(); + if (!kAllowedCallerProgramNames.contains(program_name)) { +-#if BUILDFLAG(IS_LINUX) && !defined(NDEBUG) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !defined(NDEBUG) + // Linux binaries generated in out/Debug are underscore-separated. To make + // debugging easier, we just check the name again with underscores replaced + // with hyphens. diff --git a/www/ungoogled-chromium/files/patch-remoting_host_remoting__me2me__host.cc b/www/ungoogled-chromium/files/patch-remoting_host_remoting__me2me__host.cc index da82009024c0..3190bef08174 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_remoting__me2me__host.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_remoting__me2me__host.cc @@ -1,169 +1,169 @@ ---- remoting/host/remoting_me2me_host.cc.orig 2024-10-27 06:40:35 UTC +--- remoting/host/remoting_me2me_host.cc.orig 2024-11-16 12:20:41 UTC +++ remoting/host/remoting_me2me_host.cc -@@ -134,7 +134,7 @@ +@@ -146,7 +146,7 @@ #include "remoting/host/mac/permission_utils.h" #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if defined(REMOTING_USE_X11) #include #endif // defined(REMOTING_USE_X11) -@@ -145,13 +145,13 @@ +@@ -157,13 +157,13 @@ #endif // defined(REMOTING_USE_X11) #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/linux_util.h" #include "remoting/host/audio_capturer_linux.h" #include "remoting/host/linux/certificate_watcher.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/host_utmp_logger.h" #endif -@@ -164,7 +164,7 @@ +@@ -177,7 +177,7 @@ #include "remoting/host/win/session_desktop_environment.h" #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/linux/wayland_manager.h" #include "remoting/host/linux/wayland_utils.h" #endif // BUILDFLAG(IS_LINUX) -@@ -193,7 +193,7 @@ const char kApplicationName[] = "chromoting"; +@@ -205,7 +205,7 @@ const char kApplicationName[] = "chromoting"; const char kStdinConfigPath[] = "-"; #endif // !defined(REMOTING_MULTI_PROCESS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The command line switch used to pass name of the pipe to capture audio on // linux. const char kAudioPipeSwitchName[] = "audio-pipe-name"; -@@ -412,7 +412,7 @@ class HostProcess : public ConfigWatcher::Delegate, - - std::unique_ptr context_; +@@ -448,7 +448,7 @@ class HostProcess : public ConfigWatcher::Delegate, + std::unique_ptr agent_process_broker_client_; + #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Watch for certificate changes and kill the host when changes occur std::unique_ptr cert_watcher_; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -478,7 +478,7 @@ class HostProcess : public ConfigWatcher::Delegate, +@@ -515,7 +515,7 @@ class HostProcess : public ConfigWatcher::Delegate, std::unique_ptr host_status_logger_; std::unique_ptr host_event_logger_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr host_utmp_logger_; #endif std::unique_ptr power_save_blocker_; -@@ -785,7 +785,7 @@ void HostProcess::StartOnNetworkThread() { +@@ -834,7 +834,7 @@ void HostProcess::StartOnNetworkThread() { void HostProcess::ShutdownOnNetworkThread() { DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); config_watcher_.reset(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) cert_watcher_.reset(); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) } -@@ -856,7 +856,7 @@ void HostProcess::CreateAuthenticatorFactory() { +@@ -905,7 +905,7 @@ void HostProcess::CreateAuthenticatorFactory() { context_->url_loader_factory(), service_account_email_, oauth_refresh_token_)); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!cert_watcher_) { cert_watcher_ = std::make_unique( base::BindRepeating(&HostProcess::ShutdownHost, -@@ -1001,13 +1001,13 @@ void HostProcess::StartOnUiThread() { +@@ -1047,13 +1047,13 @@ void HostProcess::StartOnUiThread() { base::BindRepeating(&HostProcess::OnPolicyUpdate, base::Unretained(this)), base::BindRepeating(&HostProcess::OnPolicyError, base::Unretained(this))); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsRunningWayland()) { WaylandManager::Get()->Init(context_->ui_task_runner()); } #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If an audio pipe is specific on the command-line then initialize // AudioCapturerLinux to capture from it. base::FilePath audio_pipe_name = -@@ -1084,7 +1084,7 @@ void HostProcess::ShutdownOnUiThread() { +@@ -1130,7 +1130,7 @@ void HostProcess::ShutdownOnUiThread() { // It is now safe for the HostProcess to be deleted. self_ = nullptr; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Cause the global AudioPipeReader to be freed, otherwise the audio // thread will remain in-use and prevent the process from exiting. // TODO(wez): DesktopEnvironmentFactory should own the pipe reader. -@@ -1092,7 +1092,7 @@ void HostProcess::ShutdownOnUiThread() { +@@ -1138,7 +1138,7 @@ void HostProcess::ShutdownOnUiThread() { AudioCapturerLinux::InitializePipeReader(nullptr, base::FilePath()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) context_->input_task_runner()->PostTask( FROM_HERE, base::BindOnce([]() { delete ui::X11EventSource::GetInstance(); })); -@@ -1502,7 +1502,7 @@ bool HostProcess::OnUsernamePolicyUpdate(const base::V +@@ -1592,7 +1592,7 @@ bool HostProcess::OnUsernamePolicyUpdate(const base::V // Returns false: never restart the host after this policy update. DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) std::optional host_username_match_required = policies.FindBool(policy::key::kRemoteAccessHostMatchUsername); if (!host_username_match_required.has_value()) { -@@ -1778,7 +1778,7 @@ void HostProcess::StartHost() { +@@ -1866,7 +1866,7 @@ void HostProcess::StartHost() { corp_host_status_logger_->StartObserving(*session_manager); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) desktop_environment_options_.set_enable_remote_webauthn(is_corp_host_); #endif -@@ -1798,7 +1798,7 @@ void HostProcess::StartHost() { +@@ -1886,7 +1886,7 @@ void HostProcess::StartHost() { host_status_logger_ = std::make_unique( host_->status_monitor(), log_to_server_.get()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); if (cmd_line->HasSwitch(kEnableUtempter)) { host_utmp_logger_ = -@@ -1834,7 +1834,7 @@ void HostProcess::StartHost() { +@@ -1922,7 +1922,7 @@ void HostProcess::StartHost() { // addresses. host_->Start(*host_owner_emails_.begin()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // For Windows, ChromotingHostServices connections are handled by the daemon // process, then the message pipe is forwarded to the network process. host_->StartChromotingHostServices(); -@@ -1968,7 +1968,7 @@ int HostProcessMain() { +@@ -2069,7 +2069,7 @@ int HostProcessMain() { HOST_LOG << "Starting host process: version " << STRINGIZE(VERSION); const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if defined(REMOTING_USE_X11) // Initialize Xlib for multi-threaded use, allowing non-Chromium code to // use X11 safely (such as the WebRTC capturer, GTK ...) -@@ -2017,7 +2017,7 @@ int HostProcessMain() { +@@ -2118,7 +2118,7 @@ int HostProcessMain() { std::unique_ptr network_change_notifier( net::NetworkChangeNotifier::CreateIfNeeded()); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) // Create an X11EventSource on all UI threads, so the global X11 connection // (x11::Connection::Get()) can dispatch X events. auto event_source = diff --git a/www/ungoogled-chromium/files/patch-sandbox_linux_BUILD.gn b/www/ungoogled-chromium/files/patch-sandbox_linux_BUILD.gn index 73f24ec3dfc5..d0af815ee467 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-08-18 10:26:52 UTC +--- sandbox/linux/BUILD.gn.orig 2024-11-16 12:20:41 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_BUILD.gn b/www/ungoogled-chromium/files/patch-sandbox_policy_BUILD.gn index 507cbb91fcbe..468d93369003 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_BUILD.gn @@ -1,39 +1,39 @@ ---- sandbox/policy/BUILD.gn.orig 2024-10-27 06:40:35 UTC +--- sandbox/policy/BUILD.gn.orig 2024-11-16 12:20:41 UTC +++ sandbox/policy/BUILD.gn @@ -50,7 +50,7 @@ component("policy") { "//third_party/jni_zero", ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "linux/bpf_audio_policy_linux.cc", "linux/bpf_audio_policy_linux.h", -@@ -125,6 +125,27 @@ component("policy") { +@@ -127,6 +127,27 @@ component("policy") { "//sandbox/linux:sandbox_services", "//sandbox/linux:seccomp_bpf", "//sandbox/linux:suid_sandbox_client", + ] + } + if (is_openbsd) { + sources += [ + "openbsd/sandbox_openbsd.cc", + "openbsd/sandbox_openbsd.h", + ] + deps += [ + "//sandbox:sandbox_buildflags", + "//ui/gfx/x", + ] + libs = [ "util" ] + } + if (is_freebsd) { + sources += [ + "freebsd/sandbox_freebsd.cc", + "freebsd/sandbox_freebsd.h", + ] + deps += [ + "//sandbox:sandbox_buildflags", + "//ui/gfx/x", ] } if (is_chromeos_ash) { diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_features.cc b/www/ungoogled-chromium/files/patch-sandbox_policy_features.cc index 6c2e5214ba22..6c7dab1448c3 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_features.cc +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_features.cc @@ -1,23 +1,23 @@ ---- sandbox/policy/features.cc.orig 2024-10-27 06:40:35 UTC +--- sandbox/policy/features.cc.orig 2024-11-16 12:20:41 UTC +++ sandbox/policy/features.cc @@ -20,7 +20,11 @@ namespace sandbox::policy::features { // (Only causes an effect when feature kNetworkServiceInProcess is disabled.) BASE_FEATURE(kNetworkServiceSandbox, "NetworkServiceSandbox", +#if BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT); +#else base::FEATURE_DISABLED_BY_DEFAULT); +#endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) // Enables a fine-grained seccomp-BPF syscall filter for the network service. -@@ -134,7 +138,7 @@ BASE_FEATURE(kSpectreVariant2Mitigation, +@@ -132,7 +136,7 @@ BASE_FEATURE(kSpectreVariant2Mitigation, base::FEATURE_ENABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Enabling the kNetworkServiceSandbox feature automatically enables Spectre // variant 2 mitigations in the network service. This can lead to performance // regressions, so enabling this feature will turn off the Spectre Variant 2 diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_features.h b/www/ungoogled-chromium/files/patch-sandbox_policy_features.h index ac1cc29a3e81..930855f02c64 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_features.h +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_features.h @@ -1,11 +1,11 @@ ---- sandbox/policy/features.h.orig 2024-10-27 06:40:35 UTC +--- sandbox/policy/features.h.orig 2024-11-16 12:20:41 UTC +++ sandbox/policy/features.h -@@ -45,7 +45,7 @@ SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE( +@@ -45,7 +45,7 @@ SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE(kWinSboxPar SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE(kSpectreVariant2Mitigation); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE( kForceDisableSpectreVariant2MitigationInNetworkService); diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.cc b/www/ungoogled-chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.cc index 5cbf1dc9bed9..a72200b667d8 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.cc +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.cc @@ -1,248 +1,214 @@ ---- sandbox/policy/freebsd/sandbox_freebsd.cc.orig 2023-05-05 12:12:41 UTC +--- sandbox/policy/freebsd/sandbox_freebsd.cc.orig 2024-11-16 12:20:41 UTC +++ sandbox/policy/freebsd/sandbox_freebsd.cc -@@ -0,0 +1,245 @@ +@@ -0,0 +1,211 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "sandbox/policy/freebsd/sandbox_freebsd.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "base/command_line.h" +#include "base/debug/stack_trace.h" +#include "base/feature_list.h" +#include "base/files/file_path.h" +#include "base/files/file_util.h" +#include "base/files/scoped_file.h" +#include "base/logging.h" +#include "base/memory/singleton.h" +#include "base/path_service.h" +#include "base/posix/eintr_wrapper.h" +#include "base/strings/string_number_conversions.h" +#include "base/system/sys_info.h" +#include "base/threading/thread.h" +#include "base/time/time.h" +#include "build/build_config.h" +#include "crypto/crypto_buildflags.h" +#include "ppapi/buildflags/buildflags.h" +#include "sandbox/constants.h" +#include "sandbox/linux/services/credentials.h" +#include "sandbox/linux/services/namespace_sandbox.h" +#include "sandbox/linux/services/proc_util.h" +#include "sandbox/linux/services/resource_limits.h" +#include "sandbox/linux/services/thread_helpers.h" +#include "sandbox/linux/syscall_broker/broker_command.h" +#include "sandbox/linux/syscall_broker/broker_process.h" +#include "sandbox/policy/sandbox.h" +#include "sandbox/policy/sandbox_type.h" +#include "sandbox/policy/mojom/sandbox.mojom.h" +#include "sandbox/policy/switches.h" +#include "sandbox/sandbox_buildflags.h" + +#if BUILDFLAG(USING_SANITIZER) +#include +#endif + +#if BUILDFLAG(USE_NSS_CERTS) +#include "crypto/nss_util.h" +#endif + +#include "third_party/boringssl/src/include/openssl/crypto.h" + +#include "ui/gfx/font_util.h" + +namespace sandbox { +namespace policy { + +SandboxLinux::SandboxLinux() + : sandbox_status_flags_(kInvalid), + pre_initialized_(false), + initialize_sandbox_ran_(false), + broker_process_(nullptr) { +} + +SandboxLinux::~SandboxLinux() { + if (pre_initialized_) { + CHECK(initialize_sandbox_ran_); + } +} + +SandboxLinux* SandboxLinux::GetInstance() { + SandboxLinux* instance = base::Singleton::get(); + CHECK(instance); + return instance; +} + +void SandboxLinux::StopThread(base::Thread* thread) { + DCHECK(thread); + thread->Stop(); +} + +void SandboxLinux::PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type) { + CHECK(!pre_initialized_); +#if BUILDFLAG(USING_SANITIZER) + // Sanitizers need to open some resources before the sandbox is enabled. + // This should not fork, not launch threads, not open a directory. + __sanitizer_sandbox_on_notify(sanitizer_args()); + sanitizer_args_.reset(); +#endif + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + const std::string process_type = + command_line->GetSwitchValueASCII(switches::kProcessType); + + base::SysInfo::AmountOfPhysicalMemory(); + base::SysInfo::NumberOfProcessors(); + base::SysInfo::CPUModelName(); + + switch (sandbox_type) { + case sandbox::mojom::Sandbox::kNoSandbox: + { +#if BUILDFLAG(USE_NSS_CERTS) + // The main process has to initialize the ~/.pki dir which won't work + // after unveil(2). + crypto::EnsureNSSInit(); +#endif + CRYPTO_pre_sandbox_init(); + + base::FilePath cache_directory, local_directory; + + base::PathService::Get(base::DIR_CACHE, &cache_directory); + base::PathService::Get(base::DIR_HOME, &local_directory); + + cache_directory = cache_directory.AppendASCII("ungoogled-chromium"); + local_directory = local_directory.AppendASCII(".local").AppendASCII("share").AppendASCII("applications"); + + if (!base::CreateDirectory(cache_directory)) { + LOG(ERROR) << "Failed to create " << cache_directory.value() << " directory."; + } + + if (!base::CreateDirectory(local_directory)) { + LOG(ERROR) << "Failed to create " << local_directory.value() << " directory."; + } + + break; + } + case sandbox::mojom::Sandbox::kRenderer: + gfx::InitializeFonts(); + break; + default: + break; + } + + pre_initialized_ = true; +} + +bool SandboxLinux::InitializeSandbox(sandbox::mojom::Sandbox sandbox_type, + SandboxLinux::PreSandboxHook hook, + const Options& options) { + DCHECK(!initialize_sandbox_ran_); + initialize_sandbox_ran_ = true; + + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + const std::string process_type = + command_line->GetSwitchValueASCII(switches::kProcessType); + + if (command_line->HasSwitch(switches::kNoSandbox)) + return true; + + VLOG(1) << "SandboxLinux::InitializeSandbox: process_type=" -+ << process_type << " sandbox_type=" << GetSandboxTypeInEnglish(sandbox_type); ++ << process_type << " sandbox_type=" << sandbox_type; + + // Only one thread is running, pre-initialize if not already done. + if (!pre_initialized_) + PreinitializeSandbox(sandbox_type); + + // Attempt to limit the future size of the address space of the process. + int error = 0; + const bool limited_as = LimitAddressSpace(&error); + if (error) { + // Restore errno. Internally to |LimitAddressSpace|, the errno due to + // setrlimit may be lost. + errno = error; + PCHECK(limited_as); + } + + if (hook) + CHECK(std::move(hook).Run(options)); + + return true; +} + +bool SandboxLinux::LimitAddressSpace(int* error) { +#if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \ + !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER) + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + if (SandboxTypeFromCommandLine(*command_line) == sandbox::mojom::Sandbox::kNoSandbox) { + return false; + } + + // Unfortunately, it does not appear possible to set RLIMIT_AS such that it + // will both (a) be high enough to support V8's and WebAssembly's address + // space requirements while also (b) being low enough to mitigate exploits + // using integer overflows that require large allocations, heap spray, or + // other memory-hungry attack modes. + + *error = sandbox::ResourceLimits::Lower( + RLIMIT_DATA, static_cast(sandbox::kDataSizeLimit)); + + // Cache the resource limit before turning on the sandbox. + base::SysInfo::AmountOfVirtualMemory(); + base::SysInfo::MaxSharedMemorySize(); + + return *error == 0; +#else + base::SysInfo::AmountOfVirtualMemory(); + return false; +#endif // !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && + // !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER) +} + -+// static -+std::string SandboxLinux::GetSandboxTypeInEnglish(sandbox::mojom::Sandbox sandbox_type) { -+ switch (sandbox_type) { -+ case sandbox::mojom::Sandbox::kNoSandbox: -+ return "Unsandboxed"; -+ case sandbox::mojom::Sandbox::kRenderer: -+ return "Renderer"; -+ case sandbox::mojom::Sandbox::kUtility: -+ return "Utility"; -+ case sandbox::mojom::Sandbox::kGpu: -+ return "GPU"; -+#if BUILDFLAG(ENABLE_PPAPI) -+ case sandbox::mojom::Sandbox::kPpapi: -+ return "PPAPI"; -+#endif -+ case sandbox::mojom::Sandbox::kNetwork: -+ return "Network"; -+ case sandbox::mojom::Sandbox::kCdm: -+ return "CDM"; -+ case sandbox::mojom::Sandbox::kPrintCompositor: -+ return "Print Compositor"; -+ case sandbox::mojom::Sandbox::kAudio: -+ return "Audio"; -+ case sandbox::mojom::Sandbox::kSpeechRecognition: -+ return "Speech Recognition"; -+ case sandbox::mojom::Sandbox::kService: -+ return "Service"; -+ case sandbox::mojom::Sandbox::kVideoCapture: -+ return "Video Capture"; -+ default: -+ return "Unknown"; -+ } -+} -+ +} // namespace policy +} // namespace sandbox diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.h b/www/ungoogled-chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.h index 95d4bf168f16..f29f3ef92613 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.h +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.h @@ -1,281 +1,279 @@ ---- sandbox/policy/freebsd/sandbox_freebsd.h.orig 2022-12-02 17:56:32 UTC +--- sandbox/policy/freebsd/sandbox_freebsd.h.orig 2024-11-16 12:20:41 UTC +++ sandbox/policy/freebsd/sandbox_freebsd.h -@@ -0,0 +1,278 @@ +@@ -0,0 +1,276 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +#ifndef SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ +#define SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ + +#include +#include +#include + +#include "base/logging.h" +#include "base/posix/global_descriptors.h" +#include "sandbox/policy/export.h" +#include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h" +#include "sandbox/policy/mojom/sandbox.mojom.h" +#include "base/sanitizer_buildflags.h" + +#if BUILDFLAG(USING_SANITIZER) +#include +#endif + +namespace base { +template +struct DefaultSingletonTraits; +class Thread; +} // namespace base + +namespace sandbox { +namespace syscall_broker { +class BrokerProcess; +} // namespace syscall_broker +} // namespace sandbox + +namespace sandbox { +namespace policy { + +// A singleton class to represent and change our sandboxing state for the +// three main Linux sandboxes. +// The sandboxing model allows using two layers of sandboxing. The first layer +// can be implemented either with unprivileged namespaces or with the setuid +// sandbox. This class provides a way to engage the namespace sandbox, but does +// not deal with the legacy setuid sandbox directly. +// The second layer is mainly based on seccomp-bpf and is engaged with +// InitializeSandbox(). InitializeSandbox() is also responsible for "sealing" +// the first layer of sandboxing. That is, InitializeSandbox must always be +// called to have any meaningful sandboxing at all. +class SANDBOX_POLICY_EXPORT SandboxLinux { + public: + // This is a list of sandbox IPC methods which the renderer may send to the + // sandbox host. See + // https://chromium.googlesource.com/chromium/src/+/master/docs/linux_sandbox_ipc.md + // This isn't the full list, values < 32 are reserved for methods called from + // Skia, and values < 64 are reserved for libc_interceptor.cc. + enum LinuxSandboxIPCMethods { + DEPRECATED_METHOD_GET_FALLBACK_FONT_FOR_CHAR = 64, + DEPRECATED_METHOD_GET_CHILD_WITH_INODE, + DEPRECATED_METHOD_GET_STYLE_FOR_STRIKE, + METHOD_MAKE_SHARED_MEMORY_SEGMENT, + DEPRECATED_METHOD_MATCH_WITH_FALLBACK, + }; + + // These form a bitmask which describes the conditions of the Linux sandbox. + // Note: this doesn't strictly give you the current status, it states + // what will be enabled when the relevant processes are initialized. + enum Status { + // SUID sandbox active. + kSUID = 1 << 0, + + // Sandbox is using a new PID namespace. + kPIDNS = 1 << 1, + + // Sandbox is using a new network namespace. + kNetNS = 1 << 2, + + // seccomp-bpf sandbox active. + kSeccompBPF = 1 << 3, + + // The Yama LSM module is present and enforcing. + kYama = 1 << 4, + + // seccomp-bpf sandbox is active and the kernel supports TSYNC. + kSeccompTSYNC = 1 << 5, + + // User namespace sandbox active. + kUserNS = 1 << 6, + + // A flag that denotes an invalid sandbox status. + kInvalid = 1 << 31, + }; + + // SandboxLinux Options are a superset of SandboxSecompBPF Options. + struct Options : public SandboxSeccompBPF::Options { + // When running with a zygote, the namespace sandbox will have already + // been engaged prior to initializing SandboxLinux itself, and need not + // be done so again. Set to true to indicate that there isn't a zygote + // for this process and the step is to be performed here explicitly. + bool engage_namespace_sandbox = false; + + // Allow starting the sandbox with multiple threads already running. This + // will enable TSYNC for seccomp-BPF, which syncs the seccomp-BPF policy + // across all running threads. + bool allow_threads_during_sandbox_init = false; + + // Enables the CHECK for open directories. The open directory check is only + // useful for the chroot jail (from the semantic layer of the sandbox), and + // can safely be disabled if we are only enabling the seccomp-BPF layer. + bool check_for_open_directories = true; + }; + + // Callers can provide this hook to run code right before the policy + // is passed to the BPF compiler and the sandbox is engaged. If + // pre_sandbox_hook() returns true, the sandbox will be engaged + // afterwards, otherwise the process is terminated. + using PreSandboxHook = base::OnceCallback; + + // Get our singleton instance. + static SandboxLinux* GetInstance(); + + SandboxLinux(const SandboxLinux&) = delete; + SandboxLinux& operator=(const SandboxLinux&) = delete; + + bool SetPledge(const char *pstring, const char *ppath); + bool SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type); + + // Do some initialization that can only be done before any of the sandboxes + // are enabled. If using the setuid sandbox, this should be called manually + // before the setuid sandbox is engaged. + // Security: When this runs, it is imperative that either InitializeSandbox() + // runs as well or that all file descriptors returned in + // GetFileDescriptorsToClose() get closed. + // Otherwise file descriptors that bypass the security of the setuid sandbox + // would be kept open. One must be particularly careful if a process performs + // a fork(). + void PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type); + + // Check that the current process is the init process of a new PID + // namespace and then proceed to drop access to the file system by using + // a new unprivileged namespace. This is a layer-1 sandbox. + // In order for this sandbox to be effective, it must be "sealed" by calling + // InitializeSandbox(). + void EngageNamespaceSandbox(bool from_zygote); + + // Return a list of file descriptors to close if PreinitializeSandbox() ran + // but InitializeSandbox() won't. Avoid using. + // TODO(jln): get rid of this hack. + std::vector GetFileDescriptorsToClose(); + + // Seal an eventual layer-1 sandbox and initialize the layer-2 sandbox with + // an adequate policy depending on the process type and command line + // arguments. + // Currently the layer-2 sandbox is composed of seccomp-bpf and address space + // limitations. + // This function should only be called without any thread running. + bool InitializeSandbox(sandbox::mojom::Sandbox sandbox_type, + PreSandboxHook hook, + const Options& options); + + // Stop |thread| in a way that can be trusted by the sandbox. + void StopThread(base::Thread* thread); + + // Returns the status of the renderer, worker and ppapi sandbox. Can only + // be queried after going through PreinitializeSandbox(). This is a bitmask + // and uses the constants defined in "enum Status" above. Since the + // status needs to be provided before the sandboxes are actually started, + // this returns what will actually happen once InitializeSandbox() + // is called from inside these processes. + int GetStatus(); + -+ static std::string GetSandboxTypeInEnglish(sandbox::mojom::Sandbox sandbox_type); -+ + // Returns true if the current process is single-threaded or if the number + // of threads cannot be determined. + bool IsSingleThreaded() const; + + // Returns true if we started Seccomp BPF. + bool seccomp_bpf_started() const; + + // Check the policy and eventually start the seccomp-bpf sandbox. This should + // never be called with threads started. If we detect that threads have + // started we will crash. + bool StartSeccompBPF(sandbox::mojom::Sandbox sandbox_type, + PreSandboxHook hook, + const Options& options); + + // Limit the address space of the current process (and its children) to make + // some vulnerabilities harder to exploit. Writes the errno due to setrlimit + // (including 0 if no error) into |error|. + bool LimitAddressSpace(int* error); + + // Returns a file descriptor to proc. The file descriptor is no longer valid + // after the sandbox has been sealed. + int proc_fd() const { + DCHECK_NE(-1, proc_fd_); + return proc_fd_; + } + +#if BUILDFLAG(USING_SANITIZER) + __sanitizer_sandbox_arguments* sanitizer_args() const { + return sanitizer_args_.get(); + }; +#endif + + // A BrokerProcess is a helper that is started before the sandbox is engaged, + // typically from a pre-sandbox hook, that will serve requests to access + // files over an IPC channel. The client of this runs from a SIGSYS handler + // triggered by the seccomp-bpf sandbox. + // |client_sandbox_policy| is the policy being run by the client, and is + // used to derive the equivalent broker-side policy. + // |broker_side_hook| is an alternate pre-sandbox hook to be run before the + // broker itself gets sandboxed, to which the broker side policy and + // |options| are passed. + // Crashes the process if the broker can not be started since continuation + // is impossible (and presumably unsafe). + // This should never be destroyed, as after the sandbox is started it is + // vital to the process. +#if 0 + void StartBrokerProcess( + const sandbox::syscall_broker::BrokerCommandSet& allowed_command_set, + std::vector permissions, + PreSandboxHook broker_side_hook, + const Options& options); + + sandbox::syscall_broker::BrokerProcess* broker_process() const { + return broker_process_; + } +#endif + + private: + friend struct base::DefaultSingletonTraits; + + SandboxLinux(); + ~SandboxLinux(); + + // We must have been pre_initialized_ before using these. + bool seccomp_bpf_supported() const; + bool seccomp_bpf_with_tsync_supported() const; + + // Returns true if it can be determined that the current process has open + // directories that are not managed by the SandboxLinux class. This would + // be a vulnerability as it would allow to bypass the setuid sandbox. + bool HasOpenDirectories() const; + + // The last part of the initialization is to make sure any temporary "hole" + // in the sandbox is closed. For now, this consists of closing proc_fd_. + void SealSandbox(); + + // GetStatus() makes promises as to how the sandbox will behave. This + // checks that no promises have been broken. + void CheckForBrokenPromises(sandbox::mojom::Sandbox sandbox_type); + + // Stop |thread| and make sure it does not appear in /proc/self/tasks/ + // anymore. + void StopThreadAndEnsureNotCounted(base::Thread* thread) const; + + // A file descriptor to /proc. It's dangerous to have it around as it could + // allow for sandbox bypasses. It needs to be closed before we consider + // ourselves sandboxed. + int proc_fd_; + + bool seccomp_bpf_started_; + // The value returned by GetStatus(). Gets computed once and then cached. + int sandbox_status_flags_; + // Did PreinitializeSandbox() run? + bool pre_initialized_; + bool seccomp_bpf_supported_; // Accurate if pre_initialized_. + bool seccomp_bpf_with_tsync_supported_; // Accurate if pre_initialized_. + bool yama_is_enforcing_; // Accurate if pre_initialized_. + bool initialize_sandbox_ran_; // InitializeSandbox() was called. +#if BUILDFLAG(USING_SANITIZER) + std::unique_ptr<__sanitizer_sandbox_arguments> sanitizer_args_; +#endif + sandbox::syscall_broker::BrokerProcess* broker_process_; // Leaked as global. +}; + +} // namespace policy +} // namespace sandbox + +#endif // SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_mojom_sandbox.mojom b/www/ungoogled-chromium/files/patch-sandbox_policy_mojom_sandbox.mojom index aa06f62440b3..879ecb31f79c 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_mojom_sandbox.mojom +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_mojom_sandbox.mojom @@ -1,15 +1,15 @@ ---- sandbox/policy/mojom/sandbox.mojom.orig 2024-10-27 06:40:35 UTC +--- sandbox/policy/mojom/sandbox.mojom.orig 2024-11-16 12:20:41 UTC +++ sandbox/policy/mojom/sandbox.mojom -@@ -80,6 +80,12 @@ enum Sandbox { +@@ -81,6 +81,12 @@ enum Sandbox { [EnableIf=is_fuchsia] kVideoCapture, + [EnableIf=is_openbsd] + kVideoCapture, + + [EnableIf=is_freebsd] + kVideoCapture, + // Allows access to file contents and Windows APIs for parsing icons from PE // files. [EnableIf=is_win] diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc b/www/ungoogled-chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc index d37a3b1e8466..6bbdac2476f3 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc @@ -1,427 +1,395 @@ ---- sandbox/policy/openbsd/sandbox_openbsd.cc.orig 2024-03-22 14:16:19 UTC +--- sandbox/policy/openbsd/sandbox_openbsd.cc.orig 2024-11-16 12:20:41 UTC +++ sandbox/policy/openbsd/sandbox_openbsd.cc -@@ -0,0 +1,424 @@ +@@ -0,0 +1,392 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "sandbox/policy/openbsd/sandbox_openbsd.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "base/command_line.h" +#include "base/debug/stack_trace.h" +#include "base/feature_list.h" +#include "base/files/file_path.h" +#include "base/files/file_util.h" +#include "base/files/scoped_file.h" +#include "base/logging.h" +#include "base/memory/singleton.h" +#include "base/path_service.h" +#include "base/posix/eintr_wrapper.h" +#include "base/strings/string_number_conversions.h" +#include "base/system/sys_info.h" +#include "base/threading/thread.h" +#include "base/time/time.h" +#include "build/build_config.h" +#include "crypto/crypto_buildflags.h" +#include "ppapi/buildflags/buildflags.h" +#include "sandbox/constants.h" +#include "sandbox/linux/services/credentials.h" +#include "sandbox/linux/services/namespace_sandbox.h" +#include "sandbox/linux/services/proc_util.h" +#include "sandbox/linux/services/resource_limits.h" +#include "sandbox/linux/services/thread_helpers.h" +#include "sandbox/linux/syscall_broker/broker_command.h" +#include "sandbox/linux/syscall_broker/broker_process.h" +#include "sandbox/policy/sandbox.h" +#include "sandbox/policy/sandbox_type.h" +#include "sandbox/policy/mojom/sandbox.mojom.h" +#include "sandbox/policy/switches.h" +#include "sandbox/sandbox_buildflags.h" + +#if BUILDFLAG(USING_SANITIZER) +#include +#endif + +#if BUILDFLAG(USE_NSS_CERTS) +#include "crypto/nss_util.h" +#endif + +#include "third_party/boringssl/src/include/openssl/crypto.h" + +#include +#include "ui/gfx/linux/fontconfig_util.h" + +#define MAXTOKENS 3 + +#define _UNVEIL_MAIN "/etc/ungoogled-chromium/unveil.main"; +#define _UNVEIL_GPU "/etc/ungoogled-chromium/unveil.gpu"; +#define _UNVEIL_UTILITY_NETWORK "/etc/ungoogled-chromium/unveil.utility_network"; +#define _UNVEIL_UTILITY_AUDIO "/etc/ungoogled-chromium/unveil.utility_audio"; +#define _UNVEIL_UTILITY_VIDEO "/etc/ungoogled-chromium/unveil.utility_video"; + +namespace sandbox { +namespace policy { + +SandboxLinux::SandboxLinux() + : unveil_initialized_(false), + sandbox_status_flags_(kInvalid), + pre_initialized_(false), + initialize_sandbox_ran_(false), + broker_process_(nullptr) { +} + +SandboxLinux::~SandboxLinux() { + if (pre_initialized_) { + CHECK(initialize_sandbox_ran_); + } +} + +SandboxLinux* SandboxLinux::GetInstance() { + SandboxLinux* instance = base::Singleton::get(); + CHECK(instance); + return instance; +} + +void SandboxLinux::StopThread(base::Thread* thread) { + DCHECK(thread); + thread->Stop(); +} + +void SandboxLinux::PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type) { + CHECK(!pre_initialized_); +#if BUILDFLAG(USING_SANITIZER) + // Sanitizers need to open some resources before the sandbox is enabled. + // This should not fork, not launch threads, not open a directory. + __sanitizer_sandbox_on_notify(sanitizer_args()); + sanitizer_args_.reset(); +#endif + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + const std::string process_type = + command_line->GetSwitchValueASCII(switches::kProcessType); + + base::SysInfo::AmountOfPhysicalMemory(); + base::SysInfo::NumberOfProcessors(); + base::SysInfo::CPUModelName(); + + switch (sandbox_type) { + case sandbox::mojom::Sandbox::kNoSandbox: + { +#if BUILDFLAG(USE_NSS_CERTS) + // The main process has to initialize the ~/.pki dir which won't work + // after unveil(2). + crypto::EnsureNSSInit(); +#endif + CRYPTO_pre_sandbox_init(); + + base::FilePath cache_directory, local_directory; + + base::PathService::Get(base::DIR_CACHE, &cache_directory); + base::PathService::Get(base::DIR_HOME, &local_directory); + + cache_directory = cache_directory.AppendASCII("ungoogled-chromium"); + local_directory = local_directory.AppendASCII(".local").AppendASCII("share").AppendASCII("applications"); + + if (!base::CreateDirectory(cache_directory)) { + LOG(ERROR) << "Failed to create " << cache_directory.value() << " directory."; + } + + if (!base::CreateDirectory(local_directory)) { + LOG(ERROR) << "Failed to create " << local_directory.value() << " directory."; + } + + break; + } + case sandbox::mojom::Sandbox::kRenderer: + { + FcConfig* config = gfx::GetGlobalFontConfig(); + DCHECK(config); + break; + } + default: + break; + } + + pre_initialized_ = true; +} + +bool SandboxLinux::SetPledge(const char *pstring, const char *ppath) { + FILE *fp; + char *s = NULL; + size_t len = 0; + ssize_t read; + + if (pstring != NULL) { + if (pledge(pstring, NULL) == -1) + goto err; + VLOG(5) << "pledge " << pstring; + } else if (ppath != NULL) { + fp = fopen(ppath, "r"); + if (fp != NULL) { + while ((read = getline(&s, &len, fp)) != -1 ) { + if (s[strlen(s)-1] == '\n') + s[strlen(s)-1] = '\0'; + if (pledge(s, NULL) == -1) + goto err; + VLOG(5) << "pledge " << s; + } + fclose(fp); + } else { + LOG(ERROR) << "fopen(" << ppath << ") failed, errno: " << errno; + return false; + } + } + return true; +err: + LOG(ERROR) << "pledge() failed, errno: " << errno; + return false; +} + +bool SandboxLinux::SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type) { + FILE *fp; + char *s = NULL, *cp = NULL, *home = NULL, **ap, *tokens[MAXTOKENS]; + char path[PATH_MAX]; + const char *ufile; + size_t len = 0, lineno = 0; + + switch (sandbox_type) { + case sandbox::mojom::Sandbox::kNoSandbox: + ufile = _UNVEIL_MAIN; + break; + case sandbox::mojom::Sandbox::kGpu: ++ case sandbox::mojom::Sandbox::kOnDeviceModelExecution: + ufile = _UNVEIL_GPU; + break; + case sandbox::mojom::Sandbox::kNetwork: + ufile = _UNVEIL_UTILITY_NETWORK; + break; + case sandbox::mojom::Sandbox::kAudio: + ufile = _UNVEIL_UTILITY_AUDIO; + break; + case sandbox::mojom::Sandbox::kVideoCapture: + ufile = _UNVEIL_UTILITY_VIDEO; + break; + default: + unveil("/dev/null", "r"); + goto done; + } + + fp = fopen(ufile, "r"); + if (fp != NULL) { + while (!feof(fp)) { + if ((s = fparseln(fp, &len, &lineno, NULL, + FPARSELN_UNESCCOMM | FPARSELN_UNESCCONT)) == NULL) { + if (ferror(fp)) { + LOG(ERROR) << "ferror(), errno: " << errno; + _exit(1); + } else { + continue; + } + } + cp = s; + cp += strspn(cp, " \t\n"); /* eat whitespace */ + if (cp[0] == '\0') + continue; + + for (ap = tokens; ap < &tokens[MAXTOKENS - 1] && + (*ap = strsep(&cp, " \t")) != NULL;) { + if (**ap != '\0') + ap++; + } + *ap = NULL; + + if (tokens[1] == NULL) { + LOG(ERROR) << ufile << ": line " << lineno << ": must supply value to " << s; + _exit(1); + } + + if (tokens[0][0] == '~') { + if ((home = getenv("HOME")) == NULL || *home == '\0') { + LOG(ERROR) << "failed to get home"; + _exit(1); + } + memmove(tokens[0], tokens[0] + 1, strlen(tokens[0])); + strncpy(path, home, sizeof(path) - 1); + path[sizeof(path) - 1] = '\0'; + strncat(path, tokens[0], sizeof(path) - 1 - strlen(path)); + } else { + strncpy(path, tokens[0], sizeof(path) - 1); + path[sizeof(path) - 1] = '\0'; + } + + if (unveil(path, tokens[1]) == -1) { + LOG(ERROR) << "failed unveiling " << path << " with permissions " << tokens[1]; + _exit(1); + } else { + VLOG(5) << "unveiling " << path << " with permissions " << tokens[1]; + } + } + fclose(fp); + } else { + LOG(ERROR) << "failed to open " << ufile << " errno: " << errno; + _exit(1); + } + +done: + unveil_initialized_ = true; + + return true; +} + +bool SandboxLinux::unveil_initialized() const { + return unveil_initialized_; +} + +bool SandboxLinux::InitializeSandbox(sandbox::mojom::Sandbox sandbox_type, + SandboxLinux::PreSandboxHook hook, + const Options& options) { + DCHECK(!initialize_sandbox_ran_); + initialize_sandbox_ran_ = true; + + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + const std::string process_type = + command_line->GetSwitchValueASCII(switches::kProcessType); + + if (command_line->HasSwitch(switches::kNoSandbox)) + return true; + + VLOG(1) << "SandboxLinux::InitializeSandbox: process_type=" -+ << process_type << " sandbox_type=" << GetSandboxTypeInEnglish(sandbox_type); ++ << process_type << " sandbox_type=" << sandbox_type; + + // Only one thread is running, pre-initialize if not already done. + if (!pre_initialized_) + PreinitializeSandbox(sandbox_type); + + // Attempt to limit the future size of the address space of the process. + int error = 0; + const bool limited_as = LimitAddressSpace(&error); + if (error) { + // Restore errno. Internally to |LimitAddressSpace|, the errno due to + // setrlimit may be lost. + errno = error; + PCHECK(limited_as); + } + + if (hook) + CHECK(std::move(hook).Run(options)); + + if (!command_line->HasSwitch(switches::kDisableUnveil)) + SetUnveil(process_type, sandbox_type); + + switch(sandbox_type) { + case sandbox::mojom::Sandbox::kNoSandbox: + SetPledge(NULL, "/etc/ungoogled-chromium/pledge.main"); + break; + case sandbox::mojom::Sandbox::kRenderer: + // prot_exec needed by v8 + // flock needed by sqlite3 locking + SetPledge("stdio rpath flock prot_exec recvfd sendfd ps", NULL); + break; + case sandbox::mojom::Sandbox::kGpu: ++ case sandbox::mojom::Sandbox::kOnDeviceModelExecution: + SetPledge("stdio drm rpath flock cpath wpath prot_exec recvfd sendfd tmppath", NULL); + break; +#if BUILDFLAG(ENABLE_PPAPI) + case sandbox::mojom::Sandbox::kPpapi: + // prot_exec needed by v8 + SetPledge("stdio rpath prot_exec recvfd sendfd", NULL); + break; +#endif + case sandbox::mojom::Sandbox::kAudio: + SetPledge(NULL, "/etc/ungoogled-chromium/pledge.utility_audio"); + break; + case sandbox::mojom::Sandbox::kNetwork: + SetPledge(NULL, "/etc/ungoogled-chromium/pledge.utility_network"); + break; + case sandbox::mojom::Sandbox::kVideoCapture: + SetPledge(NULL, "/etc/ungoogled-chromium/pledge.utility_video"); + break; + case sandbox::mojom::Sandbox::kUtility: + case sandbox::mojom::Sandbox::kService: + SetPledge("stdio rpath cpath wpath fattr flock sendfd recvfd prot_exec", NULL); + break; + default: -+ LOG(ERROR) << "non-pledge()'d process: " << GetSandboxTypeInEnglish(sandbox_type); ++ LOG(ERROR) << "non-pledge()'d process: " << sandbox_type; + break; + } + + return true; +} + +bool SandboxLinux::LimitAddressSpace(int* error) { +#if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \ + !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER) + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + if (SandboxTypeFromCommandLine(*command_line) == sandbox::mojom::Sandbox::kNoSandbox) { + return false; + } + + // Unfortunately, it does not appear possible to set RLIMIT_AS such that it + // will both (a) be high enough to support V8's and WebAssembly's address + // space requirements while also (b) being low enough to mitigate exploits + // using integer overflows that require large allocations, heap spray, or + // other memory-hungry attack modes. + + *error = sandbox::ResourceLimits::Lower( + RLIMIT_DATA, static_cast(sandbox::kDataSizeLimit)); + + // Cache the resource limit before turning on the sandbox. + base::SysInfo::AmountOfVirtualMemory(); + base::SysInfo::MaxSharedMemorySize(); + + return *error == 0; +#else + base::SysInfo::AmountOfVirtualMemory(); + return false; +#endif // !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && + // !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER) +} + -+// static -+std::string SandboxLinux::GetSandboxTypeInEnglish(sandbox::mojom::Sandbox sandbox_type) { -+ switch (sandbox_type) { -+ case sandbox::mojom::Sandbox::kNoSandbox: -+ return "Unsandboxed"; -+ case sandbox::mojom::Sandbox::kRenderer: -+ return "Renderer"; -+ case sandbox::mojom::Sandbox::kUtility: -+ return "Utility"; -+ case sandbox::mojom::Sandbox::kGpu: -+ return "GPU"; -+#if BUILDFLAG(ENABLE_PPAPI) -+ case sandbox::mojom::Sandbox::kPpapi: -+ return "PPAPI"; -+#endif -+ case sandbox::mojom::Sandbox::kNetwork: -+ return "Network"; -+ case sandbox::mojom::Sandbox::kCdm: -+ return "CDM"; -+ case sandbox::mojom::Sandbox::kPrintCompositor: -+ return "Print Compositor"; -+ case sandbox::mojom::Sandbox::kAudio: -+ return "Audio"; -+ case sandbox::mojom::Sandbox::kSpeechRecognition: -+ return "Speech Recognition"; -+ case sandbox::mojom::Sandbox::kService: -+ return "Service"; -+ case sandbox::mojom::Sandbox::kVideoCapture: -+ return "Video Capture"; -+ default: -+ return "Unknown"; -+ } -+} -+ +} // namespace policy +} // namespace sandbox diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.h b/www/ungoogled-chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.h index 07842fb5cdf5..aee435170642 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.h +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.h @@ -1,285 +1,283 @@ ---- sandbox/policy/openbsd/sandbox_openbsd.h.orig 2022-12-02 17:56:32 UTC +--- sandbox/policy/openbsd/sandbox_openbsd.h.orig 2024-11-16 12:20:41 UTC +++ sandbox/policy/openbsd/sandbox_openbsd.h -@@ -0,0 +1,282 @@ +@@ -0,0 +1,280 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +#ifndef SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ +#define SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ + +#include +#include +#include + +#include "base/logging.h" +#include "base/posix/global_descriptors.h" +#include "sandbox/policy/export.h" +#include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h" +#include "sandbox/policy/mojom/sandbox.mojom.h" +#include "base/sanitizer_buildflags.h" + +#if BUILDFLAG(USING_SANITIZER) +#include +#endif + +namespace base { +template +struct DefaultSingletonTraits; +class Thread; +} // namespace base + +namespace sandbox { +namespace syscall_broker { +class BrokerProcess; +} // namespace syscall_broker +} // namespace sandbox + +namespace sandbox { +namespace policy { + +// A singleton class to represent and change our sandboxing state for the +// three main Linux sandboxes. +// The sandboxing model allows using two layers of sandboxing. The first layer +// can be implemented either with unprivileged namespaces or with the setuid +// sandbox. This class provides a way to engage the namespace sandbox, but does +// not deal with the legacy setuid sandbox directly. +// The second layer is mainly based on seccomp-bpf and is engaged with +// InitializeSandbox(). InitializeSandbox() is also responsible for "sealing" +// the first layer of sandboxing. That is, InitializeSandbox must always be +// called to have any meaningful sandboxing at all. +class SANDBOX_POLICY_EXPORT SandboxLinux { + public: + // This is a list of sandbox IPC methods which the renderer may send to the + // sandbox host. See + // https://chromium.googlesource.com/chromium/src/+/master/docs/linux_sandbox_ipc.md + // This isn't the full list, values < 32 are reserved for methods called from + // Skia, and values < 64 are reserved for libc_interceptor.cc. + enum LinuxSandboxIPCMethods { + DEPRECATED_METHOD_GET_FALLBACK_FONT_FOR_CHAR = 64, + DEPRECATED_METHOD_GET_CHILD_WITH_INODE, + DEPRECATED_METHOD_GET_STYLE_FOR_STRIKE, + METHOD_MAKE_SHARED_MEMORY_SEGMENT, + DEPRECATED_METHOD_MATCH_WITH_FALLBACK, + }; + + // These form a bitmask which describes the conditions of the Linux sandbox. + // Note: this doesn't strictly give you the current status, it states + // what will be enabled when the relevant processes are initialized. + enum Status { + // SUID sandbox active. + kSUID = 1 << 0, + + // Sandbox is using a new PID namespace. + kPIDNS = 1 << 1, + + // Sandbox is using a new network namespace. + kNetNS = 1 << 2, + + // seccomp-bpf sandbox active. + kSeccompBPF = 1 << 3, + + // The Yama LSM module is present and enforcing. + kYama = 1 << 4, + + // seccomp-bpf sandbox is active and the kernel supports TSYNC. + kSeccompTSYNC = 1 << 5, + + // User namespace sandbox active. + kUserNS = 1 << 6, + + // A flag that denotes an invalid sandbox status. + kInvalid = 1 << 31, + }; + + // SandboxLinux Options are a superset of SandboxSecompBPF Options. + struct Options : public SandboxSeccompBPF::Options { + // When running with a zygote, the namespace sandbox will have already + // been engaged prior to initializing SandboxLinux itself, and need not + // be done so again. Set to true to indicate that there isn't a zygote + // for this process and the step is to be performed here explicitly. + bool engage_namespace_sandbox = false; + + // Allow starting the sandbox with multiple threads already running. This + // will enable TSYNC for seccomp-BPF, which syncs the seccomp-BPF policy + // across all running threads. + bool allow_threads_during_sandbox_init = false; + + // Enables the CHECK for open directories. The open directory check is only + // useful for the chroot jail (from the semantic layer of the sandbox), and + // can safely be disabled if we are only enabling the seccomp-BPF layer. + bool check_for_open_directories = true; + }; + + // Callers can provide this hook to run code right before the policy + // is passed to the BPF compiler and the sandbox is engaged. If + // pre_sandbox_hook() returns true, the sandbox will be engaged + // afterwards, otherwise the process is terminated. + using PreSandboxHook = base::OnceCallback; + + // Get our singleton instance. + static SandboxLinux* GetInstance(); + + SandboxLinux(const SandboxLinux&) = delete; + SandboxLinux& operator=(const SandboxLinux&) = delete; + + bool SetPledge(const char *pstring, const char *ppath); + bool SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type); + + // Do some initialization that can only be done before any of the sandboxes + // are enabled. If using the setuid sandbox, this should be called manually + // before the setuid sandbox is engaged. + // Security: When this runs, it is imperative that either InitializeSandbox() + // runs as well or that all file descriptors returned in + // GetFileDescriptorsToClose() get closed. + // Otherwise file descriptors that bypass the security of the setuid sandbox + // would be kept open. One must be particularly careful if a process performs + // a fork(). + void PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type); + + // Check that the current process is the init process of a new PID + // namespace and then proceed to drop access to the file system by using + // a new unprivileged namespace. This is a layer-1 sandbox. + // In order for this sandbox to be effective, it must be "sealed" by calling + // InitializeSandbox(). + void EngageNamespaceSandbox(bool from_zygote); + + // Return a list of file descriptors to close if PreinitializeSandbox() ran + // but InitializeSandbox() won't. Avoid using. + // TODO(jln): get rid of this hack. + std::vector GetFileDescriptorsToClose(); + + // Seal an eventual layer-1 sandbox and initialize the layer-2 sandbox with + // an adequate policy depending on the process type and command line + // arguments. + // Currently the layer-2 sandbox is composed of seccomp-bpf and address space + // limitations. + // This function should only be called without any thread running. + bool InitializeSandbox(sandbox::mojom::Sandbox sandbox_type, + PreSandboxHook hook, + const Options& options); + + // Stop |thread| in a way that can be trusted by the sandbox. + void StopThread(base::Thread* thread); + + // Returns the status of the renderer, worker and ppapi sandbox. Can only + // be queried after going through PreinitializeSandbox(). This is a bitmask + // and uses the constants defined in "enum Status" above. Since the + // status needs to be provided before the sandboxes are actually started, + // this returns what will actually happen once InitializeSandbox() + // is called from inside these processes. + int GetStatus(); + -+ static std::string GetSandboxTypeInEnglish(sandbox::mojom::Sandbox sandbox_type); -+ + // Returns true if the current process is single-threaded or if the number + // of threads cannot be determined. + bool IsSingleThreaded() const; + + // Returns true if we started Seccomp BPF. + bool seccomp_bpf_started() const; + + // Returns true if unveil(2) is used. + bool unveil_initialized() const; + + // Check the policy and eventually start the seccomp-bpf sandbox. This should + // never be called with threads started. If we detect that threads have + // started we will crash. + bool StartSeccompBPF(sandbox::mojom::Sandbox sandbox_type, + PreSandboxHook hook, + const Options& options); + + // Limit the address space of the current process (and its children) to make + // some vulnerabilities harder to exploit. Writes the errno due to setrlimit + // (including 0 if no error) into |error|. + bool LimitAddressSpace(int* error); + + // Returns a file descriptor to proc. The file descriptor is no longer valid + // after the sandbox has been sealed. + int proc_fd() const { + DCHECK_NE(-1, proc_fd_); + return proc_fd_; + } + +#if BUILDFLAG(USING_SANITIZER) + __sanitizer_sandbox_arguments* sanitizer_args() const { + return sanitizer_args_.get(); + }; +#endif + + // A BrokerProcess is a helper that is started before the sandbox is engaged, + // typically from a pre-sandbox hook, that will serve requests to access + // files over an IPC channel. The client of this runs from a SIGSYS handler + // triggered by the seccomp-bpf sandbox. + // |client_sandbox_policy| is the policy being run by the client, and is + // used to derive the equivalent broker-side policy. + // |broker_side_hook| is an alternate pre-sandbox hook to be run before the + // broker itself gets sandboxed, to which the broker side policy and + // |options| are passed. + // Crashes the process if the broker can not be started since continuation + // is impossible (and presumably unsafe). + // This should never be destroyed, as after the sandbox is started it is + // vital to the process. +#if 0 + void StartBrokerProcess( + const sandbox::syscall_broker::BrokerCommandSet& allowed_command_set, + std::vector permissions, + PreSandboxHook broker_side_hook, + const Options& options); + + sandbox::syscall_broker::BrokerProcess* broker_process() const { + return broker_process_; + } +#endif + + private: + friend struct base::DefaultSingletonTraits; + + SandboxLinux(); + ~SandboxLinux(); + + // We must have been pre_initialized_ before using these. + bool seccomp_bpf_supported() const; + bool seccomp_bpf_with_tsync_supported() const; + + // Returns true if it can be determined that the current process has open + // directories that are not managed by the SandboxLinux class. This would + // be a vulnerability as it would allow to bypass the setuid sandbox. + bool HasOpenDirectories() const; + + // The last part of the initialization is to make sure any temporary "hole" + // in the sandbox is closed. For now, this consists of closing proc_fd_. + void SealSandbox(); + + // GetStatus() makes promises as to how the sandbox will behave. This + // checks that no promises have been broken. + void CheckForBrokenPromises(sandbox::mojom::Sandbox sandbox_type); + + // Stop |thread| and make sure it does not appear in /proc/self/tasks/ + // anymore. + void StopThreadAndEnsureNotCounted(base::Thread* thread) const; + + // A file descriptor to /proc. It's dangerous to have it around as it could + // allow for sandbox bypasses. It needs to be closed before we consider + // ourselves sandboxed. + int proc_fd_; + + bool seccomp_bpf_started_; + bool unveil_initialized_; + // The value returned by GetStatus(). Gets computed once and then cached. + int sandbox_status_flags_; + // Did PreinitializeSandbox() run? + bool pre_initialized_; + bool seccomp_bpf_supported_; // Accurate if pre_initialized_. + bool seccomp_bpf_with_tsync_supported_; // Accurate if pre_initialized_. + bool yama_is_enforcing_; // Accurate if pre_initialized_. + bool initialize_sandbox_ran_; // InitializeSandbox() was called. +#if BUILDFLAG(USING_SANITIZER) + std::unique_ptr<__sanitizer_sandbox_arguments> sanitizer_args_; +#endif + sandbox::syscall_broker::BrokerProcess* broker_process_; // Leaked as global. +}; + +} // namespace policy +} // namespace sandbox + +#endif // SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_sandbox__type.cc b/www/ungoogled-chromium/files/patch-sandbox_policy_sandbox__type.cc index 8ff0d1b31197..8153f7595e53 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_sandbox__type.cc +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_sandbox__type.cc @@ -1,120 +1,172 @@ ---- sandbox/policy/sandbox_type.cc.orig 2024-10-27 06:40:35 UTC +--- sandbox/policy/sandbox_type.cc.orig 2024-11-16 12:20:41 UTC +++ sandbox/policy/sandbox_type.cc @@ -38,7 +38,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { #endif case Sandbox::kAudio: return false; -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) case Sandbox::kVideoCapture: return false; #endif @@ -62,7 +62,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { #if BUILDFLAG(IS_MAC) case Sandbox::kMirroring: #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) case Sandbox::kHardwareVideoDecoding: #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS_ASH) @@ -73,7 +73,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { case Sandbox::kLibassistant: #endif // BUILDFLAG(ENABLE_CROS_LIBASSISTANT) #endif // // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) | BUILDFLAG(IS_BSD) case Sandbox::kZygoteIntermediateSandbox: case Sandbox::kHardwareVideoEncoding: #endif -@@ -131,7 +131,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -81,10 +81,10 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { + case Sandbox::kScreenAI: + #endif + case Sandbox::kSpeechRecognition: +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + case Sandbox::kVideoEffects: + #endif +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + case Sandbox::kOnDeviceTranslation: + #endif + return false; +@@ -136,7 +136,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi #endif case Sandbox::kPrintCompositor: case Sandbox::kAudio: -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) case Sandbox::kVideoCapture: #endif #if BUILDFLAG(IS_WIN) -@@ -142,10 +142,10 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -147,10 +147,10 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi case Sandbox::kMediaFoundationCdm: case Sandbox::kWindowsSystemProxyResolver: #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) case 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) case Sandbox::kHardwareVideoEncoding: #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -171,7 +171,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -168,10 +168,10 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi + case Sandbox::kScreenAI: + #endif + case Sandbox::kSpeechRecognition: +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + case Sandbox::kVideoEffects: + #endif +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + case Sandbox::kOnDeviceTranslation: + #endif + DCHECK(command_line->GetSwitchValueASCII(switches::kProcessType) == +@@ -181,7 +181,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi switches::kServiceSandboxType, StringFromUtilitySandboxType(sandbox_type)); break; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case Sandbox::kZygoteIntermediateSandbox: break; #endif -@@ -211,7 +211,7 @@ sandbox::mojom::Sandbox SandboxTypeFromCommandLine( +@@ -221,7 +221,7 @@ sandbox::mojom::Sandbox SandboxTypeFromCommandLine( return Sandbox::kUtility; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Intermediate process gains a sandbox later. if (process_type == switches::kZygoteProcessType) return Sandbox::kZygoteIntermediateSandbox; -@@ -259,7 +259,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -267,7 +267,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb return switches::kUtilitySandbox; case Sandbox::kAudio: return switches::kAudioSandbox; -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) case Sandbox::kVideoCapture: return switches::kVideoCaptureSandbox; #endif -@@ -291,11 +291,11 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -281,11 +281,11 @@ std::string StringFromUtilitySandboxType(Sandbox sandb + case Sandbox::kScreenAI: + return switches::kScreenAISandbox; + #endif +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + case Sandbox::kVideoEffects: + return switches::kVideoEffectsSandbox; + #endif +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + case Sandbox::kOnDeviceTranslation: + return switches::kOnDeviceTranslationSandbox; + #endif +@@ -305,11 +305,11 @@ std::string StringFromUtilitySandboxType(Sandbox sandb case Sandbox::kMirroring: return switches::kMirroringSandbox; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) case Sandbox::kHardwareVideoDecoding: return switches::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) case Sandbox::kHardwareVideoEncoding: return switches::kHardwareVideoEncodingSandbox; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -314,7 +314,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -328,7 +328,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb // The following are not utility processes so should not occur. case Sandbox::kRenderer: case Sandbox::kGpu: -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case Sandbox::kZygoteIntermediateSandbox: #endif - NOTREACHED_IN_MIGRATION(); -@@ -389,15 +389,15 @@ sandbox::mojom::Sandbox UtilitySandboxTypeFromString( + NOTREACHED(); +@@ -399,25 +399,25 @@ sandbox::mojom::Sandbox UtilitySandboxTypeFromString( + if (sandbox_string == switches::kScreenAISandbox) + return Sandbox::kScreenAI; + #endif +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (sandbox_string == switches::kVideoEffectsSandbox) { return Sandbox::kVideoEffects; } + #endif +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + if (sandbox_string == switches::kOnDeviceTranslationSandbox) { + return Sandbox::kOnDeviceTranslation; + } + #endif -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) if (sandbox_string == switches::kVideoCaptureSandbox) return Sandbox::kVideoCapture; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) if (sandbox_string == switches::kHardwareVideoDecodingSandbox) return 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) if (sandbox_string == switches::kHardwareVideoEncodingSandbox) return Sandbox::kHardwareVideoEncoding; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/ungoogled-chromium/files/patch-sandbox_policy_switches.cc b/www/ungoogled-chromium/files/patch-sandbox_policy_switches.cc index 1ea59118fc9c..e6bba9924230 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_switches.cc +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_switches.cc @@ -1,26 +1,35 @@ ---- sandbox/policy/switches.cc.orig 2024-10-27 06:40:35 UTC +--- sandbox/policy/switches.cc.orig 2024-11-16 12:20:41 UTC +++ sandbox/policy/switches.cc @@ -55,10 +55,10 @@ const char kWindowsSystemProxyResolverSandbox[] = "pro const char kMirroringSandbox[] = "mirroring"; #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) const char kHardwareVideoDecodingSandbox[] = "hardware_video_decoding"; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kHardwareVideoEncodingSandbox[] = "hardware_video_encoding"; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -98,7 +98,9 @@ const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-f +@@ -71,7 +71,7 @@ const char kLibassistantSandbox[] = "libassistant"; + #endif // BUILDFLAG(ENABLE_CROS_LIBASSISTANT) + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + const char kOnDeviceTranslationSandbox[] = "on_device_translation"; + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) + +@@ -102,7 +102,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 0414a7fdfdbe..743193963265 100644 --- a/www/ungoogled-chromium/files/patch-sandbox_policy_switches.h +++ b/www/ungoogled-chromium/files/patch-sandbox_policy_switches.h @@ -1,25 +1,34 @@ ---- sandbox/policy/switches.h.orig 2024-10-27 06:40:35 UTC +--- sandbox/policy/switches.h.orig 2024-11-16 12:20:41 UTC +++ sandbox/policy/switches.h @@ -58,10 +58,10 @@ SANDBOX_POLICY_EXPORT extern const char kWindowsSystem 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) -@@ -83,7 +83,8 @@ SANDBOX_POLICY_EXPORT extern const char kDisableSetuid +@@ -74,7 +74,7 @@ SANDBOX_POLICY_EXPORT extern const char kLibassistantS + #endif // BUILDFLAG(ENABLE_CROS_LIBASSISTANT) + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + SANDBOX_POLICY_EXPORT extern const char kOnDeviceTranslationSandbox[]; + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) + +@@ -87,7 +87,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_device_geolocation_location__provider__manager.cc b/www/ungoogled-chromium/files/patch-services_device_geolocation_location__provider__manager.cc index 9d932403cd29..c29faafd589b 100644 --- a/www/ungoogled-chromium/files/patch-services_device_geolocation_location__provider__manager.cc +++ b/www/ungoogled-chromium/files/patch-services_device_geolocation_location__provider__manager.cc @@ -1,11 +1,11 @@ ---- services/device/geolocation/location_provider_manager.cc.orig 2024-08-26 14:40:28 UTC +--- services/device/geolocation/location_provider_manager.cc.orig 2024-11-16 12:20:41 UTC +++ services/device/geolocation/location_provider_manager.cc -@@ -51,7 +51,7 @@ LocationProviderManager::LocationProviderManager( +@@ -87,7 +87,7 @@ LocationProviderManager::LocationProviderManager( #if BUILDFLAG(IS_ANDROID) // On Android, default to using the platform location provider. provider_manager_mode_ = kPlatformOnly; -#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Ash / Lacros / Linux, default to using the network location provider. provider_manager_mode_ = kNetworkOnly; #else diff --git a/www/ungoogled-chromium/files/patch-services_network_BUILD.gn b/www/ungoogled-chromium/files/patch-services_network_BUILD.gn index 5c4e3160f731..f500fecf4f69 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 2024-10-27 06:40:35 UTC +--- services/network/BUILD.gn.orig 2024-11-16 12:20:41 UTC +++ services/network/BUILD.gn -@@ -395,7 +395,6 @@ if (is_linux || is_chromeos) { +@@ -401,7 +401,6 @@ if (is_linux || is_chromeos) { ] deps = [ "//base:base", - "//sandbox/linux:sandbox_services", "//sandbox/policy:policy", ] configs += [ "//build/config/compiler:wexit_time_destructors" ] diff --git a/www/ungoogled-chromium/files/patch-services_network_network__context.cc b/www/ungoogled-chromium/files/patch-services_network_network__context.cc index 678be7af20ff..fa7f8c41b359 100644 --- a/www/ungoogled-chromium/files/patch-services_network_network__context.cc +++ b/www/ungoogled-chromium/files/patch-services_network_network__context.cc @@ -1,20 +1,20 @@ ---- services/network/network_context.cc.orig 2024-10-27 06:40:35 UTC +--- services/network/network_context.cc.orig 2024-11-16 12:20:41 UTC +++ services/network/network_context.cc -@@ -588,7 +588,7 @@ NetworkContext::NetworkContextHttpAuthPreferences:: +@@ -589,7 +589,7 @@ NetworkContext::NetworkContextHttpAuthPreferences:: NetworkContext::NetworkContextHttpAuthPreferences:: ~NetworkContextHttpAuthPreferences() = default; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool NetworkContext::NetworkContextHttpAuthPreferences::AllowGssapiLibraryLoad() const { if (network_service_) { -@@ -2435,7 +2435,7 @@ void NetworkContext::OnHttpAuthDynamicParamsChanged( +@@ -2444,7 +2444,7 @@ void NetworkContext::OnHttpAuthDynamicParamsChanged( http_auth_dynamic_network_service_params->android_negotiate_account_type); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) http_auth_merged_preferences_.set_allow_gssapi_library_load( http_auth_dynamic_network_service_params->allow_gssapi_library_load); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-services_network_network__context.h b/www/ungoogled-chromium/files/patch-services_network_network__context.h index b202017af1d8..b22022173ddd 100644 --- a/www/ungoogled-chromium/files/patch-services_network_network__context.h +++ b/www/ungoogled-chromium/files/patch-services_network_network__context.h @@ -1,11 +1,11 @@ ---- services/network/network_context.h.orig 2024-10-27 06:40:35 UTC +--- services/network/network_context.h.orig 2024-11-16 12:20:41 UTC +++ services/network/network_context.h -@@ -697,7 +697,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -696,7 +696,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext public: explicit NetworkContextHttpAuthPreferences(NetworkService* network_service); ~NetworkContextHttpAuthPreferences() override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool AllowGssapiLibraryLoad() const override; #endif // BUILDFLAG(IS_LINUX) private: diff --git a/www/ungoogled-chromium/files/patch-services_network_public_cpp_BUILD.gn b/www/ungoogled-chromium/files/patch-services_network_public_cpp_BUILD.gn index 12c9456acf8f..a967423b65e8 100644 --- a/www/ungoogled-chromium/files/patch-services_network_public_cpp_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-services_network_public_cpp_BUILD.gn @@ -1,11 +1,11 @@ ---- services/network/public/cpp/BUILD.gn.orig 2024-10-27 06:40:35 UTC +--- services/network/public/cpp/BUILD.gn.orig 2024-11-16 12:20:41 UTC +++ services/network/public/cpp/BUILD.gn -@@ -481,7 +481,7 @@ component("cpp_base") { +@@ -483,7 +483,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 index 84fa4b1a2d8f..01ddc2ab0033 100644 --- a/www/ungoogled-chromium/files/patch-services_network_public_mojom_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-services_network_public_mojom_BUILD.gn @@ -1,25 +1,25 @@ ---- services/network/public/mojom/BUILD.gn.orig 2024-08-26 14:40:28 UTC +--- services/network/public/mojom/BUILD.gn.orig 2024-11-16 12:20:41 UTC +++ services/network/public/mojom/BUILD.gn -@@ -493,11 +493,11 @@ mojom("url_loader_base") { +@@ -491,11 +491,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/40263697): Remove this once is_linux in the mojom IDL does # not include lacros. enabled_features += [ "use_network_interface_change_listener" ] -@@ -1490,7 +1490,7 @@ mojom("mojom") { +@@ -1493,7 +1493,7 @@ mojom("mojom") { } } - if (is_linux) { + if (is_linux && !is_bsd) { # TODO(crbug.com/40263697): Remove this once is_linux in the mojom IDL does # not include lacros. enabled_features += [ "use_network_interface_change_listener" ] diff --git a/www/ungoogled-chromium/files/patch-services_on__device__model_on__device__model__service.h b/www/ungoogled-chromium/files/patch-services_on__device__model_on__device__model__service.h index 6d24d405ced3..5d4b5f4757ba 100644 --- a/www/ungoogled-chromium/files/patch-services_on__device__model_on__device__model__service.h +++ b/www/ungoogled-chromium/files/patch-services_on__device__model_on__device__model__service.h @@ -1,22 +1,22 @@ ---- services/on_device_model/on_device_model_service.h.orig 2024-10-27 06:40:35 UTC +--- services/on_device_model/on_device_model_service.h.orig 2024-11-16 12:20:41 UTC +++ services/on_device_model/on_device_model_service.h -@@ -27,6 +27,10 @@ namespace ml { - class OnDeviceModelInternalImpl; +@@ -31,6 +31,10 @@ class OnDeviceModelInternalImpl; + class TsHolder; } +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + namespace on_device_model { class COMPONENT_EXPORT(ON_DEVICE_MODEL) OnDeviceModelService -@@ -40,7 +44,7 @@ class COMPONENT_EXPORT(ON_DEVICE_MODEL) OnDeviceModelS +@@ -44,7 +48,7 @@ class COMPONENT_EXPORT(ON_DEVICE_MODEL) OnDeviceModelS // Must be called in the service's process after the run loop finished. [[nodiscard]] static bool Shutdown(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) static void AddSandboxLinuxOptions( sandbox::policy::SandboxLinux::Options& options); #endif diff --git a/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.cc b/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.cc index 1551fc787c6d..ad49082759d4 100644 --- a/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.cc +++ b/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.cc @@ -1,38 +1,38 @@ ---- services/video_capture/video_capture_service_impl.cc.orig 2024-10-01 07:26:23 UTC +--- services/video_capture/video_capture_service_impl.cc.orig 2024-11-16 12:20:41 UTC +++ services/video_capture/video_capture_service_impl.cc -@@ -42,7 +42,7 @@ - #include "services/video_capture/lacros/device_factory_adapter_lacros.h" +@@ -43,7 +43,7 @@ #endif // BUILDFLAG(IS_CHROMEOS_LACROS) --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "media/capture/capture_switches.h" #include "media/capture/video/video_capture_gpu_channel_host.h" #include "services/viz/public/cpp/gpu/context_provider_command_buffer.h" -@@ -110,7 +110,7 @@ class VideoCaptureServiceImpl::GpuDependenciesContext - this}; +@@ -112,7 +112,7 @@ class VideoCaptureServiceImpl::GpuDependenciesContext }; --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || 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 -@@ -337,7 +337,7 @@ void VideoCaptureServiceImpl::LazyInitializeGpuDepende +@@ -334,7 +334,7 @@ void VideoCaptureServiceImpl::LazyInitializeGpuDepende gpu_dependencies_context_ = std::make_unique(); - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) --#if BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_CHROMEOS_ASH) { #else - if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) { -@@ -469,7 +469,7 @@ void VideoCaptureServiceImpl::OnGpuInfoUpdate(const CH - } +@@ -468,7 +468,7 @@ void VideoCaptureServiceImpl::OnGpuInfoUpdate(const CH #endif --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) void VideoCaptureServiceImpl::SetVizGpu(std::unique_ptr viz_gpu) { viz_gpu_ = std::move(viz_gpu); } diff --git a/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.h b/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.h index 8671391e5cdd..ec9b34075d50 100644 --- a/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.h +++ b/www/ungoogled-chromium/files/patch-services_video__capture_video__capture__service__impl.h @@ -1,29 +1,29 @@ ---- services/video_capture/video_capture_service_impl.h.orig 2024-08-26 14:40:28 UTC +--- services/video_capture/video_capture_service_impl.h.orig 2024-11-16 12:20:41 UTC +++ services/video_capture/video_capture_service_impl.h -@@ -27,7 +27,7 @@ - #include "services/video_capture/ash/video_capture_device_factory_ash.h" +@@ -28,7 +28,7 @@ #endif // BUILDFLAG(IS_CHROMEOS_ASH) --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "services/viz/public/cpp/gpu/gpu.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || - // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -75,7 +75,7 @@ class VideoCaptureServiceImpl : public mojom::VideoCap - #if BUILDFLAG(IS_WIN) + // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_MAC) +@@ -77,7 +77,7 @@ class VideoCaptureServiceImpl : public mojom::VideoCap void OnGpuInfoUpdate(const CHROME_LUID& luid) override; #endif --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) void SetVizGpu(std::unique_ptr viz_gpu); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || - // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -120,7 +120,7 @@ class VideoCaptureServiceImpl : public mojom::VideoCap - factory_receivers_ash_; + // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_MAC) +@@ -123,7 +123,7 @@ class VideoCaptureServiceImpl : public mojom::VideoCap #endif --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || 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-services_video__effects_video__effects__sandbox__hook__linux.cc b/www/ungoogled-chromium/files/patch-services_video__effects_video__effects__sandbox__hook__linux.cc new file mode 100644 index 000000000000..e39712ee0fac --- /dev/null +++ b/www/ungoogled-chromium/files/patch-services_video__effects_video__effects__sandbox__hook__linux.cc @@ -0,0 +1,27 @@ +--- services/video_effects/video_effects_sandbox_hook_linux.cc.orig 2024-11-16 12:20:41 UTC ++++ services/video_effects/video_effects_sandbox_hook_linux.cc +@@ -6,7 +6,13 @@ + + #include + ++#include "build/build_config.h" ++ ++#if BUILDFLAG(IS_BSD) ++#include "sandbox/policy/sandbox.h" ++#else + #include "sandbox/policy/linux/sandbox_linux.h" ++#endif + #include "services/on_device_model/ml/chrome_ml.h" + + namespace video_effects { +@@ -29,8 +35,10 @@ bool VideoEffectsPreSandboxHook( + DVLOG(1) << "Successfully opened Chrome ML shared library."; + } + ++#if !BUILDFLAG(IS_BSD) + auto* instance = sandbox::policy::SandboxLinux::GetInstance(); + instance->EngageNamespaceSandboxIfPossible(); ++#endif + return true; + } + diff --git a/www/ungoogled-chromium/files/patch-services_video__effects_video__effects__sandbox__hook__linux.h b/www/ungoogled-chromium/files/patch-services_video__effects_video__effects__sandbox__hook__linux.h new file mode 100644 index 000000000000..26b186c899b5 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-services_video__effects_video__effects__sandbox__hook__linux.h @@ -0,0 +1,16 @@ +--- services/video_effects/video_effects_sandbox_hook_linux.h.orig 2024-11-16 12:20:41 UTC ++++ services/video_effects/video_effects_sandbox_hook_linux.h +@@ -5,7 +5,13 @@ + #ifndef SERVICES_VIDEO_EFFECTS_VIDEO_EFFECTS_SANDBOX_HOOK_LINUX_H_ + #define SERVICES_VIDEO_EFFECTS_VIDEO_EFFECTS_SANDBOX_HOOK_LINUX_H_ + ++#include "build/build_config.h" ++ ++#if BUILDFLAG(IS_BSD) ++#include "sandbox/policy/sandbox.h" ++#else + #include "sandbox/policy/linux/sandbox_linux.h" ++#endif + + namespace video_effects { + 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 3397ef26be22..49832a90a0ce 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 2024-08-26 14:40:28 UTC +--- third_party/angle/src/libANGLE/Display.cpp.orig 2024-11-16 12:20:41 UTC +++ third_party/angle/src/libANGLE/Display.cpp @@ -60,7 +60,7 @@ # include "libANGLE/renderer/gl/cgl/DisplayCGL.h" # elif ANGLE_ENABLE_EAGL # include "libANGLE/renderer/gl/eagl/DisplayEAGL.h" -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # include "libANGLE/renderer/gl/egl/DisplayEGL.h" # if defined(ANGLE_USE_X11) # include "libANGLE/renderer/gl/glx/DisplayGLX_api.h" @@ -416,7 +416,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) { @@ -462,7 +462,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) { @@ -513,7 +513,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()) { -@@ -2158,7 +2158,7 @@ static ClientExtensions GenerateClientExtensions() +@@ -2131,7 +2131,7 @@ static ClientExtensions GenerateClientExtensions() extensions.x11Visual = true; #endif -#if defined(ANGLE_PLATFORM_LINUX) +#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) extensions.platformANGLEDeviceTypeEGLANGLE = true; #endif diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_public_platform_web__vector.h b/www/ungoogled-chromium/files/patch-third__party_blink_public_platform_web__vector.h index 724df7471651..9c924c9953bb 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_public_platform_web__vector.h +++ b/www/ungoogled-chromium/files/patch-third__party_blink_public_platform_web__vector.h @@ -1,11 +1,11 @@ ---- third_party/blink/public/platform/web_vector.h.orig 2024-08-26 14:40:28 UTC +--- third_party/blink/public/platform/web_vector.h.orig 2024-11-16 12:20:41 UTC +++ third_party/blink/public/platform/web_vector.h -@@ -91,7 +91,7 @@ class WebVector { +@@ -86,7 +86,7 @@ class WebVector { // The vector can be populated using reserve() and emplace_back(). WebVector() = default; -#if defined(ARCH_CPU_64_BITS) +#if defined(ARCH_CPU_64_BITS) || defined(__OpenBSD__) // Create a vector with |size| default-constructed elements. We define // a constructor with size_t otherwise we'd have a duplicate define. explicit WebVector(size_t size) : data_(size) {} diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc index 9e29890bd9ad..2300a0733a60 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 2024-06-22 08:49:42 UTC +--- third_party/blink/renderer/controller/blink_initializer.cc.orig 2024-11-16 12:20:41 UTC +++ third_party/blink/renderer/controller/blink_initializer.cc @@ -81,12 +81,12 @@ #include "third_party/blink/renderer/controller/private_memory_footprint_provider.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/controller/memory_usage_monitor_posix.h" #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/controller/highest_pmf_reporter.h" #include "third_party/blink/renderer/controller/user_level_memory_pressure_signal_generator.h" #endif -@@ -256,7 +256,7 @@ void BlinkInitializer::RegisterInterfaces(mojo::Binder +@@ -255,7 +255,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)), -@@ -303,7 +303,7 @@ void BlinkInitializer::RegisterMemoryWatchers(Platform +@@ -302,7 +302,7 @@ void BlinkInitializer::RegisterMemoryWatchers(Platform #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Start reporting the highest private memory footprint after the first // navigation. HighestPmfReporter::Initialize(main_thread_task_runner); diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc index 6824d5cb8392..4a7d06419c30 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc @@ -1,21 +1,21 @@ ---- third_party/blink/renderer/controller/memory_usage_monitor_posix.cc.orig 2024-08-26 14:40:28 UTC +--- third_party/blink/renderer/controller/memory_usage_monitor_posix.cc.orig 2024-11-16 12:20:41 UTC +++ third_party/blink/renderer/controller/memory_usage_monitor_posix.cc -@@ -133,15 +133,17 @@ void MemoryUsageMonitorPosix::ResetFileDescriptors() { +@@ -128,15 +128,17 @@ void MemoryUsageMonitorPosix::ResetFileDescriptors() { void MemoryUsageMonitorPosix::SetProcFiles(base::File statm_file, base::File status_file) { +#if !BUILDFLAG(IS_BSD) DCHECK(statm_file.IsValid()); DCHECK(status_file.IsValid()); DCHECK_EQ(-1, statm_fd_.get()); DCHECK_EQ(-1, status_fd_.get()); statm_fd_.reset(statm_file.TakePlatformFile()); status_fd_.reset(status_file.TakePlatformFile()); +#endif } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // static void MemoryUsageMonitorPosix::Bind( mojo::PendingReceiver receiver) { diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc index 015c06b0f6b8..b6f9538ed4bf 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2024-10-27 06:40:35 UTC +--- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2024-11-16 12:20:41 UTC +++ third_party/blink/renderer/core/exported/web_view_impl.cc @@ -428,7 +428,7 @@ SkFontHinting RendererPreferencesToSkiaHinting( const blink::RendererPreferences& prefs) { // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) if (!prefs.should_antialias_text) { // When anti-aliasing is off, GTK maps all non-zero hinting settings to // 'Normal' hinting so we do the same. Otherwise, folks who have 'Slight' -@@ -3413,7 +3413,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs +@@ -3415,7 +3415,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs renderer_preferences_.use_subpixel_positioning); // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) && \ !BUILDFLAG(IS_ANDROID) if (!renderer_preferences_.system_font_family_name.empty()) { WebFontRenderStyle::SetSystemFontFamily(blink::WebString::FromUTF8( diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc index b12d67895aac..ae5121379c75 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 2024-10-27 06:40:35 UTC +--- third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2024-11-16 12:20:41 UTC +++ third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -6478,7 +6478,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { +@@ -6474,7 +6474,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 \ -@@ -6887,7 +6887,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc +@@ -6883,7 +6883,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_layout_layout__view.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc index 8f60a0a7349b..fac51e0b03ab 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 2024-10-27 06:40:35 UTC +--- third_party/blink/renderer/core/layout/layout_view.cc.orig 2024-11-16 12:20:41 UTC +++ third_party/blink/renderer/core/layout/layout_view.cc @@ -73,7 +73,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 -@@ -776,7 +776,7 @@ void LayoutView::LayoutRoot() { +@@ -769,7 +769,7 @@ void LayoutView::LayoutRoot() { intrinsic_logical_widths_ = LogicalWidth(); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The font code in FontPlatformData does not have a direct connection to the // document, the frame or anything from which we could retrieve the device // scale factor. After using zoom for DSF, the GraphicsContext does only ever diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_origin__trials_origin__trial__context.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_origin__trials_origin__trial__context.cc new file mode 100644 index 000000000000..8292c4eca776 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_origin__trials_origin__trial__context.cc @@ -0,0 +1,11 @@ +--- third_party/blink/renderer/core/origin_trials/origin_trial_context.cc.orig 2024-11-16 12:20:41 UTC ++++ third_party/blink/renderer/core/origin_trials/origin_trial_context.cc +@@ -553,7 +553,7 @@ bool OriginTrialContext::CanEnableTrialFromName(const + } + + if (trial_name == "TranslationAPI") { +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return base::FeatureList::IsEnabled(features::kEnableTranslationAPI); + #else + return false; diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc index be1ea7a282ad..294355dc01ce 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc.orig 2024-04-23 07:42:17 UTC +--- third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc.orig 2024-11-16 12:20:41 UTC +++ third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc -@@ -813,7 +813,7 @@ TEST_F(AudioRendererMixerManagerTest, MixerParamsLaten +@@ -874,7 +874,7 @@ TEST_F(AudioRendererMixerManagerTest, MixerParamsLaten mixer->get_output_params_for_testing().sample_rate()); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Use 10 ms buffer (441 frames per buffer). EXPECT_EQ(output_sample_rate / 100, mixer->get_output_params_for_testing().frames_per_buffer()); diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc index ac361a71c263..98572d548dff 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc @@ -1,10 +1,10 @@ ---- third_party/blink/renderer/modules/peerconnection/rtc_data_channel.cc.orig 2024-10-27 06:40:35 UTC +--- third_party/blink/renderer/modules/peerconnection/rtc_data_channel.cc.orig 2024-11-16 12:20:41 UTC +++ third_party/blink/renderer/modules/peerconnection/rtc_data_channel.cc -@@ -557,6 +557,7 @@ void RTCDataChannel::send(Blob* data, ExceptionState& +@@ -542,6 +542,7 @@ void RTCDataChannel::send(Blob* data, ExceptionState& pending_messages_.push_back(message); } +#undef close void RTCDataChannel::close() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (state_ == webrtc::DataChannelInterface::kClosing || 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 0daff3813fff..77dd60b1cea7 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 2024-10-27 06:40:35 UTC +--- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2024-11-16 12:20:41 UTC +++ third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -6302,7 +6302,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid +@@ -6319,7 +6319,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