diff --git a/www/ungoogled-chromium/Makefile b/www/ungoogled-chromium/Makefile index d19906c1360c..adbba0f1382e 100644 --- a/www/ungoogled-chromium/Makefile +++ b/www/ungoogled-chromium/Makefile @@ -1,407 +1,406 @@ PORTNAME= ungoogled-chromium -PORTVERSION= 125.0.6422.141 -PORTREVISION= 1 +PORTVERSION= 126.0.6478.114 UGVERSION= ${DISTVERSION}-1 PULSEMV= 16 PULSEV= ${PULSEMV}.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} \ ungoogled-chromium-${UGVERSION}.tar.gz:external \ pulseaudio-${PULSEV}.tar.gz:pulseaudio MAINTAINER= chromium@FreeBSD.org COMMENT= Google web browser based on WebKit sans integration with Google WWW= https://github.com/ungoogled-software/ungoogled-chromium LICENSE= BSD3CLAUSE LGPL21 MPL11 LICENSE_COMB= multi ONLY_FOR_ARCHS= aarch64 amd64 i386 PATCH_DEPENDS= gpatch:devel/patch \ ${PYTHON_VERSION}:lang/python${PYTHON_SUFFIX} BUILD_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \ gperf:devel/gperf \ flock:sysutils/flock \ node:www/node \ 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 \ libasound.so:audio/alsa-lib \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libsndio.so:audio/sndio \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libepoll-shim.so:devel/libepoll-shim \ libevent.so:devel/libevent \ libffi.so:devel/libffi \ libicuuc.so:devel/icu \ libjsoncpp.so:devel/jsoncpp \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libcairo.so:graphics/cairo \ libdrm.so:graphics/libdrm \ libexif.so:graphics/libexif \ libpng.so:graphics/png \ libwebp.so:graphics/webp \ libdav1d.so:multimedia/dav1d \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libfontconfig.so:x11-fonts/fontconfig \ libwayland-client.so:graphics/wayland \ libxkbcommon.so:x11/libxkbcommon \ libxshmfence.so:x11/libxshmfence RUN_DEPENDS= xdg-open:devel/xdg-utils \ noto-basic>0:x11-fonts/noto-basic USES= bison compiler:c++17-lang cpe desktop-file-utils gl gmake gnome \ iconv:wchar_t jpeg localbase:ldflags ninja perl5 pkgconfig \ python:build qt:5 shebangfix tar:xz xorg CPE_VENDOR= google CPE_PRODUCT= chrome USE_GL= gbm gl USE_GNOME= atk dconf gdkpixbuf2 glib20 gtk30 libxml2 libxslt USE_LDCONFIG= ${DATADIR} USE_PERL5= build USE_XORG= x11 xcb xcomposite xcursor xext xdamage xfixes xi \ xorgproto xrandr xrender xscrnsaver xtst USE_QT= buildtools:build SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper buildtools/linux64/clang-format MAKE_ARGS= -C out/${BUILDTYPE} ALL_TARGET= chrome BINARY_ALIAS= python3=${PYTHON_CMD} \ moc=${PREFIX}/bin/moc-qt5 # TODO bz@ : install libwidevinecdm.so (see third_party/widevine/cdm/BUILD.gn) # # Run "./out/${BUILDTYPE}/gn args out/${BUILDTYPE} --list" for all variables. # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= enable_widevine=true \ fatal_linker_warnings=false \ icu_use_data_file=false \ is_clang=true \ optimize_webui=true \ toolkit_views=true \ use_allocator_shim=false \ use_aura=true \ use_custom_libcxx=true \ use_custom_libunwind=true \ use_lld=true \ use_partition_alloc=true \ use_partition_alloc_as_malloc=false \ use_sysroot=false \ use_system_freetype=false \ use_system_harfbuzz=true \ use_system_libffi=true \ use_system_libjpeg=true \ use_udev=false \ extra_cxxflags="${CXXFLAGS} -I${WRKDIR}/pulseaudio-${PULSEV}/src -DPA_MAJOR=${PULSEMV}" \ 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 # Audio backends GN_ARGS+= use_alsa=true \ use_pulseaudio=true \ use_sndio=true # 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 OPTIONS_EXCLUDE_aarch64=LTO 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) 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 WIDEVINE_DESC= Depend on foreign-cdm to enable playback of DRM content WIDEVINE_RUN_DEPENDS= foreign-cdm>0:www/foreign-cdm .include "Makefile.tests" TEST_DISTFILES= chromium-${DISTVERSION}-testdata${EXTRACT_SUFX} \ test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz:external TEST_ALL_TARGET= ${TEST_TARGETS} .include .include # for COMPILER_VERSION .if ${PORT_OPTIONS:MHEIMDAL_BASE} && !exists(/usr/lib/libkrb5.so) IGNORE= you have selected HEIMDAL_BASE but do not have Heimdal installed in base .endif .if ${COMPILER_VERSION} < 180 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} .else BINARY_ALIAS+= ar=/usr/bin/llvm-ar \ nm=/usr/bin/llvm-nm .endif # - swiftshader/lib/{libEGL.so,libGLESv2.so} is x86 only # - map ffmpeg target to ${ARCH} .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " FFMPEG_TARGET= arm64 .elif ${ARCH} == amd64 BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" FFMPEG_TARGET= x64 .elif ${ARCH} == i386 BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" FFMPEG_TARGET= ia32 .endif FFMPEG_BDIR= ${WRKSRC}/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} post-extract-TEST-on: @${MKDIR} ${WRKSRC}/third_party/test_fonts/test_fonts @${MV} ${WRKDIR}/test_fonts ${WRKSRC}/third_party/test_fonts/ pre-patch: cd ${WRKDIR}/ungoogled-chromium-${UGVERSION} && ${PYTHON_CMD} \ utils/prune_binaries.py ${WRKSRC} pruning.list cd ${WRKDIR}/ungoogled-chromium-${UGVERSION} && PATCH_BIN=gpatch \ ${PYTHON_CMD} utils/patches.py apply ${WRKSRC} patches cd ${WRKDIR}/ungoogled-chromium-${UGVERSION} && ${PYTHON_CMD} \ utils/domain_substitution.py apply -r domain_regex.list -f \ domain_substitution.list -c ${WRKSRC}/domsubcache.tar.gz ${WRKSRC} pre-configure: # We used to remove bundled libraries to be sure that chromium uses # system libraries and not shipped ones. # cd ${WRKSRC} && ${PYTHON_CMD} \ #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved] cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ ./build/linux/unbundle/replace_gn_files.py --system-libraries \ dav1d flac fontconfig freetype harfbuzz-ng icu libdrm libevent libpng \ libusb libwebp libxml libxslt openh264 opus || ${FALSE} # Chromium uses an unreleased version of FFmpeg, so configure it cd ${WRKSRC}/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 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 363cdf04252d..b17c5f73e2cf 100644 --- a/www/ungoogled-chromium/distinfo +++ b/www/ungoogled-chromium/distinfo @@ -1,11 +1,11 @@ -TIMESTAMP = 1717418110 -SHA256 (chromium-125.0.6422.141.tar.xz) = 9966b50279d0cfaaf4b58570387f0d526388f8d5f6dd990e3f083a55d8d8e603 -SIZE (chromium-125.0.6422.141.tar.xz) = 3470583616 -SHA256 (ungoogled-chromium-125.0.6422.141-1.tar.gz) = c7b8ed60dacb22dde8ee69ca82ab9e92e0fa2f9372b7edb441ef6d20dc356f39 -SIZE (ungoogled-chromium-125.0.6422.141-1.tar.gz) = 668658 +TIMESTAMP = 1719046105 +SHA256 (chromium-126.0.6478.114.tar.xz) = cf4aad7fccc2a6c2339691c23f4c46ef2818e2474a9f83292b237eaa958015ed +SIZE (chromium-126.0.6478.114.tar.xz) = 4167281776 +SHA256 (ungoogled-chromium-126.0.6478.114-1.tar.gz) = ef62c96b0689f2df38636e84a3fffdb924fdcd51ad0b6ec611045ebf58d9f550 +SIZE (ungoogled-chromium-126.0.6478.114-1.tar.gz) = 1258507 SHA256 (pulseaudio-16.1.tar.gz) = 027266c62f2a84422ac45fa721a649508f0f1628fb1fd9242315ac54ce2d7c92 SIZE (pulseaudio-16.1.tar.gz) = 2763111 -SHA256 (chromium-125.0.6422.141-testdata.tar.xz) = 96ff1038b1ac6a1679d72d137ec0558f6174f1f20c712f79bbc7ccedd5ee2fd0 -SIZE (chromium-125.0.6422.141-testdata.tar.xz) = 280241644 +SHA256 (chromium-126.0.6478.114-testdata.tar.xz) = 718c08b1ef3ea8a762b7a276071af9c7c728a2cf2b44721cc616687396d7ccbf +SIZE (chromium-126.0.6478.114-testdata.tar.xz) = 279963992 SHA256 (test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz) = a2ca2962daf482a8f943163541e1c73ba4b2694fabcd2510981f2db4eda493c8 SIZE (test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz) = 32624734 diff --git a/www/ungoogled-chromium/files/patch-BUILD.gn b/www/ungoogled-chromium/files/patch-BUILD.gn index 84aff7b3b972..741afaa49dfe 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-05-23 20:04:36 UTC +--- BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ BUILD.gn @@ -65,7 +65,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) @@ -97,7 +97,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", @@ -428,7 +427,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", @@ -616,6 +615,15 @@ group("gn_all") { } } + if (is_bsd) { + deps -= [ + "//third_party/breakpad:dump_syms($host_toolchain)", + "//third_party/breakpad:microdump_stackwalk($host_toolchain)", + "//third_party/breakpad:minidump_dump($host_toolchain)", + "//third_party/breakpad:minidump_stackwalk($host_toolchain)", + ] + } + if (is_mac) { deps += [ "//third_party/breakpad:dump_syms", @@ -662,7 +670,7 @@ group("gn_all") { host_os == "win") { deps += [ "//chrome/test/mini_installer:mini_installer_tests" ] } - } else if (!is_android && !is_ios && !is_fuchsia) { + } else if (!is_android && !is_ios && !is_fuchsia && !is_bsd) { deps += [ "//third_party/breakpad:symupload($host_toolchain)" ] } @@ -1082,7 +1090,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 = [ -@@ -1175,7 +1183,7 @@ if (use_blink && !is_cronet_build) { +@@ -1177,7 +1185,7 @@ if (use_blink && !is_cronet_build) { data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ] } - if (!is_win && !is_android) { + if (!is_win && !is_android && !is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } -@@ -1184,7 +1192,7 @@ if (use_blink && !is_cronet_build) { +@@ -1186,7 +1194,7 @@ if (use_blink && !is_cronet_build) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } - if (is_linux || is_chromeos) { + if ((is_linux && !is_bsd) || is_chromeos) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } -@@ -1644,7 +1652,7 @@ group("chromium_builder_perf") { +@@ -1646,7 +1654,7 @@ group("chromium_builder_perf") { data_deps += [ "//chrome/test:performance_browser_tests" ] } - if (!is_win) { + if (!is_win && !is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } diff --git a/www/ungoogled-chromium/files/patch-apps_ui_views_app__window__frame__view.cc b/www/ungoogled-chromium/files/patch-apps_ui_views_app__window__frame__view.cc index 9060c0d436ee..e27833c448b5 100644 --- a/www/ungoogled-chromium/files/patch-apps_ui_views_app__window__frame__view.cc +++ b/www/ungoogled-chromium/files/patch-apps_ui_views_app__window__frame__view.cc @@ -1,11 +1,11 @@ ---- apps/ui/views/app_window_frame_view.cc.orig 2024-02-03 15:42:55 UTC +--- apps/ui/views/app_window_frame_view.cc.orig 2024-06-22 08:49:42 UTC +++ apps/ui/views/app_window_frame_view.cc @@ -148,7 +148,7 @@ gfx::Rect AppWindowFrameView::GetWindowBoundsForClient gfx::Rect window_bounds = client_bounds; - // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is + // 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) // Get the difference between the widget's client area bounds and window // bounds, and grow |window_bounds| by that amount. gfx::Insets native_frame_insets = diff --git a/www/ungoogled-chromium/files/patch-base_BUILD.gn b/www/ungoogled-chromium/files/patch-base_BUILD.gn index 4e78563c0051..e2c394b30676 100644 --- a/www/ungoogled-chromium/files/patch-base_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-base_BUILD.gn @@ -1,156 +1,156 @@ ---- base/BUILD.gn.orig 2024-05-23 20:04:36 UTC +--- base/BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ base/BUILD.gn @@ -200,7 +200,7 @@ buildflag_header("ios_cronet_buildflags") { flags = [ "CRONET_BUILD=$is_cronet_build" ] } -enable_message_pump_epoll = is_linux || is_chromeos || is_android +enable_message_pump_epoll = (is_linux || is_chromeos || is_android) && !is_bsd buildflag_header("message_pump_buildflags") { header = "message_pump_buildflags.h" header_dir = "base/message_loop" -@@ -1141,11 +1141,23 @@ component("base") { +@@ -1142,11 +1142,23 @@ component("base") { # Needed for if using newer C++ library than sysroot, except if # building inside the cros_sdk environment - use host_toolchain as a # more robust check for this. - if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) && + if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos && !is_bsd)) && host_toolchain != "//build/toolchain/cros:host") { libs += [ "atomic" ] } + # *BSD needs libkvm + if (is_bsd) { + libs += [ "kvm" ] + } + + if (is_freebsd) { + libs += [ + "execinfo", + "util", + ] + } + if (use_allocator_shim) { if (is_apple) { sources += [ "allocator/early_zone_registration_apple.h" ] -@@ -1165,7 +1177,7 @@ component("base") { +@@ -1166,7 +1178,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" ] } -@@ -2125,6 +2137,22 @@ component("base") { +@@ -2126,6 +2138,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 += [ -@@ -2270,6 +2298,33 @@ component("base") { +@@ -2271,6 +2299,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", -@@ -2280,7 +2335,7 @@ component("base") { +@@ -2281,7 +2336,7 @@ component("base") { } if (dep_libevent) { - deps += [ "//third_party/libevent" ] + public_deps += [ "//third_party/libevent" ] } if (use_libevent) { -@@ -3093,7 +3148,7 @@ if (is_apple) { +@@ -3094,7 +3149,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 -@@ -3745,7 +3800,7 @@ test("base_unittests") { +@@ -3743,7 +3798,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", -@@ -3772,7 +3827,7 @@ test("base_unittests") { +@@ -3770,7 +3825,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", -@@ -3783,7 +3838,7 @@ test("base_unittests") { +@@ -3781,7 +3836,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" ] } -@@ -4051,7 +4106,7 @@ test("base_unittests") { +@@ -4049,7 +4104,7 @@ test("base_unittests") { } } - if (is_fuchsia || is_linux || is_chromeos) { + if ((is_fuchsia || is_linux || is_chromeos) && !is_bsd) { sources += [ "debug/elf_reader_unittest.cc", "debug/test_elf_image_builder.cc", diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni index 31db3444ebff..f08a37989808 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-05-23 20:04:36 UTC +--- base/allocator/partition_allocator/partition_alloc.gni.orig 2024-06-22 08:49:42 UTC +++ base/allocator/partition_allocator/partition_alloc.gni @@ -33,7 +33,7 @@ if (is_nacl) { use_large_empty_slot_span_ring = is_mac 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, -@@ -354,7 +354,7 @@ declare_args() { +@@ -373,7 +373,7 @@ declare_args() { # dependencies that use partition_allocator are compiled in AOSP against a # version of glibc that does not include pkeys syscall numbers. enable_pkeys = - (is_linux || is_chromeos) && target_cpu == "x64" && !is_cronet_build + !is_bsd && (is_linux || is_chromeos) && target_cpu == "x64" && !is_cronet_build } assert(!enable_pkeys || ((is_linux || is_chromeos) && target_cpu == "x64"), "Pkeys are only supported on x64 linux and ChromeOS") diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn index 257ee378fcb6..260aa83606e7 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-05-23 20:04:36 UTC +--- base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ base/allocator/partition_allocator/src/partition_alloc/BUILD.gn -@@ -850,7 +850,7 @@ if (is_clang_or_gcc) { +@@ -884,7 +884,7 @@ if (is_clang_or_gcc) { configs -= [ "//build/config/compiler:enable_arc" ] } } - if (is_chromeos || is_linux) { + if ((is_chromeos || is_linux) && !is_bsd) { shim_headers += [ "shim/allocator_shim_override_cpp_symbols.h", "shim/allocator_shim_override_glibc_weak_symbols.h", diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h index 45fa4325dd35..429da957afaa 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-05-23 20:04:36 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig 2024-06-22 08:49:42 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h -@@ -231,7 +231,7 @@ constexpr bool kUseLazyCommit = false; +@@ -232,7 +232,7 @@ constexpr bool kUseLazyCommit = false; // On these platforms, lock all the partitions before fork(), and unlock after. // This may be required on more platforms in the future. #define PA_CONFIG_HAS_ATFORK_HANDLER() \ - (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // PartitionAlloc uses PartitionRootEnumerator to acquire all // PartitionRoots at BeforeFork and to release at AfterFork. -@@ -278,7 +278,7 @@ constexpr bool kUseLazyCommit = false; +@@ -279,7 +279,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 BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_ARM64)) +#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_BSD) #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() 1 #else #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() 0 diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h index 5a3e737a737f..f351db78d2d0 100644 --- a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h +++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h.orig 2024-05-23 20:04:36 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h.orig 2024-06-22 08:49:42 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h @@ -316,7 +316,7 @@ constexpr size_t kNumPools = kMaxPoolHandle - 1; // 8GB for each of the glued pools). - #if BUILDFLAG(HAS_64_BIT_POINTERS) + #if PA_BUILDFLAG(HAS_64_BIT_POINTERS) #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || \ -- BUILDFLAG(ENABLE_POINTER_COMPRESSION) -+ BUILDFLAG(ENABLE_POINTER_COMPRESSION) || BUILDFLAG(IS_BSD) +- PA_BUILDFLAG(ENABLE_POINTER_COMPRESSION) ++ PA_BUILDFLAG(ENABLE_POINTER_COMPRESSION) || BUILDFLAG(IS_BSD) constexpr size_t kPoolMaxSize = 8 * kGiB; #else constexpr size_t kPoolMaxSize = 16 * kGiB; diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc index 88d599996250..8a6272b4a6be 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-05-23 20:04:36 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig 2024-06-22 08:49:42 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_root.cc @@ -48,7 +48,7 @@ #include "wow64apiset.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #endif @@ -280,7 +280,7 @@ void PartitionAllocMallocInitOnce() { return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // When fork() is called, only the current thread continues to execute in the // child process. If the lock is held, but *not* by this thread when fork() is // called, we have a deadlock. -@@ -954,7 +954,7 @@ void PartitionRoot::Init(PartitionOptions opts) { +@@ -957,7 +957,7 @@ void PartitionRoot::Init(PartitionOptions opts) { // apple OSes. PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) || (internal::SystemPageSize() == (size_t{1} << 14))); -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // Check runtime pagesize. Though the code is currently the same, it is // not merged with the IS_APPLE case above as a 1 << 16 case needs to be // added here in the future, to allow 64 kiB pagesize. That is only diff --git a/www/ungoogled-chromium/files/patch-base_base__paths__posix.cc b/www/ungoogled-chromium/files/patch-base_base__paths__posix.cc index 3bd086bb0886..acf8259c7582 100644 --- a/www/ungoogled-chromium/files/patch-base_base__paths__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_base__paths__posix.cc @@ -1,108 +1,108 @@ ---- base/base_paths_posix.cc.orig 2024-04-23 07:42:17 UTC +--- base/base_paths_posix.cc.orig 2024-06-22 08:49:42 UTC +++ base/base_paths_posix.cc @@ -15,6 +15,7 @@ #include #include +#include "base/command_line.h" #include "base/environment.h" #include "base/files/file_path.h" #include "base/files/file_util.h" @@ -26,9 +27,13 @@ #include "base/process/process_metrics.h" #include "build/build_config.h" -#if BUILDFLAG(IS_FREEBSD) +#if BUILDFLAG(IS_BSD) #include #include +#if BUILDFLAG(IS_OPENBSD) +#include +#define MAXTOKENS 2 +#endif #elif BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_AIX) #include #endif -@@ -48,8 +53,7 @@ bool PathProviderPosix(int key, FilePath* result) { +@@ -49,8 +54,7 @@ bool PathProviderPosix(int key, FilePath* result) { *result = bin_dir; return true; #elif BUILDFLAG(IS_FREEBSD) - int name[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; - std::optional bin_dir = StringSysctl(name, std::size(name)); + std::optional bin_dir = StringSysctl({ CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }); if (!bin_dir.has_value() || bin_dir.value().length() <= 1) { - NOTREACHED() << "Unable to resolve path."; + NOTREACHED_IN_MIGRATION() << "Unable to resolve path."; return false; -@@ -65,13 +69,65 @@ bool PathProviderPosix(int key, FilePath* result) { +@@ -67,13 +71,65 @@ bool PathProviderPosix(int key, FilePath* result) { *result = FilePath(bin_dir); return true; #elif BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_AIX) - // There is currently no way to get the executable path on OpenBSD - char* cpath; - if ((cpath = getenv("CHROME_EXE_PATH")) != NULL) - *result = FilePath(cpath); - else - *result = FilePath("/usr/local/chrome/chrome"); - return true; + char *cpath; +#if !BUILDFLAG(IS_AIX) + struct kinfo_file *files; + kvm_t *kd = NULL; + char errbuf[_POSIX2_LINE_MAX]; + static char retval[PATH_MAX]; + int cnt; + struct stat sb; + pid_t cpid = getpid(); + bool ret = false; + + const base::CommandLine* command_line = + base::CommandLine::ForCurrentProcess(); + + VLOG(1) << "PathProviderPosix argv: " << command_line->argv()[0]; + + if (realpath(command_line->argv()[0].c_str(), retval) == NULL) + goto out; + + if (stat(command_line->argv()[0].c_str(), &sb) < 0) + goto out; + + if (!command_line->HasSwitch("no-sandbox")) { + ret = true; + *result = FilePath(retval); + VLOG(1) << "PathProviderPosix (sandbox) result: " << retval; + goto out; + } + + if ((kd = kvm_openfiles(NULL, NULL, NULL, (int)KVM_NO_FILES, errbuf)) == NULL) + goto out; + + if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, cpid, + sizeof(struct kinfo_file), &cnt)) == NULL) + goto out; + + for (int i = 0; i < cnt; i++) { + if (files[i].fd_fd == KERN_FILE_TEXT && + files[i].va_fsid == static_cast(sb.st_dev) && + files[i].va_fileid == sb.st_ino) { + ret = true; + *result = FilePath(retval); + VLOG(1) << "PathProviderPosix result: " << retval; + } + } +out: + if (kd) + kvm_close(kd); + if (!ret) { +#endif + if ((cpath = getenv("CHROME_EXE_PATH")) != NULL) + *result = FilePath(cpath); + else + *result = FilePath("/usr/local/ungoogled-chromium/ungoogled-chromium"); + return true; +#if !BUILDFLAG(IS_AIX) + } + return ret; +#endif #endif } case DIR_SRC_TEST_DATA_ROOT: { diff --git a/www/ungoogled-chromium/files/patch-base_debug_debugger__posix.cc b/www/ungoogled-chromium/files/patch-base_debug_debugger__posix.cc index b5c2ec083686..da9e7d8594cd 100644 --- a/www/ungoogled-chromium/files/patch-base_debug_debugger__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_debug_debugger__posix.cc @@ -1,69 +1,69 @@ ---- base/debug/debugger_posix.cc.orig 2024-04-23 07:42:17 UTC +--- base/debug/debugger_posix.cc.orig 2024-06-22 08:49:42 UTC +++ base/debug/debugger_posix.cc -@@ -36,6 +36,10 @@ +@@ -41,6 +41,10 @@ #include #endif +#if BUILDFLAG(IS_OPENBSD) +#include +#endif + #if BUILDFLAG(IS_FREEBSD) #include #endif -@@ -95,32 +99,51 @@ bool BeingDebugged() { +@@ -100,32 +104,51 @@ bool BeingDebugged() { // Caution: struct kinfo_proc is marked __APPLE_API_UNSTABLE. The source and // binary interfaces may change. +#if BUILDFLAG(IS_OPENBSD) + struct kinfo_proc *info; + size_t info_size; +#else struct kinfo_proc info; size_t info_size = sizeof(info); +#endif #if BUILDFLAG(IS_OPENBSD) if (sysctl(mib, std::size(mib), NULL, &info_size, NULL, 0) < 0) return -1; - mib[5] = (info_size / sizeof(struct kinfo_proc)); + mib[5] = static_cast((info_size / sizeof(struct kinfo_proc))); + if ((info = reinterpret_cast(malloc(info_size))) == NULL) { + is_set = true; + being_debugged = false; + return being_debugged; + } + + int sysctl_result = sysctl(mib, std::size(mib), info, &info_size, NULL, 0); #endif +#if !BUILDFLAG(IS_OPENBSD) int sysctl_result = sysctl(mib, std::size(mib), &info, &info_size, NULL, 0); +#endif DCHECK_EQ(sysctl_result, 0); if (sysctl_result != 0) { is_set = true; being_debugged = false; - return being_debugged; + goto out; } // This process is being debugged if the P_TRACED flag is set. is_set = true; #if BUILDFLAG(IS_FREEBSD) being_debugged = (info.ki_flag & P_TRACED) != 0; -#elif BUILDFLAG(IS_BSD) - being_debugged = (info.p_flag & P_TRACED) != 0; +#elif BUILDFLAG(IS_OPENBSD) + being_debugged = (info->p_psflags & PS_TRACED) != 0; #else being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0; +#endif + +out: +#if BUILDFLAG(IS_OPENBSD) + free(info); #endif return being_debugged; } diff --git a/www/ungoogled-chromium/files/patch-base_debug_elf__reader.cc b/www/ungoogled-chromium/files/patch-base_debug_elf__reader.cc index 5a1b0e4f68df..53399b12480f 100644 --- a/www/ungoogled-chromium/files/patch-base_debug_elf__reader.cc +++ b/www/ungoogled-chromium/files/patch-base_debug_elf__reader.cc @@ -1,13 +1,13 @@ ---- base/debug/elf_reader.cc.orig 2024-04-23 07:42:17 UTC +--- base/debug/elf_reader.cc.orig 2024-06-22 08:49:42 UTC +++ base/debug/elf_reader.cc -@@ -45,6 +45,10 @@ using Xword = Elf64_Xword; +@@ -50,6 +50,10 @@ using Xword = Elf64_Xword; constexpr char kGnuNoteName[] = "GNU"; +#ifndef NT_GNU_BUILD_ID +#define NT_GNU_BUILD_ID 3 +#endif + // Returns a pointer to the header of the ELF binary mapped into memory, or a // null pointer if the header is invalid. Here and below |elf_mapped_base| is a // pointer to the start of the ELF image. diff --git a/www/ungoogled-chromium/files/patch-base_debug_proc__maps__linux.cc b/www/ungoogled-chromium/files/patch-base_debug_proc__maps__linux.cc index 30c6e6205902..5dfcd54a026b 100644 --- a/www/ungoogled-chromium/files/patch-base_debug_proc__maps__linux.cc +++ b/www/ungoogled-chromium/files/patch-base_debug_proc__maps__linux.cc @@ -1,11 +1,11 @@ ---- base/debug/proc_maps_linux.cc.orig 2022-10-01 07:40:07 UTC +--- base/debug/proc_maps_linux.cc.orig 2024-06-22 08:49:42 UTC +++ base/debug/proc_maps_linux.cc -@@ -13,7 +13,7 @@ +@@ -18,7 +18,7 @@ #include "base/strings/string_split.h" #include "build/build_config.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include #endif diff --git a/www/ungoogled-chromium/files/patch-base_debug_stack__trace.cc b/www/ungoogled-chromium/files/patch-base_debug_stack__trace.cc index 662dab087655..02298b574ee6 100644 --- a/www/ungoogled-chromium/files/patch-base_debug_stack__trace.cc +++ b/www/ungoogled-chromium/files/patch-base_debug_stack__trace.cc @@ -1,29 +1,29 @@ ---- base/debug/stack_trace.cc.orig 2024-05-23 20:04:36 UTC +--- base/debug/stack_trace.cc.orig 2024-06-22 08:49:42 UTC +++ base/debug/stack_trace.cc -@@ -249,7 +249,7 @@ bool StackTrace::WillSymbolizeToStreamForTesting() { +@@ -254,7 +254,7 @@ bool StackTrace::WillSymbolizeToStreamForTesting() { // Symbols are not expected to be reliable when gn args specifies // symbol_level=0. return false; -#elif defined(__UCLIBC__) || defined(_AIX) +#elif defined(__UCLIBC__) || defined(_AIX) || BUILDFLAG(IS_BSD) // StackTrace::OutputToStream() is not implemented under uclibc, nor AIX. // See https://crbug.com/706728 return false; -@@ -311,7 +311,7 @@ std::string StackTrace::ToString() const { +@@ -316,7 +316,7 @@ std::string StackTrace::ToString() const { std::string StackTrace::ToStringWithPrefix(cstring_view prefix_string) const { std::stringstream stream; -#if !defined(__UCLIBC__) && !defined(_AIX) +#if !defined(__UCLIBC__) && !defined(_AIX) && !BUILDFLAG(IS_BSD) OutputToStreamWithPrefix(&stream, prefix_string); #endif return stream.str(); -@@ -335,7 +335,7 @@ bool StackTrace::ShouldSuppressOutput() { +@@ -340,7 +340,7 @@ bool StackTrace::ShouldSuppressOutput() { } std::ostream& operator<<(std::ostream& os, const StackTrace& s) { -#if !defined(__UCLIBC__) && !defined(_AIX) +#if !defined(__UCLIBC__) && !defined(_AIX) && !BUILDFLAG(IS_BSD) s.OutputToStream(&os); #else os << "StackTrace::OutputToStream not implemented."; 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 7fa69cf288de..7ed4a96d07c4 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-04-23 07:42:17 UTC +--- base/debug/stack_trace_posix.cc.orig 2024-06-22 08:49:42 UTC +++ base/debug/stack_trace_posix.cc -@@ -41,7 +41,7 @@ +@@ -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 -@@ -59,8 +59,10 @@ +@@ -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 -@@ -301,7 +303,7 @@ void PrintToStderr(const char* output) { +@@ -306,7 +308,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 -@@ -318,7 +320,11 @@ void AlarmSignalHandler(int signal, siginfo_t* info, v +@@ -323,7 +325,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) -@@ -535,7 +541,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf +@@ -540,7 +546,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; -@@ -560,6 +566,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf +@@ -565,6 +571,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) { -@@ -574,6 +581,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf +@@ -579,6 +586,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) -@@ -763,6 +771,7 @@ class SandboxSymbolizeHelper { +@@ -768,6 +776,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. -@@ -855,11 +864,15 @@ class SandboxSymbolizeHelper { +@@ -860,11 +869,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)) { -@@ -877,6 +890,7 @@ class SandboxSymbolizeHelper { +@@ -882,6 +895,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_dir__reader__linux.h b/www/ungoogled-chromium/files/patch-base_files_dir__reader__linux.h index 74f2516ba6e6..d6f77c7c8b1a 100644 --- a/www/ungoogled-chromium/files/patch-base_files_dir__reader__linux.h +++ b/www/ungoogled-chromium/files/patch-base_files_dir__reader__linux.h @@ -1,39 +1,39 @@ ---- base/files/dir_reader_linux.h.orig 2022-10-01 07:40:07 UTC +--- base/files/dir_reader_linux.h.orig 2024-06-22 08:49:42 UTC +++ base/files/dir_reader_linux.h -@@ -16,10 +16,16 @@ +@@ -21,10 +21,16 @@ #include "base/logging.h" #include "base/posix/eintr_wrapper.h" +#include "build/build_config.h" + // See the comments in dir_reader_posix.h about this. namespace base { +#if BUILDFLAG(IS_BSD) +#include +typedef struct dirent linux_dirent; +#else struct linux_dirent { uint64_t d_ino; int64_t d_off; -@@ -27,6 +33,7 @@ struct linux_dirent { +@@ -32,6 +38,7 @@ struct linux_dirent { unsigned char d_type; char d_name[0]; }; +#endif class DirReaderLinux { public: -@@ -61,7 +68,11 @@ class DirReaderLinux { +@@ -66,7 +73,11 @@ class DirReaderLinux { if (offset_ != size_) return true; +#if BUILDFLAG(IS_BSD) + const int r = getdents(fd_, reinterpret_cast(buf_), sizeof(buf_)); +#else const long r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_)); +#endif if (r == 0) return false; if (r < 0) { diff --git a/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc index 907b6adfe9cb..c0b9a141d307 100644 --- a/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_files_file__path__watcher__unittest.cc @@ -1,29 +1,29 @@ ---- base/files/file_path_watcher_unittest.cc.orig 2024-02-25 20:22:18 UTC +--- base/files/file_path_watcher_unittest.cc.orig 2024-06-22 08:49:42 UTC +++ base/files/file_path_watcher_unittest.cc @@ -847,7 +847,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) { } delegate.RunUntilEventsMatch(event_expecter); -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && BUILDFLAG(IS_BSD) ASSERT_TRUE(WriteFile(file1, "content v2")); // Mac implementation does not detect files modified in a directory. - // TODO(https://crbug.com/1432064): Expect that no events are fired on Mac. + // TODO(crbug.com/40263777): Expect that no events are fired on Mac. @@ -1783,7 +1783,7 @@ namespace { enum Permission { Read, Write, Execute }; -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) bool ChangeFilePermissions(const FilePath& path, Permission perm, bool allow) { struct stat stat_buf; @@ -1817,7 +1817,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi } // namespace -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) && BUILDFLAG(IS_BSD) // Linux implementation of FilePathWatcher doesn't catch attribute changes. // http://crbug.com/78043 // Windows implementation of FilePathWatcher catches attribute changes that diff --git a/www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc b/www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc index 888b2f477f82..aa43ce53c9b8 100644 --- a/www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_files_file__util__posix.cc @@ -1,53 +1,53 @@ ---- base/files/file_util_posix.cc.orig 2024-05-23 20:04:36 UTC +--- base/files/file_util_posix.cc.orig 2024-06-22 08:49:42 UTC +++ base/files/file_util_posix.cc -@@ -810,33 +810,34 @@ bool CreateDirectoryAndGetError(const FilePath& full_p +@@ -819,33 +819,34 @@ bool CreateDirectoryAndGetError(const FilePath& full_p File::Error* error) { ScopedBlockingCall scoped_blocking_call( FROM_HERE, BlockingType::MAY_BLOCK); // For call to mkdir(). + const FilePath kFileSystemRoot("/"); std::vector subpaths; // Collect a list of all parent directories. FilePath last_path = full_path; - subpaths.push_back(full_path); + if (full_path != kFileSystemRoot) + subpaths.push_back(full_path); for (FilePath path = full_path.DirName(); - path.value() != last_path.value(); path = path.DirName()) { + (path.value() != last_path.value() && + (path != kFileSystemRoot)); path = path.DirName()) { subpaths.push_back(path); last_path = path; } // Iterate through the parents and create the missing ones. for (const FilePath& subpath : base::Reversed(subpaths)) { - if (DirectoryExists(subpath)) - continue; - if (mkdir(subpath.value().c_str(), 0700) == 0) - continue; - // Mkdir failed, but it might have failed with EEXIST, or some other error - // due to the directory appearing out of thin air. This can occur if - // two processes are trying to create the same file system tree at the same - // time. Check to see if it exists and make sure it is a directory. - int saved_errno = errno; - if (!DirectoryExists(subpath)) { - if (error) - *error = File::OSErrorToFileError(saved_errno); - errno = saved_errno; - return false; + if (!PathExists(subpath)) { + if ((mkdir(subpath.value().c_str(), 0700) == -1) && + ((full_path != subpath) ? (errno != ENOENT) : (-1))) { + int saved_errno = errno; + if (error) + *error = File::OSErrorToFileError(saved_errno); + return false; + } + } else if (!DirectoryExists(subpath)) { + if (error) + *error = File::OSErrorToFileError(ENOTDIR); + return false; } } return true; diff --git a/www/ungoogled-chromium/files/patch-base_files_file__util__unittest.cc b/www/ungoogled-chromium/files/patch-base_files_file__util__unittest.cc index e4bc8834c64b..5aeb0bf599bc 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-05-23 20:04:36 UTC +--- base/files/file_util_unittest.cc.orig 2024-06-22 08:49:42 UTC +++ base/files/file_util_unittest.cc -@@ -3772,7 +3772,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { +@@ -3835,7 +3835,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"; -@@ -4553,7 +4553,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles +@@ -4568,7 +4568,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 ca8f3e9ab943..fe358cd525a1 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-02-03 15:42:55 UTC +--- base/logging_unittest.cc.orig 2024-06-22 08:49:42 UTC +++ base/logging_unittest.cc -@@ -32,7 +32,7 @@ +@@ -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 -@@ -570,14 +570,18 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo +@@ -579,14 +579,18 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo // need the arch-specific boilerplate below, which is inspired by breakpad. // At the same time, on OSX, ucontext.h is deprecated but si_addr works fine. uintptr_t crash_addr = 0; -#if BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FREEBSD) crash_addr = reinterpret_cast(info->si_addr); #else // OS_* ucontext_t* context = reinterpret_cast(context_ptr); #if defined(ARCH_CPU_X86) crash_addr = static_cast(context->uc_mcontext.gregs[REG_EIP]); #elif defined(ARCH_CPU_X86_64) +#if BUILDFLAG(IS_OPENBSD) + crash_addr = static_cast(context->sc_rip); +#else crash_addr = static_cast(context->uc_mcontext.gregs[REG_RIP]); +#endif #elif defined(ARCH_CPU_ARMEL) crash_addr = static_cast(context->uc_mcontext.arm_pc); #elif defined(ARCH_CPU_ARM64) diff --git a/www/ungoogled-chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc b/www/ungoogled-chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc index 0efce0ad9c4b..9cb587b68073 100644 --- a/www/ungoogled-chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc @@ -1,21 +1,21 @@ ---- base/memory/madv_free_discardable_memory_posix.cc.orig 2023-06-05 19:39:05 UTC +--- base/memory/madv_free_discardable_memory_posix.cc.orig 2024-06-22 08:49:42 UTC +++ base/memory/madv_free_discardable_memory_posix.cc -@@ -306,6 +306,10 @@ void MadvFreeDiscardableMemoryPosix::SetKeepMemoryForT +@@ -311,6 +311,10 @@ void MadvFreeDiscardableMemoryPosix::SetKeepMemoryForT bool MadvFreeDiscardableMemoryPosix::IsResident() const { DFAKE_SCOPED_RECURSIVE_LOCK(thread_collision_warner_); +// XXX mincore +#if BUILDFLAG(IS_BSD) + return false; +#else #if BUILDFLAG(IS_APPLE) std::vector vec(allocated_pages_); #else -@@ -321,6 +325,7 @@ bool MadvFreeDiscardableMemoryPosix::IsResident() cons +@@ -326,6 +330,7 @@ bool MadvFreeDiscardableMemoryPosix::IsResident() cons return false; } return true; +#endif } bool MadvFreeDiscardableMemoryPosix::IsDiscarded() const { diff --git a/www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket.cc b/www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket.cc index e2e5341a3cf4..6a49c4db3866 100644 --- a/www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket.cc +++ b/www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket.cc @@ -1,57 +1,57 @@ ---- base/posix/unix_domain_socket.cc.orig 2024-04-23 07:42:17 UTC +--- base/posix/unix_domain_socket.cc.orig 2024-06-22 08:49:42 UTC +++ base/posix/unix_domain_socket.cc -@@ -51,7 +51,7 @@ bool CreateSocketPair(ScopedFD* one, ScopedFD* two) { +@@ -56,7 +56,7 @@ bool CreateSocketPair(ScopedFD* one, ScopedFD* two) { // static bool UnixDomainSocket::EnableReceiveProcessId(int fd) { -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) const int enable = 1; return setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &enable, sizeof(enable)) == 0; #else -@@ -77,7 +77,7 @@ bool UnixDomainSocket::SendMsg(int fd, +@@ -82,7 +82,7 @@ bool UnixDomainSocket::SendMsg(int fd, struct cmsghdr* cmsg; msg.msg_control = control_buffer; -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) msg.msg_controllen = checked_cast(control_len); #else msg.msg_controllen = control_len; -@@ -85,7 +85,7 @@ bool UnixDomainSocket::SendMsg(int fd, +@@ -90,7 +90,7 @@ bool UnixDomainSocket::SendMsg(int fd, cmsg = CMSG_FIRSTHDR(&msg); cmsg->cmsg_level = SOL_SOCKET; cmsg->cmsg_type = SCM_RIGHTS; -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) cmsg->cmsg_len = checked_cast(CMSG_LEN(sizeof(int) * fds.size())); #else cmsg->cmsg_len = CMSG_LEN(sizeof(int) * fds.size()); -@@ -149,7 +149,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, +@@ -154,7 +154,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, const size_t kControlBufferSize = CMSG_SPACE(sizeof(int) * kMaxFileDescriptors) -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) // macOS does not support ucred. // macOS supports xucred, but this structure is insufficient. + CMSG_SPACE(sizeof(struct ucred)) -@@ -177,7 +177,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, +@@ -182,7 +182,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, wire_fds = reinterpret_cast(CMSG_DATA(cmsg)); wire_fds_len = payload_len / sizeof(int); } -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) // macOS does not support SCM_CREDENTIALS. if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_CREDENTIALS) { -@@ -211,6 +211,9 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, +@@ -216,6 +216,9 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, socklen_t pid_size = sizeof(pid); if (getsockopt(fd, SOL_LOCAL, LOCAL_PEERPID, &pid, &pid_size) != 0) pid = -1; +#elif BUILDFLAG(IS_BSD) + NOTIMPLEMENTED(); + pid = -1; #else // |pid| will legitimately be -1 if we read EOF, so only DCHECK if we // actually received a message. Unfortunately, Linux allows sending zero diff --git a/www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket__unittest.cc b/www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket__unittest.cc index 86367a4e590f..08db4e99a715 100644 --- a/www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_posix_unix__domain__socket__unittest.cc @@ -1,11 +1,11 @@ ---- base/posix/unix_domain_socket_unittest.cc.orig 2023-03-10 11:01:21 UTC +--- base/posix/unix_domain_socket_unittest.cc.orig 2024-06-22 08:49:42 UTC +++ base/posix/unix_domain_socket_unittest.cc -@@ -10,6 +10,8 @@ +@@ -15,6 +15,8 @@ #include #include +#include + #include "base/files/file_util.h" #include "base/files/scoped_file.h" #include "base/functional/bind.h" diff --git a/www/ungoogled-chromium/files/patch-base_process_kill.h b/www/ungoogled-chromium/files/patch-base_process_kill.h index 874e399762b9..be9236ccba75 100644 --- a/www/ungoogled-chromium/files/patch-base_process_kill.h +++ b/www/ungoogled-chromium/files/patch-base_process_kill.h @@ -1,11 +1,11 @@ ---- base/process/kill.h.orig 2024-02-25 20:22:18 UTC +--- base/process/kill.h.orig 2024-06-22 08:49:42 UTC +++ base/process/kill.h -@@ -121,7 +121,7 @@ BASE_EXPORT TerminationStatus GetTerminationStatus(Pro +@@ -123,7 +123,7 @@ BASE_EXPORT TerminationStatus GetTerminationStatus(Pro BASE_EXPORT TerminationStatus GetKnownDeadTerminationStatus( ProcessHandle handle, int* exit_code); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Spawns a thread to wait asynchronously for the child |process| to exit // and then reaps it. BASE_EXPORT void EnsureProcessGetsReaped(Process process); diff --git a/www/ungoogled-chromium/files/patch-base_process_launch__posix.cc b/www/ungoogled-chromium/files/patch-base_process_launch__posix.cc index 522a9fe1f079..1327238aa4d1 100644 --- a/www/ungoogled-chromium/files/patch-base_process_launch__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_process_launch__posix.cc @@ -1,12 +1,12 @@ ---- base/process/launch_posix.cc.orig 2024-02-25 20:22:18 UTC +--- base/process/launch_posix.cc.orig 2024-06-22 08:49:42 UTC +++ base/process/launch_posix.cc -@@ -61,6 +61,9 @@ +@@ -66,6 +66,9 @@ #error "macOS should use launch_mac.cc" #endif +#if defined(OS_FREEBSD) +#pragma weak environ +#endif extern char** environ; namespace base { diff --git a/www/ungoogled-chromium/files/patch-base_process_memory__linux.cc b/www/ungoogled-chromium/files/patch-base_process_memory__linux.cc index e2285cb45b47..1d9c724abd12 100644 --- a/www/ungoogled-chromium/files/patch-base_process_memory__linux.cc +++ b/www/ungoogled-chromium/files/patch-base_process_memory__linux.cc @@ -1,44 +1,44 @@ ---- base/process/memory_linux.cc.orig 2024-02-03 15:42:55 UTC +--- base/process/memory_linux.cc.orig 2024-06-22 08:49:42 UTC +++ base/process/memory_linux.cc @@ -28,6 +28,7 @@ void __libc_free(void*); namespace base { +#if !BUILDFLAG(IS_BSD) namespace { void ReleaseReservationOrTerminate() { @@ -37,12 +38,14 @@ void ReleaseReservationOrTerminate() { } } // namespace +#endif void EnableTerminationOnHeapCorruption() { // On Linux, there nothing to do AFAIK. } void EnableTerminationOnOutOfMemory() { +#if !BUILDFLAG(IS_BSD) // Set the new-out of memory handler. std::set_new_handler(&ReleaseReservationOrTerminate); // If we're using glibc's allocator, the above functions will override @@ -51,8 +54,10 @@ void EnableTerminationOnOutOfMemory() { - #if BUILDFLAG(USE_ALLOCATOR_SHIM) + #if PA_BUILDFLAG(USE_ALLOCATOR_SHIM) allocator_shim::SetCallNewHandlerOnMallocFailure(true); #endif +#endif } +#if !BUILDFLAG(IS_BSD) // ScopedAllowBlocking() has private constructor and it can only be used in // friend classes/functions. Declaring a class is easier in this situation to // avoid adding more dependency to thread_restrictions.h because of the @@ -112,6 +117,7 @@ bool AdjustOOMScoreHelper::AdjustOOMScore(ProcessId pr bool AdjustOOMScore(ProcessId process, int score) { return AdjustOOMScoreHelper::AdjustOOMScore(process, score); } +#endif bool UncheckedMalloc(size_t size, void** result) { - #if BUILDFLAG(USE_ALLOCATOR_SHIM) + #if PA_BUILDFLAG(USE_ALLOCATOR_SHIM) diff --git a/www/ungoogled-chromium/files/patch-base_process_process__metrics__freebsd.cc b/www/ungoogled-chromium/files/patch-base_process_process__metrics__freebsd.cc index d750a08cd3f9..7c46c6b92e77 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__metrics__freebsd.cc +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics__freebsd.cc @@ -1,307 +1,307 @@ ---- base/process/process_metrics_freebsd.cc.orig 2024-05-23 20:04:36 UTC +--- base/process/process_metrics_freebsd.cc.orig 2024-06-22 08:49:42 UTC +++ base/process/process_metrics_freebsd.cc @@ -3,44 +3,58 @@ // found in the LICENSE file. #include "base/process/process_metrics.h" +#include "base/notreached.h" #include +#include #include #include #include +#include /* O_RDONLY */ +#include +#include + #include "base/memory/ptr_util.h" +#include "base/values.h" namespace base { +namespace { +int GetPageShift() { + int pagesize = getpagesize(); + int pageshift = 0; -ProcessMetrics::ProcessMetrics(ProcessHandle process) - : process_(process), - last_cpu_(0) {} + while (pagesize > 1) { + pageshift++; + pagesize >>= 1; + } + return pageshift; +} +} + +ProcessMetrics::ProcessMetrics(ProcessHandle process) : process_(process) {} + // static std::unique_ptr ProcessMetrics::CreateProcessMetrics( ProcessHandle process) { return WrapUnique(new ProcessMetrics(process)); } -base::expected -ProcessMetrics::GetPlatformIndependentCPUUsage() { +base::expected +ProcessMetrics::GetCumulativeCPUUsage() { struct kinfo_proc info; - int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, process_}; - size_t length = sizeof(info); + size_t length = sizeof(struct kinfo_proc); + struct timeval tv; + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_ }; + if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) - return base::unexpected(ProcessCPUUsageError::kSystemError); + return base::ok(TimeDelta()); - return base::ok(double{info.ki_pctcpu} / FSCALE * 100.0); + return base::ok(Microseconds(info.ki_runtime)); } -base::expected -ProcessMetrics::GetCumulativeCPUUsage() { -- NOTREACHED(); +- NOTREACHED_IN_MIGRATION(); - return base::unexpected(ProcessCPUUsageError::kNotImplemented); -} - size_t GetSystemCommitCharge() { int mib[2], pagesize; unsigned long mem_total, mem_free, mem_inactive; @@ -62,6 +76,230 @@ size_t GetSystemCommitCharge() { pagesize = getpagesize(); return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize); +} + +int64_t GetNumberOfThreads(ProcessHandle process) { + // Taken from FreeBSD top (usr.bin/top/machine.c) + + kvm_t* kd = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, "kvm_open"); + if (kd == NULL) + return 0; + + struct kinfo_proc* pbase; + int nproc; + pbase = kvm_getprocs(kd, KERN_PROC_PID, process, &nproc); + if (pbase == NULL) + return 0; + + if (kvm_close(kd) == -1) + return 0; + + return nproc; +} + +bool GetSystemMemoryInfo(SystemMemoryInfoKB *meminfo) { + unsigned int mem_total, mem_free, swap_total, swap_used; + size_t length; + int pagesizeKB; + + pagesizeKB = getpagesize() / 1024; + + length = sizeof(mem_total); + if (sysctlbyname("vm.stats.vm.v_page_count", &mem_total, + &length, NULL, 0) != 0 || length != sizeof(mem_total)) + return false; + + length = sizeof(mem_free); + if (sysctlbyname("vm.stats.vm.v_free_count", &mem_free, &length, NULL, 0) + != 0 || length != sizeof(mem_free)) + return false; + + length = sizeof(swap_total); + if (sysctlbyname("vm.swap_size", &swap_total, &length, NULL, 0) + != 0 || length != sizeof(swap_total)) + return false; + + length = sizeof(swap_used); + if (sysctlbyname("vm.swap_anon_use", &swap_used, &length, NULL, 0) + != 0 || length != sizeof(swap_used)) + return false; + + meminfo->total = mem_total * pagesizeKB; + meminfo->free = mem_free * pagesizeKB; + meminfo->swap_total = swap_total * pagesizeKB; + meminfo->swap_free = (swap_total - swap_used) * pagesizeKB; + + return true; +} + +int ProcessMetrics::GetOpenFdCount() const { + struct kinfo_file * kif; + int cnt; + + if ((kif = kinfo_getfile(process_, &cnt)) == NULL) + return -1; + + free(kif); + + return cnt; +} + +int ProcessMetrics::GetOpenFdSoftLimit() const { + size_t length; + int total_count = 0; + int mib[] = { CTL_KERN, KERN_MAXFILESPERPROC }; + + length = sizeof(total_count); + + if (sysctl(mib, std::size(mib), &total_count, &length, NULL, 0) < 0) { + total_count = -1; + } + + return total_count; +} + +size_t ProcessMetrics::GetResidentSetSize() const { + kvm_t *kd = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "kvm_open"); + + if (kd == nullptr) + return 0; + + struct kinfo_proc *pp; + int nproc; + + if ((pp = kvm_getprocs(kd, KERN_PROC_PID, process_, &nproc)) == nullptr) { + kvm_close(kd); + return 0; + } + + size_t rss; + + if (nproc > 0) { + rss = pp->ki_rssize << GetPageShift(); + } else { + rss = 0; + } + + kvm_close(kd); + return rss; +} + +uint64_t ProcessMetrics::GetVmSwapBytes() const { + kvm_t *kd = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "kvm_open"); + + if (kd == nullptr) + return 0; + + struct kinfo_proc *pp; + int nproc; + + if ((pp = kvm_getprocs(kd, KERN_PROC_PID, process_, &nproc)) == nullptr) { + kvm_close(kd); + return 0; + } + + size_t swrss; + + if (nproc > 0) { + swrss = pp->ki_swrss > pp->ki_rssize + ? (pp->ki_swrss - pp->ki_rssize) << GetPageShift() + : 0; + } else { + swrss = 0; + } + + kvm_close(kd); + return swrss; +} + +int ProcessMetrics::GetIdleWakeupsPerSecond() { + NOTIMPLEMENTED(); + return 0; +} + +bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) { + NOTIMPLEMENTED(); + return false; +} + +bool GetVmStatInfo(VmStatInfo* vmstat) { + NOTIMPLEMENTED(); + return false; +} + +SystemDiskInfo::SystemDiskInfo() { + reads = 0; + reads_merged = 0; + sectors_read = 0; + read_time = 0; + writes = 0; + writes_merged = 0; + sectors_written = 0; + write_time = 0; + io = 0; + io_time = 0; + weighted_io_time = 0; +} + +SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo& other) = default; + +SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default; + +Value::Dict SystemDiskInfo::ToDict() const { + Value::Dict res; + + // Write out uint64_t variables as doubles. + // Note: this may discard some precision, but for JS there's no other option. + res.Set("reads", static_cast(reads)); + res.Set("reads_merged", static_cast(reads_merged)); + res.Set("sectors_read", static_cast(sectors_read)); + res.Set("read_time", static_cast(read_time)); + res.Set("writes", static_cast(writes)); + res.Set("writes_merged", static_cast(writes_merged)); + res.Set("sectors_written", static_cast(sectors_written)); + res.Set("write_time", static_cast(write_time)); + res.Set("io", static_cast(io)); + res.Set("io_time", static_cast(io_time)); + res.Set("weighted_io_time", static_cast(weighted_io_time)); + + NOTIMPLEMENTED(); + + return res; +} + +Value::Dict SystemMemoryInfoKB::ToDict() const { + Value::Dict res; + res.Set("total", total); + res.Set("free", free); + res.Set("available", available); + res.Set("buffers", buffers); + res.Set("cached", cached); + res.Set("active_anon", active_anon); + res.Set("inactive_anon", inactive_anon); + res.Set("active_file", active_file); + res.Set("inactive_file", inactive_file); + res.Set("swap_total", swap_total); + res.Set("swap_free", swap_free); + res.Set("swap_used", swap_total - swap_free); + res.Set("dirty", dirty); + res.Set("reclaimable", reclaimable); + + NOTIMPLEMENTED(); + + return res; +} + +Value::Dict VmStatInfo::ToDict() const { + Value::Dict res; + // TODO(crbug.com/1334256): Make base::Value able to hold uint64_t and remove + // casts below. + res.Set("pswpin", static_cast(pswpin)); + res.Set("pswpout", static_cast(pswpout)); + res.Set("pgmajfault", static_cast(pgmajfault)); + + NOTIMPLEMENTED(); + + return res; } } // namespace base diff --git a/www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc b/www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc index d8b8eeb3f43c..635db0ae0280 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics__openbsd.cc @@ -1,234 +1,234 @@ ---- base/process/process_metrics_openbsd.cc.orig 2024-05-23 20:04:36 UTC +--- base/process/process_metrics_openbsd.cc.orig 2024-06-22 08:49:42 UTC +++ base/process/process_metrics_openbsd.cc @@ -6,75 +6,50 @@ #include #include +#include #include #include +#include +#include + #include "base/memory/ptr_util.h" #include "base/types/expected.h" +#include "base/values.h" +#include "base/notreached.h" namespace base { -namespace { +ProcessMetrics::ProcessMetrics(ProcessHandle process) : process_(process) {} -base::expected GetProcessCPU(pid_t pid) { +base::expected +ProcessMetrics::GetCumulativeCPUUsage() { struct kinfo_proc info; - size_t length; - int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid, - sizeof(struct kinfo_proc), 0 }; + size_t length = sizeof(struct kinfo_proc); + struct timeval tv; - if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) < 0) { - return base::unexpected(ProcessCPUUsageError::kSystemError); - } + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_, + sizeof(struct kinfo_proc), 1 }; - mib[5] = (length / sizeof(struct kinfo_proc)); - if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) { return base::unexpected(ProcessCPUUsageError::kSystemError); } - return base::ok(info.p_pctcpu); + tv.tv_sec = info.p_rtime_sec; + tv.tv_usec = info.p_rtime_usec; + + return base::ok(Microseconds(TimeValToMicroseconds(tv))); } -} // namespace - // static std::unique_ptr ProcessMetrics::CreateProcessMetrics( ProcessHandle process) { return WrapUnique(new ProcessMetrics(process)); } -base::expected -ProcessMetrics::GetPlatformIndependentCPUUsage() { - TimeTicks time = TimeTicks::Now(); - - if (last_cpu_time_.is_zero()) { - // First call, just set the last values. - last_cpu_time_ = time; - return base::ok(0.0); - } - - const base::expected cpu = GetProcessCPU(process_); - if (!cpu.has_value()) { - return base::unexpected(cpu.error()); - } - - last_cpu_time_ = time; - return base::ok(double{cpu.value()} / FSCALE * 100.0); -} - -base::expected -ProcessMetrics::GetCumulativeCPUUsage() { -- NOTREACHED(); +- NOTREACHED_IN_MIGRATION(); - return base::unexpected(ProcessCPUUsageError::kNotImplemented); -} - -ProcessMetrics::ProcessMetrics(ProcessHandle process) - : process_(process), - last_cpu_(0) {} - size_t GetSystemCommitCharge() { int mib[] = { CTL_VM, VM_METER }; - int pagesize; + size_t pagesize; struct vmtotal vmtotal; unsigned long mem_total, mem_free, mem_inactive; size_t len = sizeof(vmtotal); @@ -86,9 +61,136 @@ size_t GetSystemCommitCharge() { mem_free = vmtotal.t_free; mem_inactive = vmtotal.t_vm - vmtotal.t_avm; - pagesize = getpagesize(); + pagesize = checked_cast(getpagesize()); return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize); +} + +int ProcessMetrics::GetOpenFdCount() const { +#if 0 + struct kinfo_file *files; + kvm_t *kd = NULL; + int total_count = 0; + char errbuf[_POSIX2_LINE_MAX]; + + if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL) + goto out; + + if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, process_, + sizeof(struct kinfo_file), &total_count)) == NULL) { + total_count = 0; + goto out; + } + + kvm_close(kd); + +out: + return total_count; +#endif + return getdtablecount(); +} + +int ProcessMetrics::GetOpenFdSoftLimit() const { + return getdtablesize(); +// return GetMaxFds(); +} + +uint64_t ProcessMetrics::GetVmSwapBytes() const { + NOTIMPLEMENTED(); + return 0; +} + +bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo) { + NOTIMPLEMENTED_LOG_ONCE(); + return false; +} + +bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) { + NOTIMPLEMENTED(); + return false; +} + +bool GetVmStatInfo(VmStatInfo* vmstat) { + NOTIMPLEMENTED(); + return false; +} + +int ProcessMetrics::GetIdleWakeupsPerSecond() { + NOTIMPLEMENTED(); + return 0; +} + +Value::Dict SystemMemoryInfoKB::ToDict() const { + Value::Dict res; + res.Set("total", total); + res.Set("free", free); + res.Set("available", available); + res.Set("buffers", buffers); + res.Set("cached", cached); + res.Set("active_anon", active_anon); + res.Set("inactive_anon", inactive_anon); + res.Set("active_file", active_file); + res.Set("inactive_file", inactive_file); + res.Set("swap_total", swap_total); + res.Set("swap_free", swap_free); + res.Set("swap_used", swap_total - swap_free); + res.Set("dirty", dirty); + res.Set("reclaimable", reclaimable); + + NOTIMPLEMENTED(); + + return res; +} + +Value::Dict VmStatInfo::ToDict() const { + Value::Dict res; + res.Set("pswpin", static_cast(pswpin)); + res.Set("pswpout", static_cast(pswpout)); + res.Set("pgmajfault", static_cast(pgmajfault)); + + NOTIMPLEMENTED(); + + return res; +} + +SystemDiskInfo::SystemDiskInfo() { + reads = 0; + reads_merged = 0; + sectors_read = 0; + read_time = 0; + writes = 0; + writes_merged = 0; + sectors_written = 0; + write_time = 0; + io = 0; + io_time = 0; + weighted_io_time = 0; +} + +SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo&) = default; + +SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default; + +Value::Dict SystemDiskInfo::ToDict() const { + Value::Dict res; + + // Write out uint64_t variables as doubles. + // Note: this may discard some precision, but for JS there's no other option. + res.Set("reads", static_cast(reads)); + res.Set("reads_merged", static_cast(reads_merged)); + res.Set("sectors_read", static_cast(sectors_read)); + res.Set("read_time", static_cast(read_time)); + res.Set("writes", static_cast(writes)); + res.Set("writes_merged", static_cast(writes_merged)); + res.Set("sectors_written", static_cast(sectors_written)); + res.Set("write_time", static_cast(write_time)); + res.Set("io", static_cast(io)); + res.Set("io_time", static_cast(io_time)); + res.Set("weighted_io_time", static_cast(weighted_io_time)); + + NOTIMPLEMENTED(); + + return res; } } // namespace base diff --git a/www/ungoogled-chromium/files/patch-base_process_process__metrics__unittest.cc b/www/ungoogled-chromium/files/patch-base_process_process__metrics__unittest.cc index cb832274f2d7..f255fbdcf289 100644 --- a/www/ungoogled-chromium/files/patch-base_process_process__metrics__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_process_process__metrics__unittest.cc @@ -1,12 +1,12 @@ ---- base/process/process_metrics_unittest.cc.orig 2024-05-23 20:04:36 UTC +--- base/process/process_metrics_unittest.cc.orig 2024-06-22 08:49:42 UTC +++ base/process/process_metrics_unittest.cc -@@ -57,7 +57,8 @@ +@@ -62,7 +62,8 @@ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) || \ + BUILDFLAG(IS_BSD) #define ENABLE_CPU_TESTS 1 #else #define ENABLE_CPU_TESTS 0 diff --git a/www/ungoogled-chromium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc b/www/ungoogled-chromium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc index c7cbb2eb27ee..aecb117a873b 100644 --- a/www/ungoogled-chromium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc +++ b/www/ungoogled-chromium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc @@ -1,11 +1,11 @@ ---- base/profiler/stack_sampling_profiler_test_util.cc.orig 2024-04-23 07:42:17 UTC +--- base/profiler/stack_sampling_profiler_test_util.cc.orig 2024-06-22 08:49:42 UTC +++ base/profiler/stack_sampling_profiler_test_util.cc -@@ -37,7 +37,7 @@ +@@ -42,7 +42,7 @@ // Fortunately, it provides _alloca, which functions identically. #include #define alloca _alloca -#else +#elif !BUILDFLAG(IS_BSD) #include #endif diff --git a/www/ungoogled-chromium/files/patch-base_profiler_thread__delegate__posix.cc b/www/ungoogled-chromium/files/patch-base_profiler_thread__delegate__posix.cc index b757d966f758..a966e14c0344 100644 --- a/www/ungoogled-chromium/files/patch-base_profiler_thread__delegate__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_profiler_thread__delegate__posix.cc @@ -1,20 +1,20 @@ ---- base/profiler/thread_delegate_posix.cc.orig 2024-04-23 07:42:17 UTC +--- base/profiler/thread_delegate_posix.cc.orig 2024-06-22 08:49:42 UTC +++ base/profiler/thread_delegate_posix.cc -@@ -14,7 +14,7 @@ +@@ -19,7 +19,7 @@ #include "base/process/process_handle.h" #include "build/build_config.h" -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) #include "base/profiler/stack_base_address_posix.h" #endif -@@ -23,7 +23,7 @@ namespace base { +@@ -28,7 +28,7 @@ namespace base { std::unique_ptr ThreadDelegatePosix::Create( SamplingProfilerThreadToken thread_token) { std::optional base_address; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base_address = thread_token.stack_base_address; #else base_address = diff --git a/www/ungoogled-chromium/files/patch-base_rand__util.h b/www/ungoogled-chromium/files/patch-base_rand__util.h index 515814d31102..39a7e39ac74e 100644 --- a/www/ungoogled-chromium/files/patch-base_rand__util.h +++ b/www/ungoogled-chromium/files/patch-base_rand__util.h @@ -1,11 +1,11 @@ ---- base/rand_util.h.orig 2024-02-25 20:22:18 UTC +--- base/rand_util.h.orig 2024-06-22 08:49:42 UTC +++ base/rand_util.h -@@ -149,7 +149,7 @@ void RandomShuffle(Itr first, Itr last) { +@@ -147,7 +147,7 @@ void RandomShuffle(Itr first, Itr last) { std::shuffle(first, last, RandomBitGenerator()); } -#if BUILDFLAG(IS_POSIX) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_BSD) BASE_EXPORT int GetUrandomFD(); #endif diff --git a/www/ungoogled-chromium/files/patch-base_rand__util__posix.cc b/www/ungoogled-chromium/files/patch-base_rand__util__posix.cc index 519616833805..6ccbd2f24140 100644 --- a/www/ungoogled-chromium/files/patch-base_rand__util__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_rand__util__posix.cc @@ -1,62 +1,62 @@ ---- base/rand_util_posix.cc.orig 2024-03-22 14:16:19 UTC +--- base/rand_util_posix.cc.orig 2024-06-22 08:49:42 UTC +++ base/rand_util_posix.cc -@@ -23,7 +23,7 @@ +@@ -28,7 +28,7 @@ #include "base/time/time.h" #include "build/build_config.h" -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) #include "third_party/lss/linux_syscall_support.h" #elif BUILDFLAG(IS_MAC) - // TODO(crbug.com/995996): Waiting for this header to appear in the iOS SDK. -@@ -40,6 +40,7 @@ namespace base { + // TODO(crbug.com/40641285): Waiting for this header to appear in the iOS SDK. +@@ -45,6 +45,7 @@ namespace base { namespace { +#if !BUILDFLAG(IS_BSD) #if BUILDFLAG(IS_AIX) // AIX has no 64-bit support for O_CLOEXEC. static constexpr int kOpenFlags = O_RDONLY; -@@ -64,10 +65,11 @@ class URandomFd { +@@ -69,10 +70,11 @@ class URandomFd { private: const int fd_; }; +#endif #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ BUILDFLAG(IS_ANDROID)) && \ - !BUILDFLAG(IS_NACL) + !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) // TODO(pasko): Unify reading kernel version numbers in: // mojo/core/channel_linux.cc // chrome/browser/android/seccomp_support_detector.cc -@@ -177,6 +179,7 @@ bool UseBoringSSLForRandBytes() { +@@ -182,6 +184,7 @@ bool UseBoringSSLForRandBytes() { namespace { - void RandBytes(span output, bool avoid_allocation) { + void RandBytesInternal(span output, bool avoid_allocation) { +#if !BUILDFLAG(IS_BSD) #if !BUILDFLAG(IS_NACL) // The BoringSSL experiment takes priority over everything else. if (!avoid_allocation && internal::UseBoringSSLForRandBytes()) { -@@ -215,6 +218,9 @@ void RandBytes(span output, bool avoid_alloca +@@ -220,6 +223,9 @@ void RandBytesInternal(span output, bool avoi const int urandom_fd = GetUrandomFD(); const bool success = ReadFromFD(urandom_fd, as_writable_chars(output)); CHECK(success); +#else + arc4random_buf(output.data(), output.size()); +#endif } } // namespace -@@ -239,9 +245,11 @@ void RandBytes(void* output, size_t output_length) { - RandBytes(make_span(static_cast(output), output_length)); +@@ -239,9 +245,11 @@ void RandBytes(span output) { + RandBytesInternal(output, /*avoid_allocation=*/false); } +#if !BUILDFLAG(IS_BSD) int GetUrandomFD() { static NoDestructor urandom_fd; return urandom_fd->fd(); } +#endif } // namespace base diff --git a/www/ungoogled-chromium/files/patch-base_strings_safe__sprintf__unittest.cc b/www/ungoogled-chromium/files/patch-base_strings_safe__sprintf__unittest.cc index 3c50745fb0b5..5a3f2ff4a63d 100644 --- a/www/ungoogled-chromium/files/patch-base_strings_safe__sprintf__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_strings_safe__sprintf__unittest.cc @@ -1,18 +1,18 @@ ---- base/strings/safe_sprintf_unittest.cc.orig 2024-05-23 20:04:36 UTC +--- base/strings/safe_sprintf_unittest.cc.orig 2024-06-22 08:49:42 UTC +++ base/strings/safe_sprintf_unittest.cc -@@ -735,6 +735,7 @@ TEST(SafeSPrintfTest, EmbeddedNul) { +@@ -740,6 +740,7 @@ TEST(SafeSPrintfTest, EmbeddedNul) { #endif } +#if !BUILDFLAG(IS_BSD) TEST(SafeSPrintfTest, EmitNULL) { char buf[40]; #if defined(__GNUC__) -@@ -751,6 +752,7 @@ TEST(SafeSPrintfTest, EmitNULL) { +@@ -756,6 +757,7 @@ TEST(SafeSPrintfTest, EmitNULL) { #pragma GCC diagnostic pop #endif } +#endif TEST(SafeSPrintfTest, PointerSize) { // The internal data representation is a 64bit value, independent of the diff --git a/www/ungoogled-chromium/files/patch-base_system_sys__info__freebsd.cc b/www/ungoogled-chromium/files/patch-base_system_sys__info__freebsd.cc index fc9a45185508..a0c6de0c4d65 100644 --- a/www/ungoogled-chromium/files/patch-base_system_sys__info__freebsd.cc +++ b/www/ungoogled-chromium/files/patch-base_system_sys__info__freebsd.cc @@ -1,115 +1,115 @@ ---- base/system/sys_info_freebsd.cc.orig 2022-10-01 07:40:07 UTC +--- base/system/sys_info_freebsd.cc.orig 2024-06-22 08:49:42 UTC +++ base/system/sys_info_freebsd.cc @@ -9,30 +9,106 @@ #include #include "base/notreached.h" +#include "base/process/process_metrics.h" +#include "base/strings/string_util.h" namespace base { -int64_t SysInfo::AmountOfPhysicalMemoryImpl() { - int pages, page_size; +int SysInfo::NumberOfProcessors() { + int mib[] = {CTL_HW, HW_NCPU}; + int ncpu; + size_t size = sizeof(ncpu); + if (sysctl(mib, std::size(mib), &ncpu, &size, NULL, 0) < 0) { + NOTREACHED(); + return 1; + } + return ncpu; +} + +uint64_t SysInfo::AmountOfPhysicalMemoryImpl() { + int pages, page_size, r = 0; size_t size = sizeof(pages); - sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0); - sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); - if (pages == -1 || page_size == -1) { + + if (r == 0) + r = sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0); + if (r == 0) + r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); + + if (r == -1) { - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; } - return static_cast(pages) * page_size; + + return static_cast(pages) * page_size; } +uint64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() { + int page_size, r = 0; + unsigned int pgfree, pginact, pgcache; + size_t size = sizeof(page_size); + size_t szpg = sizeof(pgfree); + + if (r == 0) + r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); + if (r == 0) + r = sysctlbyname("vm.stats.vm.v_free_count", &pgfree, &szpg, NULL, 0); + if (r == 0) + r = sysctlbyname("vm.stats.vm.v_inactive_count", &pginact, &szpg, NULL, 0); + if (r == 0) + r = sysctlbyname("vm.stats.vm.v_cache_count", &pgcache, &szpg, NULL, 0); + + if (r == -1) { + NOTREACHED(); + return 0; + } + + return static_cast((pgfree + pginact + pgcache) * page_size); +} + // static +uint64_t SysInfo::AmountOfAvailablePhysicalMemory(const SystemMemoryInfoKB& info) { + uint64_t res_kb = info.available != 0 + ? info.available - info.active_file + : info.free + info.reclaimable + info.inactive_file; + return res_kb * 1024; +} + +// static +std::string SysInfo::CPUModelName() { + int mib[] = { CTL_HW, HW_MODEL }; + char name[256]; + size_t size = std::size(name); + + if (sysctl(mib, std::size(mib), &name, &size, NULL, 0) == 0) { + return name; + } + + return std::string(); +} + +// static uint64_t SysInfo::MaxSharedMemorySize() { size_t limit; size_t size = sizeof(limit); + if (sysctlbyname("kern.ipc.shmmax", &limit, &size, NULL, 0) < 0) { - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; } + return static_cast(limit); +} + +SysInfo::HardwareInfo SysInfo::GetHardwareInfoSync() { + HardwareInfo info; + + info.manufacturer = "FreeBSD"; + info.model = HardwareModelName(); + + DCHECK(IsStringUTF8(info.manufacturer)); + DCHECK(IsStringUTF8(info.model)); + + return info; } } // namespace base diff --git a/www/ungoogled-chromium/files/patch-base_system_sys__info__openbsd.cc b/www/ungoogled-chromium/files/patch-base_system_sys__info__openbsd.cc index 8f10ea2d33fe..a54506f9b27c 100644 --- a/www/ungoogled-chromium/files/patch-base_system_sys__info__openbsd.cc +++ b/www/ungoogled-chromium/files/patch-base_system_sys__info__openbsd.cc @@ -1,94 +1,94 @@ ---- base/system/sys_info_openbsd.cc.orig 2024-02-25 20:22:18 UTC +--- base/system/sys_info_openbsd.cc.orig 2024-06-22 08:49:42 UTC +++ base/system/sys_info_openbsd.cc @@ -3,7 +3,6 @@ // found in the LICENSE file. #include "base/system/sys_info.h" - #include #include #include @@ -12,6 +11,7 @@ #include "base/notreached.h" #include "base/posix/sysctl.h" +#include "base/strings/string_util.h" namespace { @@ -27,9 +27,14 @@ uint64_t AmountOfMemory(int pages_name) { namespace base { +// pledge(2) +uint64_t aofpmem = 0; +uint64_t shmmax = 0; +char cpumodel[256]; + // static int SysInfo::NumberOfProcessors() { - int mib[] = {CTL_HW, HW_NCPU}; + int mib[] = {CTL_HW, HW_NCPUONLINE}; int ncpu; size_t size = sizeof(ncpu); if (sysctl(mib, std::size(mib), &ncpu, &size, NULL, 0) < 0) { @@ -41,10 +46,26 @@ int SysInfo::NumberOfProcessors() { // static uint64_t SysInfo::AmountOfPhysicalMemoryImpl() { - return AmountOfMemory(_SC_PHYS_PAGES); + // pledge(2) + if (!aofpmem) + aofpmem = AmountOfMemory(_SC_PHYS_PAGES); + return aofpmem; } // static +std::string SysInfo::CPUModelName() { + int mib[] = {CTL_HW, HW_MODEL}; + size_t len = std::size(cpumodel); + + if (cpumodel[0] == '\0') { + if (sysctl(mib, std::size(mib), cpumodel, &len, NULL, 0) < 0) + return std::string(); + } + + return std::string(cpumodel, len - 1); +} + +// static uint64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() { // We should add inactive file-backed memory also but there is no such // information from OpenBSD unfortunately. @@ -56,16 +77,28 @@ uint64_t SysInfo::MaxSharedMemorySize() { int mib[] = {CTL_KERN, KERN_SHMINFO, KERN_SHMINFO_SHMMAX}; size_t limit; size_t size = sizeof(limit); + // pledge(2) + if (shmmax) + goto out; if (sysctl(mib, std::size(mib), &limit, &size, NULL, 0) < 0) { - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return 0; } - return static_cast(limit); + shmmax = static_cast(limit); +out: + return shmmax; } // static -std::string SysInfo::CPUModelName() { - return StringSysctl({CTL_HW, HW_MODEL}).value(); +SysInfo::HardwareInfo SysInfo::GetHardwareInfoSync() { + HardwareInfo info; + // Set the manufacturer to "OpenBSD" and the model to + // an empty string. + info.manufacturer = "OpenBSD"; + info.model = HardwareModelName(); + DCHECK(IsStringUTF8(info.manufacturer)); + DCHECK(IsStringUTF8(info.model)); + return info; } } // namespace base diff --git a/www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc b/www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc index 68696a0e50d2..0cc33eae9e66 100644 --- a/www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc +++ b/www/ungoogled-chromium/files/patch-base_test_launcher_test__launcher.cc @@ -1,10 +1,10 @@ ---- base/test/launcher/test_launcher.cc.orig 2024-02-03 15:42:55 UTC +--- base/test/launcher/test_launcher.cc.orig 2024-06-22 08:49:42 UTC +++ base/test/launcher/test_launcher.cc -@@ -69,6 +69,7 @@ +@@ -74,6 +74,7 @@ #include "testing/gtest/include/gtest/gtest.h" #if BUILDFLAG(IS_POSIX) +#include #include #include "base/files/file_descriptor_watcher_posix.h" diff --git a/www/ungoogled-chromium/files/patch-base_test_test__file__util__posix.cc b/www/ungoogled-chromium/files/patch-base_test_test__file__util__posix.cc index 1bc9f92e2020..54ae23dcbb71 100644 --- a/www/ungoogled-chromium/files/patch-base_test_test__file__util__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_test_test__file__util__posix.cc @@ -1,11 +1,11 @@ ---- base/test/test_file_util_posix.cc.orig 2024-03-22 14:16:19 UTC +--- base/test/test_file_util_posix.cc.orig 2024-06-22 08:49:42 UTC +++ base/test/test_file_util_posix.cc -@@ -89,7 +89,7 @@ void SyncPageCacheToDisk() { +@@ -91,7 +91,7 @@ void SyncPageCacheToDisk() { } #if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_APPLE) && \ - !BUILDFLAG(IS_ANDROID) + !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) bool EvictFileFromSystemCache(const FilePath& file) { // There doesn't seem to be a POSIX way to cool the disk cache. NOTIMPLEMENTED(); diff --git a/www/ungoogled-chromium/files/patch-base_threading_platform__thread.h b/www/ungoogled-chromium/files/patch-base_threading_platform__thread.h index 9f4ebd22b2ee..e9225801c6cc 100644 --- a/www/ungoogled-chromium/files/patch-base_threading_platform__thread.h +++ b/www/ungoogled-chromium/files/patch-base_threading_platform__thread.h @@ -1,11 +1,11 @@ ---- base/threading/platform_thread.h.orig 2024-04-23 07:42:17 UTC +--- base/threading/platform_thread.h.orig 2024-06-22 08:49:42 UTC +++ base/threading/platform_thread.h -@@ -46,6 +46,8 @@ typedef DWORD PlatformThreadId; +@@ -49,6 +49,8 @@ typedef DWORD PlatformThreadId; typedef zx_koid_t PlatformThreadId; #elif BUILDFLAG(IS_APPLE) typedef mach_port_t PlatformThreadId; +#elif BUILDFLAG(IS_BSD) +typedef uint64_t PlatformThreadId; #elif BUILDFLAG(IS_POSIX) typedef pid_t PlatformThreadId; #endif diff --git a/www/ungoogled-chromium/files/patch-base_threading_platform__thread__posix.cc b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__posix.cc index 62fb5adc60db..ca3ba6f3cd77 100644 --- a/www/ungoogled-chromium/files/patch-base_threading_platform__thread__posix.cc +++ b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__posix.cc @@ -1,53 +1,53 @@ ---- base/threading/platform_thread_posix.cc.orig 2024-05-23 20:04:36 UTC +--- base/threading/platform_thread_posix.cc.orig 2024-06-22 08:49:42 UTC +++ base/threading/platform_thread_posix.cc @@ -77,11 +77,11 @@ void* ThreadFunc(void* params) { if (!thread_params->joinable) base::DisallowSingleton(); --#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) -+#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_BSD) +-#if PA_BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) ++#if PA_BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_BSD) partition_alloc::internal::StackTopRegistry::Get().NotifyThreadCreated(); #endif -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) #if BUILDFLAG(IS_APPLE) PlatformThread::SetCurrentThreadRealtimePeriodValue( delegate->GetRealtimePeriod()); @@ -265,6 +265,8 @@ PlatformThreadId PlatformThreadBase::CurrentId() { return reinterpret_cast(pthread_self()); #elif BUILDFLAG(IS_POSIX) && BUILDFLAG(IS_AIX) return pthread_self(); +#elif BUILDFLAG(IS_BSD) + return reinterpret_cast(pthread_self()); #elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_AIX) return reinterpret_cast(pthread_self()); #endif @@ -355,7 +357,7 @@ void PlatformThreadBase::Detach(PlatformThreadHandle t // static bool PlatformThreadBase::CanChangeThreadType(ThreadType from, ThreadType to) { -#if BUILDFLAG(IS_NACL) +#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD) return false; #else if (from >= to) { @@ -376,6 +378,9 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type, MessagePumpType pump_type_hint) { #if BUILDFLAG(IS_NACL) NOTIMPLEMENTED(); +// avoid pledge(2) violation +#elif BUILDFLAG(IS_BSD) + NOTIMPLEMENTED(); #else if (internal::SetCurrentThreadTypeForPlatform(thread_type, pump_type_hint)) return; @@ -398,7 +403,7 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type, // static ThreadPriorityForTest PlatformThreadBase::GetCurrentThreadPriorityForTest() { -#if BUILDFLAG(IS_NACL) +#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD) NOTIMPLEMENTED(); return ThreadPriorityForTest::kNormal; #else diff --git a/www/ungoogled-chromium/files/patch-base_threading_platform__thread__unittest.cc b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__unittest.cc index 66183f7d1437..a143aa51699d 100644 --- a/www/ungoogled-chromium/files/patch-base_threading_platform__thread__unittest.cc +++ b/www/ungoogled-chromium/files/patch-base_threading_platform__thread__unittest.cc @@ -1,38 +1,38 @@ ---- base/threading/platform_thread_unittest.cc.orig 2024-05-23 20:04:36 UTC +--- base/threading/platform_thread_unittest.cc.orig 2024-06-22 08:49:42 UTC +++ base/threading/platform_thread_unittest.cc -@@ -33,7 +33,7 @@ +@@ -38,7 +38,7 @@ #include "base/time/time.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include #include -@@ -424,7 +424,7 @@ TEST(PlatformThreadTest, +@@ -429,7 +429,7 @@ TEST(PlatformThreadTest, // and hardcodes what we know. Please inform scheduler-dev@ch40m1um.qjz9zk if this // proprerty changes for a given platform. TEST(PlatformThreadTest, CanChangeThreadType) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Ubuntu, RLIMIT_NICE and RLIMIT_RTPRIO are 0 by default, so we won't be // able to increase priority to any level unless we are root (euid == 0). bool kCanIncreasePriority = false; -@@ -708,12 +708,16 @@ INSTANTIATE_TEST_SUITE_P( +@@ -713,12 +713,16 @@ INSTANTIATE_TEST_SUITE_P( #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) namespace { bool IsTidCacheCorrect() { +#if BUILDFLAG(IS_BSD) + return PlatformThread::CurrentId() == reinterpret_cast(pthread_self()); +#else return PlatformThread::CurrentId() == syscall(__NR_gettid); +#endif } void* CheckTidCacheCorrectWrapper(void*) { diff --git a/www/ungoogled-chromium/files/patch-base_trace__event_malloc__dump__provider.cc b/www/ungoogled-chromium/files/patch-base_trace__event_malloc__dump__provider.cc index 96f932b7ca80..a75ada518d5f 100644 --- a/www/ungoogled-chromium/files/patch-base_trace__event_malloc__dump__provider.cc +++ b/www/ungoogled-chromium/files/patch-base_trace__event_malloc__dump__provider.cc @@ -1,30 +1,30 @@ ---- base/trace_event/malloc_dump_provider.cc.orig 2024-04-23 07:42:17 UTC +--- base/trace_event/malloc_dump_provider.cc.orig 2024-06-22 08:49:42 UTC +++ base/trace_event/malloc_dump_provider.cc -@@ -24,6 +24,8 @@ +@@ -29,6 +29,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_BSD) +#include #else #include #endif -@@ -181,7 +183,7 @@ void ReportAppleAllocStats(size_t* total_virtual_size, +@@ -187,7 +189,7 @@ void ReportAppleAllocStats(size_t* total_virtual_size, - #if (BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \ - (!BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_WIN) && \ + #if (PA_BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \ + (!PA_BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_WIN) && \ - !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_FUCHSIA)) + !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD)) void ReportMallinfoStats(ProcessMemoryDump* pmd, size_t* total_virtual_size, size_t* resident_size, -@@ -366,6 +368,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump +@@ -391,6 +393,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump &allocated_objects_count); #elif BUILDFLAG(IS_FUCHSIA) // TODO(fuchsia): Port, see https://crbug.com/706592. +#elif BUILDFLAG(IS_BSD) + total_virtual_size = 0; + allocated_objects_size = 0; #else ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size, &allocated_objects_size, &allocated_objects_count); diff --git a/www/ungoogled-chromium/files/patch-base_trace__event_memory__dump__manager.cc b/www/ungoogled-chromium/files/patch-base_trace__event_memory__dump__manager.cc index 6fc72cbe49c3..806329f53067 100644 --- a/www/ungoogled-chromium/files/patch-base_trace__event_memory__dump__manager.cc +++ b/www/ungoogled-chromium/files/patch-base_trace__event_memory__dump__manager.cc @@ -1,11 +1,11 @@ ---- base/trace_event/memory_dump_manager.cc.orig 2022-10-01 07:40:07 UTC +--- base/trace_event/memory_dump_manager.cc.orig 2024-06-22 08:49:42 UTC +++ base/trace_event/memory_dump_manager.cc -@@ -82,7 +82,7 @@ const char* const MemoryDumpManager::kSystemAllocatorP +@@ -87,7 +87,7 @@ const char* const MemoryDumpManager::kSystemAllocatorP #if defined(MALLOC_MEMORY_TRACING_SUPPORTED) MallocDumpProvider::kAllocatedObjects; #else - nullptr; + ""; #endif // static diff --git a/www/ungoogled-chromium/files/patch-base_trace__event_process__memory__dump.cc b/www/ungoogled-chromium/files/patch-base_trace__event_process__memory__dump.cc index 79c476eb0880..3dda7a0eca84 100644 --- a/www/ungoogled-chromium/files/patch-base_trace__event_process__memory__dump.cc +++ b/www/ungoogled-chromium/files/patch-base_trace__event_process__memory__dump.cc @@ -1,20 +1,20 @@ ---- base/trace_event/process_memory_dump.cc.orig 2024-04-23 07:42:17 UTC +--- base/trace_event/process_memory_dump.cc.orig 2024-06-22 08:49:42 UTC +++ base/trace_event/process_memory_dump.cc -@@ -113,7 +113,7 @@ std::optional ProcessMemoryDump::CountResident +@@ -118,7 +118,7 @@ std::optional ProcessMemoryDump::CountResident #if BUILDFLAG(IS_WIN) std::unique_ptr vec( new PSAPI_WORKING_SET_EX_INFORMATION[max_vec_size]); -#elif BUILDFLAG(IS_APPLE) +#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) std::unique_ptr vec(new char[max_vec_size]); #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) std::unique_ptr vec(new unsigned char[max_vec_size]); -@@ -135,7 +135,7 @@ std::optional ProcessMemoryDump::CountResident +@@ -140,7 +140,7 @@ std::optional ProcessMemoryDump::CountResident for (size_t i = 0; i < page_count; i++) resident_page_count += vec[i].VirtualAttributes.Valid; -#elif BUILDFLAG(IS_FUCHSIA) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - // TODO(crbug.com/851760): Implement counting resident bytes. + // TODO(crbug.com/42050620): Implement counting resident bytes. // For now, log and avoid unused variable warnings. NOTIMPLEMENTED_LOG_ONCE(); 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 a9d66cda0265..7049a4138285 100644 --- a/www/ungoogled-chromium/files/patch-build_config_clang_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-build_config_clang_BUILD.gn @@ -1,11 +1,11 @@ ---- build/config/clang/BUILD.gn.orig 2024-05-23 20:04:36 UTC +--- build/config/clang/BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ build/config/clang/BUILD.gn -@@ -212,7 +212,7 @@ template("clang_lib") { +@@ -214,7 +214,7 @@ template("clang_lib") { # Adds a dependency on the Clang runtime library clang_rt.builtins. clang_lib("compiler_builtins") { - if (!toolchain_has_rust) { + if (!toolchain_has_rust || is_bsd) { # Since there's no Rust in the toolchain, there's no concern that we'll use # the Rust stdlib's intrinsics here. # 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 ef291fed0a7e..95fdb4a5d11f 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,132 @@ ---- build/config/compiler/BUILD.gn.orig 2024-05-23 20:04:36 UTC +--- build/config/compiler/BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ build/config/compiler/BUILD.gn -@@ -203,7 +203,7 @@ declare_args() { +@@ -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() { -@@ -265,13 +265,16 @@ config("default_include_dirs") { +@@ -251,13 +251,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 --------------------------------------------------------------------- -@@ -512,6 +515,10 @@ config("compiler") { +@@ -499,6 +502,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ - if (use_gold) { -@@ -587,7 +594,7 @@ config("compiler") { + if (use_icf && (!is_apple || use_lld)) { +@@ -545,7 +552,7 @@ config("compiler") { ldflags += [ "-Wl,-z,keep-text-section-prefix" ] } - if (is_clang && !is_nacl && current_os != "zos") { + if (is_clang && !is_nacl && current_os != "zos" && !is_bsd) { cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] if (save_reproducers_on_lld_crash && use_lld) { ldflags += [ -@@ -1198,7 +1205,7 @@ config("compiler_cpu_abi") { +@@ -1173,7 +1180,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" ] -@@ -1213,7 +1220,7 @@ config("compiler_cpu_abi") { +@@ -1188,7 +1195,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" ] -@@ -1548,7 +1555,7 @@ config("compiler_deterministic") { +@@ -1523,7 +1530,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", -@@ -1600,7 +1607,7 @@ config("compiler_deterministic") { +@@ -1575,7 +1582,7 @@ config("compiler_deterministic") { } config("clang_revision") { - if (is_clang && clang_base_path == default_clang_base_path) { + if (is_clang && !is_bsd && clang_base_path == default_clang_base_path) { update_args = [ "--print-revision", "--verify-version=$clang_version", -@@ -1914,9 +1921,6 @@ config("default_warnings") { +@@ -1889,9 +1896,6 @@ config("default_warnings") { - # TODO(crbug.com/1494809): Evaluate and possibly enable. + # TODO(crbug.com/40286317): Evaluate and possibly enable. "-Wno-vla-extension", - -- # TODO(https://crbug.com/1490607): Fix and re-enable. +- # TODO(crbug.com/40284799): Fix and re-enable. - "-Wno-thread-safety-reference-return", ] cflags_cc += [ -@@ -1924,7 +1928,7 @@ config("default_warnings") { +@@ -1899,7 +1903,7 @@ config("default_warnings") { "-Wenum-compare-conditional", ] - if (!is_nacl) { -+ if (!is_nacl && !is_bsd) { ++ if (!is_nacl && !is_openbsd) { cflags_cc += [ - # TODO(https://crbug.com/1513724): Fix and re-enable. + # TODO(crbug.com/41486292): Fix and re-enable. "-Wno-c++11-narrowing-const-reference", -@@ -2113,7 +2117,7 @@ config("no_chromium_code") { - # third-party libraries. - "-Wno-c++11-narrowing", - ] -- if (!is_nacl) { -+ if (!is_nacl && !is_freebsd) { - cflags += [ - # Disabled for similar reasons as -Wunused-variable. - "-Wno-unused-but-set-variable", -@@ -2638,7 +2642,7 @@ config("afdo_optimize_size") { +@@ -2616,7 +2620,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. -@@ -2665,7 +2669,7 @@ config("afdo") { +@@ -2643,7 +2647,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 ] } -@@ -2829,7 +2833,8 @@ config("symbols") { +@@ -2808,7 +2812,8 @@ config("symbols") { configs += [ "//build/config:compress_debug_sections" ] } - if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") { + if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos" && + !is_bsd) { if (is_apple) { - # TODO(https://crbug.com/1050118): Investigate missing debug info on mac. + # 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_linux_unbundle_libwebp.gn b/www/ungoogled-chromium/files/patch-build_linux_unbundle_libwebp.gn deleted file mode 100644 index f329541cc6a7..000000000000 --- a/www/ungoogled-chromium/files/patch-build_linux_unbundle_libwebp.gn +++ /dev/null @@ -1,27 +0,0 @@ ---- build/linux/unbundle/libwebp.gn.orig 2024-04-23 07:42:17 UTC -+++ build/linux/unbundle/libwebp.gn -@@ -22,6 +22,8 @@ shim_headers("libwebp_shim") { - "webp/mux.h", - "webp/mux_types.h", - "webp/types.h", -+ "webp/sharpyuv/sharpyuv.h", -+ "webp/sharpyuv/sharpyuv_csp.h", - ] - } - -@@ -30,6 +32,14 @@ source_set("libwebp_webp") { - public_configs = [ ":system_libwebp" ] - } - -+source_set("libwebp_sharpyuv") { -+ deps = [ ":libwebp_shim" ] -+ public_configs = [ ":system_libwebp" ] -+} -+ - group("libwebp") { -- deps = [ ":libwebp_webp" ] -+ deps = [ -+ ":libwebp_webp", -+ ":libwebp_sharpyuv", -+ ] - } diff --git a/www/ungoogled-chromium/files/patch-build_toolchain_gcc__toolchain.gni b/www/ungoogled-chromium/files/patch-build_toolchain_gcc__toolchain.gni index c04afadf6810..f98283ea45a1 100644 --- a/www/ungoogled-chromium/files/patch-build_toolchain_gcc__toolchain.gni +++ b/www/ungoogled-chromium/files/patch-build_toolchain_gcc__toolchain.gni @@ -1,44 +1,44 @@ ---- build/toolchain/gcc_toolchain.gni.orig 2024-05-23 20:04:36 UTC +--- build/toolchain/gcc_toolchain.gni.orig 2024-06-22 08:49:42 UTC +++ build/toolchain/gcc_toolchain.gni @@ -57,6 +57,13 @@ if (enable_resource_allowlist_generation) { "enable_resource_allowlist_generation=true does not work for target_os=$target_os") } +declare_args() { + extra_cflags = "" + extra_cppflags = "" + extra_cxxflags = "" + extra_ldflags = "" +} + # This template defines a toolchain for something that works like gcc # (including clang). # -@@ -879,22 +886,12 @@ template("gcc_toolchain") { - # use_gold too. +@@ -878,22 +885,12 @@ template("gcc_toolchain") { + # actually just be doing a native compile. template("clang_toolchain") { gcc_toolchain(target_name) { - _path = "$clang_base_path/bin" - _is_path_absolute = get_path_info(_path, "abspath") == _path - - # Preserve absolute paths for tools like distcc. - if (_is_path_absolute && filter_include([ _path ], [ "//*" ]) == []) { - prefix = _path - } else { - prefix = rebase_path(_path, root_build_dir) - } - - cc = "${prefix}/clang" - cxx = "${prefix}/clang++" + cc = "cc" + cxx = "c++" ld = cxx - readelf = "${prefix}/llvm-readelf" - ar = "${prefix}/llvm-ar" - nm = "${prefix}/llvm-nm" + readelf = "readelf" + ar = "ar" + nm = "nm" forward_variables_from(invoker, "*", [ "toolchain_args" ]) diff --git a/www/ungoogled-chromium/files/patch-chrome_app_chrome__command__ids.h b/www/ungoogled-chromium/files/patch-chrome_app_chrome__command__ids.h index a44434748c6f..cc257ed6c650 100644 --- a/www/ungoogled-chromium/files/patch-chrome_app_chrome__command__ids.h +++ b/www/ungoogled-chromium/files/patch-chrome_app_chrome__command__ids.h @@ -1,17 +1,17 @@ ---- chrome/app/chrome_command_ids.h.orig 2023-09-17 07:59:53 UTC +--- chrome/app/chrome_command_ids.h.orig 2024-06-22 08:49:42 UTC +++ chrome/app/chrome_command_ids.h @@ -68,12 +68,12 @@ #define IDC_TOGGLE_MULTITASK_MENU 34050 #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define IDC_USE_SYSTEM_TITLE_BAR 34051 #endif - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch of lacros-chrome is complete. + // 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) #define IDC_RESTORE_WINDOW 34052 #endif 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 4110fb39f720..41dacbb22451 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,154 +1,154 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/app/chrome_main_delegate.cc @@ -137,7 +137,7 @@ #include "components/about_ui/credit_utils.h" #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) #include "components/nacl/common/nacl_paths.h" #include "components/nacl/zygote/nacl_fork_delegate_linux.h" #endif @@ -180,21 +180,21 @@ #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_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "base/message_loop/message_pump_libevent.h" #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/policy_path_parser.h" #include "components/crash/core/app/crashpad.h" #endif @@ -241,7 +241,7 @@ #include "base/scoped_add_feature_flags.h" #include "ui/base/ui_base_features.h" #include "ui/ozone/public/ozone_platform.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/chrome_browser_main_extra_parts_linux.h" #endif #endif // BUILDFLAG(IS_OZONE) @@ -341,7 +341,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 @@ -426,7 +426,7 @@ bool HandleVersionSwitches(const base::CommandLine& co - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) || @@ -472,7 +472,7 @@ void SetCrashpadUploadConsentPostLogin() { } #endif // 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; @@ -554,7 +554,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. @@ -638,7 +638,7 @@ void InitializeUserDataDir(base::CommandLine* command_ std::string process_type = command_line->GetSwitchValueASCII(switches::kProcessType); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux, Chrome does not support running multiple copies under different // DISPLAYs, so the profile directory can be specified in the environment to // support the virtual desktop use-case. @@ -765,7 +765,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Record the startup process creation time on supported platforms. On Android // this is recorded in ChromeMainDelegateAndroid. startup_metric_utils::GetCommon().RecordStartupProcessCreationTime( -@@ -962,7 +962,7 @@ std::optional ChromeMainDelegate::PostEarlyInitia +@@ -957,7 +957,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(); -@@ -1155,7 +1155,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv +@@ -1150,7 +1150,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; -@@ -1310,7 +1310,7 @@ std::optional ChromeMainDelegate::BasicStartupCom +@@ -1305,7 +1305,7 @@ std::optional ChromeMainDelegate::BasicStartupCom - // TODO(crbug.com/1052397): Revisit the macro expression once build flag + // 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 -@@ -1340,7 +1340,7 @@ std::optional ChromeMainDelegate::BasicStartupCom +@@ -1335,7 +1335,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 -@@ -1735,7 +1735,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1722,7 +1722,7 @@ void ChromeMainDelegate::PreSandboxStartup() { CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; } -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != switches::kZygoteProcess) { if (command_line.HasSwitch(switches::kPreCrashpadCrashTest)) { -@@ -1836,7 +1836,7 @@ absl::variant Chrome +@@ -1821,7 +1821,7 @@ absl::variant Chrome // This entry is not needed on Linux, where the NaCl loader // process is launched via nacl_helper instead. -#if BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) {switches::kNaClLoaderProcess, NaClMain}, #else {"", nullptr}, // To avoid constant array of size 0 diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_BUILD.gn b/www/ungoogled-chromium/files/patch-chrome_browser_BUILD.gn index 7dcb72999243..1e383b7d3449 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-05-23 20:04:36 UTC +--- chrome/browser/BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/BUILD.gn -@@ -6607,6 +6607,13 @@ static_library("browser") { +@@ -6688,6 +6688,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 38ea86610700..5d0179c1c884 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_about__flags.cc @@ -1,218 +1,218 @@ ---- chrome/browser/about_flags.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/about_flags.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/about_flags.cc -@@ -237,7 +237,7 @@ +@@ -239,7 +239,7 @@ #include "ui/ui_features.h" #include "url/url_features.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/allocator/buildflags.h" #endif -@@ -325,7 +325,7 @@ +@@ -329,7 +329,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) -@@ -334,7 +334,7 @@ +@@ -338,7 +338,7 @@ #include "chrome/browser/win/titlebar_config.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/profile_management/profile_management_features.h" - #include "components/supervised_user/core/common/features.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -@@ -492,7 +492,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap + +@@ -483,7 +483,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, -@@ -1295,7 +1295,7 @@ const FeatureEntry::FeatureVariation kPageContentAnnot +@@ -1266,7 +1266,7 @@ const FeatureEntry::FeatureVariation kPageContentAnnot }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kHistoryEmbeddingsAtKeywordAcceleration[]{ {"AtKeywordAcceleration", "true"}, }; -@@ -1425,7 +1425,7 @@ const FeatureEntry::FeatureVariation kChromeRefresh202 - nullptr}}; +@@ -1329,7 +1329,7 @@ const FeatureEntry::FeatureVariation + }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kShortcutBoostSingleUrl[] = { {"ShortcutBoostSearchScore", "0"}, {"ShortcutBoostNonTopHitThreshold", "0"}, -@@ -3794,7 +3794,7 @@ const flags_ui::FeatureEntry::FeatureVariation +@@ -3680,7 +3680,7 @@ const flags_ui::FeatureEntry::FeatureVariation std::size(kParcelTrackingTestDataOutForDelivery), nullptr}, }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const flags_ui::FeatureEntry::FeatureParam kDesktopPWAsLinkCapturingDefaultOn[] = {{"on_by_default", "true"}}; const flags_ui::FeatureEntry::FeatureParam -@@ -4592,7 +4592,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4520,7 +4520,7 @@ const FeatureEntry kFeatureEntries[] = { }, #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { "fluent-overlay-scrollbars", flag_descriptions::kFluentOverlayScrollbarsName, -@@ -5047,7 +5047,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4956,7 +4956,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kWebAppUniversalInstallDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kWebAppUniversalInstall)}, #endif // !BUILDFLAG(IS_ANDROID) - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#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 | kOsFuchsia, -@@ -5172,7 +5172,7 @@ const FeatureEntry kFeatureEntries[] = { + kOsMac | kOsWin | kOsLinux, +@@ -5083,7 +5083,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) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_BSD) {"pulseaudio-loopback-for-cast", flag_descriptions::kPulseaudioLoopbackForCastName, flag_descriptions::kPulseaudioLoopbackForCastDescription, kOsLinux, -@@ -5188,7 +5188,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5099,7 +5099,7 @@ const FeatureEntry kFeatureEntries[] = { MULTI_VALUE_TYPE(kOzonePlatformHintRuntimeChoices)}, #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"skip-undecryptable-passwords", flag_descriptions::kSkipUndecryptablePasswordsName, flag_descriptions::kSkipUndecryptablePasswordsDescription, -@@ -6096,7 +6096,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6020,7 +6020,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"omnibox-domain-suggestions", flag_descriptions::kOmniboxDomainSuggestionsName, flag_descriptions::kOmniboxDomainSuggestionsDescription, kOsDesktop, -@@ -6416,7 +6416,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6340,7 +6340,7 @@ const FeatureEntry kFeatureEntries[] = { "OrganicRepeatableQueries")}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- 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, -@@ -7959,7 +7959,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(ash::features::kPrivacyIndicators)}, - #endif // BUILDFLAG(IS_CHROMEOS_ASH) +@@ -7958,7 +7958,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, -@@ -7983,7 +7983,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7982,7 +7982,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(media::kV4L2FlatStatefulVideoDecoder)}, #endif -#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, -@@ -8851,7 +8851,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8819,7 +8819,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(ash::features::kWallpaperPerDesk)}, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"enable-get-all-screens-media", flag_descriptions::kGetAllScreensMediaName, flag_descriptions::kGetAllScreensMediaDescription, kOsCrOS | kOsLacros | kOsLinux, -@@ -8899,7 +8899,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8858,7 +8858,7 @@ const FeatureEntry kFeatureEntries[] = { #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { "ui-debug-tools", flag_descriptions::kUIDebugToolsName, -@@ -9125,7 +9125,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9095,7 +9095,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) {"policy-indication-for-managed-default-search", flag_descriptions::kPolicyIndicationForManagedDefaultSearchName, flag_descriptions::kPolicyIndicationForManagedDefaultSearchDescription, -@@ -9432,7 +9432,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9402,7 +9402,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #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, -@@ -10348,7 +10348,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10312,7 +10312,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), -@@ -10386,7 +10386,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10350,7 +10350,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, -@@ -10499,7 +10499,7 @@ const FeatureEntry kFeatureEntries[] = { + {"show-featured-enterprise-site-search", + flag_descriptions::kShowFeaturedEnterpriseSiteSearchName, + flag_descriptions::kShowFeaturedEnterpriseSiteSearchDescription, kOsAll, +@@ -10465,7 +10465,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, -@@ -10845,7 +10845,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10814,7 +10814,7 @@ const FeatureEntry kFeatureEntries[] = { trusted_vault::kTrustedVaultFrequentDegradedRecoverabilityPolling)}, #endif -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"restart-to-gain-access-to-keychain", flag_descriptions::kRestartToGainAccessToKeychainName, flag_descriptions::kRestartToGainAccessToKeychainDescription, -@@ -11123,7 +11123,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -11095,7 +11095,7 @@ const FeatureEntry kFeatureEntries[] = { // Controls the view mode for (history) sync screen. #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) {"minor-mode-restrictions-for-history-sync-opt-in", flag_descriptions::kMinorModeRestrictionsForHistorySyncOptInName, flag_descriptions::kMinorModeRestrictionsForHistorySyncOptInDescription, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_accessibility_pdf__ocr__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_accessibility_pdf__ocr__controller.cc deleted file mode 100644 index dcd7c1c26720..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_accessibility_pdf__ocr__controller.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/accessibility/pdf_ocr_controller.cc.orig 2024-05-23 20:04:36 UTC -+++ chrome/browser/accessibility/pdf_ocr_controller.cc -@@ -111,7 +111,7 @@ void AnnounceToScreenReader(const int message_id) { - // TODO(crbug.com/333398721): Sending announcements results in a failure in - // `AuraLinuxAccessibilityInProcessBrowserTest::IndexInParentWithModal` and - // flaky fail when running Chrome. --#if !BUILDFLAG(IS_LINUX) -+#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) - const Browser* browser = BrowserList::GetInstance()->GetLastActive(); - if (!browser) { - VLOG(2) << "Browser is not ready to announce"; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h b/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h index 76295ae50402..6491e69a2d31 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h @@ -1,11 +1,11 @@ ---- chrome/browser/apps/platform_apps/platform_app_launch.h.orig 2024-04-23 07:42:17 UTC +--- chrome/browser/apps/platform_apps/platform_app_launch.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/apps/platform_apps/platform_app_launch.h -@@ -39,7 +39,7 @@ content::WebContents* OpenExtensionApplicationTab(Prof +@@ -38,7 +38,7 @@ bool OpenExtensionApplicationWindow(Profile* profile, + content::WebContents* OpenExtensionApplicationTab(Profile* profile, const std::string& app_id); - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Opens the deprecated Chrome Apps flow if |app_id| refers to a Chrome App and // Chrome Apps are deprecated on the |profile|. Returns true if that was the // case, or false otherwise. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc b/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc index ea1cb28931e9..2a222b51abd1 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_browser__features.cc @@ -1,20 +1,20 @@ ---- chrome/browser/browser_features.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/browser_features.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/browser_features.cc -@@ -78,7 +78,7 @@ const base::FeatureParam kSpareRendererWarmupDel +@@ -82,7 +82,7 @@ const base::FeatureParam kSpareRendererWarmupDel 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); -@@ -359,7 +359,7 @@ BASE_FEATURE(kSandboxExternalProtocolBlockedWarning, +@@ -354,7 +354,7 @@ BASE_FEATURE(kSandboxExternalProtocolBlockedWarning, BASE_FEATURE(kSupportSearchSuggestionForPrerender2, "SupportSearchSuggestionForPrerender2", #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT); #else base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc index dcc7025fa42d..3d3829d87afe 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.cc @@ -1,29 +1,29 @@ ---- chrome/browser/browser_process_impl.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/browser_process_impl.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/browser_process_impl.cc -@@ -229,7 +229,7 @@ +@@ -232,7 +232,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 -@@ -1273,7 +1273,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { +@@ -1289,7 +1289,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 -@@ -1578,7 +1578,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1602,7 +1602,7 @@ void BrowserProcessImpl::Unpin() { // Mac is currently not supported. - // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is + // 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_browser__process__impl.h b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.h index 1742d9d5b408..53fb58bce709 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_browser__process__impl.h @@ -1,11 +1,11 @@ ---- chrome/browser/browser_process_impl.h.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/browser_process_impl.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/browser_process_impl.h -@@ -393,7 +393,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -400,7 +400,7 @@ class BrowserProcessImpl : public BrowserProcess, - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) base::RepeatingTimer autoupdate_timer_; // Gets called by autoupdate timer to see if browser needs restart and can be diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc index b3d696a57478..b7988a40e1e0 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,72 +1,71 @@ ---- chrome/browser/chrome_browser_interface_binders.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -129,13 +129,13 @@ +@@ -132,12 +132,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) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#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 "ui/webui/resources/cr_components/app_management/app_management.mojom.h" #endif -@@ -226,7 +226,7 @@ +@@ -228,7 +228,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" -@@ -850,7 +850,7 @@ void BindScreen2xMainContentExtractor( +@@ -854,7 +854,7 @@ void BindScreen2xMainContentExtractor( #endif #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) void BindVisualSuggestionsModelProvider( content::RenderFrameHost* frame_host, mojo::PendingReceiver< -@@ -1046,7 +1046,7 @@ void PopulateChromeFrameBinders( +@@ -1050,7 +1050,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 -@@ -1128,7 +1128,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1137,7 +1137,7 @@ void PopulateChromeWebUIFrameBinders( commerce::CommerceInternalsUI>(map); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< connectors_internals::mojom::PageHandler, enterprise_connectors::ConnectorsInternalsUI>(map); -@@ -1140,7 +1140,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1148,7 +1148,7 @@ void PopulateChromeWebUIFrameBinders( + policy::DlpInternalsUI>(map); #endif - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#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 -@@ -1732,7 +1732,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1759,7 +1759,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 c3bf97eb4a54..e7314c8b4f54 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-05-23 20:04:36 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -246,15 +246,15 @@ +@@ -247,15 +247,15 @@ - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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 -@@ -287,14 +287,14 @@ - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch +@@ -288,14 +288,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_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- 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" -@@ -361,14 +361,14 @@ +@@ -367,14 +367,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"); -@@ -523,7 +523,7 @@ void ProcessSingletonNotificationCallbackImpl( +@@ -539,7 +539,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. -@@ -1090,7 +1090,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1101,7 +1101,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 . -@@ -1138,7 +1138,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch +@@ -1149,7 +1149,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_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_CHROMEOS_LACROS) ++ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) metrics::DesktopSessionDurationTracker::Initialize(); ProfileActivityMetricsRecorder::Initialize(); TouchModeStatsTracker::Initialize( -@@ -1323,7 +1323,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1334,7 +1334,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Delete the media history database if it still exists. - // TODO(crbug.com/1198344): Remove this. + // TODO(crbug.com/40177301): Remove this. base::ThreadPool::PostTask( -@@ -1372,7 +1372,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1383,7 +1383,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(); } -@@ -1482,7 +1482,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl( +@@ -1493,7 +1493,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(); } -@@ -2022,7 +2022,7 @@ bool ChromeBrowserMainParts::ProcessSingletonNotificat +@@ -2039,7 +2039,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 571b0f452ba5..b19120111513 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-03-22 14:16:19 UTC +--- chrome/browser/chrome_browser_main_linux.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/chrome_browser_main_linux.cc -@@ -24,7 +24,7 @@ +@@ -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 -@@ -71,7 +71,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 -@@ -96,7 +98,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(); -@@ -135,7 +137,7 @@ void ChromeBrowserMainPartsLinux::PostBrowserStart() { +@@ -137,7 +139,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__browser__main__posix.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__posix.cc index 16b813f4a880..0e004fc9acc0 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__posix.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__browser__main__posix.cc @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_browser_main_posix.cc.orig 2024-02-25 20:22:18 UTC +--- chrome/browser/chrome_browser_main_posix.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/chrome_browser_main_posix.cc @@ -79,7 +79,7 @@ void ExitHandler::ExitWhenPossibleOnUIThread(int signa } else { - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) switch (signal) { case SIGINT: case SIGHUP: diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc index fdb9ef5c9b29..34b5e3590e74 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,152 +1,152 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -466,7 +466,7 @@ +@@ -467,7 +467,7 @@ #include "storage/browser/file_system/external_mount_points.h" - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) -@@ -576,12 +576,12 @@ +@@ -577,12 +577,12 @@ - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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 -@@ -592,7 +592,7 @@ +@@ -593,7 +593,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" -@@ -600,7 +600,7 @@ +@@ -601,7 +601,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) @@ -616,7 +616,7 @@ - #include "components/lens/lens_features.h" + #include "chrome/browser/ui/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" -@@ -1514,7 +1514,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre +@@ -1519,7 +1519,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) -@@ -1638,7 +1638,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1643,7 +1643,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) -@@ -1675,7 +1675,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1677,7 +1677,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo std::make_unique()); - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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 -@@ -1696,7 +1696,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1698,7 +1698,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()); -@@ -1715,7 +1715,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1717,7 +1717,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo chrome::AddMetricsExtraParts(main_parts.get()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) main_parts->AddParts( std::make_unique< chrome::enterprise_util::ChromeBrowserMainExtraPartsEnterprise>()); -@@ -2866,7 +2866,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin - GetProfileParamsProcess(*command_line)); +@@ -2871,7 +2871,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)) { -@@ -4618,7 +4618,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -4636,7 +4636,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, -@@ -5168,7 +5168,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5186,7 +5186,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); -@@ -5182,7 +5182,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5200,7 +5200,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); -@@ -5213,7 +5213,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5231,7 +5231,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); -@@ -7132,7 +7132,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS +@@ -7165,7 +7165,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 e735cecb646c..c50062a002d9 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-05-23 20:04:36 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -503,7 +503,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -507,7 +507,7 @@ class ChromeContentBrowserClient : public content::Con bool IsPluginAllowedToUseDevChannelAPIs( content::BrowserContext* browser_context, const GURL& url) override; -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) void GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc b/www/ungoogled-chromium/files/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc index 370a62faced7..3c7bce57c72d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc @@ -1,38 +1,38 @@ ---- chrome/browser/component_updater/widevine_cdm_component_installer.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/component_updater/widevine_cdm_component_installer.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/component_updater/widevine_cdm_component_installer.cc @@ -41,7 +41,7 @@ #include "third_party/widevine/cdm/buildflags.h" #include "third_party/widevine/cdm/widevine_cdm_common.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/path_service.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/media/component_widevine_cdm_hint_file_linux.h" @@ -74,7 +74,7 @@ static_assert(std::size(kWidevineSha2Hash) == crypto:: const char ImageLoaderComponentName[] = "WidevineCdm"; #endif -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // On Linux and ChromeOS the Widevine CDM is loaded at startup before the // zygote is locked down. As a result there is no need to register the CDM // with Chrome as it can't be used until Chrome is restarted. @@ -102,7 +102,7 @@ void RegisterWidevineCdmWithChrome(const base::Version } #endif // !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux and ChromeOS the Widevine CDM is loaded at startup before the // zygote is locked down. To locate the Widevine CDM at startup, a hint file // is used. Update the hint file with the new Widevine CDM path. -@@ -388,7 +388,7 @@ void WidevineCdmComponentInstallerPolicy::UpdateCdmPat +@@ -398,7 +398,7 @@ void WidevineCdmComponentInstallerPolicy::UpdateCdmPat return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) VLOG(1) << "Updating hint file with Widevine CDM " << cdm_version; // This is running on a thread that allows IO, so simply update the hint file. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc index d3f720a71a8a..056bfea09b5f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc @@ -1,11 +1,11 @@ ---- chrome/browser/device_identity/device_oauth2_token_service_factory.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/device_identity/device_oauth2_token_service_factory.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/device_identity/device_oauth2_token_service_factory.cc @@ -28,7 +28,7 @@ std::unique_ptr CreatePlatform return std::make_unique( local_state); - #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || \ + #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) return std::make_unique(local_state); #else NOTREACHED(); 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 ce0823d9fb28..838073c6ab90 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-05-23 20:04:36 UTC +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1678,7 +1678,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1685,7 +1685,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(); } -@@ -1777,7 +1777,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow +@@ -1784,7 +1784,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__commands.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.cc index 1985813aa269..4bec1ad9fcf8 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.cc @@ -1,20 +1,20 @@ ---- chrome/browser/download/download_commands.cc.orig 2023-04-08 11:38:38 UTC +--- chrome/browser/download/download_commands.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/download/download_commands.cc @@ -26,7 +26,7 @@ #include "ui/base/clipboard/scoped_clipboard_writer.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" @@ -167,7 +167,7 @@ void DownloadCommands::ExecuteCommand(Command command) } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) Browser* DownloadCommands::GetBrowser() const { if (!model_) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.h b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.h index a7394d6e81b6..2eca2e8e934a 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__commands.h @@ -1,11 +1,11 @@ ---- chrome/browser/download/download_commands.h.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/download/download_commands.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/download/download_commands.h @@ -66,7 +66,7 @@ class DownloadCommands { void ExecuteCommand(Command command); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) bool IsDownloadPdf() const; bool CanOpenPdfInSystemViewer() const; Browser* GetBrowser() const; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__item__model.cc index 8ee5dd1ce539..d2b1f2b544d1 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-05-23 20:04:36 UTC +--- chrome/browser/download/download_item_model.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/download/download_item_model.cc -@@ -795,7 +795,7 @@ bool DownloadItemModel::IsCommandChecked( +@@ -796,7 +796,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(); -@@ -843,7 +843,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand +@@ -844,7 +844,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); -@@ -1191,7 +1191,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe +@@ -1192,7 +1192,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (download_->GetOriginalMimeType() == "application/x-x509-user-cert") { SetShouldPreferOpeningInBrowser(true); return; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc index 15de4d0b4b0d..d35aef1f5389 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_download_download__prefs.cc @@ -1,90 +1,90 @@ ---- chrome/browser/download/download_prefs.cc.orig 2024-04-23 07:42:17 UTC +--- chrome/browser/download/download_prefs.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/download/download_prefs.cc @@ -11,6 +11,7 @@ #include #include "base/check.h" +#include "base/command_line.h" #include "base/feature_list.h" #include "base/files/file_util.h" #include "base/functional/bind.h" @@ -64,6 +65,10 @@ #include "chrome/browser/flags/android/chrome_feature_list.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + using content::BrowserContext; using content::BrowserThread; using content::DownloadManager; @@ -74,7 +79,7 @@ namespace { // Consider downloads 'dangerous' if they go to the home directory on Linux and // to the desktop on any platform. bool DownloadPathIsDangerous(const base::FilePath& download_path) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath home_dir = base::GetHomeDir(); if (download_path == home_dir) { return true; @@ -180,7 +185,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) should_open_pdf_in_system_reader_ = prefs->GetBoolean(prefs::kOpenPdfDownloadInSystemReader); #endif -@@ -299,7 +304,7 @@ void DownloadPrefs::RegisterProfilePrefs( +@@ -297,7 +302,7 @@ void DownloadPrefs::RegisterProfilePrefs( registry->RegisterFilePathPref(prefs::kSaveFileDefaultDirectory, default_download_path); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOpenPdfDownloadInSystemReader, false); #endif #if BUILDFLAG(IS_ANDROID) -@@ -462,7 +467,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens +@@ -458,7 +463,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) void DownloadPrefs::SetShouldOpenPdfInSystemReader(bool should_open) { if (should_open_pdf_in_system_reader_ == should_open) return; -@@ -494,7 +499,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons +@@ -490,7 +495,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons void DownloadPrefs::ResetAutoOpenByUser() { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) SetShouldOpenPdfInSystemReader(false); #endif auto_open_by_user_.clear(); -@@ -534,7 +539,7 @@ void DownloadPrefs::SaveAutoOpenState() { +@@ -527,7 +532,7 @@ void DownloadPrefs::SaveAutoOpenState() { bool DownloadPrefs::CanPlatformEnableAutoOpenForPdf() const { #if BUILDFLAG(IS_CHROMEOS) return false; // There is no UI for auto-open on ChromeOS. -#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return ShouldOpenPdfInSystemReader(); #else return false; -@@ -686,7 +691,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa +@@ -679,7 +684,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa #else // If the stored download directory is an absolute path, we presume it's // correct; there's not really much more validation we can do here. +#if BUILDFLAG(IS_OPENBSD) + // If unveil(2) is used, force the file dialog directory to something we + // know is available. + auto* sandbox = sandbox::policy::SandboxLinux::GetInstance(); + if (!sandbox->unveil_initialized() && path.IsAbsolute()) +#else if (path.IsAbsolute()) +#endif return path; // When the default download directory is *not* an absolute path, we use the diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc index aeb244aa14f2..b2b53016a2e3 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc @@ -1,11 +1,11 @@ ---- chrome/browser/enterprise/connectors/analysis/analysis_service_settings.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/enterprise/connectors/analysis/analysis_service_settings.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/enterprise/connectors/analysis/analysis_service_settings.cc -@@ -150,7 +150,7 @@ AnalysisServiceSettings::AnalysisServiceSettings( +@@ -151,7 +151,7 @@ AnalysisServiceSettings::AnalysisServiceSettings( const char* verification_key = kKeyWindowsVerification; #elif BUILDFLAG(IS_MAC) const char* verification_key = kKeyMacVerification; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char* verification_key = kKeyLinuxVerification; #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc index 908ed72e59a7..f5185580e4a6 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-05-23 20:04:36 UTC +--- chrome/browser/enterprise/connectors/connectors_service.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/enterprise/connectors/connectors_service.cc -@@ -524,7 +524,7 @@ bool ConnectorsService::ConnectorsEnabled() const { +@@ -520,7 +520,7 @@ bool ConnectorsService::ConnectorsEnabled() const { Profile* profile = Profile::FromBrowserContext(context_); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On desktop, the guest profile is actually the primary OTR profile of // the "regular" guest profile. The regular guest profile is never used // directly by users. Also, user are not able to create child OTR profiles diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc index 782e19a6bd35..c94f9ad69fb0 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc @@ -1,29 +1,29 @@ ---- chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc @@ -23,7 +23,7 @@ #include "components/policy/core/common/management/management_service.h" #include "content/public/browser/browser_context.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_process.h" #include "chrome/browser/enterprise/connectors/device_trust/attestation/browser/browser_attestation_service.h" #include "chrome/browser/enterprise/connectors/device_trust/attestation/browser/device_attester.h" @@ -54,7 +54,7 @@ bool IsProfileManaged(Profile* profile) { return management_service && management_service->IsManaged(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) policy::CloudPolicyStore* GetUserCloudPolicyStore(Profile* profile) { policy::CloudPolicyManager* user_policy_manager = - profile->GetUserCloudPolicyManager(); -@@ -104,7 +104,7 @@ DeviceTrustServiceFactory::DeviceTrustServiceFactory() + profile->GetCloudPolicyManager(); +@@ -101,7 +101,7 @@ DeviceTrustServiceFactory::DeviceTrustServiceFactory() DependsOn(DeviceTrustConnectorServiceFactory::GetInstance()); DependsOn(policy::ManagementServiceFactory::GetInstance()); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Depends on this service via the SignalsService having a dependency on it. DependsOn(enterprise_signals::SignalsAggregatorFactory::GetInstance()); // Depends on this service via the ProfileAttester having a dependency on it diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc index 3cbac8430d25..8934f43f28c4 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc @@ -11,7 +11,7 @@ namespace enterprise_connectors { BrowserCrashEventRouter::BrowserCrashEventRouter( content::BrowserContext* context) { --#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS) -+#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) +-#if !BUILDFLAG(IS_CHROMEOS) ++#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) CrashReportingContext* crash_reporting_context = CrashReportingContext::GetInstance(); Profile* profile = Profile::FromBrowserContext(context); @@ -21,7 +21,7 @@ BrowserCrashEventRouter::BrowserCrashEventRouter( } BrowserCrashEventRouter::~BrowserCrashEventRouter() { --#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS) -+#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) +-#if !BUILDFLAG(IS_CHROMEOS) ++#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) CrashReportingContext* crash_reporting_context = CrashReportingContext::GetInstance(); crash_reporting_context->RemoveProfile(this); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.cc index 820ed7bdfbe4..c214f7625b8a 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.cc @@ -1,11 +1,11 @@ ---- chrome/browser/enterprise/connectors/reporting/crash_reporting_context.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/enterprise/connectors/reporting/crash_reporting_context.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/enterprise/connectors/reporting/crash_reporting_context.cc @@ -18,7 +18,7 @@ namespace enterprise_connectors { --#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS) -+#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) +-#if !BUILDFLAG(IS_CHROMEOS) ++#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) namespace { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_identifiers_profile__id__delegate__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_identifiers_profile__id__delegate__impl.cc index 1d9eb0ecbd33..0e4564a2042b 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_identifiers_profile__id__delegate__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_identifiers_profile__id__delegate__impl.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/identifiers/profile_id_delegate_impl.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/enterprise/identifiers/profile_id_delegate_impl.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/enterprise/identifiers/profile_id_delegate_impl.cc -@@ -12,7 +12,7 @@ +@@ -13,7 +13,7 @@ #include "components/enterprise/browser/identifiers/identifiers_prefs.h" #include "components/prefs/pref_service.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "components/enterprise/browser/controller/browser_dm_token_storage.h" #if BUILDFLAG(IS_WIN) #include "base/strings/utf_string_conversions.h" -@@ -36,7 +36,7 @@ void CreateProfileGUID(PrefService* prefs) { +@@ -94,7 +94,7 @@ std::string ProfileIdDelegateImpl::GetDeviceId() { } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Gets the device ID from the BrowserDMTokenStorage. - std::string GetId() { + std::string ProfileIdDelegateImpl::GetId() { std::string device_id = diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_profile__management_profile__management__navigation__throttle.cc b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_profile__management_profile__management__navigation__throttle.cc index d00120d5154c..23a18278c0f8 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_profile__management_profile__management__navigation__throttle.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_enterprise_profile__management_profile__management__navigation__throttle.cc @@ -1,13 +1,13 @@ ---- chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc @@ -66,8 +66,8 @@ base::flat_map& Ge - // TODO(crbug.com/1445072): Add actual domains with attribute names. + // TODO(crbug.com/40267996): Add actual domains with attribute names. profile_attributes->insert(std::make_pair( "supported.test", - SAMLProfileAttributes("placeholderName", "placeholderDomain", - "placeholderToken"))); + SAMLProfileAttributes(SAMLProfileAttributes{"placeholderName", "placeholderDomain", + "placeholderToken"}))); // Extract domains and attributes from the command line switch. const base::CommandLine& command_line = 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 fd017cba68a2..0c2d25a74f67 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-05-23 20:04:36 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1370,6 +1370,10 @@ static_library("extensions") { +@@ -1386,6 +1386,10 @@ static_library("extensions") { deps += [ "//chrome/services/printing/public/mojom" ] } + if (is_bsd) { + sources -= [ "api/image_writer_private/removable_storage_provider_linux.cc" ] + } + if (enable_service_discovery) { sources += [ "api/mdns/mdns_api.cc", diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_messaging_native__process__launcher__posix.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_messaging_native__process__launcher__posix.cc index 1bcd3ded4a62..31031631739b 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_messaging_native__process__launcher__posix.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_messaging_native__process__launcher__posix.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc @@ -84,7 +84,7 @@ bool NativeProcessLauncher::LaunchNativeProcess( - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) // 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 790b0363e8e6..34f28a73a02b 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-05-23 20:04:36 UTC +--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc -@@ -606,7 +606,7 @@ void PasswordsPrivateDelegateImpl::OnFetchingFamilyMem +@@ -610,7 +610,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_runtime_chrome__runtime__api__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc index 85be5e5534d1..6b8c10902806 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc @@ -1,13 +1,13 @@ ---- chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2024-04-23 07:42:17 UTC +--- chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc @@ -284,7 +284,9 @@ bool ChromeRuntimeAPIDelegate::GetPlatformInfo(Platfor } else if (strcmp(os, "linux") == 0) { info->os = extensions::api::runtime::PlatformOs::kLinux; } else if (strcmp(os, "openbsd") == 0) { - info->os = extensions::api::runtime::PlatformOs::kOpenbsd; + info->os = extensions::api::runtime::PlatformOs::kLinux; + } else if (strcmp(os, "freebsd") == 0) { + info->os = extensions::api::runtime::PlatformOs::kLinux; - } else if (strcmp(os, "fuchsia") == 0) { - info->os = extensions::api::runtime::PlatformOs::kFuchsia; } else { + NOTREACHED() << "Platform not supported: " << os; + return false; 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 cab95f7dd397..e5faf5aaa033 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -202,7 +202,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -195,7 +195,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist (*s_allowlist)[::prefs::kSidePanelHorizontalAlignment] = settings_api::PrefType::kBoolean; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kUseCustomChromeFrame] = settings_api::PrefType::kBoolean; #endif -@@ -213,7 +213,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -206,7 +206,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist // Appearance settings. (*s_allowlist)[::prefs::kCurrentThemeID] = settings_api::PrefType::kString; (*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 f9f8384b1120..56df80389795 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-04-23 07:42:17 UTC +--- chrome/browser/extensions/api/tabs/tabs_api.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/extensions/api/tabs/tabs_api.cc @@ -867,7 +867,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio // minimized. - // TODO(crbug.com/1410400): Remove this workaround when linux is fixed. - // TODO(crbug.com/1410400): Find a fix for wayland as well. + // 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) { new_window->window()->Minimize(); } 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 011dfc5e1aba..4463a14eef3e 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-05-23 20:04:36 UTC +--- chrome/browser/extensions/api/webstore_private/webstore_private_api.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/extensions/api/webstore_private/webstore_private_api.cc -@@ -880,7 +880,7 @@ void WebstorePrivateBeginInstallWithManifest3Function: +@@ -885,7 +885,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 e02b215d1206..00c0b180bdcc 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/external_provider_impl.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/extensions/external_provider_impl.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/extensions/external_provider_impl.cc -@@ -830,7 +830,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -831,7 +831,7 @@ void ExternalProviderImpl::CreateExternalProviders( if (!profile->GetPrefs()->GetBoolean(pref_names::kBlockExternalExtensions)) { - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) provider_list->push_back(std::make_unique( service, base::MakeRefCounted( -@@ -858,7 +858,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -859,7 +859,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 f191562dc942..5fd811a0c533 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-04-23 07:42:17 UTC +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -316,7 +316,7 @@ const struct { +@@ -314,7 +314,7 @@ const struct { FILE_PATH_LITERAL("Library/Mobile Documents/com~apple~CloudDocs"), kDontBlockChildren}, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux also block access to devices via /dev. {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), kBlockAllChildren}, // And security sensitive data in /proc and /sys. diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_first__run_first__run__dialog.h b/www/ungoogled-chromium/files/patch-chrome_browser_first__run_first__run__dialog.h index 4cde20ab20ba..ab09d44239a0 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_first__run_first__run__dialog.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_first__run_first__run__dialog.h @@ -1,11 +1,11 @@ ---- chrome/browser/first_run/first_run_dialog.h.orig 2022-12-02 17:56:32 UTC +--- chrome/browser/first_run/first_run_dialog.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/first_run/first_run_dialog.h @@ -12,7 +12,7 @@ // Hide this function on platforms where the dialog does not exist. - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) namespace first_run { 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 109395bc2929..5889bcaa0a54 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.cc @@ -1,83 +1,91 @@ ---- chrome/browser/flag_descriptions.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/flag_descriptions.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/flag_descriptions.cc -@@ -2872,7 +2872,7 @@ const char kCbdTimeframeRequiredDescription[] = +@@ -2927,7 +2927,7 @@ const char kCbdTimeframeRequiredDescription[] = "value to the list."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) const char kPolicyIndicationForManagedDefaultSearchName[] = "Enable policy indication for managed Default Search provider"; const char kPolicyIndicationForManagedDefaultSearchDescription[] = -@@ -3175,7 +3175,7 @@ const char kSiteInstanceGroupsForDataUrlsDescription[] +@@ -3224,7 +3224,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[] = +@@ -3249,7 +3249,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."; -@@ -7447,7 +7447,7 @@ const char kLacrosMergeIcuDataFileDescription[] = +@@ -7489,7 +7489,7 @@ const char kLacrosMergeIcuDataFileDescription[] = "Enables sharing common areas of icudtl.dat between Ash and Lacros."; #endif // #if BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kGetAllScreensMediaName[] = "GetAllScreensMedia API"; const char kGetAllScreensMediaDescription[] = "When enabled, the getAllScreensMedia API for capturing multiple screens " -@@ -7713,7 +7713,7 @@ const char kV4L2FlatStatefulVideoDecoderDescription[] +@@ -7757,7 +7757,7 @@ const char kV4L2FlatStatefulVideoDecoderDescription[] // Linux ----------------------------------------------------------------------- -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kOzonePlatformHintChoiceDefault[] = "Default"; const char kOzonePlatformHintChoiceAuto[] = "Auto"; const char kOzonePlatformHintChoiceX11[] = "X11"; -@@ -7761,7 +7761,7 @@ const char kZeroCopyVideoCaptureDescription[] = +@@ -7805,14 +7805,14 @@ const char kZeroCopyVideoCaptureDescription[] = #endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +- 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."; -@@ -7774,7 +7774,7 @@ const char kEnableProtoApiForClassifyUrlDescription[] - "Calls to Classify URL RPC will use Protocol Buffer format in resposnes, " - "instead of JSON."; + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || + // BUILDFLAG(IS_CHROMEOS) -#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[] = -@@ -7806,7 +7806,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti +@@ -7844,7 +7844,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."; -@@ -7922,7 +7922,7 @@ const char kElementCaptureDescription[] = +@@ -7984,7 +7984,7 @@ const char kElementCaptureDescription[] = #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- 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."; -@@ -7979,7 +7979,7 @@ const char kComposeProactiveNudgeDescription[] = - "Enables proactive nudging for Compose"; +@@ -8045,7 +8045,7 @@ const char kComposeNudgeAtCursorDescription[] = + "Shows the Compose proactive nudge at the cursor location"; #endif // BUILDFLAG(ENABLE_COMPOSE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const char kThirdPartyProfileManagementName[] = "Third party profile management"; const char kThirdPartyProfileManagementDescription[] = diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h index d814b8b0655b..c4ca3265f592 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_flag__descriptions.h @@ -1,83 +1,90 @@ ---- chrome/browser/flag_descriptions.h.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/flag_descriptions.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/flag_descriptions.h -@@ -1682,7 +1682,7 @@ extern const char kCbdTimeframeRequiredName[]; +@@ -1705,7 +1705,7 @@ extern const char kCbdTimeframeRequiredName[]; extern const char kCbdTimeframeRequiredDescription[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) extern const char kPolicyIndicationForManagedDefaultSearchName[]; extern const char kPolicyIndicationForManagedDefaultSearchDescription[]; #endif -@@ -1857,7 +1857,7 @@ extern const char kSiteInstanceGroupsForDataUrlsName[] +@@ -1876,7 +1876,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[]; + #endif +@@ -1891,7 +1891,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[]; #endif -@@ -4320,7 +4320,7 @@ extern const char kLacrosMergeIcuDataFileName[]; +@@ -4350,7 +4350,7 @@ extern const char kLacrosMergeIcuDataFileName[]; extern const char kLacrosMergeIcuDataFileDescription[]; #endif // #if BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kGetAllScreensMediaName[]; extern const char kGetAllScreensMediaDescription[]; #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -4471,7 +4471,7 @@ extern const char kV4L2FlatStatefulVideoDecoderDescrip +@@ -4505,7 +4505,7 @@ extern const char kV4L2FlatStatefulVideoDecoderDescrip // Linux --------------------------------------------------------------------- -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kOzonePlatformHintChoiceDefault[]; extern const char kOzonePlatformHintChoiceAuto[]; extern const char kOzonePlatformHintChoiceX11[]; -@@ -4513,7 +4513,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa +@@ -4547,7 +4547,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[]; -@@ -4525,7 +4525,7 @@ extern const char kRestartToGainAccessToKeychainDescri +@@ -4559,13 +4559,13 @@ extern const char kRestartToGainAccessToKeychainDescri #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +- 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) || -@@ -4534,7 +4534,7 @@ extern const char kFollowingFeedSidepanelDescription[] - extern const char kEnableProtoApiForClassifyUrlName[]; - extern const char kEnableProtoApiForClassifyUrlDescription[]; + // BUILDFLAG(IS_CHROMEOS) -#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[]; -@@ -4611,7 +4611,7 @@ extern const char kElementCaptureDescription[]; +@@ -4661,7 +4661,7 @@ extern const char kElementCaptureDescription[]; #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_MAC) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kUIDebugToolsName[]; extern const char kUIDebugToolsDescription[]; -@@ -4651,7 +4651,7 @@ extern const char kComposeProactiveNudgeName[]; - extern const char kComposeProactiveNudgeDescription[]; +@@ -4704,7 +4704,7 @@ extern const char kComposeNudgeAtCursorName[]; + extern const char kComposeNudgeAtCursorDescription[]; #endif // BUILDFLAG(ENABLE_COMPOSE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extern const char kThirdPartyProfileManagementName[]; extern const char kThirdPartyProfileManagementDescription[]; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_intranet__redirect__detector.h b/www/ungoogled-chromium/files/patch-chrome_browser_intranet__redirect__detector.h index bce307a1df1c..2116ca1da304 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_intranet__redirect__detector.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_intranet__redirect__detector.h @@ -1,11 +1,11 @@ ---- chrome/browser/intranet_redirect_detector.h.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/intranet_redirect_detector.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/intranet_redirect_detector.h @@ -25,7 +25,7 @@ class SimpleURLLoader; class PrefRegistrySimple; #if !(BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)) +- BUILDFLAG(IS_CHROMEOS)) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) #error "IntranetRedirectDetector should only be built on Desktop platforms." #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_audio__service__util.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media_audio__service__util.cc index a5dcd120ef6e..3b49bf884b10 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_media_audio__service__util.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_audio__service__util.cc @@ -1,20 +1,20 @@ ---- chrome/browser/media/audio_service_util.cc.orig 2023-01-13 08:56:02 UTC +--- chrome/browser/media/audio_service_util.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/media/audio_service_util.cc @@ -21,7 +21,7 @@ namespace { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) const base::Value* GetPolicy(const char* policy_name) { const policy::PolicyMap& policies = @@ -43,7 +43,7 @@ bool GetPolicyOrFeature(const char* policy_name, const bool IsAudioServiceSandboxEnabled() { - // TODO(crbug.com/1052397): Remove !IS_CHROMEOS_LACROS once lacros starts being + // 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) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) return GetPolicyOrFeature(policy::key::kAudioSandboxEnabled, features::kAudioServiceSandbox); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_router_discovery_BUILD.gn b/www/ungoogled-chromium/files/patch-chrome_browser_media_router_discovery_BUILD.gn index bc8f263380d1..3b43c6498756 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_media_router_discovery_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_router_discovery_BUILD.gn @@ -1,11 +1,11 @@ ---- chrome/browser/media/router/discovery/BUILD.gn.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/media/router/discovery/BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/media/router/discovery/BUILD.gn -@@ -81,7 +81,7 @@ static_library("discovery") { +@@ -82,7 +82,7 @@ static_library("discovery") { ] configs += [ "//build/config/compiler:wexit_time_destructors" ] - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "discovery_network_list_wifi_linux.cc" ] } diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_desktop__media__picker__controller.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_desktop__media__picker__controller.cc index 4f0bfcbf404a..8c62330334d9 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_desktop__media__picker__controller.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_desktop__media__picker__controller.cc @@ -1,11 +1,11 @@ ---- chrome/browser/media/webrtc/desktop_media_picker_controller.cc.orig 2024-02-25 20:22:18 UTC +--- chrome/browser/media/webrtc/desktop_media_picker_controller.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/media/webrtc/desktop_media_picker_controller.cc -@@ -92,7 +92,7 @@ bool DesktopMediaPickerController::IsSystemAudioCaptur - } else { - return base::FeatureList::IsEnabled(media::kMacLoopbackAudioForScreenShare); - } +@@ -89,7 +89,7 @@ bool DesktopMediaPickerController::IsSystemAudioCaptur + #if BUILDFLAG(IS_MAC) + return request_source == Params::RequestSource::kCast || + base::FeatureList::IsEnabled(media::kMacLoopbackAudioForScreenShare); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (request_source == Params::RequestSource::kCast) { return base::FeatureList::IsEnabled(media::kPulseaudioLoopbackForCast); } else { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc index 273183a4a136..e4067a299d10 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc @@ -1,11 +1,11 @@ ---- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/media/webrtc/webrtc_log_uploader.cc @@ -101,7 +101,7 @@ std::string GetLogUploadProduct() { const char product[] = "Chrome_Mac"; - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) #if !defined(ADDRESS_SANITIZER) const char product[] = "Chrome_Linux"; #else diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_memory__details.cc b/www/ungoogled-chromium/files/patch-chrome_browser_memory__details.cc index 4e1da4080755..ea48c7b04dff 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_memory__details.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_memory__details.cc @@ -1,20 +1,20 @@ ---- chrome/browser/memory_details.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/memory_details.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/memory_details.cc @@ -38,7 +38,7 @@ #include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h" #include "ui/base/l10n/l10n_util.h" -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) #include "content/public/browser/zygote_host/zygote_host_linux.h" #endif -@@ -335,7 +335,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() { +@@ -334,7 +334,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() { }); } -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) if (content::ZygoteHost::GetInstance()->IsZygotePid(process.pid)) { process.process_type = content::PROCESS_TYPE_ZYGOTE; } 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 a115979b7fdb..7c07c87e28ff 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-05-11 05:39:22 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc -@@ -80,8 +80,10 @@ +@@ -81,8 +81,10 @@ - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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" @@ -106,7 +108,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) @@ -115,7 +117,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 -@@ -860,7 +862,7 @@ void RecordStartupMetrics() { +@@ -862,7 +864,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, -@@ -1164,11 +1166,11 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt +@@ -1154,11 +1156,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 e4f0c05ece90..ac6e615753a1 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,83 +1,83 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc @@ -195,7 +195,7 @@ #include "chrome/notification_helper/notification_helper_constants.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "components/metrics/motherboard_metrics_provider.h" #endif @@ -212,7 +212,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) -@@ -574,7 +574,7 @@ void ChromeMetricsServiceClient::RegisterPrefs(PrefReg +@@ -534,7 +534,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) -@@ -746,7 +746,7 @@ void ChromeMetricsServiceClient::Initialize() { +@@ -706,7 +706,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 -@@ -797,7 +797,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -757,7 +757,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 -@@ -882,7 +882,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch +@@ -842,7 +842,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) || -@@ -984,7 +984,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -944,7 +944,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) -@@ -1167,7 +1167,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch +@@ -1131,7 +1131,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( -@@ -1514,7 +1514,7 @@ void ChromeMetricsServiceClient::CreateStructuredMetri +@@ -1465,7 +1465,7 @@ void ChromeMetricsServiceClient::CreateStructuredMetri recorder = std::make_unique( cros_system_profile_provider_.get()); -#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Make sure that Structured Metrics recording delegates have been created // before the service is created. This is handled in other places for ChromeOS diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc index 34af08b0c9b9..c45eb7018c81 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc @@ -1,29 +1,29 @@ ---- chrome/browser/metrics/power/process_monitor.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/metrics/power/process_monitor.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/metrics/power/process_monitor.cc @@ -64,7 +64,7 @@ ProcessMonitor::Metrics SampleMetrics(base::ProcessMet process_metrics.GetPlatformIndependentCPUUsage()); #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) metrics.idle_wakeups = process_metrics.GetIdleWakeupsPerSecond(); #endif #if BUILDFLAG(IS_MAC) @@ -82,7 +82,7 @@ void ScaleMetrics(ProcessMonitor::Metrics* metrics, do } #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) metrics->idle_wakeups *= factor; #endif -@@ -170,7 +170,7 @@ ProcessMonitor::Metrics& operator+=(ProcessMonitor::Me +@@ -157,7 +157,7 @@ ProcessMonitor::Metrics& operator+=(ProcessMonitor::Me } #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) lhs.idle_wakeups += rhs.idle_wakeups; #endif 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 18feef497e82..2d1a4bd6f10a 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.cc @@ -1,174 +1,174 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2024-04-23 07:42:17 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/net/system_network_context_manager.cc -@@ -94,7 +94,7 @@ +@@ -97,7 +97,7 @@ - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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" -@@ -139,7 +139,7 @@ SystemNetworkContextManager* g_system_network_context_ +@@ -141,7 +141,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; -@@ -147,7 +147,7 @@ bool g_network_service_will_allow_gssapi_library_load +@@ -149,7 +149,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) -@@ -193,7 +193,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut +@@ -195,7 +195,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) -@@ -208,7 +208,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut +@@ -210,7 +210,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) -@@ -218,7 +218,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut +@@ -220,7 +220,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 -@@ -260,11 +260,11 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() +@@ -262,11 +262,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 || -@@ -280,7 +280,7 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() +@@ -282,7 +282,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) -@@ -510,7 +510,7 @@ void SystemNetworkContextManager::DeleteInstance() { +@@ -512,7 +512,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) {} -@@ -568,7 +568,7 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -570,7 +570,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) -@@ -582,7 +582,7 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -584,7 +584,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) -@@ -608,7 +608,7 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -610,7 +610,7 @@ SystemNetworkContextManager::SystemNetworkContextManag #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) pref_change_registrar_.Add( prefs::kEnforceLocalAnchorConstraintsEnabled, base::BindRepeating(&SystemNetworkContextManager:: -@@ -663,7 +663,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -665,7 +665,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) -@@ -687,7 +687,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -689,7 +689,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, -1); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Note that the default value is not relevant because the pref is only // evaluated when it is managed. registry->RegisterBooleanPref(prefs::kEnforceLocalAnchorConstraintsEnabled, -@@ -696,11 +696,11 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -698,11 +698,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) -@@ -753,7 +753,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea +@@ -755,7 +755,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) -@@ -970,7 +970,7 @@ bool SystemNetworkContextManager::IsNetworkSandboxEnab +@@ -972,7 +972,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; } -@@ -1055,7 +1055,7 @@ void SystemNetworkContextManager::UpdateExplicitlyAllo +@@ -1059,7 +1059,7 @@ void SystemNetworkContextManager::UpdateExplicitlyAllo } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) void SystemNetworkContextManager::UpdateEnforceLocalAnchorConstraintsEnabled() { const PrefService::Preference* enforce_local_anchor_constraints_enabled_pref = local_state_->FindPreference( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.h b/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.h index a54ccb1ae668..55c0b120f083 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_net_system__network__context__manager.h @@ -1,29 +1,29 @@ ---- chrome/browser/net/system_network_context_manager.h.orig 2024-04-23 07:42:17 UTC +--- chrome/browser/net/system_network_context_manager.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/net/system_network_context_manager.h -@@ -200,7 +200,7 @@ class SystemNetworkContextManager { +@@ -197,7 +197,7 @@ class SystemNetworkContextManager { class URLLoaderFactoryForSystem; class NetworkProcessLaunchWatcher; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class GssapiLibraryLoadObserver : public network::mojom::GssapiLibraryLoadObserver { public: -@@ -236,7 +236,7 @@ class SystemNetworkContextManager { +@@ -233,7 +233,7 @@ class SystemNetworkContextManager { void UpdateExplicitlyAllowedNetworkPorts(); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Applies the current value of the kEnforceLocalAnchorConstraintsEnabled // pref to the enforcement state. void UpdateEnforceLocalAnchorConstraintsEnabled(); -@@ -286,7 +286,7 @@ class SystemNetworkContextManager { - +@@ -285,7 +285,7 @@ class SystemNetworkContextManager { std::unique_ptr network_annotation_monitor_; + #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) GssapiLibraryLoadObserver gssapi_library_loader_observer_{this}; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc index 8787c1699a3e..f742ba208c8b 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc @@ -1,29 +1,29 @@ ---- chrome/browser/notifications/notification_display_service_impl.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/browser/notifications/notification_display_service_impl.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/notifications/notification_display_service_impl.cc @@ -32,7 +32,7 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/send_tab_to_self/desktop_notification_handler.h" #include "chrome/browser/sharing/sharing_notification_handler.h" #endif @@ -65,7 +65,7 @@ NotificationDisplayServiceImpl* NotificationDisplaySer // static void NotificationDisplayServiceImpl::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kAllowSystemNotifications, true); #endif } @@ -81,7 +81,7 @@ NotificationDisplayServiceImpl::NotificationDisplaySer std::make_unique()); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) AddNotificationHandler( NotificationHandler::Type::SEND_TAB_TO_SELF, std::make_unique( 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 506c889811f8..16a7a1d8e01a 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-05-23 20:04:36 UTC +--- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/password_manager/chrome_password_manager_client.cc -@@ -479,7 +479,7 @@ bool ChromePasswordManagerClient::ShowKeyboardReplacin +@@ -487,7 +487,7 @@ bool ChromePasswordManagerClient::ShowKeyboardReplacin bool ChromePasswordManagerClient::CanUseBiometricAuthForFilling( device_reauth::DeviceAuthenticator* authenticator) { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!GetLocalStatePrefs() || !GetPrefs() || !authenticator) { return false; } -@@ -702,7 +702,7 @@ void ChromePasswordManagerClient::NotifyUserCredential +@@ -711,7 +711,7 @@ void ChromePasswordManagerClient::NotifyUserCredential } void ChromePasswordManagerClient::NotifyKeychainError() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) PasswordsClientUIDelegate* manage_passwords_ui_controller = PasswordsClientUIDelegateFromWebContents(web_contents()); manage_passwords_ui_controller->OnKeychainError(); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc index 2a7dad175ffe..97ddb8960034 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc @@ -1,11 +1,11 @@ ---- chrome/browser/password_manager/password_reuse_manager_factory.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/password_manager/password_reuse_manager_factory.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/password_manager/password_reuse_manager_factory.cc @@ -137,7 +137,7 @@ PasswordReuseManagerFactory::BuildServiceInstanceForBr - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) std::unique_ptr notifier = std::make_unique( IdentityManagerFactory::GetForProfile(profile)); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc b/www/ungoogled-chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc index 02bd1963c2da..0abc14a5dfa5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc @@ -1,38 +1,38 @@ ---- chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc @@ -50,7 +50,7 @@ #include "chrome/browser/policy/browser_dm_token_storage_mac.h" #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/browser_dm_token_storage_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -59,7 +59,7 @@ #include "chrome/install_static/install_util.h" #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/device_trust_key_manager_impl.h" #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/key_rotation_launcher.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -@@ -91,7 +91,7 @@ void ChromeBrowserCloudManagementControllerDesktop:: +@@ -87,7 +87,7 @@ void ChromeBrowserCloudManagementControllerDesktop:: #if BUILDFLAG(IS_MAC) storage_delegate = std::make_unique(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) storage_delegate = std::make_unique(); #elif BUILDFLAG(IS_WIN) storage_delegate = std::make_unique(); -@@ -261,7 +261,7 @@ ChromeBrowserCloudManagementControllerDesktop::CreateC +@@ -255,7 +255,7 @@ ChromeBrowserCloudManagementControllerDesktop::CreateC std::unique_ptr ChromeBrowserCloudManagementControllerDesktop::CreateDeviceTrustKeyManager() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) auto* browser_dm_token_storage = BrowserDMTokenStorage::Get(); auto* device_management_service = GetDeviceManagementService(); auto shared_url_loader_factory = GetSharedURLLoaderFactory(); 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 385b989701ae..9fcda6949d68 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,252 +1,240 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -231,19 +231,20 @@ +@@ -232,19 +232,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_FUCHSIA) || BUILDFLAG(IS_ANDROID) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) || \ -+ BUILDFLAG(IS_BSD) +- 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_FUCHSIA) || -@@ -258,13 +259,13 @@ + // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +@@ -258,13 +258,13 @@ #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) #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/site_search_policy_handler.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) -@@ -839,14 +840,14 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -842,13 +842,13 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kManagedDefaultGeolocationSetting, base::Value::Type::INTEGER }, #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ -- || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) -+ || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) +- || 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_FUCHSIA) || BUILDFLAG(IS_MAC) - #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ -- || BUILDFLAG(IS_FUCHSIA) -+ || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + // || 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 }, -@@ -1630,7 +1631,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1632,7 +1632,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 }, -@@ -1681,7 +1682,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1683,7 +1683,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 }, -@@ -1707,18 +1708,18 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1709,17 +1709,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) \ -- || BUILDFLAG(IS_FUCHSIA) -+ || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#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 }, -@@ -1731,7 +1732,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1731,7 +1731,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - // || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) \ -- || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+ || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- || BUILDFLAG(IS_CHROMEOS) ++ || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) { key::kAutoplayAllowed, prefs::kAutoplayAllowed, base::Value::Type::BOOLEAN }, -@@ -1829,7 +1830,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1829,7 +1829,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 }, -@@ -1934,7 +1935,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1934,7 +1934,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 }, -@@ -1959,7 +1960,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1959,7 +1959,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = #endif // BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) { key::kEnforceLocalAnchorConstraintsEnabled, prefs::kEnforceLocalAnchorConstraintsEnabled, base::Value::Type::BOOLEAN }, -@@ -2017,7 +2018,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2017,7 +2017,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 }, -@@ -2048,7 +2049,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2046,7 +2046,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 }, -@@ -2074,7 +2075,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - prefs::kManagedPrivateNetworkAccessRestrictionsEnabled, - base::Value::Type::BOOLEAN }, +@@ -2077,7 +2077,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}, -@@ -2095,7 +2096,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2098,7 +2098,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = optimization_guide::model_execution::prefs::kWallpaperSearchEnterprisePolicyAllowed, base::Value::Type::INTEGER}, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) { key::kChromeForTestingAllowed, prefs::kChromeForTestingAllowed, base::Value::Type::BOOLEAN }, -@@ -2214,7 +2215,7 @@ std::unique_ptr BuildH +@@ -2224,7 +2224,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()); - // Note: This needs to be created after `DefaultSearchPolicyHandler`. -@@ -2222,7 +2223,7 @@ std::unique_ptr BuildH + handlers->AddHandler(std::make_unique( + key::kMemorySaverModeSavings, + performance_manager::user_tuning::prefs::kMemorySaverModeAggressiveness, +@@ -2240,7 +2240,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)); -@@ -2411,7 +2412,7 @@ std::unique_ptr BuildH +@@ -2426,7 +2426,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( -@@ -2469,7 +2470,7 @@ std::unique_ptr BuildH +@@ -2484,7 +2484,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( -@@ -2530,7 +2531,7 @@ std::unique_ptr BuildH - SimpleSchemaValidatingPolicyHandler::RECOMMENDED_PROHIBITED, - SimpleSchemaValidatingPolicyHandler::MANDATORY_ALLOWED))); - --#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - handlers->AddHandler( - std::make_unique(chrome_schema)); - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -@@ -2909,7 +2910,7 @@ std::unique_ptr BuildH +@@ -2923,7 +2923,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( -@@ -2917,7 +2918,7 @@ std::unique_ptr BuildH +@@ -2931,7 +2931,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)); -@@ -2934,7 +2935,7 @@ std::unique_ptr BuildH - /*new_policy_handler=*/std::make_unique< +@@ -2949,7 +2949,7 @@ std::unique_ptr BuildH first_party_sets::FirstPartySetsOverridesPolicyHandler>( key::kRelatedWebsiteSetsOverrides, chrome_schema))); --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) + #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) || -@@ -2959,7 +2960,7 @@ std::unique_ptr BuildH + // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +@@ -2972,7 +2972,7 @@ std::unique_ptr BuildH base::Value::Type::BOOLEAN))); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS_ASH) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc b/www/ungoogled-chromium/files/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc index 4d1077fa7293..77ca1eed45b6 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc @@ -1,20 +1,11 @@ ---- chrome/browser/policy/policy_value_and_status_aggregator.cc.orig 2023-10-13 13:20:35 UTC +--- chrome/browser/policy/policy_value_and_status_aggregator.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/policy/policy_value_and_status_aggregator.cc @@ -53,7 +53,7 @@ #include "chrome/browser/policy/value_provider/extension_policies_value_provider.h" #endif // BUILDFLAG(ENABLE_EXTENSIONS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "components/policy/core/common/cloud/profile_cloud_policy_manager.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -99,7 +99,7 @@ std::unique_ptr GetUserP - #else // BUILDFLAG(IS_CHROMEOS_ASH) - policy::CloudPolicyManager* cloud_policy_manager = - profile->GetUserCloudPolicyManager(); --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - if (!cloud_policy_manager) { - cloud_policy_manager = profile->GetProfileCloudPolicyManager(); - } diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_prefs_browser__prefs.cc b/www/ungoogled-chromium/files/patch-chrome_browser_prefs_browser__prefs.cc index afdf689efc1d..f50941b2423f 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,57 +1,57 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -484,18 +484,18 @@ +@@ -486,18 +486,18 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "components/device_signals/core/browser/pref_names.h" // nogncheck due to crbug.com/1125897 #endif - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #endif -@@ -530,7 +530,7 @@ +@@ -532,7 +532,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 -@@ -1767,7 +1767,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) - registry->RegisterBooleanPref(prefs::kOopPrintDriversAllowedByPolicy, true); - #endif +@@ -1857,7 +1857,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) + true); + #endif // BUILDFLAG(ENABLE_PDF) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kChromeForTestingAllowed, true); #endif -@@ -2111,12 +2111,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -2206,12 +2206,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 bad8a1ca8954..fc38899fad04 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-05-23 20:04:36 UTC +--- chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/prefs/pref_service_incognito_allowlist.cc -@@ -185,7 +185,7 @@ const char* const kPersistentPrefNames[] = { +@@ -184,7 +184,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_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 9cd5deb96b23..df11cdc04d30 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,110 +1,110 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -325,7 +325,7 @@ +@@ -328,7 +328,7 @@ #include "chromeos/constants/chromeos_features.h" #endif -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/messaging_layer/util/manual_test_heartbeat_event_factory.h" #endif -@@ -409,18 +409,18 @@ +@@ -412,18 +412,18 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.h" #include "chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.h" #include "chrome/browser/enterprise/signals/user_permission_service_factory.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/idle_service_factory.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_switcher/browser_switcher_service_factory.h" #include "chrome/browser/enterprise/client_certificates/certificate_provisioning_service_factory.h" #include "chrome/browser/enterprise/client_certificates/certificate_store_factory.h" -@@ -656,7 +656,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -659,7 +659,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(); -@@ -778,26 +778,26 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -784,26 +784,26 @@ void ChromeBrowserMainExtraPartsProfiles:: enterprise_commands::UserRemoteCommandsServiceFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) enterprise_connectors::DeviceTrustConnectorServiceFactory::GetInstance(); enterprise_connectors::DeviceTrustServiceFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) enterprise_idle::IdleServiceFactory::GetInstance(); #endif #if !BUILDFLAG(IS_CHROMEOS_ASH) enterprise_reporting::CloudProfileReportingServiceFactory::GetInstance(); #endif enterprise_reporting::LegacyTechServiceFactory::GetInstance(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_signals::SignalsAggregatorFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) enterprise_signals::UserPermissionServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_signin::EnterpriseSigninServiceFactory::GetInstance(); #endif #if BUILDFLAG(ENABLE_SESSION_SERVICE) -@@ -921,7 +921,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -929,7 +929,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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)) metrics::DesktopProfileSessionDurationsServiceFactory::GetInstance(); #endif -@@ -1024,7 +1024,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1030,7 +1030,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 -@@ -1066,7 +1066,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1072,7 +1072,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_ANDROID) ProfileStatisticsFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ProfileTokenWebSigninInterceptorFactory::GetInstance(); OidcAuthenticationSigninInterceptorFactory::GetInstance(); #endif -@@ -1085,7 +1085,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1091,7 +1091,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif ReduceAcceptLanguageFactory::GetInstance(); RendererUpdaterFactory::GetInstance(); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) reporting::ManualTestHeartbeatEventFactory::GetInstance(); #endif #if BUILDFLAG(IS_CHROMEOS_LACROS) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_profiles_profile__impl.cc index c741dc1bf197..8be625c60299 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-05-23 20:04:36 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/profiles/profile_impl.cc -@@ -261,6 +261,10 @@ +@@ -260,6 +260,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; -@@ -595,7 +599,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async +@@ -594,7 +598,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async #else { #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ProfileManager* profile_manager = g_browser_process->profile_manager(); ProfileAttributesEntry* entry = profile_manager->GetProfileAttributesStorage() @@ -877,7 +881,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_safe__browsing_cloud__content__scanning_binary__upload__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc index c8fb0cb0faa4..79d7a2f640a5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc @@ -1,20 +1,20 @@ ---- chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc @@ -18,7 +18,7 @@ #include "net/base/url_util.h" #include "third_party/abseil-cpp/absl/types/variant.h" -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/analysis/local_binary_upload_service_factory.h" #endif -@@ -423,7 +423,7 @@ BinaryUploadService* BinaryUploadService::GetForProfil +@@ -434,7 +434,7 @@ BinaryUploadService* BinaryUploadService::GetForProfil Profile* profile, const enterprise_connectors::AnalysisSettings& settings) { // Local content analysis is supported only on desktop platforms. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (settings.cloud_or_local_settings.is_cloud_analysis()) { return CloudBinaryUploadServiceFactory::GetForProfile(profile); } else { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_screen__ai_screen__ai__install__state.cc b/www/ungoogled-chromium/files/patch-chrome_browser_screen__ai_screen__ai__install__state.cc index 1cc09af76a6b..9de3a70c0885 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-04-23 07:42:17 UTC +--- chrome/browser/screen_ai/screen_ai_install_state.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/screen_ai/screen_ai_install_state.cc -@@ -23,7 +23,7 @@ +@@ -22,7 +22,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 -@@ -35,7 +35,7 @@ const char kMinExpectedVersion[] = "123.1"; +@@ -32,7 +32,7 @@ const int kScreenAICleanUpDelayInDays = 30; + const char kMinExpectedVersion[] = "123.1"; + bool IsDeviceCompatible() { - // Check if the CPU has the required instruction set to run the Screen AI - // library. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - if (!base::CPU().has_sse41()) { - return false; - } + #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_screen__ai_screen__ai__service__router.cc b/www/ungoogled-chromium/files/patch-chrome_browser_screen__ai_screen__ai__service__router.cc index 5623c1b850e4..d051c34df86f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_screen__ai_screen__ai__service__router.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_screen__ai_screen__ai__service__router.cc @@ -1,20 +1,20 @@ ---- chrome/browser/screen_ai/screen_ai_service_router.cc.orig 2024-04-23 07:42:17 UTC +--- chrome/browser/screen_ai/screen_ai_service_router.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/screen_ai/screen_ai_service_router.cc -@@ -281,7 +281,7 @@ void ScreenAIServiceRouter::LaunchIfNotRunning() { +@@ -280,7 +280,7 @@ void ScreenAIServiceRouter::LaunchIfNotRunning() { base::FilePath binary_path = state_instance->get_component_binary_path(); #if BUILDFLAG(IS_WIN) std::vector preload_libraries = {binary_path}; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::vector extra_switches = { base::StringPrintf("--%s=%s", screen_ai::GetBinaryPathSwitch(), binary_path.MaybeAsASCII().c_str())}; -@@ -295,7 +295,7 @@ void ScreenAIServiceRouter::LaunchIfNotRunning() { +@@ -294,7 +294,7 @@ void ScreenAIServiceRouter::LaunchIfNotRunning() { .WithPreloadedLibraries( preload_libraries, content::ServiceProcessHostPreloadLibraries::GetPassKey()) -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) .WithExtraCommandLineSwitches(extra_switches) #endif // BUILDFLAG(IS_WIN) .Pass()); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_search__engine__choice_search__engine__choice__client__side__trial.cc b/www/ungoogled-chromium/files/patch-chrome_browser_search__engine__choice_search__engine__choice__client__side__trial.cc deleted file mode 100644 index b50b03391122..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_search__engine__choice_search__engine__choice__client__side__trial.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/search_engine_choice/search_engine_choice_client_side_trial.cc.orig 2024-02-25 20:22:18 UTC -+++ chrome/browser/search_engine_choice/search_engine_choice_client_side_trial.cc -@@ -132,7 +132,7 @@ void RegisterLocalStatePrefs(PrefRegistrySimple* regis - void SetUpIfNeeded(const base::FieldTrial::EntropyProvider& entropy_provider, - base::FeatureList* feature_list, - PrefService* local_state) { --#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_MAC) -+#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) - // Platform not in scope for this client-side trial. - return; - #else diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_send__tab__to__self_receiving__ui__handler__registry.cc b/www/ungoogled-chromium/files/patch-chrome_browser_send__tab__to__self_receiving__ui__handler__registry.cc index 3cb4347ca463..1c41fbc94a62 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_send__tab__to__self_receiving__ui__handler__registry.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_send__tab__to__self_receiving__ui__handler__registry.cc @@ -1,20 +1,20 @@ ---- chrome/browser/send_tab_to_self/receiving_ui_handler_registry.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/send_tab_to_self/receiving_ui_handler_registry.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/send_tab_to_self/receiving_ui_handler_registry.cc @@ -15,7 +15,7 @@ #include "components/send_tab_to_self/features.h" #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/send_tab_to_self/desktop_notification_handler.h" #include "chrome/browser/ui/send_tab_to_self/send_tab_to_self_toolbar_icon_controller.h" #endif @@ -47,7 +47,7 @@ SendTabToSelfToolbarIconController* ReceivingUiHandlerRegistry::GetToolbarButtonControllerForProfile( Profile* profile) { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) for (const std::unique_ptr& handler : applicable_handlers_) { auto* button_controller = diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_shortcuts_icon__badging.cc b/www/ungoogled-chromium/files/patch-chrome_browser_shortcuts_icon__badging.cc new file mode 100644 index 000000000000..6195f7760b05 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_shortcuts_icon__badging.cc @@ -0,0 +1,11 @@ +--- chrome/browser/shortcuts/icon_badging.cc.orig 2024-06-22 08:49:42 UTC ++++ chrome/browser/shortcuts/icon_badging.cc +@@ -59,7 +59,7 @@ enum class BadgeSize { + constexpr ShortcutSize kSizesNeededForShortcutCreation[] = { + ShortcutSize::k16, ShortcutSize::k32, ShortcutSize::k128, + ShortcutSize::k256, ShortcutSize::k512}; +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + constexpr ShortcutSize kSizesNeededForShortcutCreation[] = {ShortcutSize::k32, + ShortcutSize::k128}; + #elif BUILDFLAG(IS_WIN) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc index 10c706b41458..6b1f8540fcc3 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc @@ -1,11 +1,11 @@ ---- chrome/browser/supervised_user/supervised_user_extensions_delegate_impl.cc.orig 2024-04-23 07:42:17 UTC +--- chrome/browser/supervised_user/supervised_user_extensions_delegate_impl.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/supervised_user/supervised_user_extensions_delegate_impl.cc -@@ -180,7 +180,7 @@ void SupervisedUserExtensionsDelegateImpl::RequestExte +@@ -185,7 +185,7 @@ void SupervisedUserExtensionsDelegateImpl::RequestExte return; } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) CHECK(contents.value()); content::WebContents* web_contents = contents.value().get(); if (CanInstallExtensions()) { 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 9026d6859d4a..dbed8f0a05b6 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-05-23 20:04:36 UTC +--- chrome/browser/supervised_user/supervised_user_extensions_manager.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/supervised_user/supervised_user_extensions_manager.cc -@@ -346,7 +346,7 @@ void SupervisedUserExtensionsManager:: +@@ -353,7 +353,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) } -@@ -458,7 +458,7 @@ bool SupervisedUserExtensionsManager::ShouldBlockExten +@@ -470,7 +470,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() { - if (!is_active_policy_for_supervised_users_) { + supervised_user::LocallyParentApprovedExtensionsMigrationState diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h index 02240d926162..ce8717d5aa19 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h @@ -1,11 +1,11 @@ ---- chrome/browser/supervised_user/supervised_user_extensions_manager.h.orig 2024-04-23 07:42:17 UTC +--- chrome/browser/supervised_user/supervised_user_extensions_manager.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/supervised_user/supervised_user_extensions_manager.h -@@ -143,7 +143,7 @@ class SupervisedUserExtensionsManager : public Extensi +@@ -147,7 +147,7 @@ class SupervisedUserExtensionsManager : public Extensi // launched. bool ShouldBlockExtension(const std::string& extension_id) const; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Triggers an one-time migration of the present extensions as parent-approved // when the feature // `kEnableSupervisedUserSkipParentApprovalToInstallExtensions` becomes diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc index 8861a079f16c..cf0350fd6bd2 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc @@ -1,38 +1,38 @@ ---- chrome/browser/sync/chrome_sync_client.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/sync/chrome_sync_client.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/sync/chrome_sync_client.cc -@@ -108,7 +108,7 @@ +@@ -116,7 +116,7 @@ #endif // BUILDFLAG(ENABLE_SPELLCHECK) #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" #elif BUILDFLAG(IS_ANDROID) -@@ -463,7 +463,7 @@ ChromeSyncClient::CreateModelTypeControllers( +@@ -474,7 +474,7 @@ ChromeSyncClient::CreateModelTypeControllers( // platforms. bool enable_tab_group_sync = false; #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) enable_tab_group_sync = true; #elif BUILDFLAG(IS_ANDROID) - enable_tab_group_sync = -@@ -481,7 +481,7 @@ ChromeSyncClient::CreateModelTypeControllers( + enable_tab_group_sync = tab_groups::IsTabGroupSyncEnabled(GetPrefService()); +@@ -506,7 +506,7 @@ ChromeSyncClient::CreateModelTypeControllers( // Chrome prefers OS provided spell checkers where they exist. So only sync the // custom dictionary on platforms that typically don't provide one. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Dictionary sync is enabled by default. if (GetPrefService()->GetBoolean(spellcheck::prefs::kSpellCheckEnable)) { controllers.push_back( -@@ -638,7 +638,7 @@ ChromeSyncClient::GetControllerDelegateForModelType(sy +@@ -663,7 +663,7 @@ ChromeSyncClient::GetControllerDelegateForModelType(sy switch (type) { case syncer::SAVED_TAB_GROUP: { #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) auto* keyed_service = tab_groups::SavedTabGroupServiceFactory::GetForProfile(profile_); CHECK(keyed_service); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_sync_device__info__sync__client__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_sync_device__info__sync__client__impl.cc index 28a4d7de0d26..ec1b442928c6 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_sync_device__info__sync__client__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_sync_device__info__sync__client__impl.cc @@ -1,11 +1,11 @@ ---- chrome/browser/sync/device_info_sync_client_impl.cc.orig 2023-03-10 11:01:21 UTC +--- chrome/browser/sync/device_info_sync_client_impl.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/sync/device_info_sync_client_impl.cc @@ -41,7 +41,7 @@ std::string DeviceInfoSyncClientImpl::GetSigninScopedD - // in lacros-chrome once build flag switch of lacros-chrome is + // 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()); if (prefs.IsLocalSyncEnabled()) { return "local_device"; 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 e9b237a3b9ae..a0a1a0f1b517 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_sync_sync__service__factory.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_sync_sync__service__factory.cc @@ -1,29 +1,29 @@ ---- chrome/browser/sync/sync_service_factory.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/sync/sync_service_factory.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/sync/sync_service_factory.cc -@@ -81,7 +81,7 @@ +@@ -82,7 +82,7 @@ #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h" #elif BUILDFLAG(IS_ANDROID) #include "chrome/browser/tab_group_sync/tab_group_sync_service_factory.h" -@@ -132,7 +132,7 @@ std::unique_ptr BuildSyncService( - // TODO(crbug.com/1052397): Reassess whether the following block needs to be +@@ -133,7 +133,7 @@ std::unique_ptr BuildSyncService( + // TODO(crbug.com/40118868): Reassess whether the following block needs to be // included in lacros-chrome once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) syncer::SyncPrefs prefs(profile->GetPrefs()); local_sync_backend_enabled = prefs.IsLocalSyncEnabled(); -@@ -267,7 +267,7 @@ SyncServiceFactory::SyncServiceFactory() +@@ -269,7 +269,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_themes_theme__service.cc b/www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service.cc index 0bf3e1aff349..5f2e1ebf10cc 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service.cc @@ -1,20 +1,20 @@ ---- chrome/browser/themes/theme_service.cc.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/themes/theme_service.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/themes/theme_service.cc -@@ -74,7 +74,7 @@ +@@ -73,7 +73,7 @@ #include "extensions/browser/extension_registry_observer.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui.h" #include "ui/ozone/public/ozone_platform.h" #endif -@@ -330,7 +330,7 @@ CustomThemeSupplier* ThemeService::GetThemeSupplier() +@@ -329,7 +329,7 @@ CustomThemeSupplier* ThemeService::GetThemeSupplier() } bool ThemeService::ShouldUseCustomFrame() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!ui::OzonePlatform::GetInstance() ->GetPlatformRuntimeProperties() .supports_server_side_window_decorations) { diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service__factory.cc index ef5588095257..6af0d1634137 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service__factory.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_themes_theme__service__factory.cc @@ -1,37 +1,37 @@ ---- chrome/browser/themes/theme_service_factory.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/themes/theme_service_factory.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/themes/theme_service_factory.cc @@ -27,11 +27,11 @@ - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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/themes/theme_service_aura_linux.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui_factory.h" #endif @@ -103,7 +103,7 @@ ThemeServiceFactory::~ThemeServiceFactory() = default; KeyedService* ThemeServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) using ThemeService = ThemeServiceAuraLinux; #endif @@ -117,9 +117,9 @@ void ThemeServiceFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) ui::SystemTheme default_system_theme = ui::SystemTheme::kDefault; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) default_system_theme = ui::GetDefaultSystemTheme(); #endif registry->RegisterIntegerPref(prefs::kSystemTheme, 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 a16a3b2b3259..49389953f52e 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-04-23 07:42:17 UTC +--- chrome/browser/ui/actions/chrome_action_id.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/actions/chrome_action_id.h -@@ -510,7 +510,7 @@ +@@ -518,7 +518,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 dae4203ed7b4..b2a91d70434e 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-05-23 20:04:36 UTC +--- chrome/browser/ui/autofill/payments/desktop_payments_window_manager.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/autofill/payments/desktop_payments_window_manager.cc -@@ -44,7 +44,7 @@ gfx::Rect GetPopupSizeForVcn3ds() { +@@ -47,7 +47,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) } -@@ -72,7 +72,7 @@ void DesktopPaymentsWindowManager::WebContentsDestroye +@@ -90,7 +90,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_autofill_payments_desktop__payments__window__manager.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h index bf4fb7805cf9..e7d4afa4bf6e 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h @@ -1,38 +1,38 @@ ---- chrome/browser/ui/autofill/payments/desktop_payments_window_manager.h.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/ui/autofill/payments/desktop_payments_window_manager.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/autofill/payments/desktop_payments_window_manager.h -@@ -13,7 +13,7 @@ +@@ -14,7 +14,7 @@ #include "components/autofill/core/browser/payments/payments_window_manager.h" #include "content/public/browser/web_contents_observer.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "base/scoped_observation.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_list_observer.h" -@@ -34,7 +34,7 @@ class PaymentsWindowUserConsentDialogControllerImpl; +@@ -39,7 +39,7 @@ class PaymentsWindowUserConsentDialogControllerImpl; // WebContents of the original tab that the pop-up is created in. If there is a // pop-up currently present, `this` will observe the WebContents of that pop-up. class DesktopPaymentsWindowManager : public PaymentsWindowManager, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) public BrowserListObserver, #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) public content::WebContentsObserver { -@@ -51,7 +51,7 @@ class DesktopPaymentsWindowManager : public PaymentsWi - // content::WebContentsObserver: +@@ -58,7 +58,7 @@ class DesktopPaymentsWindowManager : public PaymentsWi + content::NavigationHandle* navigation_handle) override; void WebContentsDestroyed() override; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // BrowserListObserver: void OnBrowserSetLastActive(Browser* browser) override; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -@@ -118,7 +118,7 @@ class DesktopPaymentsWindowManager : public PaymentsWi +@@ -132,7 +132,7 @@ class DesktopPaymentsWindowManager : public PaymentsWi std::unique_ptr payments_window_user_consent_dialog_controller_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::ScopedObservation scoped_observation_{ this}; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) 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 3c8cfd75f2b3..20dc0c47e7d7 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-05-23 20:04:36 UTC +--- chrome/browser/ui/browser.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/browser.h -@@ -328,7 +328,7 @@ class Browser : public TabStripModelObserver, +@@ -330,7 +330,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 8f645758d2f7..0d6fb0f7550a 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__command__controller.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_browser__command__controller.cc @@ -1,53 +1,62 @@ ---- chrome/browser/ui/browser_command_controller.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/ui/browser_command_controller.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/browser_command_controller.cc -@@ -123,7 +123,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 -@@ -305,7 +305,7 @@ bool BrowserCommandController::IsReservedCommandOrKey( +@@ -308,7 +308,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(); -@@ -557,7 +557,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -560,7 +560,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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; -@@ -569,7 +569,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -572,7 +572,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, -@@ -1259,12 +1259,12 @@ void BrowserCommandController::InitCommandState() { +@@ -766,7 +766,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 { +@@ -1269,12 +1269,12 @@ void BrowserCommandController::InitCommandState() { #endif - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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() 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 730dd5720110..a89ba6a5a81d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_chrome__pages.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/chrome_pages.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/ui/chrome_pages.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/chrome_pages.cc -@@ -84,7 +84,7 @@ +@@ -85,7 +85,7 @@ + #include "components/signin/public/identity_manager/identity_manager.h" #endif - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#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 -@@ -719,7 +719,7 @@ void ShowShortcutCustomizationApp(Profile* profile, +@@ -718,7 +718,7 @@ void ShowShortcutCustomizationApp(Profile* profile, + #endif // BUILDFLAG(IS_CHROMEOS_ASH) } - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#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 35a7b6805ca9..0101a6b37b50 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-05-23 20:04:36 UTC +--- chrome/browser/ui/chrome_pages.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/chrome_pages.h -@@ -38,7 +38,7 @@ enum class ConsentLevel; +@@ -39,7 +39,7 @@ namespace signin { + enum class ConsentLevel; } // namespace signin - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#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 -@@ -263,7 +263,7 @@ void ShowShortcutCustomizationApp(Profile* profile, +@@ -196,7 +196,7 @@ void ShowShortcutCustomizationApp(Profile* profile, + const std::string& category); #endif - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#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_exclusive__access_exclusive__access__bubble.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc deleted file mode 100644 index 7e1384351dd7..000000000000 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc.orig 2023-11-04 07:08:51 UTC -+++ chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc -@@ -19,7 +19,7 @@ - - // NOTE(koz): Linux doesn't use the thick shadowed border, so we add padding - // here. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - const int ExclusiveAccessBubble::kPaddingPx = 8; - #else - const int ExclusiveAccessBubble::kPaddingPx = 15; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc index 3ffd0d67d5d0..49068d3836df 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc.orig 2024-04-23 07:42:17 UTC +--- chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc -@@ -1989,7 +1989,7 @@ const gfx::VectorIcon& GetSharingHubVectorIcon() { - OmniboxFieldTrial::IsChromeRefreshActionChipIconsEnabled() - ? omnibox::kShareWinChromeRefreshIcon - : omnibox::kShareWinIcon; +@@ -1978,7 +1978,7 @@ const gfx::VectorIcon& GetSharingHubVectorIcon() { + return omnibox::kShareMacChromeRefreshIcon; + #elif BUILDFLAG(IS_WIN) + return omnibox::kShareWinChromeRefreshIcon; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - return OmniboxFieldTrial::IsChromeRefreshIconsEnabled() || - OmniboxFieldTrial::IsChromeRefreshActionChipIconsEnabled() - ? omnibox::kShareLinuxChromeRefreshIcon + return omnibox::kShareLinuxChromeRefreshIcon; + #else + return omnibox::kShareChromeRefreshIcon; 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 54d65abff2ba..0d67092a71ab 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-05-23 20:04:36 UTC +--- chrome/browser/ui/passwords/manage_passwords_ui_controller.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/passwords/manage_passwords_ui_controller.cc @@ -92,7 +92,7 @@ int ManagePasswordsUIController::save_fallback_timeout namespace { -#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; -@@ -481,7 +481,7 @@ void ManagePasswordsUIController::OnBiometricAuthBefor +@@ -475,7 +475,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_sharing__hub_sharing__hub__bubble__controller.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_sharing__hub_sharing__hub__bubble__controller.h index 78af61aa247e..5395abe22ffd 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_sharing__hub_sharing__hub__bubble__controller.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_sharing__hub_sharing__hub__bubble__controller.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/sharing_hub/sharing_hub_bubble_controller.h.orig 2023-04-08 11:38:38 UTC +--- chrome/browser/ui/sharing_hub/sharing_hub_bubble_controller.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/sharing_hub/sharing_hub_bubble_controller.h -@@ -37,7 +37,7 @@ class SharingHubBubbleController { +@@ -36,7 +36,7 @@ class SharingHubBubbleController { + // Returns true if the omnibox icon should be shown. virtual bool ShouldOfferOmniboxIcon() = 0; - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // This method returns the set of first-party actions, which are actions // internal to Chrome. Third-party actions (those outside Chrome) are // currently not supported. 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 6a131499b189..dbdad4fad0ed 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-05-23 20:04:36 UTC +--- chrome/browser/ui/signin/signin_view_controller.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/signin/signin_view_controller.cc -@@ -325,7 +325,7 @@ void SigninViewController::ShowModalManagedUserNoticeD +@@ -324,7 +324,7 @@ void SigninViewController::ShowModalManagedUserNoticeD bool show_link_data_option, signin::SigninChoiceCallback callback) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) CloseModalSignin(); dialog_ = std::make_unique( SigninViewControllerDelegate::CreateManagedUserNoticeDelegate( 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 31c7e5c4e25f..395c11013e3b 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-05-23 20:04:36 UTC +--- chrome/browser/ui/startup/bad_flags_prompt.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/startup/bad_flags_prompt.cc -@@ -105,7 +105,7 @@ const char* const kBadFlags[] = { +@@ -106,7 +106,7 @@ const char* const kBadFlags[] = { - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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 96e68e01cb84..31ead8033e9d 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-05-23 20:04:36 UTC +--- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/startup/startup_browser_creator.cc @@ -136,7 +136,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" -@@ -964,7 +964,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -965,7 +965,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())) { -@@ -1077,7 +1077,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1078,7 +1078,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) && -@@ -1287,7 +1287,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1288,7 +1288,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( CHECK_EQ(profile_info.mode, StartupProfileMode::kBrowserWindow) << "Failed launch with app: couldn't pick a profile"; std::string app_id = command_line.GetSwitchValueASCII(switches::kAppId); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If Chrome Apps are deprecated and |app_id| is a Chrome App, display the // deprecation UI instead of launching the app. if (apps::OpenDeprecatedApplicationPrompt(privacy_safe_profile, app_id)) diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc index cd1f71d90ad2..219ebd2c400b 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/startup/startup_browser_creator_impl.cc -@@ -261,7 +261,7 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser( +@@ -233,7 +233,7 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser( // at the state of the MessageLoop. Browser::CreateParams params = Browser::CreateParams(profile_, false); params.creation_source = Browser::CreationSource::kStartupCreator; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) params.startup_id = command_line_->GetSwitchValueASCII("desktop-startup-id"); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_tab__helpers.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_tab__helpers.cc index ade488b593d0..81cf3439087a 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-05-23 20:04:36 UTC +--- chrome/browser/ui/tab_helpers.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/tab_helpers.cc -@@ -236,7 +236,7 @@ +@@ -241,7 +241,7 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- 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" -@@ -666,12 +666,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch +@@ -681,12 +681,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_test_popup__browsertest.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_test_popup__browsertest.cc index a37e5e1b428a..a3fcd8dac2b8 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_test_popup__browsertest.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_test_popup__browsertest.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/test/popup_browsertest.cc.orig 2023-07-21 09:49:17 UTC +--- chrome/browser/ui/test/popup_browsertest.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/test/popup_browsertest.cc @@ -74,7 +74,7 @@ IN_PROC_BROWSER_TEST_F(PopupTest, OpenLeftAndTopZeroCo const display::Display display = GetDisplayNearestBrowser(popup); gfx::Rect expected(popup->window()->GetBounds().size()); expected.AdjustToFit(display.work_area()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // TODO(crbug.com/1286870) Desktop Linux window bounds are inaccurate. + // TODO(crbug.com/40815883) Desktop Linux window bounds are inaccurate. expected.Outset(50); EXPECT_TRUE(expected.Contains(popup->window()->GetBounds())) @@ -106,7 +106,7 @@ IN_PROC_BROWSER_TEST_F(PopupTest, OpenClampedToCurrent // The popup should be constrained to the opener's available display space. EXPECT_EQ(display, GetDisplayNearestBrowser(popup)); gfx::Rect work_area(display.work_area()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // TODO(crbug.com/1286870) Desktop Linux bounds flakily extend outside the + // TODO(crbug.com/40815883) Desktop Linux bounds flakily extend outside the // work area on trybots, when opening with excessive width and height, e.g.: // width=${screen.availWidth+300},height=${screen.availHeight+300} yields: diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_test_test__browser__ui.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_test_test__browser__ui.cc index 061ce3f01bfd..ce784857ecf6 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_test_test__browser__ui.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_test_test__browser__ui.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/test/test_browser_ui.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/ui/test/test_browser_ui.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/test/test_browser_ui.cc @@ -22,7 +22,7 @@ - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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 "content/public/common/content_switches.h" #include "ui/base/test/skia_gold_matching_algorithm.h" -@@ -35,7 +35,7 @@ +@@ -39,7 +39,7 @@ // TODO(crbug.com/40625383) support Mac for pixel tests. - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) #define SUPPORTS_PIXEL_TEST #endif 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 1c80fadf6b29..5a404a6a7109 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/ui_features.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/ui/ui_features.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/ui_features.cc -@@ -426,7 +426,7 @@ BASE_FEATURE(kTopChromeWebUIUsesSpareRenderer, +@@ -446,7 +446,7 @@ BASE_FEATURE(kTopChromeWebUIUsesSpareRenderer, "TopChromeWebUIUsesSpareRenderer", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables alternate update-related text to be displayed in browser app menu // button, menu item and confirmation dialog. BASE_FEATURE(kUpdateTextOptions, diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h index e19854d1a10a..5d975782c88d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_ui__features.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/ui_features.h.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/ui/ui_features.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/ui_features.h -@@ -279,7 +279,7 @@ bool IsToolbarPinningEnabled(); +@@ -288,7 +288,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 diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc index 170d4b9d318a..03b3bd5008f5 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc @@ -1,43 +1,43 @@ ---- chrome/browser/ui/views/accelerator_table.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/browser/ui/views/accelerator_table.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/views/accelerator_table.cc @@ -72,11 +72,11 @@ const AcceleratorMapping kAcceleratorMap[] = { {ui::VKEY_S, ui::EF_PLATFORM_ACCELERATOR, IDC_SAVE_PAGE}, {ui::VKEY_9, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_LAST_TAB}, {ui::VKEY_NUMPAD9, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_LAST_TAB}, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {ui::VKEY_9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB}, {ui::VKEY_NUMPAD9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB}, #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {ui::VKEY_NEXT, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_MOVE_TAB_NEXT}, {ui::VKEY_PRIOR, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_MOVE_TAB_PREVIOUS}, @@ -104,7 +104,7 @@ const AcceleratorMapping kAcceleratorMap[] = { {ui::VKEY_NUMPAD7, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_6}, {ui::VKEY_8, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_7}, {ui::VKEY_NUMPAD8, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_7}, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {ui::VKEY_1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0}, {ui::VKEY_NUMPAD1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0}, {ui::VKEY_2, ui::EF_ALT_DOWN, IDC_SELECT_TAB_1}, @@ -154,7 +154,7 @@ const AcceleratorMapping kAcceleratorMap[] = { IDC_SHOW_AVATAR_MENU}, // Platform-specific key maps. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {ui::VKEY_BROWSER_BACK, ui::EF_NONE, IDC_BACK}, {ui::VKEY_BROWSER_FORWARD, ui::EF_NONE, IDC_FORWARD}, {ui::VKEY_BROWSER_HOME, ui::EF_NONE, IDC_HOME}, -@@ -250,7 +250,7 @@ const AcceleratorMapping kAcceleratorMap[] = { +@@ -249,7 +249,7 @@ const AcceleratorMapping kAcceleratorMap[] = { #endif // !BUILDFLAG(IS_CHROMEOS) #endif // !BUILDFLAG(IS_MAC) #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) {ui::VKEY_S, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_CONTENT_CONTEXT_RUN_LAYOUT_EXTRACTION}, #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h index 895991893481..ab43e251826c 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-02-25 20:22:18 UTC +--- chrome/browser/ui/views/chrome_views_delegate.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/views/chrome_views_delegate.h @@ -59,11 +59,11 @@ class ChromeViewsDelegate : public views::ViewsDelegat base::OnceClosure callback) override; - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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__view.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc index 19cd0e1244b3..4d72ac8080c8 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-05-23 20:04:36 UTC +--- chrome/browser/ui/views/frame/browser_view.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -2231,7 +2231,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra +@@ -2224,7 +2224,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra // CrOS cleanup is done. - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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_opaque__browser__frame__view.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc index e8e985ae62c9..f2de1cf052fe 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc @@ -1,38 +1,38 @@ ---- chrome/browser/ui/views/frame/opaque_browser_frame_view.cc.orig 2024-02-25 20:22:18 UTC +--- chrome/browser/ui/views/frame/opaque_browser_frame_view.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/views/frame/opaque_browser_frame_view.cc @@ -54,7 +54,7 @@ #include "ui/views/window/vector_icons/vector_icons.h" #include "ui/views/window/window_shape.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "ui/views/controls/menu/menu_runner.h" #endif @@ -566,7 +566,7 @@ OpaqueBrowserFrameView::FrameButtonStyle OpaqueBrowserFrameView::GetFrameButtonStyle() const { - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) return FrameButtonStyle::kMdButton; #else return FrameButtonStyle::kImageButton; @@ -585,7 +585,7 @@ bool OpaqueBrowserFrameView::ShouldDrawRestoredFrameSh return false; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool OpaqueBrowserFrameView::IsTiled() const { return frame()->tiled(); } @@ -783,7 +783,7 @@ gfx::Rect OpaqueBrowserFrameView::GetIconBounds() cons } void OpaqueBrowserFrameView::WindowIconPressed() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Chrome OS doesn't show the window icon, and Windows handles this on its own // due to the hit test being HTSYSMENU. menu_runner_ = std::make_unique( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_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 e53357b2afc1..a75593f5a0a7 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-04-23 07:42:17 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc -@@ -59,7 +59,7 @@ +@@ -58,7 +58,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" -@@ -89,7 +89,7 @@ constexpr int kContentSettingIconSize = 16; +@@ -88,7 +88,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 -@@ -184,7 +184,7 @@ class WindowEventObserver : public ui::EventObserver { +@@ -180,7 +180,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()) { -@@ -585,7 +585,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow +@@ -579,7 +579,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); -@@ -804,7 +804,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( +@@ -798,7 +798,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))); -@@ -886,7 +886,7 @@ void PictureInPictureBrowserFrameView::RemovedFromWidg +@@ -880,7 +880,7 @@ void PictureInPictureBrowserFrameView::RemovedFromWidg BrowserNonClientFrameView::RemovedFromWidget(); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gfx::Insets PictureInPictureBrowserFrameView::MirroredFrameBorderInsets() const { auto border = FrameBorderInsets(); -@@ -1147,7 +1147,7 @@ void PictureInPictureBrowserFrameView::AnimationProgre +@@ -1136,7 +1136,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_) { -@@ -1281,7 +1281,7 @@ void PictureInPictureBrowserFrameView::UpdateTopBarVie +@@ -1270,7 +1270,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(); -@@ -1299,7 +1299,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor +@@ -1288,7 +1288,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); -@@ -1320,7 +1320,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie +@@ -1309,7 +1309,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_frame_system__menu__model__builder.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc index 6d6ece654283..b8d807072b79 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/views/frame/system_menu_model_builder.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/ui/views/frame/system_menu_model_builder.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/views/frame/system_menu_model_builder.cc @@ -75,7 +75,7 @@ void SystemMenuModelBuilder::BuildSystemMenuForBrowser ui::SimpleMenuModel* model) { - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) model->AddItemWithStringId(IDC_MINIMIZE_WINDOW, IDS_MINIMIZE_WINDOW_MENU); model->AddItemWithStringId(IDC_MAXIMIZE_WINDOW, IDS_MAXIMIZE_WINDOW_MENU); model->AddItemWithStringId(IDC_RESTORE_WINDOW, IDS_RESTORE_WINDOW_MENU); @@ -91,7 +91,7 @@ void SystemMenuModelBuilder::BuildSystemMenuForBrowser } - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) model->AddSeparator(ui::NORMAL_SEPARATOR); bool supports_server_side_decorations = true; #if BUILDFLAG(IS_OZONE) && !BUILDFLAG(IS_CHROMEOS) @@ -147,7 +147,7 @@ void SystemMenuModelBuilder::BuildSystemMenuForAppOrPo model->AddSeparator(ui::NORMAL_SEPARATOR); model->AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) model->AddSeparator(ui::NORMAL_SEPARATOR); model->AddItemWithStringId(IDC_CLOSE_WINDOW, IDS_CLOSE); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc index 96a86594a46c..922898b2727d 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/views/frame/system_menu_model_delegate.cc.orig 2023-07-21 09:49:17 UTC +--- chrome/browser/ui/views/frame/system_menu_model_delegate.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/views/frame/system_menu_model_delegate.cc @@ -21,7 +21,7 @@ #include "chromeos/ui/frame/desks/move_to_desks_menu_model.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/common/pref_names.h" #include "components/prefs/pref_service.h" #endif @@ -36,7 +36,7 @@ SystemMenuModelDelegate::SystemMenuModelDelegate( SystemMenuModelDelegate::~SystemMenuModelDelegate() {} bool SystemMenuModelDelegate::IsCommandIdChecked(int command_id) const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (command_id == IDC_USE_SYSTEM_TITLE_BAR) { PrefService* prefs = browser_->profile()->GetPrefs(); return !prefs->GetBoolean(prefs::kUseCustomChromeFrame); @@ -58,7 +58,7 @@ bool SystemMenuModelDelegate::IsCommandIdEnabled(int c bool SystemMenuModelDelegate::IsCommandIdVisible(int command_id) const { - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) bool is_maximized = browser_->window()->IsMaximized(); switch (command_id) { case IDC_MAXIMIZE_WINDOW: 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 943923d9415f..9968d2b75adc 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-03-22 14:16:19 UTC +--- chrome/browser/ui/views/passwords/password_bubble_view_base.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/views/passwords/password_bubble_view_base.cc @@ -34,7 +34,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 -@@ -139,7 +139,7 @@ PasswordBubbleViewBase* PasswordBubbleViewBase::Create +@@ -132,7 +132,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 new file mode 100644 index 000000000000..d1cb1d73b34d --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view.cc @@ -0,0 +1,11 @@ +--- chrome/browser/ui/views/profiles/profile_menu_view.cc.orig 2024-06-22 08:49:42 UTC ++++ chrome/browser/ui/views/profiles/profile_menu_view.cc +@@ -82,7 +82,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 6e0ee2242a81..6b1bf556f0bf 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-05-23 20:04:36 UTC +--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc @@ -723,7 +723,7 @@ void ProfileMenuViewBase::SetProfileIdentityInfo( - // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is + // 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) // 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 e51fc6408523..920e6c87d97c 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-05-23 20:04:36 UTC +--- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc @@ -58,7 +58,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 = 1024; + const int kManagedUserNoticeConfirmationUpdatedDialogWidth = 900; @@ -187,7 +187,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( @@ -348,7 +348,7 @@ SigninViewControllerDelegateViews::SigninViewControlle SetButtons(ui::DIALOG_BUTTON_NONE); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // On the local profile creation dialog, cancelling the dialog (for instance // through the VKEY_ESCAPE accelerator) should delete the profile. if (delete_profile_on_cancel) { @@ -438,7 +438,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() @@ -511,7 +511,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_tabs_tab.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab.cc index 36bebc0a5e28..0151c9f468c2 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-05-23 20:04:36 UTC +--- chrome/browser/ui/views/tabs/tab.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/views/tabs/tab.cc -@@ -622,7 +622,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& +@@ -630,7 +630,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 57659e87e510..e5c22ff81798 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc @@ -1,56 +1,56 @@ ---- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/views/tabs/tab_drag_controller.cc @@ -95,7 +95,7 @@ #include "components/remote_cocoa/browser/window.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/aura/client/drag_drop_client.h" #endif @@ -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)) { @@ -405,7 +405,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_ = @@ -1069,7 +1069,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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. -@@ -2143,7 +2143,7 @@ void TabDragController::CompleteDrag() { +@@ -2151,7 +2151,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 -@@ -2573,7 +2573,7 @@ TabDragController::Liveness TabDragController::GetLoca +@@ -2581,7 +2581,7 @@ TabDragController::Liveness TabDragController::GetLoca } - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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 4b0378e0fc39..d7ce6141bf3a 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-05-23 20:04:36 UTC +--- chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc -@@ -371,7 +371,7 @@ TabHoverCardBubbleView::TabHoverCardBubbleView(Tab* ta +@@ -375,7 +375,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 e66eda5ccaff..d3588190e985 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,11 +1,11 @@ ---- chrome/browser/ui/views/user_education/browser_user_education_service.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/ui/views/user_education/browser_user_education_service.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/views/user_education/browser_user_education_service.cc -@@ -794,7 +794,7 @@ void MaybeRegisterChromeFeaturePromos( +@@ -980,7 +980,7 @@ void MaybeRegisterChromeFeaturePromos( FeaturePromoSpecification::AcceleratorInfo()) .SetBubbleArrow(HelpBubbleArrow::kTopLeft))); -#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 7fb0a5265d65..e84d7b5b6d25 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-05-23 20:04:36 UTC +--- chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc @@ -515,7 +515,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; -@@ -2105,7 +2105,7 @@ void WebAppIntegrationTestDriver::DeletePlatformShortc +@@ -2096,7 +2096,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( -@@ -3419,7 +3419,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginEna +@@ -3410,7 +3410,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 -@@ -3434,7 +3434,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3425,7 +3425,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 -@@ -3444,7 +3444,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3435,7 +3435,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; } -@@ -3460,7 +3460,7 @@ void WebAppIntegrationTestDriver::CheckSiteHandlesFile +@@ -3451,7 +3451,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; } -@@ -4283,7 +4283,7 @@ base::FilePath WebAppIntegrationTestDriver::GetShortcu +@@ -4265,7 +4265,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 -@@ -4483,7 +4483,7 @@ bool WebAppIntegrationTestDriver::IsShortcutAndIconCre +@@ -4465,7 +4465,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); -@@ -4527,7 +4527,7 @@ bool WebAppIntegrationTestDriver::DoIconColorsMatch(Pr +@@ -4509,7 +4509,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__dialogs.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__dialogs.h index 30f2683ca37a..3bdf7a7d2630 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__dialogs.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_web__applications_web__app__dialogs.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/web_applications/web_app_dialogs.h.orig 2024-04-23 07:42:17 UTC +--- chrome/browser/ui/web_applications/web_app_dialogs.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/web_applications/web_app_dialogs.h @@ -22,7 +22,7 @@ #include "ui/gfx/native_widget_types.h" static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)); -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)); +- BUILDFLAG(IS_CHROMEOS)); ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)); class GURL; class Profile; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_about_about__ui.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_about_about__ui.cc index 4d73fac74ede..5ef54fc98623 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_about_about__ui.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_about_about__ui.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/about/about_ui.cc.orig 2024-02-03 15:42:55 UTC +--- chrome/browser/ui/webui/about/about_ui.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/webui/about/about_ui.cc -@@ -592,7 +592,7 @@ std::string ChromeURLs(content::BrowserContext* browse +@@ -593,7 +593,7 @@ std::string ChromeURLs(content::BrowserContext* browse return html; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::string AboutLinuxProxyConfig() { std::string data; AppendHeader(&data, -@@ -646,7 +646,7 @@ void AboutUIHTMLSource::StartDataRequest( +@@ -648,7 +648,7 @@ void AboutUIHTMLSource::StartDataRequest( response = ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(idr); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) } else if (source_name_ == chrome::kChromeUILinuxProxyConfigHost) { response = AboutLinuxProxyConfig(); #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc index 1160d1b0b3a8..2b5355ebcd3a 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc @@ -1,92 +1,91 @@ ---- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -206,7 +206,7 @@ +@@ -197,7 +197,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 -@@ -232,17 +232,17 @@ +@@ -222,17 +222,17 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/discards/discards_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/sandbox/sandbox_internals_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h" #endif -@@ -386,7 +386,7 @@ bool IsAboutUI(const GURL& url) { +@@ -376,7 +376,7 @@ bool IsAboutUI(const GURL& url) { #if !BUILDFLAG(IS_ANDROID) || url.host_piece() == chrome::kChromeUITermsHost #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) || url.host_piece() == chrome::kChromeUILinuxProxyConfigHost #endif #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -606,7 +606,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -580,7 +580,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 -@@ -662,7 +662,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -636,7 +636,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) -@@ -710,27 +710,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -684,26 +684,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) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#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 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 4d658d2a5552..805bc697315d 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-02-25 20:22:18 UTC +--- chrome/browser/ui/webui/management/management_ui.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/webui/management/management_ui.cc -@@ -98,11 +98,11 @@ content::WebUIDataSource* CreateAndAddManagementUIHtml +@@ -99,11 +99,11 @@ content::WebUIDataSource* CreateAndAddManagementUIHtml {kManagementOnFileTransferVisibleData, IDS_MANAGEMENT_FILE_TRANSFER_VISIBLE_DATA}, #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 new file mode 100644 index 000000000000..7094a7c6db6e --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui__constants.cc @@ -0,0 +1,17 @@ +--- chrome/browser/ui/webui/management/management_ui_constants.cc.orig 2024-06-22 08:49:42 UTC ++++ chrome/browser/ui/webui/management/management_ui_constants.cc +@@ -78,12 +78,12 @@ const char kProfileReportingBrowser[] = "profileReport + const char kProfileReportingExtension[] = "profileReportingExtension"; + const char kProfileReportingPolicy[] = "profileReportingPolicy"; + +-#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__constants.h b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui__constants.h new file mode 100644 index 000000000000..373df9c3548a --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_ui_webui_management_management__ui__constants.h @@ -0,0 +1,19 @@ +--- chrome/browser/ui/webui/management/management_ui_constants.h.orig 2024-06-22 08:49:42 UTC ++++ chrome/browser/ui/webui/management/management_ui_constants.h +@@ -8,14 +8,14 @@ + #include "build/build_config.h" + #include "build/chromeos_buildflags.h" + +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Constants defining the IDs for the localized strings sent to the page as + // load time data. + extern const char kManagementScreenCaptureEvent[]; + extern const char kManagementScreenCaptureData[]; + #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) + extern const char kManagementDeviceSignalsDisclosure[]; + #endif // #if 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 67f0951ba6ff..1d26df7f4f24 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,53 +1,29 @@ ---- chrome/browser/ui/webui/management/management_ui_handler.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/ui/webui/management/management_ui_handler.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/webui/management/management_ui_handler.cc -@@ -95,7 +95,7 @@ - #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" - #endif // BUILDFLAG(IS_CHROMEOS_ASH) +@@ -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) -@@ -191,12 +191,12 @@ enum class ReportingType { - kLegacyTech, - }; - --#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) -@@ -830,7 +830,7 @@ void ManagementUIHandler::AddReportingInfo(base::Value - GetReportingTypeValue(report_definition.reporting_type)); - report_sources->Append(std::move(data)); +@@ -353,7 +353,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(); -@@ -1100,7 +1100,7 @@ base::Value::Dict ManagementUIHandler::GetThreatProtec - &info); - } - --#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - if (capture_policy::IsGetAllScreensMediaAllowedForAnySite(profile)) { - AddThreatProtectionPermission(kManagementScreenCaptureEvent, - kManagementScreenCaptureData, &info); -@@ -1184,7 +1184,7 @@ policy::PolicyService* ManagementUIHandler::GetPolicyS +@@ -525,7 +525,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 f13eebe4d83f..5b38ad6235a2 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,37 +1,20 @@ ---- chrome/browser/ui/webui/management/management_ui_handler.h.orig 2024-02-25 20:22:18 UTC +--- 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 -@@ -24,14 +24,14 @@ - #include "extensions/common/extension_id.h" - #include "url/gurl.h" - --#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Constants defining the IDs for the localized strings sent to the page as - // load time data. - extern const char kManagementScreenCaptureEvent[]; - extern const char kManagementScreenCaptureData[]; - #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) - extern const char kManagementDeviceSignalsDisclosure[]; - #endif // #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - -@@ -119,7 +119,7 @@ class StatusCollector; - class SystemLogUploader; +@@ -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 -@@ -179,7 +179,7 @@ class ManagementUIHandler : public content::WebUIMessa +@@ -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(); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) 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 ddb38b954b6f..1351d322320d 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-05-23 20:04:36 UTC +--- chrome/browser/ui/webui/searchbox/searchbox_handler.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/webui/searchbox/searchbox_handler.cc -@@ -101,7 +101,7 @@ const char* kMacShareIconResourceName = +@@ -105,7 +105,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 -@@ -161,7 +161,7 @@ static void DefineChromeRefreshRealboxIcons() { +@@ -165,7 +165,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 -@@ -662,7 +662,7 @@ std::string SearchboxHandler::ActionVectorIconToResour +@@ -670,7 +670,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 6a30c771d258..85e06710f9fd 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-05-23 20:04:36 UTC +--- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -134,7 +134,7 @@ +@@ -135,7 +135,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 -@@ -153,7 +153,7 @@ +@@ -154,7 +154,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 -@@ -266,7 +266,7 @@ void AddA11yStrings(content::WebUIDataSource* html_sou +@@ -271,7 +271,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", -@@ -404,7 +404,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -411,7 +411,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht {"huge", IDS_SETTINGS_HUGE_FONT_SIZE}, {"sidePanelAlignLeft", IDS_SETTINGS_SIDE_PANEL_ALIGN_LEFT}, {"sidePanelAlignRight", IDS_SETTINGS_SIDE_PANEL_ALIGN_RIGHT}, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"gtkTheme", IDS_SETTINGS_GTK_THEME}, {"useGtkTheme", IDS_SETTINGS_USE_GTK_THEME}, {"qtTheme", IDS_SETTINGS_QT_THEME}, -@@ -414,7 +414,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -421,7 +421,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht #else {"resetToDefaultTheme", IDS_SETTINGS_RESET_TO_DEFAULT_THEME}, #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, #endif #if BUILDFLAG(IS_MAC) -@@ -435,7 +435,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -444,7 +444,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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_visited__url__ranking_visited__url__ranking__service__factory.cc b/www/ungoogled-chromium/files/patch-chrome_browser_visited__url__ranking_visited__url__ranking__service__factory.cc new file mode 100644 index 000000000000..9909ddd0c865 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_visited__url__ranking_visited__url__ranking__service__factory.cc @@ -0,0 +1,20 @@ +--- chrome/browser/visited_url_ranking/visited_url_ranking_service_factory.cc.orig 2024-06-22 08:49:42 UTC ++++ chrome/browser/visited_url_ranking/visited_url_ranking_service_factory.cc +@@ -35,7 +35,7 @@ + #include "components/visited_url_ranking/public/visited_url_ranking_service.h" + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "chrome/browser/visited_url_ranking/desktop_tab_model_url_visit_data_fetcher.h" + #endif + +@@ -80,7 +80,7 @@ VisitedURLRankingServiceFactory::BuildServiceInstanceF + + std::map> data_fetchers; + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + data_fetchers.emplace( + Fetcher::kTabModel, + std::make_unique( diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h index 2a0899732850..7efcebc5ca55 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/os_integration/os_integration_test_override.h.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/web_applications/os_integration/os_integration_test_override.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/web_applications/os_integration/os_integration_test_override.h -@@ -97,7 +97,7 @@ class OsIntegrationTestOverride +@@ -99,7 +99,7 @@ class OsIntegrationTestOverride virtual base::FilePath chrome_apps_folder() = 0; virtual void EnableOrDisablePathOnLogin(const base::FilePath& file_path, bool enable_on_login) = 0; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) virtual base::Environment* environment() = 0; #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc index 8fc193f83ca1..e44cc19e401e 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc @@ -1,20 +1,20 @@ ---- chrome/browser/web_applications/os_integration/web_app_shortcut.cc.orig 2023-09-17 07:59:53 UTC +--- chrome/browser/web_applications/os_integration/web_app_shortcut.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/web_applications/os_integration/web_app_shortcut.cc @@ -65,7 +65,7 @@ namespace { #if BUILDFLAG(IS_MAC) const int kDesiredIconSizesForShortcut[] = {16, 32, 128, 256, 512}; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Linux supports icons of any size. FreeDesktop Icon Theme Specification states // that "Minimally you should install a 48x48 icon in the hicolor theme." const int kDesiredIconSizesForShortcut[] = {16, 32, 48, 128, 256, 512}; @@ -227,7 +227,7 @@ std::unique_ptr BuildShortcutInfoWithout - // TODO(crbug.com/1416965): Implement tests on Linux for using shortcuts_menu + // TODO(crbug.com/40257107): Implement tests on Linux for using shortcuts_menu // actions. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const std::vector& shortcuts_menu_item_infos = CreateShortcutsMenuItemInfos(state.shortcut_menus()); DCHECK_LE(shortcuts_menu_item_infos.size(), kMaxApplicationDockMenuItems); diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h index 256362ff74f4..f0d269c970db 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h @@ -1,38 +1,38 @@ ---- chrome/browser/web_applications/test/os_integration_test_override_impl.h.orig 2024-05-23 20:04:36 UTC +--- chrome/browser/web_applications/test/os_integration_test_override_impl.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/web_applications/test/os_integration_test_override_impl.h @@ -40,7 +40,7 @@ class ShellLinkItem; namespace web_app { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) struct LinuxFileRegistration { base::FilePath file_name; std::string xdg_command; -@@ -116,7 +116,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra +@@ -122,7 +122,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra bool DeleteApplicationMenuDirOnWin(); #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool DeleteDesktopDirOnLinux(); #endif // BUILDFLAG(IS_LINUX) -@@ -235,7 +235,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra +@@ -242,7 +242,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra base::FilePath chrome_apps_folder() override; void EnableOrDisablePathOnLogin(const base::FilePath& file_path, bool enable_on_login) override; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FilePath desktop(); base::FilePath startup(); base::FilePath applications(); -@@ -315,7 +315,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra +@@ -322,7 +322,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra base::ScopedTempDir chrome_apps_folder_; std::map startup_enabled_; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::ScopedTempDir desktop_; base::ScopedTempDir startup_; base::ScopedTempDir xdg_data_home_dir_; diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__helpers.cc b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__helpers.cc index 25d8580d98b4..8d6dde6af1b1 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__helpers.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__helpers.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/web_app_helpers.cc.orig 2024-04-23 07:42:17 UTC +--- chrome/browser/web_applications/web_app_helpers.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/web_applications/web_app_helpers.cc -@@ -146,7 +146,7 @@ bool IsValidWebAppUrl(const GURL& app_url) { +@@ -145,7 +145,7 @@ bool IsValidWebAppUrl(const GURL& app_url) { + return false; bool allow_extension_apps = true; - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Stop allowing apps to be extension urls when the shortcuts are separated - // they can be extension urls instead. allow_extension_apps = diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__install__info.h b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__install__info.h index 2774381c0487..0fcb9117da19 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__install__info.h +++ b/www/ungoogled-chromium/files/patch-chrome_browser_web__applications_web__app__install__info.h @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/web_app_install_info.h.orig 2023-12-23 12:33:28 UTC +--- chrome/browser/web_applications/web_app_install_info.h.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/web_applications/web_app_install_info.h @@ -35,7 +35,7 @@ #include "url/gurl.h" static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)); -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)); +- BUILDFLAG(IS_CHROMEOS)); ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)); namespace web_app { 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 e8f86a6a2753..f8d60a06142c 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-05-23 20:04:36 UTC +--- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/browser/webauthn/chrome_authenticator_request_delegate.cc -@@ -798,7 +798,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureDisc +@@ -916,7 +916,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_browser_webauthn_enclave__manager.cc b/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_enclave__manager.cc new file mode 100644 index 000000000000..5d3a05b75dea --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_browser_webauthn_enclave__manager.cc @@ -0,0 +1,20 @@ +--- chrome/browser/webauthn/enclave_manager.cc.orig 2024-06-22 08:49:42 UTC ++++ chrome/browser/webauthn/enclave_manager.cc +@@ -652,7 +652,7 @@ base::flat_set GetGaiaIDs( + } + + std::string UserVerifyingLabelToString(crypto::UserVerifyingKeyLabel label) { +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return label; + #else + return std::string("placeholder"); +@@ -661,7 +661,7 @@ std::string UserVerifyingLabelToString(crypto::UserVer + + std::optional UserVerifyingKeyLabelFromString( + std::string saved_label) { +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return saved_label; + #else + return std::nullopt; diff --git a/www/ungoogled-chromium/files/patch-chrome_common_channel__info.h b/www/ungoogled-chromium/files/patch-chrome_common_channel__info.h index a77108da13a9..5be4fa1f1657 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_channel__info.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_channel__info.h @@ -1,18 +1,20 @@ ---- chrome/common/channel_info.h.orig 2023-05-05 12:12:41 UTC +--- chrome/common/channel_info.h.orig 2024-06-22 08:49:42 UTC +++ chrome/common/channel_info.h -@@ -104,13 +104,13 @@ void ClearChannelForTesting(); +@@ -12,7 +12,7 @@ + #include "build/build_config.h" + #include "build/chromeos_buildflags.h" + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + namespace base { + class Environment; + } +@@ -100,7 +100,7 @@ void ClearChannelIdForTesting(); std::string GetChannelSuffixForDataDir(); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::string GetChannelSuffixForExtraFlagsEnvVarName(); - #endif - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Returns the channel-specific filename of the desktop shortcut used to launch - // the browser. - std::string GetDesktopName(base::Environment* env); diff --git a/www/ungoogled-chromium/files/patch-chrome_common_channel__info__posix.cc b/www/ungoogled-chromium/files/patch-chrome_common_channel__info__posix.cc index 9662e94e0c59..d9c452fe01cd 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_channel__info__posix.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_channel__info__posix.cc @@ -1,20 +1,20 @@ ---- chrome/common/channel_info_posix.cc.orig 2023-05-05 12:12:41 UTC +--- chrome/common/channel_info_posix.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/common/channel_info_posix.cc -@@ -92,7 +92,7 @@ std::string GetChannelSuffixForDataDir() { +@@ -93,7 +93,7 @@ std::string GetChannelSuffixForDataDir() { } } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::string GetChannelSuffixForExtraFlagsEnvVarName() { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) const auto channel_state = GetChannelImpl(); -@@ -118,7 +118,7 @@ std::string GetChannelSuffixForExtraFlagsEnvVarName() +@@ -121,7 +121,7 @@ std::string GetChannelSuffixForExtraFlagsEnvVarName() - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) std::string GetDesktopName(base::Environment* env) { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) // Google Chrome packaged as a snap is a special case: the application name 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 ba1e6feaf6b8..a6e5613e1ffb 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__features.cc @@ -1,65 +1,65 @@ ---- chrome/common/chrome_features.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/common/chrome_features.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/common/chrome_features.cc @@ -81,7 +81,7 @@ BASE_FEATURE(kUseAdHocSigningForWebAppShims, #endif // BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- 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, @@ -99,7 +99,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. -@@ -300,7 +300,7 @@ BASE_FEATURE(kDesktopPWAsEnforceWebAppSettingsPolicy, +@@ -282,7 +282,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 -@@ -339,7 +339,7 @@ BASE_FEATURE(kDesktopPWAsTabStripSettings, +@@ -324,7 +324,7 @@ BASE_FEATURE(kDesktopPWAsTabStripSettings, + "DesktopPWAsTabStripSettings", base::FEATURE_DISABLED_BY_DEFAULT); - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#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. -@@ -373,7 +373,7 @@ const base::FeatureParam kDnsOverHttpsFallbackPa +@@ -357,7 +357,7 @@ const base::FeatureParam kDnsOverHttpsFallbackPa const base::FeatureParam kDnsOverHttpsShowUiParam{&kDnsOverHttps, "ShowUi", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) true #else false -@@ -905,7 +905,7 @@ BASE_FEATURE(kKAnonymityServiceStorage, +@@ -882,7 +882,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); -@@ -918,7 +918,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit +@@ -895,7 +895,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 bc58c5b5e131..718b9fa3fbbf 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-05-23 20:04:36 UTC +--- chrome/common/chrome_features.h.orig 2024-06-22 08:49:42 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_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- 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) -@@ -220,7 +220,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -197,7 +197,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsPreventClose); + COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings); - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#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); -@@ -552,7 +552,7 @@ BASE_DECLARE_FEATURE(kKAnonymityServiceOHTTPRequests); +@@ -527,7 +527,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; -@@ -560,7 +560,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -535,7 +535,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 8db86abf78a5..8fe404900671 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-05-23 20:04:36 UTC +--- chrome/common/chrome_paths.cc.orig 2024-06-22 08:49:42 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) { } 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) { 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) { #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) { 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; -@@ -609,7 +609,7 @@ bool PathProvider(int key, base::FilePath* result) { - #endif +@@ -599,7 +599,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) -@@ -623,9 +623,12 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -613,9 +613,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 bcaa3c52ef76..0850a36a0c18 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.cc @@ -1,19 +1,19 @@ ---- chrome/common/chrome_switches.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/common/chrome_switches.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/common/chrome_switches.cc -@@ -872,14 +872,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- +@@ -863,14 +863,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- 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"; #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 7516b3588b7b..f34032fb9642 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_chrome__switches.h @@ -1,17 +1,17 @@ ---- chrome/common/chrome_switches.h.orig 2024-05-23 20:04:36 UTC +--- chrome/common/chrome_switches.h.orig 2024-06-22 08:49:42 UTC +++ chrome/common/chrome_switches.h -@@ -275,12 +275,12 @@ extern const char kAllowNaClSocketAPI[]; +@@ -273,12 +273,12 @@ extern const char kAllowNaClSocketAPI[]; #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extern const char kEnableNewAppMenuIcon[]; extern const char kGuest[]; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extern const char kListApps[]; extern const char kProfileBaseName[]; extern const char kProfileManagementAttributes[]; diff --git a/www/ungoogled-chromium/files/patch-chrome_common_media_component__widevine__cdm__hint__file__linux.h b/www/ungoogled-chromium/files/patch-chrome_common_media_component__widevine__cdm__hint__file__linux.h index 7b4bed1176f7..b656296c38c9 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_media_component__widevine__cdm__hint__file__linux.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_media_component__widevine__cdm__hint__file__linux.h @@ -1,11 +1,11 @@ ---- chrome/common/media/component_widevine_cdm_hint_file_linux.h.orig 2024-05-23 20:04:36 UTC +--- chrome/common/media/component_widevine_cdm_hint_file_linux.h.orig 2024-06-22 08:49:42 UTC +++ chrome/common/media/component_widevine_cdm_hint_file_linux.h @@ -17,7 +17,7 @@ - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) #error "This file only applies to desktop Linux and ChromeOS." #endif 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 dca1753420e2..e9c2d791498d 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-05-23 20:04:36 UTC +--- chrome/common/pref_names.h.orig 2024-06-22 08:49:42 UTC +++ chrome/common/pref_names.h -@@ -1299,7 +1299,7 @@ inline constexpr char kUseAshProxy[] = "lacros.proxy.u +@@ -1313,7 +1313,7 @@ inline constexpr char kUseAshProxy[] = "lacros.proxy.u - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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 -@@ -1443,7 +1443,7 @@ inline constexpr char kShowUpdatePromotionInfoBar[] = +@@ -1457,7 +1457,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"; -@@ -2026,7 +2026,7 @@ inline constexpr char kDownloadDefaultDirectory[] = +@@ -2069,7 +2069,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 -@@ -2462,14 +2462,14 @@ inline constexpr char kMediaStorageIdSalt[] = "media.s +@@ -2505,14 +2505,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"; -@@ -2547,7 +2547,7 @@ inline constexpr char kAmbientAuthenticationInPrivateM +@@ -2590,7 +2590,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[] = -@@ -3061,7 +3061,7 @@ inline constexpr char kDeviceWeeklyScheduledSuspend[] +@@ -3104,7 +3104,7 @@ inline constexpr char kDeviceWeeklyScheduledSuspend[] #endif // 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) // Defines administrator-set availability of Chrome for Testing. inline constexpr char kChromeForTestingAllowed[] = "chrome_for_testing.allowed"; #endif -@@ -3626,7 +3626,7 @@ inline constexpr char kFileOrDirectoryPickerWithoutGes +@@ -3673,7 +3673,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[] = -@@ -3675,7 +3675,7 @@ inline constexpr char kCACertificateManagementAllowed[ +@@ -3722,7 +3722,7 @@ inline constexpr char kCACertificateManagementAllowed[ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) inline constexpr char kEnforceLocalAnchorConstraintsEnabled[] = "enforce_local_anchor_constraints_enabled"; #endif -@@ -3974,7 +3974,7 @@ inline constexpr char kPrintingOAuth2AuthorizationServ +@@ -4021,7 +4021,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 a1764bbd32d5..d719e2fac13f 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-05-23 20:04:36 UTC +--- chrome/common/url_constants.h.orig 2024-06-22 08:49:42 UTC +++ chrome/common/url_constants.h -@@ -863,7 +863,7 @@ inline constexpr char kPhoneHubPermissionLearnMoreURL[ +@@ -888,7 +888,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) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#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.cc b/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.cc index d7776004f868..ab035cd12c73 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.cc +++ b/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.cc @@ -1,68 +1,94 @@ ---- chrome/common/webui_url_constants.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/common/webui_url_constants.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/common/webui_url_constants.cc -@@ -516,18 +516,18 @@ const char kOsUISystemURL[] = "os://system"; +@@ -518,18 +518,18 @@ const char kOsUISystemURL[] = "os://system"; const char kOsUIVersionURL[] = "os://version"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kChromeUIWebUIJsErrorHost[] = "webuijserror"; const char kChromeUIWebUIJsErrorURL[] = "chrome://webuijserror/"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) const char kChromeUIConnectorsInternalsHost[] = "connectors-internals"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kChromeUIDiscardsHost[] = "discards"; const char kChromeUIDiscardsURL[] = "chrome://discards/"; #endif -@@ -542,14 +542,14 @@ const char kChromeUILinuxProxyConfigHost[] = "linux-pr +@@ -544,14 +544,14 @@ const char kChromeUILinuxProxyConfigHost[] = "linux-pr #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) const char kChromeUISandboxHost[] = "sandbox"; #endif - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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_FUCHSIA) || \ + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -+ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) ++ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) const char kChromeUIBrowserSwitchHost[] = "browser-switch"; const char kChromeUIBrowserSwitchURL[] = "chrome://browser-switch/"; const char kChromeUIIntroHost[] = "intro"; -@@ -568,7 +568,7 @@ const char kChromeUIProfilePickerUrl[] = "chrome://pro +@@ -570,7 +570,7 @@ const char kChromeUIProfilePickerUrl[] = "chrome://pro const char kChromeUIProfilePickerStartupQuery[] = "startup"; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) const char kChromeUITabModalConfirmDialogHost[] = "tab-modal-confirm-dialog"; -@@ -648,7 +648,7 @@ const char kCookiesSubPagePath[] = "/cookies"; +@@ -649,7 +649,7 @@ const char kTrackingProtectionSubPagePath[] = "/tracki + const char kCookiesSubPagePath[] = "/cookies"; #endif - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#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 kChromeUIWebAppSettingsURL[] = "chrome://app-settings/"; const char kChromeUIWebAppSettingsHost[] = "app-settings"; #endif -@@ -875,7 +875,7 @@ const char* const kChromeDebugURLs[] = { +@@ -795,21 +795,21 @@ const char* const kChromeHostURLs[] = { + kChromeUIAssistantOptInHost, + #endif + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + kChromeUIConnectorsInternalsHost, + #endif + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + kChromeUIDiscardsHost, + #endif +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + kChromeUIWebAppSettingsHost, + #endif + #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) + kChromeUILinuxProxyConfigHost, + #endif + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ +- BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + kChromeUISandboxHost, + #endif + #if BUILDFLAG(IS_WIN) +@@ -876,7 +876,7 @@ const char* const kChromeDebugURLs[] = { blink::kChromeUIGpuJavaCrashURL, kChromeUIJavaCrashURL, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) kChromeUIWebUIJsErrorURL, #endif kChromeUIQuitURL, diff --git a/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.h b/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.h index 118c1ccac2d9..a15ae7200f0f 100644 --- a/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.h +++ b/www/ungoogled-chromium/files/patch-chrome_common_webui__url__constants.h @@ -1,57 +1,56 @@ ---- chrome/common/webui_url_constants.h.orig 2024-05-23 20:04:36 UTC +--- chrome/common/webui_url_constants.h.orig 2024-06-22 08:49:42 UTC +++ chrome/common/webui_url_constants.h -@@ -435,24 +435,24 @@ extern const char kOsUISystemURL[]; +@@ -437,23 +437,23 @@ extern const char kOsUISystemURL[]; extern const char kOsUIVersionURL[]; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kChromeUIWebUIJsErrorHost[]; extern const char kChromeUIWebUIJsErrorURL[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) extern const char kChromeUIConnectorsInternalsHost[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kChromeUIDiscardsHost[]; extern const char kChromeUIDiscardsURL[]; #endif - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) +-#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 kChromeUIWebAppSettingsURL[]; extern const char kChromeUIWebAppSettingsHost[]; #endif -@@ -467,14 +467,14 @@ extern const char kChromeUILinuxProxyConfigHost[]; +@@ -468,14 +468,14 @@ extern const char kChromeUILinuxProxyConfigHost[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) extern const char kChromeUISandboxHost[]; #endif - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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_FUCHSIA) || \ + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -+ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) ++ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) extern const char kChromeUIBrowserSwitchHost[]; extern const char kChromeUIBrowserSwitchURL[]; extern const char kChromeUIIntroHost[]; -@@ -490,7 +490,7 @@ extern const char kChromeUIProfilePickerUrl[]; +@@ -491,7 +491,7 @@ extern const char kChromeUIProfilePickerUrl[]; extern const char kChromeUIProfilePickerStartupQuery[]; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) extern const char kChromeUITabModalConfirmDialogHost[]; diff --git a/www/ungoogled-chromium/files/patch-chrome_services_file__util_public_mojom_safe__document__analyzer__mojom__traits.h b/www/ungoogled-chromium/files/patch-chrome_services_file__util_public_mojom_safe__document__analyzer__mojom__traits.h index 0e738e16aab8..4ae0407ffdad 100644 --- a/www/ungoogled-chromium/files/patch-chrome_services_file__util_public_mojom_safe__document__analyzer__mojom__traits.h +++ b/www/ungoogled-chromium/files/patch-chrome_services_file__util_public_mojom_safe__document__analyzer__mojom__traits.h @@ -1,11 +1,11 @@ ---- chrome/services/file_util/public/mojom/safe_document_analyzer_mojom_traits.h.orig 2023-04-08 11:38:38 UTC +--- chrome/services/file_util/public/mojom/safe_document_analyzer_mojom_traits.h.orig 2024-06-22 08:49:42 UTC +++ chrome/services/file_util/public/mojom/safe_document_analyzer_mojom_traits.h -@@ -16,7 +16,7 @@ +@@ -17,7 +17,7 @@ #include "mojo/public/cpp/bindings/struct_traits.h" #if !BUILDFLAG(FULL_SAFE_BROWSING) || \ - (!BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_WIN)) + (!BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_BSD)) #error FULL_SAFE_BROWSING should be set and either IS_LINUX or IS_WIN set. #endif diff --git a/www/ungoogled-chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc b/www/ungoogled-chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc index 91e76d152d22..ca9a4c8493f2 100644 --- a/www/ungoogled-chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc @@ -1,47 +1,47 @@ ---- chrome/services/printing/print_backend_service_impl.cc.orig 2024-03-22 14:16:19 UTC +--- chrome/services/printing/print_backend_service_impl.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/services/printing/print_backend_service_impl.cc @@ -49,7 +49,7 @@ #include "printing/backend/cups_connection_pool.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/no_destructor.h" #include "ui/linux/linux_ui.h" #include "ui/linux/linux_ui_delegate_stub.h" @@ -76,7 +76,7 @@ namespace printing { namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void InstantiateLinuxUiDelegate() { - // TODO(crbug.com/809738) Until a real UI can be used in a utility process, + // TODO(crbug.com/40561724) Until a real UI can be used in a utility process, // need to use the stub version. @@ -85,7 +85,7 @@ void InstantiateLinuxUiDelegate() { #endif scoped_refptr GetPrintingTaskRunner() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Use task runner associated with equivalent of UI thread. Needed for calls // made through `PrintDialogLinuxInterface` to properly execute. CHECK(base::SequencedTaskRunner::HasCurrentDefault()); @@ -469,7 +469,7 @@ void PrintBackendServiceImpl::Init( // `InitCommon()`. InitializeProcessForPrinting(); print_backend_ = PrintBackend::CreateInstance(locale); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Test framework already initializes the UI, so this should not go in // `InitCommon()`. Additionally, low-level Linux UI is not needed when tests // are using `TestPrintingContext`. @@ -690,7 +690,7 @@ void PrintBackendServiceImpl::UpdatePrintSettings( crash_keys_ = std::make_unique( *printer_name, print_backend_->GetPrinterDriverInfo(*printer_name)); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_CUPS) // Try to fill in advanced settings based upon basic info options. PrinterBasicInfo basic_info; if (print_backend_->GetPrinterBasicInfo(*printer_name, &basic_info) == diff --git a/www/ungoogled-chromium/files/patch-chrome_services_speech_audio__source__fetcher__impl.cc b/www/ungoogled-chromium/files/patch-chrome_services_speech_audio__source__fetcher__impl.cc index dfb431a3d427..25b42e22a861 100644 --- a/www/ungoogled-chromium/files/patch-chrome_services_speech_audio__source__fetcher__impl.cc +++ b/www/ungoogled-chromium/files/patch-chrome_services_speech_audio__source__fetcher__impl.cc @@ -1,11 +1,11 @@ ---- chrome/services/speech/audio_source_fetcher_impl.cc.orig 2024-04-23 07:42:17 UTC +--- chrome/services/speech/audio_source_fetcher_impl.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/services/speech/audio_source_fetcher_impl.cc @@ -132,7 +132,7 @@ void AudioSourceFetcherImpl::Start( - // TODO(crbug.com/1185978): Check implementation / sandbox policy on Mac and + // TODO(crbug.com/40753481): Check implementation / sandbox policy on Mac and // Windows. -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) is_started_ = true; // Initialize the AudioCapturerSource with |this| as the CaptureCallback, // get the parameters for the device ID, then start audio capture. diff --git a/www/ungoogled-chromium/files/patch-chrome_test_base_scoped__channel__override__posix.cc b/www/ungoogled-chromium/files/patch-chrome_test_base_scoped__channel__override__posix.cc new file mode 100644 index 000000000000..b2d8cf2a62b9 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chrome_test_base_scoped__channel__override__posix.cc @@ -0,0 +1,11 @@ +--- chrome/test/base/scoped_channel_override_posix.cc.orig 2024-06-22 08:49:42 UTC ++++ chrome/test/base/scoped_channel_override_posix.cc +@@ -45,7 +45,7 @@ std::string GetVersionExtra(ScopedChannelOverride::Cha + return "beta"; + case ScopedChannelOverride::Channel::kDev: + return "unstable"; +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + case ScopedChannelOverride::Channel::kCanary: + return "canary"; + #endif // BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc b/www/ungoogled-chromium/files/patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc index 984e914d08dd..bb096af138df 100644 --- a/www/ungoogled-chromium/files/patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc +++ b/www/ungoogled-chromium/files/patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc @@ -1,20 +1,20 @@ ---- chrome/test/chromedriver/keycode_text_conversion_unittest.cc.orig 2022-10-01 07:40:07 UTC +--- chrome/test/chromedriver/keycode_text_conversion_unittest.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/test/chromedriver/keycode_text_conversion_unittest.cc @@ -67,7 +67,7 @@ std::string ConvertKeyCodeToTextNoError(ui::KeyboardCo - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) // Fails on bots: crbug.com/174962 #define MAYBE_KeyCodeToText DISABLED_KeyCodeToText #else @@ -104,7 +104,7 @@ TEST(KeycodeTextConversionTest, MAYBE_KeyCodeToText) { - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) // Fails on bots: crbug.com/174962 #define MAYBE_CharToKeyCode DISABLED_CharToKeyCode #else diff --git a/www/ungoogled-chromium/files/patch-chrome_utility_services.cc b/www/ungoogled-chromium/files/patch-chrome_utility_services.cc index 78198ab34249..03317a25d6ae 100644 --- a/www/ungoogled-chromium/files/patch-chrome_utility_services.cc +++ b/www/ungoogled-chromium/files/patch-chrome_utility_services.cc @@ -1,56 +1,65 @@ ---- chrome/utility/services.cc.orig 2024-05-23 20:04:36 UTC +--- chrome/utility/services.cc.orig 2024-06-22 08:49:42 UTC +++ chrome/utility/services.cc -@@ -57,7 +57,7 @@ +@@ -38,7 +38,7 @@ + #include "services/screen_ai/screen_ai_service_impl.h" // nogncheck + #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 "services/passage_embeddings/passage_embeddings_service.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(LINUX) + +@@ -61,7 +61,7 @@ #include "chrome/services/system_signals/mac/mac_system_signals_service.h" #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/services/system_signals/linux/linux_system_signals_service.h" #endif // BUILDFLAG(IS_LINUX) -@@ -78,7 +78,7 @@ +@@ -82,7 +82,7 @@ #include "chrome/services/file_util/file_util_service.h" // nogncheck #endif -#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) +#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) #include "chrome/services/file_util/document_analysis_service.h" // nogncheck #endif -@@ -217,7 +217,7 @@ auto RunMacNotificationService( +@@ -221,7 +221,7 @@ auto RunMacNotificationService( } #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - auto RunSystemSignalsService( - mojo::PendingReceiver + auto RunPassageEmbeddingsService( + mojo::PendingReceiver receiver) { -@@ -277,7 +277,7 @@ auto RunCupsIppParser( +@@ -288,7 +288,7 @@ auto RunCupsIppParser( } #endif -#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) +#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) auto RunDocumentAnalysis( mojo::PendingReceiver receiver) { return std::make_unique(std::move(receiver)); -@@ -483,7 +483,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -494,7 +494,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& services.Add(RunWindowsIconReader); #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + services.Add(RunPassageEmbeddingsService); services.Add(RunSystemSignalsService); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - -@@ -499,7 +499,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -511,7 +511,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& services.Add(RunFileUtil); #endif -#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) +#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) services.Add(RunDocumentAnalysis); #endif diff --git a/www/ungoogled-chromium/files/patch-chromecast_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 new file mode 100644 index 000000000000..c82b2ff6a208 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-chromecast_cast__core_runtime_browser_runtime__application__service__impl.cc @@ -0,0 +1,11 @@ +--- chromecast/cast_core/runtime/browser/runtime_application_service_impl.cc.orig 2024-06-22 08:49:42 UTC ++++ chromecast/cast_core/runtime/browser/runtime_application_service_impl.cc +@@ -335,7 +335,7 @@ CastWebView::Scoped RuntimeApplicationServiceImpl::Cre + GetFlagEntry(feature::kCastCoreIsRemoteControlMode, + config_.extra_features(), /*default_value=*/false); + params->enabled_for_dev = IsEnabledForDev(); +-#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 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 3211ed76f02e..b8dc268b5435 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-05-23 20:04:36 UTC +--- components/autofill/core/browser/payments_data_manager.cc.orig 2024-06-22 08:49:42 UTC +++ components/autofill/core/browser/payments_data_manager.cc -@@ -1060,7 +1060,7 @@ bool PaymentsDataManager::ShouldShowCardsFromAccountOp +@@ -1064,7 +1064,7 @@ bool PaymentsDataManager::ShouldShowCardsFromAccountOp // The feature is only for Linux, Windows, Mac, and Fuchsia. - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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 0dd4fdb792c1..86d72b6862ac 100644 --- a/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc +++ b/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/common/autofill_payments_features.cc.orig 2024-05-23 20:04:36 UTC +--- components/autofill/core/common/autofill_payments_features.cc.orig 2024-06-22 08:49:42 UTC +++ components/autofill/core/common/autofill_payments_features.cc -@@ -272,7 +272,7 @@ BASE_FEATURE(kAutofillEnableVirtualCards, +@@ -257,7 +257,7 @@ BASE_FEATURE(kAutofillEnableVirtualCards, bool ShouldShowImprovedUserConsentForCreditCardSave() { - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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_autofill_core_common_autofill__util.cc b/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__util.cc index b37615313abb..61755c1f0b84 100644 --- a/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__util.cc +++ b/www/ungoogled-chromium/files/patch-components_autofill_core_common_autofill__util.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/common/autofill_util.cc.orig 2024-03-22 14:16:19 UTC +--- components/autofill/core/common/autofill_util.cc.orig 2024-06-22 08:49:42 UTC +++ components/autofill/core/common/autofill_util.cc -@@ -131,7 +131,7 @@ bool SanitizedFieldIsEmpty(const std::u16string& value +@@ -132,7 +132,7 @@ bool SanitizedFieldIsEmpty(const std::u16string& value bool ShouldAutoselectFirstSuggestionOnArrowDown() { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/ungoogled-chromium/files/patch-components_constrained__window_constrained__window__views.cc b/www/ungoogled-chromium/files/patch-components_constrained__window_constrained__window__views.cc index 5fe891ec5aaa..b98bfdda5a24 100644 --- a/www/ungoogled-chromium/files/patch-components_constrained__window_constrained__window__views.cc +++ b/www/ungoogled-chromium/files/patch-components_constrained__window_constrained__window__views.cc @@ -1,11 +1,11 @@ ---- components/constrained_window/constrained_window_views.cc.orig 2024-03-22 14:16:19 UTC +--- components/constrained_window/constrained_window_views.cc.orig 2024-06-22 08:49:42 UTC +++ components/constrained_window/constrained_window_views.cc -@@ -324,7 +324,7 @@ bool SupportsGlobalScreenCoordinates() { +@@ -350,7 +350,7 @@ bool SupportsGlobalScreenCoordinates() { } bool PlatformClipsChildrenToViewport() { -#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/ungoogled-chromium/files/patch-components_crash_core_app_BUILD.gn b/www/ungoogled-chromium/files/patch-components_crash_core_app_BUILD.gn index bf437bf390b6..3d17feba8453 100644 --- a/www/ungoogled-chromium/files/patch-components_crash_core_app_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-components_crash_core_app_BUILD.gn @@ -1,43 +1,43 @@ ---- components/crash/core/app/BUILD.gn.orig 2024-03-22 14:16:19 UTC +--- components/crash/core/app/BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ components/crash/core/app/BUILD.gn @@ -82,6 +82,10 @@ static_library("app") { ] } + if (is_bsd) { + sources -= [ "crashpad.cc" ] + } + defines = [ "CRASH_IMPLEMENTATION" ] public_deps = [ ":lib" ] @@ -95,7 +99,7 @@ static_library("app") { "//third_party/crashpad/crashpad/util", ] - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "crashpad_linux.cc" ] data_deps = [ ":chrome_crashpad_handler" ] } @@ -115,7 +119,7 @@ static_library("app") { libs = [ "log" ] } - if (is_android || is_linux || is_chromeos) { + if ((is_android || is_linux || is_chromeos) && !is_bsd) { deps += [ "//base:base_static", "//components/crash/core/common", -@@ -243,11 +247,6 @@ if (is_mac || is_android || is_linux || is_chromeos) { +@@ -245,11 +249,6 @@ if (is_mac || is_android || is_linux || is_chromeos) { # define custom UserStreamDataSources. executable("chrome_crashpad_handler") { sources = [ "chrome_crashpad_handler.cc" ] - - deps = [ - ":crashpad_handler_main", - "//third_party/crashpad/crashpad/handler", - ] if (is_mac && (is_component_build || is_asan)) { ldflags = [ diff --git a/www/ungoogled-chromium/files/patch-components_discardable__memory_service_discardable__shared__memory__manager.cc b/www/ungoogled-chromium/files/patch-components_discardable__memory_service_discardable__shared__memory__manager.cc index c275c1f059b2..ebe28b169889 100644 --- a/www/ungoogled-chromium/files/patch-components_discardable__memory_service_discardable__shared__memory__manager.cc +++ b/www/ungoogled-chromium/files/patch-components_discardable__memory_service_discardable__shared__memory__manager.cc @@ -1,11 +1,11 @@ ---- components/discardable_memory/service/discardable_shared_memory_manager.cc.orig 2023-12-23 12:33:28 UTC +--- components/discardable_memory/service/discardable_shared_memory_manager.cc.orig 2024-06-22 08:49:42 UTC +++ components/discardable_memory/service/discardable_shared_memory_manager.cc -@@ -172,7 +172,7 @@ uint64_t GetDefaultMemoryLimit() { +@@ -176,7 +176,7 @@ uint64_t GetDefaultMemoryLimit() { // Limits the number of FDs used to 32, assuming a 4MB allocation size. uint64_t max_default_memory_limit = 128 * kMegabyte; #else - uint64_t max_default_memory_limit = 512 * kMegabyte; + uint64_t max_default_memory_limit = 128 * kMegabyte; #endif // Use 1/8th of discardable memory on low-end devices. diff --git a/www/ungoogled-chromium/files/patch-components_embedder__support_user__agent__utils.cc b/www/ungoogled-chromium/files/patch-components_embedder__support_user__agent__utils.cc index ccb070499af6..2052c8760797 100644 --- a/www/ungoogled-chromium/files/patch-components_embedder__support_user__agent__utils.cc +++ b/www/ungoogled-chromium/files/patch-components_embedder__support_user__agent__utils.cc @@ -1,12 +1,12 @@ ---- components/embedder_support/user_agent_utils.cc.orig 2024-02-03 15:42:55 UTC +--- components/embedder_support/user_agent_utils.cc.orig 2024-06-22 08:49:42 UTC +++ components/embedder_support/user_agent_utils.cc -@@ -445,6 +445,9 @@ std::string GetPlatformForUAMetadata() { +@@ -449,6 +449,9 @@ std::string GetPlatformForUAMetadata() { # else return "Chromium OS"; # endif +#elif BUILDFLAG(IS_BSD) + // The internet is weird... + return "Linux"; #else return std::string(version_info::GetOSType()); #endif diff --git a/www/ungoogled-chromium/files/patch-components_embedder__support_user__agent__utils__unittest.cc b/www/ungoogled-chromium/files/patch-components_embedder__support_user__agent__utils__unittest.cc index 578286e72fa2..d8ac3562f822 100644 --- a/www/ungoogled-chromium/files/patch-components_embedder__support_user__agent__utils__unittest.cc +++ b/www/ungoogled-chromium/files/patch-components_embedder__support_user__agent__utils__unittest.cc @@ -1,20 +1,29 @@ ---- components/embedder_support/user_agent_utils_unittest.cc.orig 2023-09-17 07:59:53 UTC +--- components/embedder_support/user_agent_utils_unittest.cc.orig 2024-06-22 08:49:42 UTC +++ components/embedder_support/user_agent_utils_unittest.cc -@@ -84,7 +84,7 @@ const char kDesktop[] = - "Safari/537.36"; - #endif // BUILDFLAG(IS_ANDROID) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - std::string GetMachine() { - struct utsname unixinfo; - uname(&unixinfo); -@@ -192,7 +192,7 @@ void CheckUserAgentStringOrdering(bool mobile_device) - int value; - ASSERT_TRUE(base::StringToInt(pieces[i], &value)); - } +@@ -71,7 +71,7 @@ const char kDesktop[] = + "X11; CrOS x86_64 14541.0.0" + #elif BUILDFLAG(IS_FUCHSIA) + "Fuchsia" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + "X11; Linux x86_64" + #elif BUILDFLAG(IS_MAC) + "Macintosh; Intel Mac OS X 10_15_7" +@@ -171,7 +171,7 @@ void CheckUserAgentStringOrdering(bool mobile_device) + ASSERT_EQ("CrOS", pieces[0]); + ASSERT_EQ("x86_64", pieces[1]); + ASSERT_EQ("14541.0.0", pieces[2]); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Post-UA Reduction there is a single value for Linux: // X11; Linux x86_64 ASSERT_EQ(2u, pieces.size()); - ASSERT_EQ("X11", pieces[0]); +@@ -727,7 +727,7 @@ TEST_F(UserAgentUtilsTest, UserAgentMetadata) { + #endif + #elif BUILDFLAG(IS_ANDROID) + EXPECT_EQ(metadata.platform, "Android"); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + EXPECT_EQ(metadata.platform, "Linux"); + #elif BUILDFLAG(IS_FREEBSD) + EXPECT_EQ(metadata.platform, "FreeBSD"); diff --git a/www/ungoogled-chromium/files/patch-components_eye__dropper_eye__dropper__view.cc b/www/ungoogled-chromium/files/patch-components_eye__dropper_eye__dropper__view.cc index 28d443a86f2f..be6c13b32cfc 100644 --- a/www/ungoogled-chromium/files/patch-components_eye__dropper_eye__dropper__view.cc +++ b/www/ungoogled-chromium/files/patch-components_eye__dropper_eye__dropper__view.cc @@ -1,11 +1,11 @@ ---- components/eye_dropper/eye_dropper_view.cc.orig 2024-02-25 20:22:18 UTC +--- components/eye_dropper/eye_dropper_view.cc.orig 2024-06-22 08:49:42 UTC +++ components/eye_dropper/eye_dropper_view.cc -@@ -200,7 +200,7 @@ EyeDropperView::EyeDropperView(gfx::NativeView parent, +@@ -202,7 +202,7 @@ EyeDropperView::EyeDropperView(gfx::NativeView parent, // EyeDropper/WidgetDelegate. set_owned_by_client(); SetPreferredSize(GetSize()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Use TYPE_MENU for Linux to ensure that the eye dropper view is displayed // above the color picker. views::Widget::InitParams params(views::Widget::InitParams::TYPE_MENU); diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__configurations.cc b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__configurations.cc index c3fe15890809..297a6976696e 100644 --- a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__configurations.cc +++ b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__configurations.cc @@ -1,29 +1,29 @@ ---- components/feature_engagement/public/feature_configurations.cc.orig 2024-05-23 20:04:36 UTC +--- components/feature_engagement/public/feature_configurations.cc.orig 2024-06-22 08:49:42 UTC +++ components/feature_engagement/public/feature_configurations.cc @@ -94,7 +94,7 @@ std::optional CreateNewUserGestureInPro std::optional GetClientSideFeatureConfig( const base::Feature* feature) { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // The IPH bubble for link capturing has a trigger set to ANY so that it // always shows up. The per app specific guardrails are independently stored @@ -113,7 +113,7 @@ std::optional GetClientSideFeatureConfi #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (kIPHPasswordsAccountStorageFeature.name == feature->name) { std::optional config = FeatureConfig(); config->valid = true; -@@ -1392,7 +1392,7 @@ std::optional GetClientSideFeatureConfi +@@ -1498,7 +1498,7 @@ std::optional GetClientSideFeatureConfi #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) if (kIPHAutofillCreditCardBenefitFeature.name == feature->name) { diff --git a/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.cc b/www/ungoogled-chromium/files/patch-components_feature__engagement_public_feature__constants.cc index a20cd8a2444f..1d49cef24a0c 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,29 +1,30 @@ ---- components/feature_engagement/public/feature_constants.cc.orig 2024-05-23 20:04:36 UTC +--- components/feature_engagement/public/feature_constants.cc.orig 2024-06-22 08:49:42 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) - BASE_FEATURE(kIPHBatterySaverModeFeature, - "IPH_BatterySaverMode", - base::FEATURE_ENABLED_BY_DEFAULT); -@@ -577,7 +577,7 @@ BASE_FEATURE(kDefaultBrowserTriggerCriteriaExperiment, - + BASE_FEATURE(kEsbDownloadRowPromoFeature, + "EsbDownloadRowPromo", + base::FEATURE_DISABLED_BY_DEFAULT); +@@ -605,7 +605,8 @@ BASE_FEATURE(kDefaultBrowserTriggerCriteriaExperiment, #endif // BUILDFLAG(IS_IOS) --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + #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", -@@ -712,7 +712,7 @@ BASE_FEATURE(kIPHScalableIphGamingFeature, + base::FEATURE_DISABLED_BY_DEFAULT); +@@ -736,7 +737,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 53e554de7cf6..8a7cde1e1915 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,29 +1,30 @@ ---- components/feature_engagement/public/feature_constants.h.orig 2024-05-23 20:04:36 UTC +--- components/feature_engagement/public/feature_constants.h.orig 2024-06-22 08:49:42 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) + BASE_DECLARE_FEATURE(kEsbDownloadRowPromoFeature); BASE_DECLARE_FEATURE(kIPHBatterySaverModeFeature); BASE_DECLARE_FEATURE(kIPHCompanionSidePanelFeature); - BASE_DECLARE_FEATURE(kIPHCompanionSidePanelRegionSearchFeature); -@@ -242,7 +242,7 @@ BASE_DECLARE_FEATURE(kDefaultBrowserTriggerCriteriaExp - +@@ -252,7 +252,8 @@ BASE_DECLARE_FEATURE(kDefaultBrowserTriggerCriteriaExp #endif // BUILDFLAG(IS_IOS) --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + #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(kIPHAutofillExternalAccountProfileSuggestionFeature); -@@ -293,7 +293,7 @@ BASE_DECLARE_FEATURE(kIPHScalableIphHelpAppBasedTenFea + BASE_DECLARE_FEATURE(kIPHAutofillManualFallbackFeature); +@@ -301,7 +302,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); #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 b6c58c6ad68e..55bc22e837ad 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,29 +1,30 @@ ---- components/feature_engagement/public/feature_list.cc.orig 2024-05-23 20:04:36 UTC +--- components/feature_engagement/public/feature_list.cc.orig 2024-06-22 08:49:42 UTC +++ components/feature_engagement/public/feature_list.cc -@@ -147,7 +147,7 @@ const base::Feature* const kAllFeatures[] = { +@@ -148,7 +148,7 @@ const base::Feature* const kAllFeatures[] = { &kIPHiOSInlineEnhancedSafeBrowsingPromoFeature, #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) + &kEsbDownloadRowPromoFeature, &kIPHBatterySaverModeFeature, &kIPHCompanionSidePanelFeature, - &kIPHCompanionSidePanelRegionSearchFeature, -@@ -201,7 +201,7 @@ const base::Feature* const kAllFeatures[] = { - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || +@@ -211,7 +211,8 @@ const base::Feature* const kAllFeatures[] = { // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + #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, &kIPHAutofillExternalAccountProfileSuggestionFeature, -@@ -252,7 +252,7 @@ const base::Feature* const kAllFeatures[] = { + &kIPHAutofillManualFallbackFeature, +@@ -260,7 +261,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, #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 53df6ea3c51b..03e948e0a5f5 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,56 +1,58 @@ ---- components/feature_engagement/public/feature_list.h.orig 2024-05-23 20:04:36 UTC +--- components/feature_engagement/public/feature_list.h.orig 2024-06-22 08:49:42 UTC +++ components/feature_engagement/public/feature_list.h -@@ -265,7 +265,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSInlineEnhancedSafeBrowsi +@@ -266,7 +266,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSInlineEnhancedSafeBrowsi #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + DEFINE_VARIATION_PARAM(kEsbDownloadRowPromoFeature, "EsbDownloadRowPromo"); DEFINE_VARIATION_PARAM(kIPHBatterySaverModeFeature, "IPH_BatterySaverMode"); DEFINE_VARIATION_PARAM(kIPHCompanionSidePanelFeature, "IPH_CompanionSidePanel"); - DEFINE_VARIATION_PARAM(kIPHCompanionSidePanelRegionSearchFeature, -@@ -358,7 +358,7 @@ DEFINE_VARIATION_PARAM(kIPHBackNavigationMenuFeature, - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || +@@ -370,7 +370,8 @@ DEFINE_VARIATION_PARAM(kIPHBackNavigationMenuFeature, // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + #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"); -@@ -447,7 +447,7 @@ DEFINE_VARIATION_PARAM(kIPHScalableIphHelpAppBasedTenF + DEFINE_VARIATION_PARAM(kIPHAutofillExternalAccountProfileSuggestionFeature, +@@ -457,7 +458,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"); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -595,7 +595,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -606,7 +607,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation VARIATION_ENTRY(kIPHiOSPromoGenericDefaultBrowserFeature), VARIATION_ENTRY(kIPHiOSOverflowMenuCustomizationFeature), #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), -@@ -649,7 +649,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || +@@ -665,7 +666,8 @@ constexpr flags_ui::FeatureEntry::FeatureVariation // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + #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(kIPHAutofillExternalAccountProfileSuggestionFeature), -@@ -700,7 +700,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation + VARIATION_ENTRY(kIPHAutofillManualFallbackFeature), +@@ -714,7 +716,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), #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/ungoogled-chromium/files/patch-components_feed_core_v2_feed__network__impl__unittest.cc b/www/ungoogled-chromium/files/patch-components_feed_core_v2_feed__network__impl__unittest.cc index ad28195004ea..92d0bc480417 100644 --- a/www/ungoogled-chromium/files/patch-components_feed_core_v2_feed__network__impl__unittest.cc +++ b/www/ungoogled-chromium/files/patch-components_feed_core_v2_feed__network__impl__unittest.cc @@ -1,13 +1,13 @@ ---- components/feed/core/v2/feed_network_impl_unittest.cc.orig 2023-12-23 12:33:28 UTC +--- components/feed/core/v2/feed_network_impl_unittest.cc.orig 2024-06-22 08:49:42 UTC +++ components/feed/core/v2/feed_network_impl_unittest.cc -@@ -781,8 +781,8 @@ TEST_F(FeedNetworkTest, SendApiRequest_DecodesClientIn +@@ -753,8 +753,8 @@ TEST_F(FeedNetworkTest, SendApiRequest_DecodesClientIn EXPECT_EQ(feedwire::ClientInfo::CHROME_ANDROID, client_info.app_type()); EXPECT_EQ(feedwire::Version::RELEASE, client_info.app_version().build_type()); - EXPECT_EQ(1, client_info.app_version().major()); - EXPECT_EQ(2, client_info.app_version().minor()); + EXPECT_EQ(1, client_info.app_version().gmajor()); + EXPECT_EQ(2, client_info.app_version().gminor()); EXPECT_EQ(3, client_info.app_version().build()); EXPECT_EQ(4, client_info.app_version().revision()); EXPECT_FALSE(client_info.chrome_client_info().start_surface()); diff --git a/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan.cc b/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan.cc index fafc67016d8e..38b8a1d9a432 100644 --- a/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan.cc +++ b/www/ungoogled-chromium/files/patch-components_gwp__asan_client_gwp__asan.cc @@ -1,11 +1,11 @@ ---- components/gwp_asan/client/gwp_asan.cc.orig 2024-05-23 20:04:36 UTC +--- components/gwp_asan/client/gwp_asan.cc.orig 2024-06-22 08:49:42 UTC +++ components/gwp_asan/client/gwp_asan.cc -@@ -74,7 +74,7 @@ namespace { +@@ -75,7 +75,7 @@ namespace { // ProcessSamplingBoost is the multiplier to increase the // ProcessSamplingProbability in scenarios where we want to perform additional // testing (e.g., on canary/dev builds). -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) constexpr int kDefaultMaxAllocations = 50; constexpr int kDefaultMaxMetadata = 210; constexpr int kDefaultTotalPages = kCpuIs64Bit ? 2048 : kDefaultMaxMetadata * 2; diff --git a/www/ungoogled-chromium/files/patch-components_media__router_common_media__source.cc b/www/ungoogled-chromium/files/patch-components_media__router_common_media__source.cc index 9f190ae4f62c..41b536b004cc 100644 --- a/www/ungoogled-chromium/files/patch-components_media__router_common_media__source.cc +++ b/www/ungoogled-chromium/files/patch-components_media__router_common_media__source.cc @@ -1,11 +1,11 @@ ---- components/media_router/common/media_source.cc.orig 2024-02-25 20:22:18 UTC +--- components/media_router/common/media_source.cc.orig 2024-06-22 08:49:42 UTC +++ components/media_router/common/media_source.cc -@@ -59,7 +59,7 @@ bool IsSystemAudioCaptureSupported() { +@@ -57,7 +57,7 @@ bool IsSystemAudioCaptureSupported() { + if (!media::IsSystemLoopbackCaptureSupported()) { + return false; } - #if BUILDFLAG(IS_MAC) - return base::FeatureList::IsEnabled(media::kMacLoopbackAudioForCast); --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled(media::kPulseaudioLoopbackForCast); #else return true; diff --git a/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc b/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc index e94b1c029044..393cf92d1939 100644 --- a/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc +++ b/www/ungoogled-chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc @@ -1,11 +1,11 @@ ---- components/network_session_configurator/browser/network_session_configurator.cc.orig 2024-04-23 07:42:17 UTC +--- components/network_session_configurator/browser/network_session_configurator.cc.orig 2024-06-22 08:49:42 UTC +++ components/network_session_configurator/browser/network_session_configurator.cc -@@ -817,7 +817,7 @@ net::URLRequestContextBuilder::HttpCacheParams::Type C +@@ -825,7 +825,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 index 2d4f3f63200e..eb785d2159df 100644 --- 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 @@ -1,11 +1,11 @@ ---- components/network_session_configurator/browser/network_session_configurator_unittest.cc.orig 2024-04-23 07:42:17 UTC +--- components/network_session_configurator/browser/network_session_configurator_unittest.cc.orig 2024-06-22 08:49:42 UTC +++ components/network_session_configurator/browser/network_session_configurator_unittest.cc -@@ -781,7 +781,7 @@ TEST_F(NetworkSessionConfiguratorTest, HostRules) { +@@ -782,7 +782,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_paint__preview_player_player__compositor__delegate.cc b/www/ungoogled-chromium/files/patch-components_paint__preview_player_player__compositor__delegate.cc index 3d2e83f72365..36e1c6ad2b23 100644 --- a/www/ungoogled-chromium/files/patch-components_paint__preview_player_player__compositor__delegate.cc +++ b/www/ungoogled-chromium/files/patch-components_paint__preview_player_player__compositor__delegate.cc @@ -1,13 +1,13 @@ ---- components/paint_preview/player/player_compositor_delegate.cc.orig 2024-02-03 15:42:55 UTC +--- components/paint_preview/player/player_compositor_delegate.cc.orig 2024-06-22 08:49:42 UTC +++ components/paint_preview/player/player_compositor_delegate.cc -@@ -455,8 +455,8 @@ void PlayerCompositorDelegate::ValidateProtoAndLoadAXT +@@ -435,8 +435,8 @@ void PlayerCompositorDelegate::ValidateProtoAndLoadAXT auto chrome_version = capture_result_->proto.metadata().chrome_version(); const auto& current_chrome_version = version_info::GetVersion(); if (capture_result_->proto.metadata().has_chrome_version() && - chrome_version.major() == current_chrome_version.components()[0] && - chrome_version.minor() == current_chrome_version.components()[1] && + chrome_version.gmajor() == current_chrome_version.components()[0] && + chrome_version.gminor() == current_chrome_version.components()[1] && chrome_version.build() == current_chrome_version.components()[2] && chrome_version.patch() == current_chrome_version.components()[3]) { paint_preview_service_->GetFileMixin()->GetAXTreeUpdate( 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 b429e7fe6fab..db55e1b2457e 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-05-23 20:04:36 UTC +--- components/password_manager/core/browser/features/password_features.cc.orig 2024-06-22 08:49:42 UTC +++ components/password_manager/core/browser/features/password_features.cc @@ -36,7 +36,7 @@ BASE_FEATURE(kClearUndecryptablePasswords, BASE_FEATURE(kClearUndecryptablePasswordsOnSync, "ClearUndecryptablePasswordsInSync", -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -100,7 +100,7 @@ BASE_FEATURE(kPasswordManualFallbackAvailable, +@@ -98,7 +98,7 @@ BASE_FEATURE(kPasswordManualFallbackAvailable, "PasswordManualFallbackAvailable", 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 9588a5887ec0..8f7277f60f20 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-05-23 20:04:36 UTC +--- components/password_manager/core/browser/features/password_features.h.orig 2024-06-22 08:49:42 UTC +++ components/password_manager/core/browser/features/password_features.h -@@ -88,7 +88,7 @@ BASE_DECLARE_FEATURE(kPasswordManagerLogToTerminal); +@@ -82,7 +82,7 @@ BASE_DECLARE_FEATURE(kPasswordManagerLogToTerminal); // Enables triggering password suggestions through the context menu. BASE_DECLARE_FEATURE(kPasswordManualFallbackAvailable); -#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__form__manager.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__form__manager.cc index 17c00c1b5e0a..21467901de53 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__form__manager.cc +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__form__manager.cc @@ -1,29 +1,29 @@ ---- components/password_manager/core/browser/password_form_manager.cc.orig 2024-05-23 20:04:36 UTC +--- components/password_manager/core/browser/password_form_manager.cc.orig 2024-06-22 08:49:42 UTC +++ components/password_manager/core/browser/password_form_manager.cc @@ -58,7 +58,7 @@ #include "components/webauthn/android/webauthn_cred_man_delegate.h" #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "components/os_crypt/sync/os_crypt.h" #endif @@ -227,7 +227,7 @@ bool ShouldUploadCrowdsourcingVotes(const FormOrDigest return false; } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool ShouldShowKeychainErrorBubble( std::optional backend_error) { if (!backend_error.has_value()) { -@@ -834,7 +834,7 @@ void PasswordFormManager::OnFetchCompleted() { +@@ -869,7 +869,7 @@ void PasswordFormManager::OnFetchCompleted() { error.value().type); } -#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (ShouldShowKeychainErrorBubble( form_fetcher_->GetProfileStoreBackendError())) { client_->NotifyKeychainError(); 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 036f58dfbfce..033ffcea11a4 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-05-23 20:04:36 UTC +--- components/password_manager/core/browser/password_manager_client.h.orig 2024-06-22 08:49:42 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" -@@ -507,7 +507,7 @@ class PasswordManagerClient { +@@ -508,7 +508,7 @@ class PasswordManagerClient { virtual void RefreshPasswordManagerSettingsIfNeeded() const; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Creates and show the cross domain confirmation popup. virtual std::unique_ptr ShowCrossDomainConfirmationPopup(const gfx::RectF& element_bounds, diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager__switches.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager__switches.cc new file mode 100644 index 000000000000..adfc8abd1a94 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager__switches.cc @@ -0,0 +1,11 @@ +--- components/password_manager/core/browser/password_manager_switches.cc.orig 2024-06-22 08:49:42 UTC ++++ components/password_manager/core/browser/password_manager_switches.cc +@@ -6,7 +6,7 @@ + + namespace password_manager { + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Specifies which encryption storage backend to use. Possible values are + // kwallet, kwallet5, kwallet6, gnome-libsecret, basic. + // Any other value will lead to Chrome detecting the best backend automatically. diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager__switches.h b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager__switches.h new file mode 100644 index 000000000000..45495c165479 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manager__switches.h @@ -0,0 +1,11 @@ +--- components/password_manager/core/browser/password_manager_switches.h.orig 2024-06-22 08:49:42 UTC ++++ components/password_manager/core/browser/password_manager_switches.h +@@ -10,7 +10,7 @@ + + namespace password_manager { + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + extern const char kPasswordStore[]; + extern const char kEnableEncryptionSelection[]; + #endif 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 new file mode 100644 index 000000000000..b772acf2ba86 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manual__fallback__flow.cc @@ -0,0 +1,11 @@ +--- components/password_manager/core/browser/password_manual_fallback_flow.cc.orig 2024-06-22 08:49:42 UTC ++++ components/password_manager/core/browser/password_manual_fallback_flow.cc +@@ -192,7 +192,7 @@ void PasswordManualFallbackFlow::DidAcceptSuggestion( + payload.password)); + + #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_password__manual__fallback__flow.h b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manual__fallback__flow.h new file mode 100644 index 000000000000..adb9866cbde5 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__manual__fallback__flow.h @@ -0,0 +1,20 @@ +--- components/password_manager/core/browser/password_manual_fallback_flow.h.orig 2024-06-22 08:49:42 UTC ++++ components/password_manager/core/browser/password_manual_fallback_flow.h +@@ -18,7 +18,7 @@ + #include "components/password_manager/core/browser/ui/saved_passwords_presenter.h" + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "components/password_manager/core/browser/password_cross_domain_confirmation_popup_controller.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || + // BUILDFLAG(IS_CHROMEOS) +@@ -159,7 +159,7 @@ class PasswordManualFallbackFlow : public autofill::Au + std::unique_ptr authenticator_; + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + std::unique_ptr + cross_domain_confirmation_popup_controller_; + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc index 6427ea7ae796..2f5b17fdeebe 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/password_store/login_database_unittest.cc.orig 2024-03-22 14:16:19 UTC +--- components/password_manager/core/browser/password_store/login_database_unittest.cc.orig 2024-06-22 08:49:42 UTC +++ components/password_manager/core/browser/password_store/login_database_unittest.cc -@@ -2105,7 +2105,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCurrent, +@@ -2132,7 +2132,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCurrent, LoginDatabaseMigrationTestBroken, testing::Values(1, 2, 3, 24)); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) class LoginDatabaseUndecryptableLoginsTest : public testing::Test { protected: LoginDatabaseUndecryptableLoginsTest() = default; diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc index 706d37b69c48..8bc6474db775 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/sync/password_sync_bridge.cc.orig 2024-05-23 20:04:36 UTC +--- components/password_manager/core/browser/sync/password_sync_bridge.cc.orig 2024-06-22 08:49:42 UTC +++ components/password_manager/core/browser/sync/password_sync_bridge.cc -@@ -194,7 +194,7 @@ bool ShouldRecoverPasswordsDuringMerge() { +@@ -196,7 +196,7 @@ bool ShouldRecoverPasswordsDuringMerge() { } bool ShouldCleanSyncMetadataDuringStartupWhenDecryptionFails() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return ShouldRecoverPasswordsDuringMerge() && base::FeatureList::IsEnabled( features::kForceInitialSyncWhenDecryptionFails); diff --git a/www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__pref__names.h b/www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__pref__names.h index 972e721cebe1..bf03ef085f34 100644 --- a/www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__pref__names.h +++ b/www/ungoogled-chromium/files/patch-components_password__manager_core_common_password__manager__pref__names.h @@ -1,11 +1,11 @@ ---- components/password_manager/core/common/password_manager_pref_names.h.orig 2024-05-23 20:04:36 UTC +--- components/password_manager/core/common/password_manager_pref_names.h.orig 2024-06-22 08:49:42 UTC +++ components/password_manager/core/common/password_manager_pref_names.h -@@ -320,7 +320,7 @@ inline constexpr char kPasswordManagerPromoCardsList[] +@@ -327,7 +327,7 @@ inline constexpr char kPasswordManagerPromoCardsList[] inline constexpr char kPasswordSharingEnabled[] = "password_manager.password_sharing_enabled"; -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Integer pref indicating how many times relaunch Chrome bubble was dismissed. inline constexpr char kRelaunchChromeBubbleDismissedCounter[] = "password_manager.relaunch_chrome_bubble_dismissed_counter"; diff --git a/www/ungoogled-chromium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc b/www/ungoogled-chromium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc index bfaa56a170a3..2446bf5271a0 100644 --- a/www/ungoogled-chromium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc +++ b/www/ungoogled-chromium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc @@ -1,11 +1,11 @@ ---- components/policy/core/browser/policy_pref_mapping_test.cc.orig 2024-04-23 07:42:17 UTC +--- components/policy/core/browser/policy_pref_mapping_test.cc.orig 2024-06-22 08:49:42 UTC +++ components/policy/core/browser/policy_pref_mapping_test.cc -@@ -413,7 +413,7 @@ class PolicyTestCase { +@@ -411,7 +411,7 @@ class PolicyTestCase { const std::string os("chromeos_lacros"); #elif BUILDFLAG(IS_IOS) const std::string os("ios"); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const std::string os("linux"); #elif BUILDFLAG(IS_MAC) const std::string os("mac"); diff --git a/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc b/www/ungoogled-chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc index b50c2f815ab9..837e251b568b 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-05-23 20:04:36 UTC +--- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2024-06-22 08:49:42 UTC +++ components/policy/core/common/cloud/cloud_policy_client.cc -@@ -597,7 +597,7 @@ void CloudPolicyClient::FetchPolicy(PolicyFetchReason +@@ -647,7 +647,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_content_common_file__type__policies__unittest.cc b/www/ungoogled-chromium/files/patch-components_safe__browsing_content_common_file__type__policies__unittest.cc index 5e39baf441ab..528ef4942bdc 100644 --- a/www/ungoogled-chromium/files/patch-components_safe__browsing_content_common_file__type__policies__unittest.cc +++ b/www/ungoogled-chromium/files/patch-components_safe__browsing_content_common_file__type__policies__unittest.cc @@ -1,11 +1,11 @@ ---- components/safe_browsing/content/common/file_type_policies_unittest.cc.orig 2022-10-01 07:40:07 UTC +--- components/safe_browsing/content/common/file_type_policies_unittest.cc.orig 2024-06-22 08:49:42 UTC +++ components/safe_browsing/content/common/file_type_policies_unittest.cc @@ -139,7 +139,7 @@ TEST_F(FileTypePoliciesTest, UnpackResourceBundle) { EXPECT_EQ(DownloadFileType::FULL_PING, file_type.ping_setting()); - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) EXPECT_EQ(DownloadFileType::ALLOW_ON_USER_GESTURE, file_type.platform_settings(0).danger_level()); EXPECT_EQ(DownloadFileType::DISALLOW_AUTO_OPEN, diff --git a/www/ungoogled-chromium/files/patch-components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc b/www/ungoogled-chromium/files/patch-components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc index 45ff508a433a..7e80fc82ab15 100644 --- a/www/ungoogled-chromium/files/patch-components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc +++ b/www/ungoogled-chromium/files/patch-components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc @@ -1,11 +1,11 @@ ---- components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc.orig 2023-12-23 12:33:28 UTC +--- components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc.orig 2024-06-22 08:49:42 UTC +++ components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc -@@ -113,7 +113,7 @@ std::ostream& operator<<(std::ostream& os, const ListI +@@ -115,7 +115,7 @@ std::ostream& operator<<(std::ostream& os, const ListI PlatformType GetCurrentPlatformType() { #if BUILDFLAG(IS_WIN) return WINDOWS_PLATFORM; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return LINUX_PLATFORM; #elif BUILDFLAG(IS_IOS) return IOS_PLATFORM; 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 6873a8b14375..3f4a227a0d2a 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-05-23 20:04:36 UTC +--- components/safe_browsing/core/common/features.cc.orig 2024-06-22 08:49:42 UTC +++ components/safe_browsing/core/common/features.cc -@@ -133,7 +133,7 @@ BASE_FEATURE(kFriendlierSafeBrowsingSettingsStandardPr +@@ -160,7 +160,7 @@ BASE_FEATURE(kFriendlierSafeBrowsingSettingsStandardPr BASE_FEATURE(kHashPrefixRealTimeLookups, "SafeBrowsingHashPrefixRealTimeLookups", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS) || 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_template__url__service.cc b/www/ungoogled-chromium/files/patch-components_search__engines_template__url__service.cc index c623ee8cbbca..cebfe120822f 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-05-23 20:04:36 UTC +--- components/search_engines/template_url_service.cc.orig 2024-06-22 08:49:42 UTC +++ components/search_engines/template_url_service.cc -@@ -2976,7 +2976,7 @@ bool TemplateURLService::MatchesDefaultSearchProvider( +@@ -3111,7 +3111,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_signin_public_base_signin__switches.cc b/www/ungoogled-chromium/files/patch-components_signin_public_base_signin__switches.cc index 59e871fa1230..b0024ca07c7c 100644 --- a/www/ungoogled-chromium/files/patch-components_signin_public_base_signin__switches.cc +++ b/www/ungoogled-chromium/files/patch-components_signin_public_base_signin__switches.cc @@ -1,20 +1,20 @@ ---- components/signin/public/base/signin_switches.cc.orig 2024-05-23 20:04:36 UTC +--- components/signin/public/base/signin_switches.cc.orig 2024-06-22 08:49:42 UTC +++ components/signin/public/base/signin_switches.cc -@@ -139,7 +139,7 @@ bool IsExplicitBrowserSigninUIOnDesktopEnabled( +@@ -129,7 +129,7 @@ bool IsExplicitBrowserSigninUIOnDesktopEnabled() { } #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kMinorModeRestrictionsForHistorySyncOptIn, "MinorModeRestrictionsForHistorySyncOptIn", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -148,7 +148,7 @@ constexpr int kMinorModeRestrictionsFetchDeadlineDefau +@@ -138,7 +138,7 @@ constexpr int kMinorModeRestrictionsFetchDeadlineDefau #if BUILDFLAG(IS_ANDROID) // Based on Signin.AccountCapabilities.UserVisibleLatency 400; -#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Based on Signin.SyncOptIn.PreSyncConfirmationLatency 900; #elif BUILDFLAG(IS_IOS) diff --git a/www/ungoogled-chromium/files/patch-components_signin_public_base_signin__switches.h b/www/ungoogled-chromium/files/patch-components_signin_public_base_signin__switches.h index 2c7ce959d722..cdf93b0c2aad 100644 --- a/www/ungoogled-chromium/files/patch-components_signin_public_base_signin__switches.h +++ b/www/ungoogled-chromium/files/patch-components_signin_public_base_signin__switches.h @@ -1,11 +1,11 @@ ---- components/signin/public/base/signin_switches.h.orig 2024-05-23 20:04:36 UTC +--- components/signin/public/base/signin_switches.h.orig 2024-06-22 08:49:42 UTC +++ components/signin/public/base/signin_switches.h -@@ -130,7 +130,7 @@ bool IsExplicitBrowserSigninUIOnDesktopEnabled( +@@ -115,7 +115,7 @@ bool IsExplicitBrowserSigninUIOnDesktopEnabled(); // Controls the view mode for (history) sync screen. #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(SIGNIN_SWITCHES) BASE_DECLARE_FEATURE(kMinorModeRestrictionsForHistorySyncOptIn); diff --git a/www/ungoogled-chromium/files/patch-components_soda_soda__util.cc b/www/ungoogled-chromium/files/patch-components_soda_soda__util.cc index 28fd0bd8a6d0..af3feef99b14 100644 --- a/www/ungoogled-chromium/files/patch-components_soda_soda__util.cc +++ b/www/ungoogled-chromium/files/patch-components_soda_soda__util.cc @@ -1,11 +1,29 @@ ---- components/soda/soda_util.cc.orig 2024-05-23 20:04:36 UTC +--- components/soda/soda_util.cc.orig 2024-06-22 08:49:42 UTC +++ components/soda/soda_util.cc -@@ -35,7 +35,7 @@ bool IsOnDeviceSpeechRecognitionSupported() { - } +@@ -20,7 +20,7 @@ + #include "base/win/windows_version.h" #endif +-#if BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_X86_FAMILY) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_FAMILY) + #include "base/cpu.h" + #endif + +@@ -45,7 +45,7 @@ bool IsSupportedChromeOS() { + } + #endif // BUILDFLAG(IS_CHROMEOS) + -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool IsSupportedLinux() { + #if defined(ARCH_CPU_X86_FAMILY) // Check if the CPU has the required instruction set to run the Speech - // On-Device API (SODA) library. - static bool has_sse41 = base::CPU().has_sse41(); +@@ -76,7 +76,7 @@ bool IsSupportedWin() { + bool IsOnDeviceSpeechRecognitionSupported() { + #if BUILDFLAG(IS_CHROMEOS) + return IsSupportedChromeOS(); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return IsSupportedLinux(); + #elif BUILDFLAG(IS_WIN) + return IsSupportedWin(); diff --git a/www/ungoogled-chromium/files/patch-components_supervised__user_core_browser_supervised__user__preferences.cc b/www/ungoogled-chromium/files/patch-components_supervised__user_core_browser_supervised__user__preferences.cc new file mode 100644 index 000000000000..28ddb64e45b8 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_supervised__user_core_browser_supervised__user__preferences.cc @@ -0,0 +1,11 @@ +--- components/supervised_user/core/browser/supervised_user_preferences.cc.orig 2024-06-22 08:49:42 UTC ++++ components/supervised_user/core/browser/supervised_user_preferences.cc +@@ -153,7 +153,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry + static_cast(FirstTimeInterstitialBannerState::kUnknown)); + registry->RegisterBooleanPref(prefs::kChildAccountStatusKnown, false); + #if BUILDFLAG(ENABLE_EXTENSIONS) && \ +- (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)) ++ (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) + registry->RegisterIntegerPref( + prefs::kLocallyParentApprovedExtensionsMigrationState, + static_cast( 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 f681f77fcb78..811cee51926a 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,20 +1,20 @@ ---- components/supervised_user/core/common/features.cc.orig 2024-05-23 20:04:36 UTC +--- components/supervised_user/core/common/features.cc.orig 2024-06-22 08:49:42 UTC +++ components/supervised_user/core/common/features.cc -@@ -62,7 +62,7 @@ BASE_FEATURE(kUpdatedSupervisedUserExtensionApprovalSt +@@ -59,7 +59,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); -@@ -73,7 +73,7 @@ bool IsSupervisedUserSkipParentApprovalToInstallExtens +@@ -70,7 +70,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 = diff --git a/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_features.h b/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_features.h index c3bb43b363e5..17cfaaf11487 100644 --- a/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_features.h +++ b/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_features.h @@ -1,11 +1,11 @@ ---- components/supervised_user/core/common/features.h.orig 2024-05-23 20:04:36 UTC +--- components/supervised_user/core/common/features.h.orig 2024-06-22 08:49:42 UTC +++ components/supervised_user/core/common/features.h -@@ -26,7 +26,7 @@ BASE_DECLARE_FEATURE( +@@ -25,7 +25,7 @@ BASE_DECLARE_FEATURE( // Applies new informative strings during the parental extension approval flow. BASE_DECLARE_FEATURE(kUpdatedSupervisedUserExtensionApprovalStrings); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kEnableExtensionsPermissionsForSupervisedUsersOnDesktop); #endif diff --git a/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_pref__names.h b/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_pref__names.h index 0d4da92f542f..fcc4f04128d0 100644 --- a/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_pref__names.h +++ b/www/ungoogled-chromium/files/patch-components_supervised__user_core_common_pref__names.h @@ -1,11 +1,11 @@ ---- components/supervised_user/core/common/pref_names.h.orig 2024-04-23 07:42:17 UTC +--- components/supervised_user/core/common/pref_names.h.orig 2024-06-22 08:49:42 UTC +++ components/supervised_user/core/common/pref_names.h -@@ -131,7 +131,7 @@ inline constexpr char kFirstTimeInterstitialBannerStat +@@ -136,7 +136,7 @@ inline constexpr char kFirstTimeInterstitialBannerStat "profile.managed.banner_state"; #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) // An integer pref that stores the current state of the local extension // parent approval migration when the feature // `kEnableSupervisedUserSkipParentApprovalToInstallExtensions` becomes enabled. diff --git a/www/ungoogled-chromium/files/patch-components_sync__device__info_local__device__info__util.cc b/www/ungoogled-chromium/files/patch-components_sync__device__info_local__device__info__util.cc index a0f5390ae09d..dae2a2a54f9f 100644 --- a/www/ungoogled-chromium/files/patch-components_sync__device__info_local__device__info__util.cc +++ b/www/ungoogled-chromium/files/patch-components_sync__device__info_local__device__info__util.cc @@ -1,29 +1,29 @@ ---- components/sync_device_info/local_device_info_util.cc.orig 2023-09-17 07:59:53 UTC +--- components/sync_device_info/local_device_info_util.cc.orig 2024-06-22 08:49:42 UTC +++ components/sync_device_info/local_device_info_util.cc -@@ -82,7 +82,7 @@ void OnMachineStatisticsLoaded(LocalDeviceNameInfo* na +@@ -84,7 +84,7 @@ void OnMachineStatisticsLoaded(LocalDeviceNameInfo* na sync_pb::SyncEnums::DeviceType GetLocalDeviceType() { #if BUILDFLAG(IS_CHROMEOS) return sync_pb::SyncEnums_DeviceType_TYPE_CROS; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return sync_pb::SyncEnums_DeviceType_TYPE_LINUX; #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) switch (ui::GetDeviceFormFactor()) { -@@ -107,7 +107,7 @@ DeviceInfo::OsType GetLocalDeviceOSType() { +@@ -109,7 +109,7 @@ DeviceInfo::OsType GetLocalDeviceOSType() { return DeviceInfo::OsType::kChromeOsAsh; #elif BUILDFLAG(IS_CHROMEOS_LACROS) return DeviceInfo::OsType::kChromeOsLacros; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return DeviceInfo::OsType::kLinux; #elif BUILDFLAG(IS_ANDROID) return DeviceInfo::OsType::kAndroid; -@@ -126,7 +126,7 @@ DeviceInfo::OsType GetLocalDeviceOSType() { +@@ -128,7 +128,7 @@ DeviceInfo::OsType GetLocalDeviceOSType() { DeviceInfo::FormFactor GetLocalDeviceFormFactor() { #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return DeviceInfo::FormFactor::kDesktop; #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) return ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET diff --git a/www/ungoogled-chromium/files/patch-components_sync_base_features.cc b/www/ungoogled-chromium/files/patch-components_sync_base_features.cc deleted file mode 100644 index d148e1b02552..000000000000 --- a/www/ungoogled-chromium/files/patch-components_sync_base_features.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- components/sync/base/features.cc.orig 2024-05-23 20:04:36 UTC -+++ components/sync/base/features.cc -@@ -116,7 +116,7 @@ BASE_FEATURE(kEnablePreferencesAccountStorage, - BASE_FEATURE(kSyncPollImmediatelyOnEveryStartup, - "SyncPollImmediatelyOnEveryStartup2", - #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) -+ 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_user__education_views_help__bubble__view.cc b/www/ungoogled-chromium/files/patch-components_user__education_views_help__bubble__view.cc index ca72bc5d9c20..fc7885dd62e0 100644 --- a/www/ungoogled-chromium/files/patch-components_user__education_views_help__bubble__view.cc +++ b/www/ungoogled-chromium/files/patch-components_user__education_views_help__bubble__view.cc @@ -1,11 +1,11 @@ ---- components/user_education/views/help_bubble_view.cc.orig 2024-03-22 14:16:19 UTC +--- components/user_education/views/help_bubble_view.cc.orig 2024-06-22 08:49:42 UTC +++ components/user_education/views/help_bubble_view.cc -@@ -1011,7 +1011,7 @@ gfx::Rect HelpBubbleView::GetAnchorRect() const { +@@ -997,7 +997,7 @@ gfx::Rect HelpBubbleView::GetAnchorRect() const { void HelpBubbleView::OnBeforeBubbleWidgetInit(views::Widget::InitParams* params, views::Widget* widget) const { BubbleDialogDelegateView::OnBeforeBubbleWidgetInit(params, widget); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Help bubbles anchored to menus may be clipped to their anchors' bounds, // resulting in visual errors, unless they use accelerated rendering. See // crbug.com/1445770 for details. diff --git a/www/ungoogled-chromium/files/patch-components_viz_common_features.cc b/www/ungoogled-chromium/files/patch-components_viz_common_features.cc new file mode 100644 index 000000000000..6871d836eb0a --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_viz_common_features.cc @@ -0,0 +1,20 @@ +--- components/viz/common/features.cc.orig 2024-06-22 08:49:42 UTC ++++ components/viz/common/features.cc +@@ -251,7 +251,7 @@ BASE_FEATURE(kBufferQueueImageSetPurgeable, + "BufferQueueImageSetPurgeable", + base::FEATURE_ENABLED_BY_DEFAULT); + +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // On platforms using SkiaOutputDeviceBufferQueue and not yet universally using + // SkiaRenderer-allocated images, when this is true SkiaRenderer will allocate + // and maintain a buffer queue of images for the root render pass, instead of +@@ -535,7 +535,7 @@ bool ShouldOnBeginFrameThrottleVideo() { + return base::FeatureList::IsEnabled(features::kOnBeginFrameThrottleVideo); + } + +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool ShouldRendererAllocateImages() { + return base::FeatureList::IsEnabled(kRendererAllocatesImages); + } diff --git a/www/ungoogled-chromium/files/patch-components_viz_common_features.h b/www/ungoogled-chromium/files/patch-components_viz_common_features.h new file mode 100644 index 000000000000..8c77fdac4f72 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_viz_common_features.h @@ -0,0 +1,20 @@ +--- components/viz/common/features.h.orig 2024-06-22 08:49:42 UTC ++++ components/viz/common/features.h +@@ -74,7 +74,7 @@ VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kDrawPredictedI + VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kAllowUndamagedNonrootRenderPassToSkip); + VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE( + kAllowForceMergeRenderPassWithRequireOverlayQuads); +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kRendererAllocatesImages); + #endif + VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kBufferQueueImageSetPurgeable); +@@ -134,7 +134,7 @@ VIZ_COMMON_EXPORT std::optional IsDynamicSched + VIZ_COMMON_EXPORT std::optional IsDynamicSchedulerEnabledForClients(); + VIZ_COMMON_EXPORT int MaxOverlaysConsidered(); + VIZ_COMMON_EXPORT bool ShouldOnBeginFrameThrottleVideo(); +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + VIZ_COMMON_EXPORT bool ShouldRendererAllocateImages(); + #endif + VIZ_COMMON_EXPORT bool IsOnBeginFrameAcksEnabled(); diff --git a/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__device__buffer__queue.cc b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__device__buffer__queue.cc new file mode 100644 index 000000000000..b799ce0bcb16 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__device__buffer__queue.cc @@ -0,0 +1,11 @@ +--- components/viz/service/display_embedder/skia_output_device_buffer_queue.cc.orig 2024-06-22 08:49:42 UTC ++++ components/viz/service/display_embedder/skia_output_device_buffer_queue.cc +@@ -197,7 +197,7 @@ SkiaOutputDeviceBufferQueue::SkiaOutputDeviceBufferQue + capabilities_.only_invalidates_damage_rect = false; + capabilities_.number_of_buffers = 3; + +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + capabilities_.renderer_allocates_images = + ::features::ShouldRendererAllocateImages(); + #else diff --git a/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc index 67e9aa330152..d643d273220e 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc +++ b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc @@ -1,11 +1,11 @@ ---- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2024-05-23 20:04:36 UTC +--- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2024-06-22 08:49:42 UTC +++ components/viz/service/display_embedder/skia_output_surface_impl.cc -@@ -1503,7 +1503,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor +@@ -1522,7 +1522,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor ->GetVulkanPhysicalDevice(), VK_IMAGE_TILING_OPTIMAL, vk_format, si_format, yuv_color_space, ycbcr_info); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Textures that were allocated _on linux_ with ycbcr info came from // VaapiVideoDecoder, which exports using DRM format modifiers. return GrBackendFormats::MakeVk(gr_ycbcr_info, diff --git a/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_software__output__surface.cc b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_software__output__surface.cc index 61de490e7a76..f567bde9a669 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_software__output__surface.cc +++ b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_software__output__surface.cc @@ -1,20 +1,20 @@ ---- components/viz/service/display_embedder/software_output_surface.cc.orig 2024-02-25 20:22:18 UTC +--- components/viz/service/display_embedder/software_output_surface.cc.orig 2024-06-22 08:49:42 UTC +++ components/viz/service/display_embedder/software_output_surface.cc @@ -124,7 +124,7 @@ void SoftwareOutputSurface::SwapBuffersCallback(base:: now.SnappedToNextTick(refresh_timebase_, refresh_interval_) - now; - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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 (needs_swap_size_notifications_) client_->DidSwapWithSize(pixel_size); #endif @@ -153,7 +153,7 @@ gfx::OverlayTransform SoftwareOutputSurface::GetDispla - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) void SoftwareOutputSurface::SetNeedsSwapSizeNotifications( bool needs_swap_size_notifications) { needs_swap_size_notifications_ = needs_swap_size_notifications; diff --git a/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_software__output__surface.h b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_software__output__surface.h index fca5bb1a540b..a1ce891568ce 100644 --- a/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_software__output__surface.h +++ b/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_software__output__surface.h @@ -1,20 +1,20 @@ ---- components/viz/service/display_embedder/software_output_surface.h.orig 2023-12-23 12:33:28 UTC +--- components/viz/service/display_embedder/software_output_surface.h.orig 2024-06-22 08:49:42 UTC +++ components/viz/service/display_embedder/software_output_surface.h @@ -47,7 +47,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputSurface : publi gfx::OverlayTransform GetDisplayTransform() override; - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) void SetNeedsSwapSizeNotifications( bool needs_swap_size_notifications) override; #endif @@ -70,7 +70,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputSurface : publi - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) bool needs_swap_size_notifications_ = false; #endif 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 addfc0159a37..34a8ea7c4e27 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-05-23 20:04:36 UTC +--- components/viz/service/display/skia_renderer.cc.orig 2024-06-22 08:49:42 UTC +++ components/viz/service/display/skia_renderer.cc -@@ -1478,7 +1478,7 @@ void SkiaRenderer::ClearFramebuffer() { +@@ -1442,7 +1442,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 3feb816a5bb4..d7c8eca86da6 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-05-23 20:04:36 UTC +--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2024-06-22 08:49:42 UTC +++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc @@ -111,7 +111,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); -@@ -654,7 +654,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw +@@ -656,7 +656,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_app_content__main__runner__impl.cc b/www/ungoogled-chromium/files/patch-content_app_content__main__runner__impl.cc index 9659f9663449..563148b0814b 100644 --- a/www/ungoogled-chromium/files/patch-content_app_content__main__runner__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_app_content__main__runner__impl.cc @@ -1,122 +1,129 @@ ---- content/app/content_main_runner_impl.cc.orig 2024-05-23 20:04:36 UTC +--- content/app/content_main_runner_impl.cc.orig 2024-06-22 08:49:42 UTC +++ content/app/content_main_runner_impl.cc -@@ -144,13 +144,13 @@ +@@ -144,18 +144,20 @@ #include "content/browser/posix_file_descriptor_info_impl.h" #include "content/public/common/content_descriptors.h" -#if !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) #include "content/public/common/zygote/zygote_fork_delegate_linux.h" #endif #endif // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/files/file_path_watcher_inotify.h" #include "base/native_library.h" #include "base/rand_util.h" -@@ -188,6 +188,10 @@ + #include "content/public/common/zygote/sandbox_support_linux.h" ++#if !BUILDFLAG(IS_BSD) + #include "sandbox/policy/linux/sandbox_linux.h" ++#endif + #include "third_party/boringssl/src/include/openssl/crypto.h" + #include "third_party/webrtc_overrides/init_webrtc.h" // nogncheck + +@@ -189,6 +191,10 @@ #include "media/base/media_switches.h" #endif +#if BUILDFLAG(IS_BSD) +#include "base/system/sys_info.h" +#endif + #if BUILDFLAG(IS_ANDROID) #include "base/system/sys_info.h" #include "content/browser/android/battery_metrics.h" -@@ -374,7 +378,7 @@ void InitializeZygoteSandboxForBrowserProcess( +@@ -384,7 +390,7 @@ void InitializeZygoteSandboxForBrowserProcess( } #endif // BUILDFLAG(USE_ZYGOTE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if BUILDFLAG(ENABLE_PPAPI) // Loads the (native) libraries but does not initialize them (i.e., does not -@@ -412,7 +416,10 @@ void PreloadLibraryCdms() { +@@ -422,7 +428,10 @@ void PreloadLibraryCdms() { void PreSandboxInit() { // Ensure the /dev/urandom is opened. + // we use arc4random +#if !BUILDFLAG(IS_BSD) base::GetUrandomFD(); +#endif // May use sysinfo(), sched_getaffinity(), and open various /sys/ and /proc/ // files. -@@ -424,9 +431,16 @@ void PreSandboxInit() { +@@ -434,9 +443,16 @@ void PreSandboxInit() { // https://boringssl.9oo91esource.qjz9zk/boringssl/+/HEAD/SANDBOXING.md CRYPTO_pre_sandbox_init(); +#if BUILDFLAG(IS_BSD) + // "cache" the amount of physical memory before pledge(2) + base::SysInfo::AmountOfPhysicalMemoryMB(); +#endif + +#if !BUILDFLAG(IS_BSD) // Pre-read /proc/sys/fs/inotify/max_user_watches so it doesn't have to be // allowed by the sandbox. base::GetMaxNumberOfInotifyWatches(); +#endif #if BUILDFLAG(ENABLE_PPAPI) // Ensure access to the Pepper plugins before the sandbox is turned on. -@@ -837,11 +851,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -847,11 +863,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam base::GlobalDescriptors::kBaseDescriptor); #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) g_fds->Set(kCrashDumpSignal, kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor); -#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || - // BUILDFLAG(IS_OPENBSD) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #endif // !BUILDFLAG(IS_WIN) -@@ -1034,8 +1047,20 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -1038,8 +1053,20 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam process_type == switches::kZygoteProcess) { PreSandboxInit(); } +#elif BUILDFLAG(IS_BSD) + PreSandboxInit(); #endif +#if BUILDFLAG(IS_BSD) + if (process_type.empty()) { + sandbox::policy::SandboxLinux::Options sandbox_options; + sandbox::policy::SandboxLinux::GetInstance()->InitializeSandbox( + sandbox::policy::SandboxTypeFromCommandLine( + *base::CommandLine::ForCurrentProcess()), + sandbox::policy::SandboxLinux::PreSandboxHook(), sandbox_options); + } +#endif + delegate_->SandboxInitialized(process_type); #if BUILDFLAG(USE_ZYGOTE) -@@ -1103,7 +1128,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1114,7 +1141,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { ->ReconfigureAfterFeatureListInit(process_type); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If dynamic Mojo Core is being used, ensure that it's loaded very early in // the child/zygote process, before any sandbox is initialized. The library // is not fully initialized with IPC support until a ChildProcess is later -@@ -1138,6 +1163,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1149,6 +1176,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { content_main_params_.reset(); RegisterMainThreadFactories(); + +#if BUILDFLAG(IS_BSD) + if (!process_type.empty()) + PreSandboxInit(); +#endif if (process_type.empty()) return RunBrowser(std::move(main_params), start_minimal_browser); diff --git a/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn b/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn index fb5729be2bfe..f9bf15e69498 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-content_browser_BUILD.gn @@ -1,16 +1,16 @@ ---- content/browser/BUILD.gn.orig 2024-05-23 20:04:36 UTC +--- content/browser/BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ content/browser/BUILD.gn -@@ -2407,6 +2407,13 @@ source_set("browser") { +@@ -2409,6 +2409,13 @@ source_set("browser") { deps += [ "//media/mojo/mojom/stable:stable_video_decoder" ] } + if (is_bsd) { + sources -= [ + "sandbox_ipc_linux.cc", + "sandbox_ipc_linux.h", + ] + } + if (is_chromeos) { sources += [ "handwriting/handwriting_recognition_service_impl_cros.cc", diff --git a/www/ungoogled-chromium/files/patch-content_browser_browser__child__process__host__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_browser__child__process__host__impl.cc index 7bcb5a05c602..4147a88c26a6 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_browser__child__process__host__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_browser__child__process__host__impl.cc @@ -1,19 +1,19 @@ ---- content/browser/browser_child_process_host_impl.cc.orig 2024-05-23 20:04:36 UTC +--- content/browser/browser_child_process_host_impl.cc.orig 2024-06-22 08:49:42 UTC +++ content/browser/browser_child_process_host_impl.cc -@@ -329,6 +329,7 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo +@@ -330,6 +330,7 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo switches::kMojoCoreLibraryPath, switches::kPerfettoDisableInterning, switches::kTraceToConsole, + switches::kDisableUnveil, }; cmd_line->CopySwitchesFrom(browser_command_line, kForwardSwitches); -@@ -657,7 +658,7 @@ void BrowserChildProcessHostImpl::OnProcessLaunched() +@@ -658,7 +659,7 @@ void BrowserChildProcessHostImpl::OnProcessLaunched() ->child_process()); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) child_thread_type_switcher_.SetPid(process.Pid()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(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 499dc3c72960..2e3f3e233ca8 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-05-23 20:04:36 UTC +--- content/browser/child_process_launcher_helper.h.orig 2024-06-22 08:49:42 UTC +++ content/browser/child_process_launcher_helper.h -@@ -304,7 +304,7 @@ class ChildProcessLauncherHelper +@@ -297,7 +297,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_child__process__launcher__helper__linux.cc b/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper__linux.cc index e22280cc32b2..ff3dbe28c569 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper__linux.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_child__process__launcher__helper__linux.cc @@ -1,125 +1,125 @@ ---- content/browser/child_process_launcher_helper_linux.cc.orig 2024-05-23 20:04:36 UTC +--- content/browser/child_process_launcher_helper_linux.cc.orig 2024-06-22 08:49:42 UTC +++ content/browser/child_process_launcher_helper_linux.cc @@ -22,7 +22,9 @@ #include "content/public/common/result_codes.h" #include "content/public/common/sandboxed_process_launcher_delegate.h" #include "content/public/common/zygote/sandbox_support_linux.h" +#if !BUILDFLAG(IS_BSD) #include "content/public/common/zygote/zygote_handle.h" +#endif #include "sandbox/policy/linux/sandbox_linux.h" namespace content { @@ -47,14 +49,20 @@ ChildProcessLauncherHelper::GetFilesToMap() { } bool ChildProcessLauncherHelper::IsUsingLaunchOptions() { +#if !BUILDFLAG(IS_BSD) return !GetZygoteForLaunch(); +#else + return true; +#endif } bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( PosixFileDescriptorInfo& files_to_register, base::LaunchOptions* options) { if (options) { +#if !BUILDFLAG(IS_BSD) DCHECK(!GetZygoteForLaunch()); +#endif // Convert FD mapping to FileHandleMappingVector options->fds_to_remap = files_to_register.GetMappingWithIDAdjustment( base::GlobalDescriptors::kBaseDescriptor); @@ -66,7 +74,9 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLaunche options->environment = delegate_->GetEnvironment(); } else { +#if !BUILDFLAG(IS_BSD) DCHECK(GetZygoteForLaunch()); +#endif // Environment variables could be supported in the future, but are not // currently supported when launching with the zygote. DCHECK(delegate_->GetEnvironment().empty()); @@ -83,6 +93,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr int* launch_result) { *is_synchronous_launch = true; Process process; +#if !BUILDFLAG(IS_BSD) ZygoteCommunication* zygote_handle = GetZygoteForLaunch(); if (zygote_handle) { - // TODO(crbug.com/569191): If chrome supported multiple zygotes they could + // TODO(crbug.com/40448989): If chrome supported multiple zygotes they could @@ -93,7 +104,6 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr GetProcessType()); *launch_result = LAUNCH_RESULT_SUCCESS; -#if !BUILDFLAG(IS_OPENBSD) if (handle) { // It could be a renderer process or an utility process. int oom_score = content::kMiscOomScore; @@ -102,15 +112,17 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr oom_score = content::kLowestRendererOomScore; ZygoteHostImpl::GetInstance()->AdjustRendererOOMScore(handle, oom_score); } -#endif process.process = base::Process(handle); process.zygote = zygote_handle; } else { +#endif process.process = base::LaunchProcess(*command_line(), *options); *launch_result = process.process.IsValid() ? LAUNCH_RESULT_SUCCESS : LAUNCH_RESULT_FAILURE; +#if !BUILDFLAG(IS_BSD) } +#endif #if BUILDFLAG(IS_CHROMEOS) process_id_ = process.process.Pid(); @@ -134,10 +146,14 @@ ChildProcessTerminationInfo ChildProcessLauncherHelper const ChildProcessLauncherHelper::Process& process, bool known_dead) { ChildProcessTerminationInfo info; +#if !BUILDFLAG(IS_BSD) if (process.zygote) { info.status = process.zygote->GetTerminationStatus( process.process.Handle(), known_dead, &info.exit_code); } else if (known_dead) { +#else + if (known_dead) { +#endif info.status = base::GetKnownDeadTerminationStatus(process.process.Handle(), &info.exit_code); } else { @@ -163,13 +179,17 @@ void ChildProcessLauncherHelper::ForceNormalProcessTer DCHECK(CurrentlyOnProcessLauncherTaskRunner()); process.process.Terminate(RESULT_CODE_NORMAL_EXIT, false); // On POSIX, we must additionally reap the child. +#if !BUILDFLAG(IS_BSD) if (process.zygote) { // If the renderer was created via a zygote, we have to proxy the reaping // through the zygote process. process.zygote->EnsureProcessTerminated(process.process.Handle()); } else { +#endif base::EnsureProcessTerminated(std::move(process.process)); +#if !BUILDFLAG(IS_BSD) } +#endif } void ChildProcessLauncherHelper::SetProcessPriorityOnLauncherThread( @@ -182,11 +202,13 @@ void ChildProcessLauncherHelper::SetProcessPriorityOnL } } +#if !BUILDFLAG(IS_BSD) ZygoteCommunication* ChildProcessLauncherHelper::GetZygoteForLaunch() { return base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoZygote) ? nullptr : delegate_->GetZygote(); } +#endif base::File OpenFileToShare(const base::FilePath& path, base::MemoryMappedFile::Region* region) { diff --git a/www/ungoogled-chromium/files/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc b/www/ungoogled-chromium/files/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc index e0d9f313f207..d44ea6e24a64 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc @@ -1,11 +1,11 @@ ---- content/browser/file_system_access/file_system_access_local_path_watcher.cc.orig 2023-11-04 07:08:51 UTC +--- content/browser/file_system_access/file_system_access_local_path_watcher.cc.orig 2024-06-22 08:49:42 UTC +++ content/browser/file_system_access/file_system_access_local_path_watcher.cc -@@ -63,7 +63,7 @@ void FileSystemAccessLocalPathWatcher::Initialize( - base::FilePathWatcher::WatchOptions watch_options { - .type = scope().IsRecursive() ? base::FilePathWatcher::Type::kRecursive - : base::FilePathWatcher::Type::kNonRecursive, +@@ -64,7 +64,7 @@ void FileSystemAccessLocalPathWatcher::Initialize( + .type = scope().IsRecursive() + ? base::FilePathWatcher::Type::kRecursive + : base::FilePathWatcher::Type::kNonRecursive, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Note: `report_modified_path` is also present on Android - // and Fuchsia. Update this switch if support for watching - // the local file system is added on those platforms. + // Note: `report_modified_path` is also present on Android + // and Fuchsia. Update this switch if support for watching + // the local file system is added on those platforms. diff --git a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl.cc index 706d82082e11..74980ef0639d 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__data__manager__impl.cc @@ -1,11 +1,11 @@ ---- content/browser/gpu/gpu_data_manager_impl.cc.orig 2024-05-23 20:04:36 UTC +--- content/browser/gpu/gpu_data_manager_impl.cc.orig 2024-06-22 08:49:42 UTC +++ content/browser/gpu/gpu_data_manager_impl.cc -@@ -396,7 +396,7 @@ void GpuDataManagerImpl::OnDisplayMetricsChanged( +@@ -397,7 +397,7 @@ void GpuDataManagerImpl::OnDisplayMetricsChanged( private_->OnDisplayMetricsChanged(display, changed_metrics); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool GpuDataManagerImpl::IsGpuMemoryBufferNV12Supported() { base::AutoLock auto_lock(lock_); return private_->IsGpuMemoryBufferNV12Supported(); 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 cdad33beee6d..e15548890702 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-05-23 20:04:36 UTC +--- content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2024-06-22 08:49:42 UTC +++ content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1694,7 +1694,7 @@ void GpuDataManagerImplPrivate::RecordCompositingMode( +@@ -1692,7 +1692,7 @@ void GpuDataManagerImplPrivate::RecordCompositingMode( UMA_HISTOGRAM_ENUMERATION("GPU.CompositingMode", compositing_mode); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool GpuDataManagerImplPrivate::IsGpuMemoryBufferNV12Supported() { return is_gpu_memory_buffer_NV12_supported_; } diff --git a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__process__host.cc b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__process__host.cc index b0a390ab081a..bca049a86111 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__process__host.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_gpu_gpu__process__host.cc @@ -1,19 +1,19 @@ ---- content/browser/gpu/gpu_process_host.cc.orig 2024-05-23 20:04:36 UTC +--- content/browser/gpu/gpu_process_host.cc.orig 2024-06-22 08:49:42 UTC +++ content/browser/gpu/gpu_process_host.cc -@@ -265,6 +265,7 @@ static const char* const kSwitchNames[] = { +@@ -268,6 +268,7 @@ static const char* const kSwitchNames[] = { switches::kEnableLowEndDeviceMode, switches::kDisableSkiaGraphite, switches::kDisableLowEndDeviceMode, + switches::kDisableUnveil, switches::kProfilingAtStart, switches::kProfilingFile, switches::kProfilingFlush, -@@ -292,7 +293,7 @@ static const char* const kSwitchNames[] = { - switches::kDisableExplicitDmaFences, +@@ -295,7 +296,7 @@ static const char* const kSwitchNames[] = { switches::kOzoneDumpFile, + switches::kEnableNativeGpuMemoryBuffers, #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) switches::kX11Display, switches::kNoXshm, #endif diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc index 007003dfe763..950ccd14d110 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc @@ -1,64 +1,64 @@ ---- content/browser/renderer_host/render_process_host_impl.cc.orig 2024-05-23 20:04:36 UTC +--- content/browser/renderer_host/render_process_host_impl.cc.orig 2024-06-22 08:49:42 UTC +++ content/browser/renderer_host/render_process_host_impl.cc -@@ -226,7 +226,7 @@ +@@ -224,7 +224,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 -@@ -968,7 +968,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = +@@ -965,7 +965,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; -@@ -1154,7 +1154,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1151,7 +1151,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public IOThreadHostImpl& operator=(const IOThreadHostImpl& other) = delete; void 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) } -@@ -1171,7 +1171,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1168,7 +1168,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (auto font_receiver = receiver.As()) { ConnectToFontService(std::move(font_receiver)); return; -@@ -1265,7 +1265,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1262,7 +1262,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public std::unique_ptr binders_; mojo::Receiver receiver_{this}; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::Remote video_encode_accelerator_factory_remote_; ChildThreadTypeSwitcher child_thread_type_switcher_; -@@ -3363,7 +3363,7 @@ void RenderProcessHostImpl::AppendRendererCommandLine( +@@ -3380,7 +3380,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() && -@@ -3422,6 +3422,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin +@@ -3438,6 +3438,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin switches::kDisableSpeechAPI, switches::kDisableThreadedCompositing, switches::kDisableTouchDragDrop, + switches::kDisableUnveil, switches::kDisableV8IdleTasks, switches::kDisableVideoCaptureUseGpuMemoryBuffer, switches::kDisableWebGLImageChromium, diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.h b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.h index 94c174f330e1..ded7a5499115 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.h +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__process__host__impl.h @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/render_process_host_impl.h.orig 2024-05-23 20:04:36 UTC +--- content/browser/renderer_host/render_process_host_impl.h.orig 2024-06-22 08:49:42 UTC +++ content/browser/renderer_host/render_process_host_impl.h -@@ -592,7 +592,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -599,7 +599,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // Sets this RenderProcessHost to be guest only. For Testing only. void SetForGuestsOnlyForTesting(); -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) // Launch the zygote early in the browser startup. static void EarlyZygoteLaunch(); #endif // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__view__host__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__view__host__impl.cc index 140ff6c7237e..c4c062ec33aa 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-04-23 07:42:17 UTC +--- content/browser/renderer_host/render_view_host_impl.cc.orig 2024-06-22 08:49:42 UTC +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -272,7 +272,7 @@ void RenderViewHostImpl::GetPlatformSpecificPrefs( +@@ -271,7 +271,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_renderer__host_render__widget__host__view__aura.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc index 44e85c8724e1..3059fb260f12 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc @@ -1,47 +1,47 @@ ---- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2024-05-23 20:04:36 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2024-06-22 08:49:42 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.cc @@ -120,7 +120,7 @@ #include "ui/gfx/gdi_util.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "content/browser/accessibility/browser_accessibility_auralinux.h" #include "ui/base/ime/linux/text_edit_command_auralinux.h" #include "ui/base/ime/text_input_flags.h" -@@ -453,7 +453,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge +@@ -469,7 +469,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge return ToBrowserAccessibilityWin(manager->GetBrowserAccessibilityRoot()) ->GetCOM(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BrowserAccessibilityManager* manager = host()->GetOrCreateRootBrowserAccessibilityManager(); if (manager && manager->GetBrowserAccessibilityRoot()) -@@ -1704,7 +1704,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { +@@ -1730,7 +1730,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { return host() && host()->delegate() && host()->delegate()->ShouldDoLearning(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool RenderWidgetHostViewAura::SetCompositionFromExistingText( const gfx::Range& range, const std::vector& ui_ime_text_spans) { -@@ -2537,7 +2537,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { +@@ -2561,7 +2561,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { } bool RenderWidgetHostViewAura::NeedsMouseCapture() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) return NeedsInputGrab(); #else return false; -@@ -2721,7 +2721,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit +@@ -2745,7 +2745,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit if (!target_host) return; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* linux_ui = ui::LinuxUi::instance(); std::vector commands; if (!event.skip_if_unhandled && linux_ui && event.os_event && diff --git a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__event__handler.cc b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__event__handler.cc index 634e7b5df1a8..60456b32342f 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__event__handler.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_renderer__host_render__widget__host__view__event__handler.cc @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/render_widget_host_view_event_handler.cc.orig 2024-02-03 15:42:55 UTC +--- content/browser/renderer_host/render_widget_host_view_event_handler.cc.orig 2024-06-22 08:49:42 UTC +++ content/browser/renderer_host/render_widget_host_view_event_handler.cc -@@ -599,7 +599,7 @@ bool RenderWidgetHostViewEventHandler::CanRendererHand +@@ -596,7 +596,7 @@ bool RenderWidgetHostViewEventHandler::CanRendererHand if (event->type() == ui::ET_MOUSE_EXITED) { if (mouse_locked || selection_popup) return false; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Don't forward the mouse leave message which is received when the context // menu is displayed by the page. This confuses the page and causes state // changes. diff --git a/www/ungoogled-chromium/files/patch-content_browser_scheduler_responsiveness_jank__monitor__impl.cc b/www/ungoogled-chromium/files/patch-content_browser_scheduler_responsiveness_jank__monitor__impl.cc index 497d2b7d4ab8..343177b21f87 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_scheduler_responsiveness_jank__monitor__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_scheduler_responsiveness_jank__monitor__impl.cc @@ -1,11 +1,11 @@ ---- content/browser/scheduler/responsiveness/jank_monitor_impl.cc.orig 2023-08-18 10:26:52 UTC +--- content/browser/scheduler/responsiveness/jank_monitor_impl.cc.orig 2024-06-22 08:49:42 UTC +++ content/browser/scheduler/responsiveness/jank_monitor_impl.cc -@@ -340,7 +340,7 @@ void JankMonitorImpl::ThreadExecutionState::DidRunTask +@@ -339,7 +339,7 @@ void JankMonitorImpl::ThreadExecutionState::DidRunTask // in context menus, among others). Simply ignore the mismatches for now. // See https://crbug.com/929813 for the details of why the mismatch // happens. -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) && \ BUILDFLAG(IS_OZONE) task_execution_metadata_.clear(); #endif 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 a1a8b41a238e..d04b6cd46397 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,82 +1,82 @@ ---- content/browser/utility_process_host.cc.orig 2024-05-23 20:04:36 UTC +--- content/browser/utility_process_host.cc.orig 2024-06-22 08:49:42 UTC +++ content/browser/utility_process_host.cc @@ -61,7 +61,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 @@ +@@ -74,7 +74,7 @@ #include "services/network/public/mojom/network_service.mojom.h" #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) #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 { +@@ -85,7 +85,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; @@ -150,7 +150,7 @@ UtilityProcessHost::UtilityProcessHost(std::unique_ptr started_(false), 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) allowed_gpu_(false), gpu_client_(nullptr, base::OnTaskRunnerDeleter(nullptr)), #endif @@ -209,7 +209,7 @@ void UtilityProcessHost::SetPreloadLibraries( #endif // BUILDFLAG(IS_WIN) 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) allowed_gpu_ = true; #endif } @@ -349,6 +349,9 @@ bool UtilityProcessHost::StartProcess() { switches::kFailAudioStreamCreation, switches::kMuteAudio, switches::kUseFileForFakeAudioCapture, +#if BUILDFLAG(IS_BSD) + switches::kAudioBackend, +#endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) || \ BUILDFLAG(IS_SOLARIS) switches::kAlsaInputDevice, @@ -409,7 +412,7 @@ bool UtilityProcessHost::StartProcess() { - file_data_->files_to_preload.merge(GetV8SnapshotFilesToPreload()); + 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) { @@ -420,13 +423,13 @@ bool UtilityProcessHost::StartProcess() { } #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || 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_v8__snapshot__files.cc b/www/ungoogled-chromium/files/patch-content_browser_v8__snapshot__files.cc index 814f3fe9a2f5..e17e5e5e100b 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_v8__snapshot__files.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_v8__snapshot__files.cc @@ -1,11 +1,11 @@ ---- content/browser/v8_snapshot_files.cc.orig 2023-03-10 11:01:21 UTC +--- content/browser/v8_snapshot_files.cc.orig 2024-06-22 08:49:42 UTC +++ content/browser/v8_snapshot_files.cc -@@ -13,7 +13,7 @@ namespace content { +@@ -17,7 +17,7 @@ namespace content { std::map> - GetV8SnapshotFilesToPreload() { + GetV8SnapshotFilesToPreload(base::CommandLine& process_command_line) { std::map> files; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if BUILDFLAG(USE_V8_CONTEXT_SNAPSHOT) files[kV8ContextSnapshotDataDescriptor] = base::FilePath( FILE_PATH_LITERAL(BUILDFLAG(V8_CONTEXT_SNAPSHOT_FILENAME))); 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 175616513732..013af0e77451 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-05-23 20:04:36 UTC +--- content/browser/web_contents/web_contents_view_aura.cc.orig 2024-06-22 08:49:42 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. -@@ -1334,7 +1334,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* +@@ -1333,7 +1333,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* // Linux window managers like to handle raise-on-click themselves. If we // raise-on-click manually, this may override user settings that prevent // focus-stealing. -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // It is possible for the web-contents to be destroyed while it is being // activated. Use a weak-ptr to track whether that happened or not. // More in https://crbug.com/1040725 diff --git a/www/ungoogled-chromium/files/patch-content_browser_webui_web__ui__main__frame__observer.cc b/www/ungoogled-chromium/files/patch-content_browser_webui_web__ui__main__frame__observer.cc index cc5c177de3d1..f391c31df98e 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_webui_web__ui__main__frame__observer.cc +++ b/www/ungoogled-chromium/files/patch-content_browser_webui_web__ui__main__frame__observer.cc @@ -1,38 +1,38 @@ ---- content/browser/webui/web_ui_main_frame_observer.cc.orig 2023-06-05 19:39:05 UTC +--- content/browser/webui/web_ui_main_frame_observer.cc.orig 2024-06-22 08:49:42 UTC +++ content/browser/webui/web_ui_main_frame_observer.cc @@ -13,7 +13,7 @@ #include "content/public/browser/navigation_handle.h" #include "content/public/browser/web_ui_controller.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/feature_list.h" #include "base/functional/callback_helpers.h" #include "base/logging.h" @@ -31,7 +31,7 @@ namespace content { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Remove the pieces of the URL we don't want to send back with the error // reports. In particular, do not send query or fragments as those can have // privacy-sensitive information in them. @@ -55,7 +55,7 @@ WebUIMainFrameObserver::WebUIMainFrameObserver(WebUIIm WebUIMainFrameObserver::~WebUIMainFrameObserver() = default; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void WebUIMainFrameObserver::OnDidAddMessageToConsole( RenderFrameHost* source_frame, blink::mojom::ConsoleMessageLevel log_level, @@ -167,7 +167,7 @@ void WebUIMainFrameObserver::ReadyToCommitNavigation( - // TODO(crbug.com/1129544) This is currently disabled due to Windows DLL + // TODO(crbug.com/40149439) This is currently disabled due to Windows DLL // thunking issues. Fix & re-enable. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) MaybeEnableWebUIJavaScriptErrorReporting(navigation_handle); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) } diff --git a/www/ungoogled-chromium/files/patch-content_browser_webui_web__ui__main__frame__observer.h b/www/ungoogled-chromium/files/patch-content_browser_webui_web__ui__main__frame__observer.h index 1299e6cfde90..3607ceb48604 100644 --- a/www/ungoogled-chromium/files/patch-content_browser_webui_web__ui__main__frame__observer.h +++ b/www/ungoogled-chromium/files/patch-content_browser_webui_web__ui__main__frame__observer.h @@ -1,20 +1,20 @@ ---- content/browser/webui/web_ui_main_frame_observer.h.orig 2022-10-01 07:40:07 UTC +--- content/browser/webui/web_ui_main_frame_observer.h.orig 2024-06-22 08:49:42 UTC +++ content/browser/webui/web_ui_main_frame_observer.h @@ -44,7 +44,7 @@ class CONTENT_EXPORT WebUIMainFrameObserver : public W - // TODO(crbug.com/1129544) This is currently disabled due to Windows DLL + // TODO(crbug.com/40149439) This is currently disabled due to Windows DLL // thunking issues. Fix & re-enable. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On official Google builds, capture and report JavaScript error messages on // WebUI surfaces back to Google. This allows us to fix JavaScript errors and // exceptions. @@ -60,7 +60,7 @@ class CONTENT_EXPORT WebUIMainFrameObserver : public W void ReadyToCommitNavigation(NavigationHandle* navigation_handle) override; private: -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void MaybeEnableWebUIJavaScriptErrorReporting( NavigationHandle* navigation_handle); diff --git a/www/ungoogled-chromium/files/patch-content_common_BUILD.gn b/www/ungoogled-chromium/files/patch-content_common_BUILD.gn index 4bd565e7a6fd..145d61336b7b 100644 --- a/www/ungoogled-chromium/files/patch-content_common_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-content_common_BUILD.gn @@ -1,36 +1,36 @@ ---- content/common/BUILD.gn.orig 2024-04-23 07:42:17 UTC +--- content/common/BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ content/common/BUILD.gn -@@ -444,19 +444,28 @@ source_set("common") { +@@ -448,19 +448,28 @@ source_set("common") { } if (is_linux || is_chromeos) { - sources += [ - "gpu_pre_sandbox_hook_linux.cc", - "gpu_pre_sandbox_hook_linux.h", - ] + if (is_bsd) { + sources += [ + "gpu_pre_sandbox_hook_bsd.cc", + "gpu_pre_sandbox_hook_bsd.h", + ] + } else { + sources += [ + "gpu_pre_sandbox_hook_linux.cc", + "gpu_pre_sandbox_hook_linux.h", + ] + } public_deps += [ "//sandbox/policy" ] deps += [ ":sandbox_support_linux", "//media/gpu:buildflags", "//sandbox/linux:sandbox_services", - "//sandbox/linux:seccomp_bpf", "//sandbox/policy:chromecast_sandbox_allowlist_buildflags", "//third_party/fontconfig", ] + if (use_seccomp_bpf) { + deps += [ "//sandbox/linux:seccomp_bpf" ] + } if (use_v4l2_codec) { deps += [ "//media/gpu/v4l2" ] } diff --git a/www/ungoogled-chromium/files/patch-content_common_features.cc b/www/ungoogled-chromium/files/patch-content_common_features.cc index eeac6c542b26..3645c17d6721 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-05-23 20:04:36 UTC +--- content/common/features.cc.orig 2024-06-22 08:49:42 UTC +++ content/common/features.cc -@@ -162,7 +162,7 @@ BASE_FEATURE(kEnableBackForwardCacheForOngoingSubframe - base::FEATURE_DISABLED_BY_DEFAULT); +@@ -164,7 +164,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); -@@ -258,7 +258,7 @@ BASE_FEATURE(kGroupNIKByJoiningOrigin, +@@ -253,7 +253,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 b1254c043a5e..43c743726899 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-05-23 20:04:36 UTC +--- content/common/features.h.orig 2024-06-22 08:49:42 UTC +++ content/common/features.h -@@ -37,7 +37,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kDocumentPolicyNeg +@@ -36,7 +36,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(kEnsureAllowBindingsIsAlwaysForWebUI); -@@ -61,7 +61,7 @@ CONTENT_EXPORT extern const base::FeatureParam + CONTENT_EXPORT BASE_DECLARE_FEATURE(kEmbeddingRequiresOptIn); +@@ -59,7 +59,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 967c74da5280..d6464213aabe 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-05-23 20:04:36 UTC +--- content/gpu/gpu_main.cc.orig 2024-06-22 08:49:42 UTC +++ content/gpu/gpu_main.cc -@@ -93,10 +93,14 @@ +@@ -94,10 +94,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 -@@ -116,7 +120,7 @@ namespace content { +@@ -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&); -@@ -181,7 +185,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel +@@ -182,7 +186,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_); -@@ -293,7 +297,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -291,7 +295,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 -@@ -315,7 +319,8 @@ int GpuMain(MainFunctionParams parameters) { +@@ -313,7 +317,8 @@ int GpuMain(MainFunctionParams parameters) { base::PlatformThread::SetName("CrGpuMain"); -#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. -@@ -442,7 +447,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -443,7 +448,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) { -@@ -482,7 +487,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo +@@ -483,7 +488,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 d587b0eb07c9..2f011331e358 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-05-23 20:04:36 UTC +--- content/public/browser/content_browser_client.cc.orig 2024-06-22 08:49:42 UTC +++ content/public/browser/content_browser_client.cc -@@ -1293,7 +1293,7 @@ bool ContentBrowserClient::ShouldRunOutOfProcessSystem +@@ -1303,7 +1303,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_common_content__features.cc b/www/ungoogled-chromium/files/patch-content_public_common_content__features.cc index f84c3db1e137..ee55d837c720 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-05-23 20:04:36 UTC +--- content/public/common/content_features.cc.orig 2024-06-22 08:49:42 UTC +++ content/public/common/content_features.cc -@@ -28,7 +28,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, - // TODO(crbug.com/1052397): Remove !IS_CHROMEOS_LACROS once lacros starts being +@@ -29,7 +29,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 -@@ -1085,9 +1085,9 @@ BASE_FEATURE(kWebAssemblyTiering, +@@ -1076,9 +1076,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 -@@ -1128,7 +1128,11 @@ BASE_FEATURE(kWebUICodeCache, +@@ -1115,7 +1115,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 4f153365d383..b5097ec3b25f 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-05-23 20:04:36 UTC +--- content/public/common/content_switches.cc.orig 2024-06-22 08:49:42 UTC +++ content/public/common/content_switches.cc -@@ -362,6 +362,8 @@ const char kEnableIsolatedWebAppsInRenderer[] = +@@ -352,6 +352,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. -@@ -993,7 +995,7 @@ const char kPreventResizingContentsForTesting[] = +@@ -990,7 +992,7 @@ const char kPreventResizingContentsForTesting[] = - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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 1363122e9fe1..3cd23e9dad6c 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-05-23 20:04:36 UTC +--- content/public/common/content_switches.h.orig 2024-06-22 08:49:42 UTC +++ content/public/common/content_switches.h -@@ -112,6 +112,7 @@ CONTENT_EXPORT extern const char kEnableGpuMemoryBuffe +@@ -111,6 +111,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 +@@ -268,7 +269,7 @@ CONTENT_EXPORT extern const char kPreventResizingConte - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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_media_gpu_gpu__video__accelerator__factories__impl.cc b/www/ungoogled-chromium/files/patch-content_renderer_media_gpu_gpu__video__accelerator__factories__impl.cc index 2d5644a7f8d8..501b736e812c 100644 --- a/www/ungoogled-chromium/files/patch-content_renderer_media_gpu_gpu__video__accelerator__factories__impl.cc +++ b/www/ungoogled-chromium/files/patch-content_renderer_media_gpu_gpu__video__accelerator__factories__impl.cc @@ -1,11 +1,11 @@ ---- content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc.orig 2024-05-23 20:04:36 UTC +--- content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc.orig 2024-06-22 08:49:42 UTC +++ content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc -@@ -57,7 +57,7 @@ bool UseSingleNV12() { +@@ -47,7 +47,7 @@ bool UseSingleNV12() { #else static BASE_FEATURE(kUseSingleNV12ForSoftwareGMB, "UseSingleNV12ForSoftwareGMB", -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT); #else base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/www/ungoogled-chromium/files/patch-content_renderer_render__thread__impl.cc b/www/ungoogled-chromium/files/patch-content_renderer_render__thread__impl.cc index 44cd707ba04e..f0c7a700770d 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-05-23 20:04:36 UTC +--- content/renderer/render_thread_impl.cc.orig 2024-06-22 08:49:42 UTC +++ content/renderer/render_thread_impl.cc @@ -206,6 +206,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_BSD) +#include #else #include #endif -@@ -999,7 +1001,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1000,7 +1002,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: kGpuStreamIdMedia, kGpuStreamPriorityMedia); const bool enable_video_decode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled(media::kVaapiVideoDecodeLinux) && #endif // BUILDFLAG(IS_LINUX) !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) && -@@ -1008,7 +1010,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1009,7 +1011,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: gpu::kGpuFeatureStatusEnabled); const bool enable_video_encode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled(media::kVaapiVideoEncodeLinux) && #else !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoEncode) && -@@ -1751,7 +1753,7 @@ std::unique_ptr RenderThreadImpl::Create +@@ -1752,7 +1754,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_shell_BUILD.gn b/www/ungoogled-chromium/files/patch-content_shell_BUILD.gn index 8ccac1eeba31..ac9c22644c22 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-05-23 20:04:36 UTC +--- content/shell/BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ content/shell/BUILD.gn -@@ -1054,7 +1054,7 @@ group("content_shell_crash_test") { +@@ -1091,7 +1091,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_utility_utility__main.cc b/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc index d5fa8851ef72..e7e4191f85d2 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,128 @@ ---- content/utility/utility_main.cc.orig 2024-05-23 20:04:36 UTC +--- content/utility/utility_main.cc.orig 2024-06-22 08:49:42 UTC +++ content/utility/utility_main.cc @@ -38,17 +38,21 @@ #include "third_party/icu/source/common/unicode/unistr.h" #include "third_party/icu/source/i18n/unicode/timezone.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/file_descriptor_store.h" #include "base/files/file_util.h" #include "base/pickle.h" #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 @@ -60,10 +64,15 @@ #endif #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#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" @@ -75,7 +84,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 @@ -102,7 +111,7 @@ namespace content { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::vector GetNetworkContextsParentDirectories() { base::MemoryMappedFile::Region region; base::ScopedFD read_pipe_fd = base::FileDescriptorStore::GetInstance().TakeFD( @@ -129,9 +138,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; @@ -146,6 +156,7 @@ bool ShouldUseAmdGpuPolicy(sandbox::mojom::Sandbox san return false; } +#endif #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) -@@ -251,7 +262,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 -@@ -263,7 +275,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. -@@ -301,7 +313,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -300,7 +312,7 @@ int UtilityMain(MainFunctionParams parameters) { screen_ai::GetBinaryPathSwitch())); break; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) case sandbox::mojom::Sandbox::kHardwareVideoDecoding: pre_sandbox_hook = base::BindOnce(&media::HardwareVideoDecodingPreSandboxHook); -@@ -328,6 +340,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -327,6 +339,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 = -@@ -335,6 +348,11 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -334,6 +347,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-content_zygote_zygote__linux.cc b/www/ungoogled-chromium/files/patch-content_zygote_zygote__linux.cc index dd08790aebaf..82436aa2e5c7 100644 --- a/www/ungoogled-chromium/files/patch-content_zygote_zygote__linux.cc +++ b/www/ungoogled-chromium/files/patch-content_zygote_zygote__linux.cc @@ -1,15 +1,15 @@ ---- content/zygote/zygote_linux.cc.orig 2024-05-23 20:04:36 UTC +--- content/zygote/zygote_linux.cc.orig 2024-06-22 08:49:42 UTC +++ content/zygote/zygote_linux.cc @@ -1,6 +1,7 @@ // Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#if 0 #include "content/zygote/zygote_linux.h" -@@ -720,3 +721,4 @@ void Zygote::HandleReinitializeLoggingRequest(base::Pi +@@ -718,3 +719,4 @@ void Zygote::HandleReinitializeLoggingRequest(base::Pi } } // namespace content +#endif diff --git a/www/ungoogled-chromium/files/patch-device_fido_fido__discovery__factory.cc b/www/ungoogled-chromium/files/patch-device_fido_fido__discovery__factory.cc new file mode 100644 index 000000000000..e4571975098a --- /dev/null +++ b/www/ungoogled-chromium/files/patch-device_fido_fido__discovery__factory.cc @@ -0,0 +1,11 @@ +--- device/fido/fido_discovery_factory.cc.orig 2024-06-22 08:49:42 UTC ++++ device/fido/fido_discovery_factory.cc +@@ -127,7 +127,7 @@ std::vector> FidoDi + + std::optional> + FidoDiscoveryFactory::MaybeCreateEnclaveDiscovery() { +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (!base::FeatureList::IsEnabled(kWebAuthnEnclaveAuthenticator) || + !enclave_ui_request_stream_ || !network_context_factory_) { + return std::nullopt; diff --git a/www/ungoogled-chromium/files/patch-extensions_common_command.cc b/www/ungoogled-chromium/files/patch-extensions_common_command.cc index b8d6733b6664..c1d7e2a9cc1f 100644 --- a/www/ungoogled-chromium/files/patch-extensions_common_command.cc +++ b/www/ungoogled-chromium/files/patch-extensions_common_command.cc @@ -1,11 +1,11 @@ ---- extensions/common/command.cc.orig 2024-02-25 20:22:18 UTC +--- extensions/common/command.cc.orig 2024-06-22 08:49:42 UTC +++ extensions/common/command.cc @@ -283,7 +283,7 @@ std::string Command::CommandPlatform() { return values::kKeybindingPlatformMac; #elif BUILDFLAG(IS_CHROMEOS) return values::kKeybindingPlatformChromeOs; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return values::kKeybindingPlatformLinux; #elif BUILDFLAG(IS_FUCHSIA) - // TODO(crbug.com/1312215): Change this once we decide what string should be + // TODO(crbug.com/40220501): Change this once we decide what string should be diff --git a/www/ungoogled-chromium/files/patch-extensions_shell_browser_shell__extensions__api__client.cc b/www/ungoogled-chromium/files/patch-extensions_shell_browser_shell__extensions__api__client.cc index ae42cf93b4b1..db2ff0156033 100644 --- a/www/ungoogled-chromium/files/patch-extensions_shell_browser_shell__extensions__api__client.cc +++ b/www/ungoogled-chromium/files/patch-extensions_shell_browser_shell__extensions__api__client.cc @@ -1,11 +1,11 @@ ---- extensions/shell/browser/shell_extensions_api_client.cc.orig 2022-10-01 07:40:07 UTC +--- extensions/shell/browser/shell_extensions_api_client.cc.orig 2024-06-22 08:49:42 UTC +++ extensions/shell/browser/shell_extensions_api_client.cc @@ -58,7 +58,7 @@ ShellExtensionsAPIClient::CreateDisplayInfoProvider() - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) FileSystemDelegate* ShellExtensionsAPIClient::GetFileSystemDelegate() { if (!file_system_delegate_) file_system_delegate_ = std::make_unique(); diff --git a/www/ungoogled-chromium/files/patch-extensions_shell_browser_shell__extensions__api__client.h b/www/ungoogled-chromium/files/patch-extensions_shell_browser_shell__extensions__api__client.h index 318f6cdb4f79..27a84fafb10b 100644 --- a/www/ungoogled-chromium/files/patch-extensions_shell_browser_shell__extensions__api__client.h +++ b/www/ungoogled-chromium/files/patch-extensions_shell_browser_shell__extensions__api__client.h @@ -1,20 +1,20 @@ ---- extensions/shell/browser/shell_extensions_api_client.h.orig 2022-10-01 07:40:07 UTC +--- extensions/shell/browser/shell_extensions_api_client.h.orig 2024-06-22 08:49:42 UTC +++ extensions/shell/browser/shell_extensions_api_client.h @@ -36,7 +36,7 @@ class ShellExtensionsAPIClient : public ExtensionsAPIC const override; - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) FileSystemDelegate* GetFileSystemDelegate() override; #endif MessagingDelegate* GetMessagingDelegate() override; @@ -45,7 +45,7 @@ class ShellExtensionsAPIClient : public ExtensionsAPIC private: - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // 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) std::unique_ptr file_system_delegate_; #endif std::unique_ptr messaging_delegate_; 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 e9cd2e399063..48880e14edf2 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-05-23 20:04:36 UTC +--- gpu/command_buffer/service/dawn_context_provider.cc.orig 2024-06-22 08:49:42 UTC +++ gpu/command_buffer/service/dawn_context_provider.cc -@@ -204,7 +204,7 @@ wgpu::BackendType DawnContextProvider::GetDefaultBacke +@@ -163,7 +163,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 ed75c574d0fd..758e1ecbbac9 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-05-23 20:04:36 UTC +--- gpu/command_buffer/service/gles2_cmd_decoder.cc.orig 2024-06-22 08:49:42 UTC +++ gpu/command_buffer/service/gles2_cmd_decoder.cc -@@ -2978,7 +2978,7 @@ GLES2Decoder* GLES2Decoder::Create( +@@ -2955,7 +2955,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 f6f28a68eb7a..f8890e4d3c13 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-03-22 14:16:19 UTC +--- gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig 2024-06-22 08:49:42 UTC +++ gpu/command_buffer/service/shared_image/external_vk_image_backing.cc @@ -50,7 +50,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" -@@ -689,7 +689,7 @@ std::unique_ptr ExternalVkIma +@@ -695,7 +695,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_shared__image__manager.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc index 47ab9928cbca..7a4510372bc4 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-05-23 20:04:36 UTC +--- gpu/command_buffer/service/shared_image/shared_image_manager.cc.orig 2024-06-22 08:49:42 UTC +++ gpu/command_buffer/service/shared_image/shared_image_manager.cc -@@ -572,7 +572,7 @@ bool SharedImageManager::SupportsScanoutImages() { +@@ -570,7 +570,7 @@ bool SharedImageManager::SupportsScanoutImages() { return true; #elif BUILDFLAG(IS_ANDROID) return base::AndroidHardwareBufferCompat::IsSupportAvailable(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) return ui::OzonePlatform::GetInstance() ->GetPlatformRuntimeProperties() .supports_native_pixmaps; diff --git a/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc b/www/ungoogled-chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc index c1ebe39a3eb3..b5e2ba6da7ed 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-05-23 20:04:36 UTC +--- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2024-06-22 08:49:42 UTC +++ gpu/command_buffer/service/webgpu_decoder_impl.cc -@@ -1257,7 +1257,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( +@@ -1249,7 +1249,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( force_fallback_adapter = true; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!shared_context_state_->GrContextIsVulkan() && !shared_context_state_->IsGraphiteDawnVulkan() && use_webgpu_adapter_ != WebGPUAdapterName::kOpenGLES) { -@@ -1925,7 +1925,7 @@ WebGPUDecoderImpl::AssociateMailboxDawn( +@@ -1915,7 +1915,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__finch__features.cc b/www/ungoogled-chromium/files/patch-gpu_config_gpu__finch__features.cc index 34762b532a5f..d2a175d4f9ad 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,20 @@ ---- gpu/config/gpu_finch_features.cc.orig 2024-04-23 07:42:17 UTC +--- gpu/config/gpu_finch_features.cc.orig 2024-06-22 08:49:42 UTC +++ gpu/config/gpu_finch_features.cc -@@ -145,7 +145,7 @@ const base::FeatureParam +@@ -137,7 +137,7 @@ 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 -@@ -158,7 +158,7 @@ BASE_FEATURE(kCanvasOopRasterization, +@@ -150,7 +150,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_LACROS) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_CHROMEOS_LACROS) || 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_vulkan_generate__bindings.py b/www/ungoogled-chromium/files/patch-gpu_vulkan_generate__bindings.py index 39466880659c..c75c5173bda9 100644 --- a/www/ungoogled-chromium/files/patch-gpu_vulkan_generate__bindings.py +++ b/www/ungoogled-chromium/files/patch-gpu_vulkan_generate__bindings.py @@ -1,11 +1,11 @@ ---- gpu/vulkan/generate_bindings.py.orig 2023-11-04 07:08:51 UTC +--- gpu/vulkan/generate_bindings.py.orig 2024-06-22 08:49:42 UTC +++ gpu/vulkan/generate_bindings.py -@@ -270,7 +270,7 @@ VULKAN_DEVICE_FUNCTIONS = [ +@@ -271,7 +271,7 @@ VULKAN_DEVICE_FUNCTIONS = [ ] }, { - 'ifdef': 'BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)', + 'ifdef': 'BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)', 'extension': 'VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME', 'functions': [ 'vkGetImageDrmFormatModifierPropertiesEXT', diff --git a/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__device__queue.cc b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__device__queue.cc index d89d0f5a3a00..a45b15133ad6 100644 --- a/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__device__queue.cc +++ b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__device__queue.cc @@ -1,20 +1,20 @@ ---- gpu/vulkan/vulkan_device_queue.cc.orig 2024-02-25 20:22:18 UTC +--- gpu/vulkan/vulkan_device_queue.cc.orig 2024-06-22 08:49:42 UTC +++ gpu/vulkan/vulkan_device_queue.cc -@@ -121,7 +121,7 @@ bool VulkanDeviceQueue::Initialize( +@@ -125,7 +125,7 @@ bool VulkanDeviceQueue::Initialize( // In dual-CPU cases, we cannot detect the active GPU correctly on Linux, // so don't select GPU device based on the |gpu_info|. -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // If gpu_info is provided, the device should match it. if (gpu_info && (device_properties.vendorID != gpu_info->gpu.vendor_id || device_properties.deviceID != gpu_info->gpu.device_id)) { -@@ -264,7 +264,7 @@ bool VulkanDeviceQueue::Initialize( +@@ -268,7 +268,7 @@ bool VulkanDeviceQueue::Initialize( // Android, Fuchsia, Linux, and CrOS (VaapiVideoDecoder) need YCbCr sampler // support. #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!physical_device_info.feature_sampler_ycbcr_conversion) { LOG(ERROR) << "samplerYcbcrConversion is not supported."; return false; diff --git a/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.cc b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.cc index 85f6b1863841..c6b84942e3f3 100644 --- a/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.cc +++ b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.cc @@ -1,20 +1,20 @@ ---- gpu/vulkan/vulkan_function_pointers.cc.orig 2024-02-25 20:22:18 UTC +--- gpu/vulkan/vulkan_function_pointers.cc.orig 2024-06-22 08:49:42 UTC +++ gpu/vulkan/vulkan_function_pointers.cc -@@ -1289,7 +1289,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer +@@ -1297,7 +1297,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (gfx::HasExtension(enabled_extensions, VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME)) { constexpr char kvkGetImageDrmFormatModifierPropertiesEXT[] = -@@ -1489,7 +1489,7 @@ void VulkanFunctionPointers::ResetForTesting() { +@@ -1498,7 +1498,7 @@ void VulkanFunctionPointers::ResetForTesting() { vkGetSwapchainImagesKHR = nullptr; vkQueuePresentKHR = nullptr; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) vkGetImageDrmFormatModifierPropertiesEXT = nullptr; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) } diff --git a/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.h b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.h index 942d2368c52e..2098cf89a04b 100644 --- a/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.h +++ b/www/ungoogled-chromium/files/patch-gpu_vulkan_vulkan__function__pointers.h @@ -1,27 +1,27 @@ ---- gpu/vulkan/vulkan_function_pointers.h.orig 2023-11-04 07:08:51 UTC +--- gpu/vulkan/vulkan_function_pointers.h.orig 2024-06-22 08:49:42 UTC +++ gpu/vulkan/vulkan_function_pointers.h -@@ -321,7 +321,7 @@ struct COMPONENT_EXPORT(VULKAN) VulkanFunctionPointers +@@ -322,7 +322,7 @@ struct COMPONENT_EXPORT(VULKAN) VulkanFunctionPointers VulkanFunction vkGetSwapchainImagesKHR; VulkanFunction vkQueuePresentKHR; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) VulkanFunction vkGetImageDrmFormatModifierPropertiesEXT; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -1324,7 +1324,7 @@ ALWAYS_INLINE VkResult vkQueuePresentKHR(VkQueue queue +@@ -1336,7 +1336,7 @@ ALWAYS_INLINE VkResult vkQueuePresentKHR(VkQueue queue pPresentInfo); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ALWAYS_INLINE VkResult vkGetImageDrmFormatModifierPropertiesEXT( VkDevice device, VkImage image, -@@ -1334,4 +1334,4 @@ ALWAYS_INLINE VkResult vkGetImageDrmFormatModifierProp +@@ -1346,4 +1346,4 @@ ALWAYS_INLINE VkResult vkGetImageDrmFormatModifierProp } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#endif // GPU_VULKAN_VULKAN_FUNCTION_POINTERS_H_ \ No newline at end of file +#endif // GPU_VULKAN_VULKAN_FUNCTION_POINTERS_H_ diff --git a/www/ungoogled-chromium/files/patch-headless_lib_browser_headless__request__context__manager.cc b/www/ungoogled-chromium/files/patch-headless_lib_browser_headless__request__context__manager.cc index 2e439c50e4a6..8e4737fb084b 100644 --- a/www/ungoogled-chromium/files/patch-headless_lib_browser_headless__request__context__manager.cc +++ b/www/ungoogled-chromium/files/patch-headless_lib_browser_headless__request__context__manager.cc @@ -1,11 +1,11 @@ ---- headless/lib/browser/headless_request_context_manager.cc.orig 2024-02-25 20:22:18 UTC +--- headless/lib/browser/headless_request_context_manager.cc.orig 2024-06-22 08:49:42 UTC +++ headless/lib/browser/headless_request_context_manager.cc -@@ -64,7 +64,7 @@ void SetCryptKeyOnce(const base::FilePath& user_data_p +@@ -66,7 +66,7 @@ void SetCryptKeyOnce(const base::FilePath& user_data_p return; done_once = true; -#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_browser_headless__web__contents__impl.cc b/www/ungoogled-chromium/files/patch-headless_lib_browser_headless__web__contents__impl.cc index 62dfd2c2729f..1cdcb1e4db82 100644 --- a/www/ungoogled-chromium/files/patch-headless_lib_browser_headless__web__contents__impl.cc +++ b/www/ungoogled-chromium/files/patch-headless_lib_browser_headless__web__contents__impl.cc @@ -1,11 +1,11 @@ ---- headless/lib/browser/headless_web_contents_impl.cc.orig 2023-06-05 19:39:05 UTC +--- headless/lib/browser/headless_web_contents_impl.cc.orig 2024-06-22 08:49:42 UTC +++ headless/lib/browser/headless_web_contents_impl.cc -@@ -60,7 +60,7 @@ namespace headless { +@@ -62,7 +62,7 @@ namespace headless { namespace { void UpdatePrefsFromSystemSettings(blink::RendererPreferences* prefs) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) content::UpdateFontRendererPreferencesFromSystemSettings(prefs); #endif diff --git a/www/ungoogled-chromium/files/patch-headless_lib_headless__content__main__delegate.cc b/www/ungoogled-chromium/files/patch-headless_lib_headless__content__main__delegate.cc index 36d6880cddb8..470b2d2c25fd 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 2023-12-23 12:33:28 UTC +--- headless/lib/headless_content_main_delegate.cc.orig 2024-06-22 08:49:42 UTC +++ headless/lib/headless_content_main_delegate.cc -@@ -362,7 +362,7 @@ void HeadlessContentMainDelegate::InitCrashReporter( +@@ -371,7 +371,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__channel.h b/www/ungoogled-chromium/files/patch-ipc_ipc__channel.h index 17341fbf9237..ebe427cfc30e 100644 --- a/www/ungoogled-chromium/files/patch-ipc_ipc__channel.h +++ b/www/ungoogled-chromium/files/patch-ipc_ipc__channel.h @@ -1,11 +1,11 @@ ---- ipc/ipc_channel.h.orig 2024-02-03 15:42:55 UTC +--- ipc/ipc_channel.h.orig 2024-06-22 08:49:42 UTC +++ ipc/ipc_channel.h -@@ -240,7 +240,7 @@ class COMPONENT_EXPORT(IPC) Channel : public Sender { +@@ -218,7 +218,7 @@ class COMPONENT_EXPORT(IPC) Channel : public Sender { static std::string GenerateUniqueRandomChannelID(); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Sandboxed processes live in a PID namespace, so when sending the IPC hello // message from client to server we need to send the PID from the global // PID namespace. 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 4efa53256179..82d273a02d04 100644 --- a/www/ungoogled-chromium/files/patch-media_base_media__switches.cc +++ b/www/ungoogled-chromium/files/patch-media_base_media__switches.cc @@ -1,105 +1,114 @@ ---- media/base/media_switches.cc.orig 2024-05-23 20:04:36 UTC +--- media/base/media_switches.cc.orig 2024-06-22 08:49:42 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 @@ -60,6 +60,10 @@ const char kDisableBackgroundMediaSuspend[] = const char kReportVp9AsAnUnsupportedMimeType[] = "report-vp9-as-an-unsupported-mime-type"; +#if BUILDFLAG(IS_BSD) +const char kAudioBackend[] = "audio-backend"; +#endif + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) || \ BUILDFLAG(IS_SOLARIS) // The Alsa device to use when opening an audio input stream. -@@ -363,8 +367,8 @@ BASE_FEATURE(kMacLoopbackAudioForScreenShare, +@@ -368,8 +372,8 @@ BASE_FEATURE(kMacLoopbackAudioForScreenShare, "MacLoopbackAudioForScreenShare", 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", -@@ -699,7 +703,7 @@ BASE_FEATURE(kFallbackAfterDecodeError, +@@ -688,7 +692,7 @@ BASE_FEATURE(kFallbackAfterDecodeError, // Show toolbar button that opens dialog for controlling media sessions. BASE_FEATURE(kGlobalMediaControls, "GlobalMediaControls", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -727,7 +731,7 @@ BASE_FEATURE(kGlobalMediaControlsUpdatedUI, +@@ -716,7 +720,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 -@@ -739,7 +743,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen, +@@ -728,7 +732,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 -@@ -768,7 +772,7 @@ BASE_FEATURE(kUnifiedAutoplay, +@@ -757,7 +761,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, -@@ -859,7 +863,7 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding, +@@ -848,7 +852,7 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding, "VaapiVp9SModeHWEncoding", base::FEATURE_ENABLED_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 V4L2 flat video decoder clients instead of V4L2VideoDecoder. // Owners: frkoenig@ch40m1um.qjz9zk, mcasas@ch40m1um.qjz9zk // Expiry: When flat decoders are supported on all platforms and the legacy -@@ -989,7 +993,7 @@ BASE_FEATURE(kLiveCaptionUseWaitK, +@@ -978,7 +982,7 @@ BASE_FEATURE(kLiveCaptionUseWaitK, // Live Caption can be used in multiple languages, as opposed to just English. BASE_FEATURE(kLiveCaptionMultiLanguage, "LiveCaptionMultiLanguage", -#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 -@@ -1024,7 +1028,7 @@ BASE_FEATURE(kLiveCaptionSystemWideOnChromeOS, +@@ -1008,7 +1012,7 @@ BASE_FEATURE(kLiveCaptionWebAudio, // Live Translate translates captions generated by Live Caption. BASE_FEATURE(kLiveTranslate, "LiveTranslate", -#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 -@@ -1487,7 +1491,7 @@ BASE_FEATURE(kUseGTFOOutOfProcessVideoDecoding, +@@ -1472,7 +1476,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, +@@ -1552,7 +1556,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 5e6232dc58c1..19753a3003a7 100644 --- a/www/ungoogled-chromium/files/patch-media_base_media__switches.h +++ b/www/ungoogled-chromium/files/patch-media_base_media__switches.h @@ -1,49 +1,56 @@ ---- media/base/media_switches.h.orig 2024-05-23 20:04:36 UTC +--- media/base/media_switches.h.orig 2024-06-22 08:49:42 UTC +++ media/base/media_switches.h @@ -43,6 +43,10 @@ MEDIA_EXPORT extern const char kDisableBackgroundMedia MEDIA_EXPORT extern const char kReportVp9AsAnUnsupportedMimeType[]; +#if BUILDFLAG(IS_BSD) +MEDIA_EXPORT extern const char kAudioBackend[]; +#endif + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) || \ BUILDFLAG(IS_SOLARIS) MEDIA_EXPORT extern const char kAlsaInputDevice[]; -@@ -314,7 +318,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlatformHEVCEncoder +@@ -324,13 +328,13 @@ 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); #endif // BUILDFLAG(IS_LINUX) -@@ -332,7 +336,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUnifiedAutoplay); + 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); +@@ -345,7 +349,7 @@ 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); -@@ -351,7 +355,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiH264TemporalLa +@@ -364,7 +368,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiH264TemporalLa MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLayerHWEncoding); MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9SModeHWEncoding); #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatVideoDecoder); MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatefulVideoDecoder); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -490,7 +494,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVide +@@ -506,7 +510,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 229ff401b3f0..4c43d00765e6 100644 --- a/www/ungoogled-chromium/files/patch-media_base_video__frame.cc +++ b/www/ungoogled-chromium/files/patch-media_base_video__frame.cc @@ -1,74 +1,74 @@ ---- media/base/video_frame.cc.orig 2024-05-23 20:04:36 UTC +--- media/base/video_frame.cc.orig 2024-06-22 08:49:42 UTC +++ media/base/video_frame.cc @@ -80,7 +80,7 @@ std::string VideoFrame::StorageTypeToString( return "OWNED_MEMORY"; case VideoFrame::STORAGE_SHMEM: return "SHMEM"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case VideoFrame::STORAGE_DMABUFS: return "DMABUFS"; #endif @@ -95,7 +95,7 @@ std::string VideoFrame::StorageTypeToString( // static bool VideoFrame::IsStorageTypeMappable(VideoFrame::StorageType storage_type) { return -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // This is not strictly needed but makes explicit that, at VideoFrame // level, DmaBufs are not mappable from userspace. storage_type != VideoFrame::STORAGE_DMABUFS && @@ -306,7 +306,7 @@ static std::optional GetDefaultLayou return VideoFrameLayout::CreateWithPlanes(format, coded_size, planes); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // This class allows us to embed a vector into a scoped_refptr, and // thus to have several VideoFrames share the same set of DMABUF FDs. class VideoFrame::DmabufHolder -@@ -712,7 +712,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM - for (size_t i = 0; i < num_planes; ++i) +@@ -440,7 +440,7 @@ scoped_refptr VideoFrame::CreateFrameForGp planes[i].stride = gpu_memory_buffer->stride(i); + } uint64_t modifier = gfx::NativePixmapHandle::kNoModifier; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (gpu_memory_buffer->GetType() == gfx::NATIVE_PIXMAP) { const auto gmb_handle = gpu_memory_buffer->CloneHandle(); if (gmb_handle.is_null() || -@@ -758,7 +758,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM +@@ -778,7 +778,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, -@@ -977,7 +977,7 @@ scoped_refptr VideoFrame::WrapVideoFrame( +@@ -997,7 +997,7 @@ scoped_refptr VideoFrame::WrapVideoFrame( } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) DCHECK(frame->dmabuf_fds_); // If there are any |dmabuf_fds_| plugged in, we should refer them too. wrapping_frame->dmabuf_fds_ = frame->dmabuf_fds_; -@@ -1435,7 +1435,7 @@ scoped_refptr VideoFrame::shar +@@ -1471,7 +1471,7 @@ scoped_refptr VideoFrame::shar : shared_images_[texture_index]; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) size_t VideoFrame::NumDmabufFds() const { return dmabuf_fds_->size(); } -@@ -1552,7 +1552,7 @@ VideoFrame::VideoFrame(const VideoFrameLayout& layout, +@@ -1588,7 +1588,7 @@ VideoFrame::VideoFrame(const VideoFrameLayout& layout, storage_type_(storage_type), visible_rect_(Intersection(visible_rect, gfx::Rect(layout.coded_size()))), natural_size_(natural_size), -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) dmabuf_fds_(base::MakeRefCounted()), #endif timestamp_(timestamp), diff --git a/www/ungoogled-chromium/files/patch-media_base_video__frame.h b/www/ungoogled-chromium/files/patch-media_base_video__frame.h index db5bbffff7da..f40513e8a787 100644 --- a/www/ungoogled-chromium/files/patch-media_base_video__frame.h +++ b/www/ungoogled-chromium/files/patch-media_base_video__frame.h @@ -1,47 +1,47 @@ ---- media/base/video_frame.h.orig 2024-05-23 20:04:36 UTC +--- media/base/video_frame.h.orig 2024-06-22 08:49:42 UTC +++ media/base/video_frame.h @@ -45,7 +45,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) @@ -111,7 +111,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 -@@ -340,7 +340,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -341,7 +341,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 -@@ -635,7 +635,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -650,7 +650,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte scoped_refptr shared_image( size_t texture_index) 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. -@@ -864,7 +864,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -886,7 +886,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // GPU memory buffer, if this frame is STORAGE_GPU_MEMORY_BUFFER. std::unique_ptr gpu_memory_buffer_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) class DmabufHolder; // Dmabufs for the frame, used when storage is STORAGE_DMABUFS. Size is either diff --git a/www/ungoogled-chromium/files/patch-media_capture_video_fake__video__capture__device__factory.cc b/www/ungoogled-chromium/files/patch-media_capture_video_fake__video__capture__device__factory.cc index ff91c2e0d0a2..8bdfbbffc748 100644 --- a/www/ungoogled-chromium/files/patch-media_capture_video_fake__video__capture__device__factory.cc +++ b/www/ungoogled-chromium/files/patch-media_capture_video_fake__video__capture__device__factory.cc @@ -1,11 +1,11 @@ ---- media/capture/video/fake_video_capture_device_factory.cc.orig 2024-02-03 15:42:55 UTC +--- media/capture/video/fake_video_capture_device_factory.cc.orig 2024-06-22 08:49:42 UTC +++ media/capture/video/fake_video_capture_device_factory.cc -@@ -230,7 +230,7 @@ void FakeVideoCaptureDeviceFactory::GetDevicesInfo( +@@ -231,7 +231,7 @@ void FakeVideoCaptureDeviceFactory::GetDevicesInfo( int entry_index = 0; for (const auto& entry : devices_config_) { VideoCaptureApi api = -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE; #elif BUILDFLAG(IS_IOS) VideoCaptureApi::UNKNOWN; diff --git a/www/ungoogled-chromium/files/patch-media_capture_video_video__capture__device__client.cc b/www/ungoogled-chromium/files/patch-media_capture_video_video__capture__device__client.cc index c86d2eb75be4..013c0fd1c684 100644 --- a/www/ungoogled-chromium/files/patch-media_capture_video_video__capture__device__client.cc +++ b/www/ungoogled-chromium/files/patch-media_capture_video_video__capture__device__client.cc @@ -1,11 +1,11 @@ ---- media/capture/video/video_capture_device_client.cc.orig 2024-05-23 20:04:36 UTC +--- media/capture/video/video_capture_device_client.cc.orig 2024-06-22 08:49:42 UTC +++ media/capture/video/video_capture_device_client.cc -@@ -154,7 +154,7 @@ FourccAndFlip GetFourccAndFlipFromPixelFormat( +@@ -164,7 +164,7 @@ FourccAndFlip GetFourccAndFlipFromPixelFormat( CHECK(!is_width_odd && !is_height_odd); return {libyuv::FOURCC_UYVY}; case media::PIXEL_FORMAT_RGB24: - if constexpr (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) { + if constexpr (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) { // Linux RGB24 defines red at lowest byte address, // see http://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html. return {libyuv::FOURCC_RAW}; diff --git a/www/ungoogled-chromium/files/patch-media_ffmpeg_scripts_robo__lib_config.py b/www/ungoogled-chromium/files/patch-media_ffmpeg_scripts_robo__lib_config.py index 219c203b4d9c..f99a7c856016 100644 --- a/www/ungoogled-chromium/files/patch-media_ffmpeg_scripts_robo__lib_config.py +++ b/www/ungoogled-chromium/files/patch-media_ffmpeg_scripts_robo__lib_config.py @@ -1,56 +1,56 @@ ---- media/ffmpeg/scripts/robo_lib/config.py.orig 2024-05-23 20:04:36 UTC +--- media/ffmpeg/scripts/robo_lib/config.py.orig 2024-06-22 08:49:42 UTC +++ media/ffmpeg/scripts/robo_lib/config.py -@@ -54,19 +54,13 @@ class RoboConfiguration: +@@ -55,19 +55,13 @@ class RoboConfiguration: self._llvm_path = os.path.join(self.chrome_src(), "third_party", "llvm-build", "Release+Asserts", "bin") - self.EnsurePathContainsLLVM() - self.EnsureNoMakeInfo() self.EnsureFFmpegHome() - self.EnsureASANConfig() + self.EnsureGNConfig() - self.ComputeBranchName() if not quiet: shell.log(f"Using chrome src: {self.chrome_src()}") shell.log(f"Using script dir: {self._script_directory}") shell.log(f"Using ffmpeg home: {self.ffmpeg_home()}") - shell.log(f"On branch: {self.branch_name()}") - if self.sushi_branch_name(): - shell.log(f"On sushi branch: {self.sushi_branch_name()}") # Filename that we'll ask generate_gn.py to write git commands to. # TODO: Should this use script_directory, or stay with ffmpeg? As long as -@@ -179,9 +173,9 @@ class RoboConfiguration: +@@ -186,9 +180,9 @@ class RoboConfiguration: if re.match(r"i.86", platform.machine()): self._host_architecture = "ia32" - elif platform.machine() == "x86_64" or platform.machine() == "AMD64": + elif platform.machine() == "x86_64" or platform.machine() == "AMD64" or platform.machine() == "amd64": self._host_architecture = "x64" - elif platform.machine() == "aarch64": + elif platform.machine() == "aarch64" or platform.machine() == "arm64": self._host_architecture = "arm64" elif platform.machine() == "mips32": self._host_architecture = "mipsel" -@@ -216,6 +210,10 @@ class RoboConfiguration: +@@ -223,6 +217,10 @@ class RoboConfiguration: elif platform.system() == "Windows" or "CYGWIN_NT" in platform.system( ): self._host_operating_system = "win" + elif platform.system() == "OpenBSD": + self._host_operating_system = "openbsd" + elif platform.system() == "FreeBSD": + self._host_operating_system = "freebsd" else: raise ValueError(f"Unsupported platform: {platform.system()}") -@@ -224,8 +222,8 @@ class RoboConfiguration: +@@ -231,8 +229,8 @@ class RoboConfiguration: wd = os.getcwd() # Walk up the tree until we find src/AUTHORS while wd != "/": - if os.path.isfile(os.path.join(wd, "src", "AUTHORS")): - self._chrome_src = os.path.join(wd, "src") + if os.path.isfile(os.path.join(wd, "third_party", "DEPS")): + self._chrome_src = wd return wd = os.path.dirname(wd) raise Exception("could not find src/AUTHORS in any parent of the wd") diff --git a/www/ungoogled-chromium/files/patch-media_gpu_chromeos_gl__image__processor__backend.cc b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_gl__image__processor__backend.cc new file mode 100644 index 000000000000..1db7e29d9039 --- /dev/null +++ b/www/ungoogled-chromium/files/patch-media_gpu_chromeos_gl__image__processor__backend.cc @@ -0,0 +1,13 @@ +--- media/gpu/chromeos/gl_image_processor_backend.cc.orig 2024-06-22 08:49:42 UTC ++++ media/gpu/chromeos/gl_image_processor_backend.cc +@@ -28,6 +28,10 @@ + #include "ui/ozone/public/ozone_platform.h" + #include "ui/ozone/public/surface_factory_ozone.h" + ++#ifndef GL_CONTEXT_LOST_KHR ++#define GL_CONTEXT_LOST_KHR 0x0507 ++#endif ++ + namespace media { + + namespace { 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 39bf70bc0337..7c6fc60f72cb 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-05-23 20:04:36 UTC +--- media/gpu/chromeos/libyuv_image_processor_backend.cc.orig 2024-06-22 08:49:42 UTC +++ media/gpu/chromeos/libyuv_image_processor_backend.cc @@ -48,7 +48,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), -@@ -410,7 +410,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Fr - fr->GetWritableVisibleData(VideoFrame::kUVPlane)), \ - fr->stride(VideoFrame::kUVPlane) +@@ -415,7 +415,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::kARGBPlane), \ - fr->stride(VideoFrame::kARGBPlane) -@@ -571,7 +571,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Fr + #define ARGB_DATA(fr) \ + fr->GetWritableVisibleData(VideoFrame::Plane::kARGB), \ + fr->stride(VideoFrame::Plane::kARGB) +@@ -577,7 +577,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 index c9fd5052b00b..8c539c6d901b 100644 --- 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 @@ -1,11 +1,11 @@ ---- media/gpu/chromeos/native_pixmap_frame_resource.cc.orig 2024-04-23 07:42:17 UTC +--- media/gpu/chromeos/native_pixmap_frame_resource.cc.orig 2024-06-22 08:49:42 UTC +++ media/gpu/chromeos/native_pixmap_frame_resource.cc -@@ -166,7 +166,7 @@ scoped_refptr NativePixmapF +@@ -154,7 +154,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 6497a7fd1cc9..234a2e260c2e 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,29 @@ ---- media/gpu/chromeos/platform_video_frame_utils.cc.orig 2024-05-23 20:04:36 UTC +--- media/gpu/chromeos/platform_video_frame_utils.cc.orig 2024-06-22 08:49:42 UTC +++ media/gpu/chromeos/platform_video_frame_utils.cc @@ -68,7 +68,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) { -@@ -349,7 +349,7 @@ scoped_refptr CreateVideoFrameFromGpuMemor +@@ -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 64333d63c165..e5b08b9e6e12 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-05-23 20:04:36 UTC +--- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2024-06-22 08:49:42 UTC +++ media/gpu/chromeos/video_decoder_pipeline.cc -@@ -1038,7 +1038,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1097,7 +1097,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()); -@@ -1047,7 +1047,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1106,7 +1106,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 -@@ -1205,7 +1205,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1294,7 +1294,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_sandbox_hardware__video__decoding__sandbox__hook__linux.cc b/www/ungoogled-chromium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc index 52fc9ff4b46e..db9c7dfb867c 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc @@ -1,44 +1,44 @@ ---- media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc.orig 2024-04-23 07:42:17 UTC +--- media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc.orig 2024-06-22 08:49:42 UTC +++ media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc @@ -16,7 +16,9 @@ #include "media/gpu/vaapi/vaapi_wrapper.h" #endif +#if !BUILDFLAG(IS_BSD) using sandbox::syscall_broker::BrokerFilePermission; +#endif // TODO(b/195769334): the hardware video decoding sandbox is really only useful // when building with VA-API or V4L2 (otherwise, we're not really doing hardware @@ -32,6 +34,7 @@ using sandbox::syscall_broker::BrokerFilePermission; namespace media { namespace { +#if !BUILDFLAG(IS_BSD) void AllowAccessToRenderNodes(std::vector& permissions, bool include_sys_dev_char, bool read_write) { -@@ -182,6 +185,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( +@@ -172,6 +175,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( NOTREACHED_NORETURN(); #endif // BUILDFLAG(USE_V4L2_CODEC) } +#endif } // namespace -@@ -197,6 +201,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( +@@ -187,6 +191,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( // (at least). bool HardwareVideoDecodingPreSandboxHook( sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) using HardwareVideoDecodingProcessPolicy = sandbox::policy::HardwareVideoDecodingProcessPolicy; using PolicyType = -@@ -242,6 +247,7 @@ bool HardwareVideoDecodingPreSandboxHook( +@@ -232,6 +237,7 @@ bool HardwareVideoDecodingPreSandboxHook( // |permissions| is empty? sandbox::policy::SandboxLinux::GetInstance()->StartBrokerProcess( command_set, permissions, options); +#endif return true; } diff --git a/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc b/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc index 71f843adfdd6..c06beb036bf2 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc @@ -1,11 +1,11 @@ ---- media/gpu/vaapi/vaapi_video_decoder.cc.orig 2024-05-23 20:04:36 UTC +--- media/gpu/vaapi/vaapi_video_decoder.cc.orig 2024-06-22 08:49:42 UTC +++ media/gpu/vaapi/vaapi_video_decoder.cc -@@ -774,7 +774,7 @@ void VaapiVideoDecoder::ApplyResolutionChangeWithScree +@@ -775,7 +775,7 @@ void VaapiVideoDecoder::ApplyResolutionChangeWithScree const gfx::Size decoder_natural_size = aspect_ratio_.GetNaturalSize(decoder_visible_rect); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::optional allocator = base::BindRepeating(&AllocateCustomFrameProxy, weak_this_); std::vector candidates = { diff --git a/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc b/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc index 773a2593c0fb..ff6dbf426e2c 100644 --- a/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc +++ b/www/ungoogled-chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc @@ -1,11 +1,11 @@ ---- media/gpu/vaapi/vaapi_wrapper.cc.orig 2024-05-23 20:04:36 UTC +--- media/gpu/vaapi/vaapi_wrapper.cc.orig 2024-06-22 08:49:42 UTC +++ media/gpu/vaapi/vaapi_wrapper.cc -@@ -70,7 +70,7 @@ +@@ -71,7 +71,7 @@ using media_gpu_vaapi::kModuleVa_prot; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/files/file_util.h" #include "base/strings/string_split.h" #endif diff --git a/www/ungoogled-chromium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h b/www/ungoogled-chromium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h index c25f9bc70bdb..7ebd8e001440 100644 --- a/www/ungoogled-chromium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h +++ b/www/ungoogled-chromium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h @@ -1,11 +1,11 @@ ---- media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h.orig 2023-10-13 13:20:35 UTC +--- media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h.orig 2024-06-22 08:49:42 UTC +++ media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h -@@ -693,7 +693,7 @@ struct StructTraitsHasTextures(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) is_software_backed_video_frame &= !video_frame->HasDmaBufs(); #endif -@@ -1284,7 +1284,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo - } +@@ -1234,7 +1234,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo + gpu_memory_buffer->CloneHandle().io_surface.get()); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - is_webgpu_compatible = (gpu_memory_buffer != nullptr); - if (is_webgpu_compatible) { - is_webgpu_compatible &= -@@ -1303,7 +1303,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo + is_webgpu_compatible = + gpu_memory_buffer->CloneHandle() + .native_pixmap_handle.supports_zero_copy_webgpu_import; +@@ -1250,7 +1250,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo gpu::SHARED_IMAGE_USAGE_DISPLAY_READ | gpu::SHARED_IMAGE_USAGE_SCANOUT; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - // TODO(crbug.com/1241537): Always add the flag once the + // 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_webrtc_helpers.cc b/www/ungoogled-chromium/files/patch-media_webrtc_helpers.cc index 2df54709543f..20e79a10e39f 100644 --- a/www/ungoogled-chromium/files/patch-media_webrtc_helpers.cc +++ b/www/ungoogled-chromium/files/patch-media_webrtc_helpers.cc @@ -1,19 +1,19 @@ ---- media/webrtc/helpers.cc.orig 2024-05-23 20:04:36 UTC +--- media/webrtc/helpers.cc.orig 2024-06-22 08:49:42 UTC +++ media/webrtc/helpers.cc @@ -41,14 +41,14 @@ void ConfigAutomaticGainControl(const AudioProcessingS return; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const bool kInputVolumeAdjustmentOverrideAllowed = true; #elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) const bool kInputVolumeAdjustmentOverrideAllowed = false; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Use AGC2 digital and input volume controller. - // TODO(crbug.com/1375239): Remove `kWebRtcAllowInputVolumeAdjustment` safely + // TODO(crbug.com/40872787): Remove `kWebRtcAllowInputVolumeAdjustment` safely // and set `input_volume_controller.enabled` true. diff --git a/www/ungoogled-chromium/files/patch-mojo_core_channel.cc b/www/ungoogled-chromium/files/patch-mojo_core_channel.cc index 2f3a57f427d0..9cde3795391f 100644 --- a/www/ungoogled-chromium/files/patch-mojo_core_channel.cc +++ b/www/ungoogled-chromium/files/patch-mojo_core_channel.cc @@ -1,14 +1,14 @@ ---- mojo/core/channel.cc.orig 2024-05-23 20:04:36 UTC +--- mojo/core/channel.cc.orig 2024-06-22 08:49:42 UTC +++ mojo/core/channel.cc -@@ -70,7 +70,11 @@ const size_t kMaxUnusedReadBufferCapacity = 4096; +@@ -71,7 +71,11 @@ const size_t kMaxUnusedReadBufferCapacity = 4096; // Fuchsia: The zx_channel_write() API supports up to 64 handles. const size_t kMaxAttachedHandles = 64; +#if defined(__i386__) && defined(OS_FREEBSD) +const size_t kChannelMessageAlignment = 4; +#else static_assert(alignof(std::max_align_t) >= kChannelMessageAlignment, ""); +#endif Channel::AlignedBuffer MakeAlignedBuffer(size_t size) { // Generic allocators (such as malloc) return a pointer that is suitably // aligned for storing any type of object with a fundamental alignment diff --git a/www/ungoogled-chromium/files/patch-mojo_public_tools_bindings_mojom.gni b/www/ungoogled-chromium/files/patch-mojo_public_tools_bindings_mojom.gni index 0b932f1bc090..7b170b16c0bd 100644 --- a/www/ungoogled-chromium/files/patch-mojo_public_tools_bindings_mojom.gni +++ b/www/ungoogled-chromium/files/patch-mojo_public_tools_bindings_mojom.gni @@ -1,19 +1,19 @@ ---- mojo/public/tools/bindings/mojom.gni.orig 2024-05-23 20:04:36 UTC +--- mojo/public/tools/bindings/mojom.gni.orig 2024-06-22 08:49:42 UTC +++ mojo/public/tools/bindings/mojom.gni -@@ -741,6 +741,16 @@ template("mojom") { +@@ -746,6 +746,16 @@ template("mojom") { enabled_features += [ "is_apple" ] } + if (is_openbsd) { + enabled_features += [ "is_openbsd" ] + enabled_features += [ "is_bsd" ] + } + + if (is_freebsd) { + enabled_features += [ "is_freebsd" ] + enabled_features += [ "is_bsd" ] + } + action(parser_target_name) { allow_remote = true diff --git a/www/ungoogled-chromium/files/patch-net_BUILD.gn b/www/ungoogled-chromium/files/patch-net_BUILD.gn index 692cce6e2130..9b5f664b1e27 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-05-23 20:04:36 UTC +--- net/BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ net/BUILD.gn @@ -123,7 +123,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" ] } -@@ -1200,6 +1200,19 @@ component("net") { +@@ -1202,6 +1202,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", -@@ -1356,7 +1369,7 @@ component("net") { +@@ -1359,7 +1372,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", -@@ -2840,7 +2853,7 @@ test("net_unittests") { +@@ -2848,7 +2861,7 @@ test("net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "base/address_tracker_linux_unittest.cc", "base/network_interfaces_linux_unittest.cc", -@@ -2928,6 +2941,10 @@ test("net_unittests") { +@@ -2936,6 +2949,10 @@ test("net_unittests") { ] } + if (is_bsd) { + deps += [ "//sandbox/policy" ] + } + if (enable_websockets) { deps += [ "//net/server:tests" ] } -@@ -2988,7 +3005,7 @@ test("net_unittests") { +@@ -2996,7 +3013,7 @@ test("net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "tools/quic/quic_simple_server_test.cc" ] } -@@ -3124,7 +3141,7 @@ test("net_unittests") { +@@ -3132,7 +3149,7 @@ test("net_unittests") { } # Use getifaddrs() on POSIX platforms, except Linux. - if (is_posix && !is_linux && !is_chromeos) { + if (is_posix && !is_linux && !is_chromeos && !is_bsd) { sources += [ "base/network_interfaces_getifaddrs_unittest.cc" ] } diff --git a/www/ungoogled-chromium/files/patch-net_base_features.cc b/www/ungoogled-chromium/files/patch-net_base_features.cc index 1414e87a1885..51689b52a75a 100644 --- a/www/ungoogled-chromium/files/patch-net_base_features.cc +++ b/www/ungoogled-chromium/files/patch-net_base_features.cc @@ -1,24 +1,24 @@ ---- net/base/features.cc.orig 2024-05-23 20:04:36 UTC +--- net/base/features.cc.orig 2024-06-22 08:49:42 UTC +++ net/base/features.cc @@ -28,7 +28,7 @@ BASE_FEATURE(kCapReferrerToOriginOnCrossOrigin, BASE_FEATURE(kAsyncDns, "AsyncDns", #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -534,7 +534,12 @@ BASE_FEATURE(kSpdyHeadersToHttpResponseUseBuilder, +@@ -518,7 +518,12 @@ BASE_FEATURE(kSpdyHeadersToHttpResponseUseBuilder, "SpdyHeadersToHttpResponseUseBuilder", base::FEATURE_DISABLED_BY_DEFAULT); +#if BUILDFLAG(IS_OPENBSD) +// No IP_RECVTOS support - BASE_FEATURE(kReceiveEcn, "ReceiveEcn", base::FEATURE_DISABLED_BY_DEFAULT); + BASE_FEATURE(kReportEcn, "ReportEcn", base::FEATURE_DISABLED_BY_DEFAULT); +#else -+BASE_FEATURE(kReceiveEcn, "ReceiveEcn", base::FEATURE_DISABLED_BY_DEFAULT); ++BASE_FEATURE(kReportEcn, "ReportEcn", base::FEATURE_DISABLED_BY_DEFAULT); +#endif BASE_FEATURE(kUseNewAlpsCodepointHttp2, "UseNewAlpsCodepointHttp2", 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 480089322f3b..f14f8ef5f32f 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-04-23 07:42:17 UTC +--- net/cert/cert_verify_proc.h.orig 2024-06-22 08:49:42 UTC +++ net/cert/cert_verify_proc.h -@@ -174,7 +174,7 @@ class NET_EXPORT CertVerifyProc +@@ -176,7 +176,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_socket_udp__socket__posix.cc b/www/ungoogled-chromium/files/patch-net_socket_udp__socket__posix.cc index f52c99d0090c..21b26322aeda 100644 --- a/www/ungoogled-chromium/files/patch-net_socket_udp__socket__posix.cc +++ b/www/ungoogled-chromium/files/patch-net_socket_udp__socket__posix.cc @@ -1,39 +1,39 @@ ---- net/socket/udp_socket_posix.cc.orig 2024-03-22 14:16:19 UTC +--- net/socket/udp_socket_posix.cc.orig 2024-06-22 08:49:42 UTC +++ net/socket/udp_socket_posix.cc -@@ -592,12 +592,17 @@ int UDPSocketPosix::SetRecvTos() { +@@ -516,12 +516,17 @@ int UDPSocketPosix::SetRecvTos() { } } +#ifdef IP_RECVTOS int rv = setsockopt(socket_, IPPROTO_IP, IP_RECVTOS, &ecn, sizeof(ecn)); +#else + int rv = -1; + errno = EOPNOTSUPP; +#endif return rv == 0 ? OK : MapSystemError(errno); } void UDPSocketPosix::SetMsgConfirm(bool confirm) { -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) if (confirm) { sendto_flags_ |= MSG_CONFIRM; } else { -@@ -618,7 +623,7 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { +@@ -542,7 +547,7 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); int value = broadcast ? 1 : 0; int rv; -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) // SO_REUSEPORT on OSX permits multiple processes to each receive // UDP multicast or broadcast datagrams destined for the bound // port. -@@ -959,7 +964,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address) +@@ -880,7 +885,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address) #if BUILDFLAG(IS_CHROMEOS_ASH) if (last_error == EINVAL) return ERR_ADDRESS_IN_USE; -#elif BUILDFLAG(IS_APPLE) +#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) if (last_error == EADDRNOTAVAIL) return ERR_ADDRESS_IN_USE; #endif diff --git a/www/ungoogled-chromium/files/patch-net_socket_udp__socket__unittest.cc b/www/ungoogled-chromium/files/patch-net_socket_udp__socket__unittest.cc index 45662e4a67c8..4d1a0360f18d 100644 --- a/www/ungoogled-chromium/files/patch-net_socket_udp__socket__unittest.cc +++ b/www/ungoogled-chromium/files/patch-net_socket_udp__socket__unittest.cc @@ -1,47 +1,47 @@ ---- net/socket/udp_socket_unittest.cc.orig 2024-04-23 07:42:17 UTC +--- net/socket/udp_socket_unittest.cc.orig 2024-06-22 08:49:42 UTC +++ net/socket/udp_socket_unittest.cc @@ -358,7 +358,7 @@ TEST_F(UDPSocketTest, PartialRecv) { EXPECT_EQ(second_packet, received); } -#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // - MacOS: requires root permissions on OSX 10.7+. // - Android: devices attached to testbots don't have default network, so // broadcasting to 255.255.255.255 returns error -109 (Address not reachable). @@ -669,7 +669,7 @@ TEST_F(UDPSocketTest, ClientSetDoNotFragment) { EXPECT_THAT(rv, IsOk()); rv = client.SetDoNotFragment(); -#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - // TODO(crbug.com/945590): IP_MTU_DISCOVER is not implemented on Fuchsia. + // TODO(crbug.com/42050633): IP_MTU_DISCOVER is not implemented on Fuchsia. EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED)); #elif BUILDFLAG(IS_MAC) @@ -697,7 +697,7 @@ TEST_F(UDPSocketTest, ServerSetDoNotFragment) { EXPECT_THAT(rv, IsOk()); rv = server.SetDoNotFragment(); -#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - // TODO(crbug.com/945590): IP_MTU_DISCOVER is not implemented on Fuchsia. + // TODO(crbug.com/42050633): IP_MTU_DISCOVER is not implemented on Fuchsia. EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED)); #elif BUILDFLAG(IS_MAC) @@ -762,7 +762,7 @@ TEST_F(UDPSocketTest, JoinMulticastGroup) { - // TODO(https://crbug.com/947115): failing on device on iOS 12.2. - // TODO(https://crbug.com/1227554): flaky on Mac 11. + // TODO(crbug.com/40620614): failing on device on iOS 12.2. + // TODO(crbug.com/40189274): flaky on Mac 11. -#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #define MAYBE_SharedMulticastAddress DISABLED_SharedMulticastAddress #else #define MAYBE_SharedMulticastAddress SharedMulticastAddress @@ -816,7 +816,7 @@ TEST_F(UDPSocketTest, MAYBE_SharedMulticastAddress) { NetLogSource()); ASSERT_THAT(client_socket.Connect(send_address), IsOk()); -#if !BUILDFLAG(IS_CHROMEOS_ASH) +#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_BSD) // Send a message via the multicast group. That message is expected be be // received by both receving sockets. // diff --git a/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc b/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc index a63d9ee9dc97..67cb6bc74da5 100644 --- a/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc +++ b/www/ungoogled-chromium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc @@ -1,29 +1,29 @@ ---- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2024-05-23 20:04:36 UTC +--- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2024-06-22 08:49:42 UTC +++ net/tools/cert_verify_tool/cert_verify_tool.cc @@ -34,7 +34,7 @@ #include "third_party/boringssl/src/pki/trust_store.h" #include "third_party/boringssl/src/pki/trust_store_collection.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "net/proxy_resolution/proxy_config.h" #include "net/proxy_resolution/proxy_config_service_fixed.h" #endif @@ -66,7 +66,7 @@ void SetUpOnNetworkThread( base::WaitableEvent* initialization_complete_event) { net::URLRequestContextBuilder url_request_context_builder; url_request_context_builder.set_user_agent(GetUserAgent()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux, use a fixed ProxyConfigService, since the default one // depends on glib. // -@@ -572,7 +572,7 @@ int main(int argc, char** argv) { +@@ -571,7 +571,7 @@ int main(int argc, char** argv) { std::string impls_str = command_line.GetSwitchValueASCII("impls"); if (impls_str.empty()) { // Default value. -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY)) impls_str = "platform,"; #endif diff --git a/www/ungoogled-chromium/files/patch-net_tools_net__watcher_net__watcher.cc b/www/ungoogled-chromium/files/patch-net_tools_net__watcher_net__watcher.cc index 84e2d59b383d..1bfb112efb0c 100644 --- a/www/ungoogled-chromium/files/patch-net_tools_net__watcher_net__watcher.cc +++ b/www/ungoogled-chromium/files/patch-net_tools_net__watcher_net__watcher.cc @@ -1,29 +1,29 @@ ---- net/tools/net_watcher/net_watcher.cc.orig 2023-02-11 09:11:04 UTC +--- net/tools/net_watcher/net_watcher.cc.orig 2024-06-22 08:49:42 UTC +++ net/tools/net_watcher/net_watcher.cc @@ -32,7 +32,7 @@ #include "net/proxy_resolution/proxy_config_service.h" #include "net/proxy_resolution/proxy_config_with_annotation.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "net/base/network_change_notifier_linux.h" #endif @@ -44,7 +44,7 @@ namespace { - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch + // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Flag to specifies which network interfaces to ignore. Interfaces should // follow as a comma seperated list. const char kIgnoreNetifFlag[] = "ignore-netif"; @@ -163,7 +163,7 @@ int main(int argc, char* argv[]) { NetWatcher net_watcher; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); std::string ignored_netifs_str = command_line->GetSwitchValueASCII(kIgnoreNetifFlag); diff --git a/www/ungoogled-chromium/files/patch-net_traffic__annotation_network__traffic__annotation.h b/www/ungoogled-chromium/files/patch-net_traffic__annotation_network__traffic__annotation.h index dbd3a0044657..abd4c9ebd086 100644 --- a/www/ungoogled-chromium/files/patch-net_traffic__annotation_network__traffic__annotation.h +++ b/www/ungoogled-chromium/files/patch-net_traffic__annotation_network__traffic__annotation.h @@ -1,20 +1,20 @@ ---- net/traffic_annotation/network_traffic_annotation.h.orig 2022-10-01 07:40:07 UTC +--- net/traffic_annotation/network_traffic_annotation.h.orig 2024-06-22 08:49:42 UTC +++ net/traffic_annotation/network_traffic_annotation.h @@ -373,7 +373,7 @@ struct MutablePartialNetworkTrafficAnnotationTag { } // namespace net // Placeholder for unannotated usages. -#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) #define TRAFFIC_ANNOTATION_WITHOUT_PROTO(ANNOTATION_ID) \ net::DefineNetworkTrafficAnnotation(ANNOTATION_ID, "No proto yet.") #endif @@ -387,7 +387,7 @@ struct MutablePartialNetworkTrafficAnnotationTag { - // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is + // 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)) + !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) #define NO_TRAFFIC_ANNOTATION_YET \ net::DefineNetworkTrafficAnnotation("undefined", "Nothing here yet.") diff --git a/www/ungoogled-chromium/files/patch-net_url__request_url__request__context.cc b/www/ungoogled-chromium/files/patch-net_url__request_url__request__context.cc index 13315c6ca642..42c4fae454d9 100644 --- a/www/ungoogled-chromium/files/patch-net_url__request_url__request__context.cc +++ b/www/ungoogled-chromium/files/patch-net_url__request_url__request__context.cc @@ -1,11 +1,11 @@ ---- net/url_request/url_request_context.cc.orig 2024-05-23 20:04:36 UTC +--- net/url_request/url_request_context.cc.orig 2024-06-22 08:49:42 UTC +++ net/url_request/url_request_context.cc @@ -121,7 +121,7 @@ const HttpNetworkSessionContext* URLRequestContext::Ge - // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is + // 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)) + !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) std::unique_ptr URLRequestContext::CreateRequest( const GURL& url, RequestPriority priority, diff --git a/www/ungoogled-chromium/files/patch-net_url__request_url__request__context.h b/www/ungoogled-chromium/files/patch-net_url__request_url__request__context.h index beb6d47cf15d..94e37534b7d1 100644 --- a/www/ungoogled-chromium/files/patch-net_url__request_url__request__context.h +++ b/www/ungoogled-chromium/files/patch-net_url__request_url__request__context.h @@ -1,11 +1,11 @@ ---- net/url_request/url_request_context.h.orig 2024-05-23 20:04:36 UTC +--- net/url_request/url_request_context.h.orig 2024-06-22 08:49:42 UTC +++ net/url_request/url_request_context.h @@ -89,7 +89,7 @@ class NET_EXPORT URLRequestContext final { - // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is + // 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)) + !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) // This function should not be used in Chromium, please use the version with // NetworkTrafficAnnotationTag in the future. // 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 8b5402223988..62995d70b122 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-02-25 20:22:18 UTC +--- pdf/pdfium/pdfium_engine.cc.orig 2024-06-22 08:49:42 UTC +++ pdf/pdfium/pdfium_engine.cc -@@ -85,7 +85,7 @@ +@@ -87,7 +87,7 @@ #include "gin/public/cppgc.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "pdf/pdfium/pdfium_font_linux.h" #endif -@@ -525,7 +525,7 @@ void InitializeSDK(bool enable_v8, +@@ -512,7 +512,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_cups__ipp__helper.cc b/www/ungoogled-chromium/files/patch-printing_backend_cups__ipp__helper.cc index 6b6ad3556705..fe924df063c6 100644 --- a/www/ungoogled-chromium/files/patch-printing_backend_cups__ipp__helper.cc +++ b/www/ungoogled-chromium/files/patch-printing_backend_cups__ipp__helper.cc @@ -1,11 +1,11 @@ ---- printing/backend/cups_ipp_helper.cc.orig 2023-09-17 07:59:53 UTC +--- printing/backend/cups_ipp_helper.cc.orig 2024-06-22 08:49:42 UTC +++ printing/backend/cups_ipp_helper.cc -@@ -215,7 +215,7 @@ void ExtractResolutions(const CupsOptionProvider& prin +@@ -202,7 +202,7 @@ void ExtractResolutions(const CupsOptionProvider& prin // Provide a default DPI if no valid DPI is found. #if BUILDFLAG(IS_MAC) constexpr gfx::Size kDefaultMissingDpi(kDefaultMacDpi, kDefaultMacDpi); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) constexpr gfx::Size kDefaultMissingDpi(kPixelsPerInch, kPixelsPerInch); #else constexpr gfx::Size kDefaultMissingDpi(kDefaultPdfDpi, kDefaultPdfDpi); diff --git a/www/ungoogled-chromium/files/patch-remoting_host_evaluate__capability.cc b/www/ungoogled-chromium/files/patch-remoting_host_evaluate__capability.cc index e0d37f59af6b..96c4d2a04ba9 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_evaluate__capability.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_evaluate__capability.cc @@ -1,11 +1,11 @@ ---- remoting/host/evaluate_capability.cc.orig 2022-10-01 07:40:07 UTC +--- remoting/host/evaluate_capability.cc.orig 2024-06-22 08:49:42 UTC +++ remoting/host/evaluate_capability.cc -@@ -55,7 +55,7 @@ base::FilePath BuildHostBinaryPath() { +@@ -56,7 +56,7 @@ base::FilePath BuildHostBinaryPath() { } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (path.BaseName().value() == FILE_PATH_LITERAL("chrome-remote-desktop-host")) { return path; diff --git a/www/ungoogled-chromium/files/patch-remoting_host_host__attributes.cc b/www/ungoogled-chromium/files/patch-remoting_host_host__attributes.cc index 0d8b40a47309..400aa104d65c 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_host__attributes.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_host__attributes.cc @@ -1,11 +1,11 @@ ---- remoting/host/host_attributes.cc.orig 2024-02-03 15:42:55 UTC +--- remoting/host/host_attributes.cc.orig 2024-06-22 08:49:42 UTC +++ remoting/host/host_attributes.cc -@@ -104,7 +104,7 @@ std::string GetHostAttributes() { +@@ -105,7 +105,7 @@ std::string GetHostAttributes() { if (media::InitializeMediaFoundation()) { result.push_back("HWEncoder"); } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) result.push_back("HWEncoder"); #endif diff --git a/www/ungoogled-chromium/files/patch-remoting_host_setup_start__host__main.cc b/www/ungoogled-chromium/files/patch-remoting_host_setup_start__host__main.cc index b6af5d9bea72..90ca35b6c9f5 100644 --- a/www/ungoogled-chromium/files/patch-remoting_host_setup_start__host__main.cc +++ b/www/ungoogled-chromium/files/patch-remoting_host_setup_start__host__main.cc @@ -1,29 +1,29 @@ ---- remoting/host/setup/start_host_main.cc.orig 2024-05-23 20:04:36 UTC +--- remoting/host/setup/start_host_main.cc.orig 2024-06-22 08:49:42 UTC +++ remoting/host/setup/start_host_main.cc -@@ -38,7 +38,7 @@ +@@ -37,7 +37,7 @@ #include #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/setup/daemon_controller_delegate_linux.h" #include "remoting/host/setup/start_host_as_root.h" #endif // BUILDFLAG(IS_LINUX) -@@ -340,7 +340,7 @@ bool InitializeCloudMachineParams(HostStarter::Params& +@@ -339,7 +339,7 @@ bool InitializeCloudMachineParams(HostStarter::Params& } // namespace int StartHostMain(int argc, char** argv) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Minimize the amount of code that runs as root on Posix systems. if (getuid() == 0) { return remoting::StartHostAsRoot(argc, argv); -@@ -371,7 +371,7 @@ int StartHostMain(int argc, char** argv) { +@@ -364,7 +364,7 @@ int StartHostMain(int argc, char** argv) { mojo::core::Init(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (command_line->HasSwitch("no-start")) { // On Linux, registering the host with systemd and starting it is the only // reason start_host requires root. The --no-start options skips that final diff --git a/www/ungoogled-chromium/files/patch-services_audio_audio__sandbox__hook__linux.cc b/www/ungoogled-chromium/files/patch-services_audio_audio__sandbox__hook__linux.cc index 4f3a05900584..342e5b806df5 100644 --- a/www/ungoogled-chromium/files/patch-services_audio_audio__sandbox__hook__linux.cc +++ b/www/ungoogled-chromium/files/patch-services_audio_audio__sandbox__hook__linux.cc @@ -1,31 +1,31 @@ ---- services/audio/audio_sandbox_hook_linux.cc.orig 2024-04-23 07:42:17 UTC +--- services/audio/audio_sandbox_hook_linux.cc.orig 2024-06-22 08:49:42 UTC +++ services/audio/audio_sandbox_hook_linux.cc -@@ -144,6 +144,7 @@ void AddPulseAudioFilePermissions( +@@ -143,6 +143,7 @@ void AddPulseAudioFilePermissions( } #endif +#if !BUILDFLAG(IS_BSD) std::vector GetAudioFilePermissions() { std::vector permissions{ BrokerFilePermission::ReadOnly("/dev/urandom"), -@@ -172,10 +173,12 @@ void LoadAudioLibraries() { +@@ -171,10 +172,12 @@ void LoadAudioLibraries() { } } } +#endif } // namespace bool AudioPreSandboxHook(sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) LoadAudioLibraries(); auto* instance = sandbox::policy::SandboxLinux::GetInstance(); instance->StartBrokerProcess(MakeBrokerCommandSet({ -@@ -193,6 +196,7 @@ bool AudioPreSandboxHook(sandbox::policy::SandboxLinux - // TODO(https://crbug.com/850878) enable namespace sandbox. Currently, if +@@ -192,6 +195,7 @@ bool AudioPreSandboxHook(sandbox::policy::SandboxLinux + // TODO(crbug.com/40579955) enable namespace sandbox. Currently, if // enabled, connect() on pulse native socket fails with ENOENT (called from // pa_context_connect). +#endif return true; } diff --git a/www/ungoogled-chromium/files/patch-services_device_BUILD.gn b/www/ungoogled-chromium/files/patch-services_device_BUILD.gn index eb91afd9270d..85f89705e6c9 100644 --- a/www/ungoogled-chromium/files/patch-services_device_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-services_device_BUILD.gn @@ -1,11 +1,11 @@ ---- services/device/BUILD.gn.orig 2023-11-04 07:08:51 UTC +--- services/device/BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ services/device/BUILD.gn -@@ -13,7 +13,7 @@ if (is_android) { +@@ -14,7 +14,7 @@ if (is_android) { } is_serial_enabled_platform = - is_win || ((is_linux || is_chromeos) && use_udev) || is_mac + is_win || ((!is_bsd && is_linux || is_chromeos) && use_udev) || is_mac source_set("lib") { # This should be visible only to embedders of the Device Service, and the diff --git a/www/ungoogled-chromium/files/patch-services_device_hid_hid__connection__fido.cc b/www/ungoogled-chromium/files/patch-services_device_hid_hid__connection__fido.cc index 9000ccc57c10..ea821ca45bc4 100644 --- a/www/ungoogled-chromium/files/patch-services_device_hid_hid__connection__fido.cc +++ b/www/ungoogled-chromium/files/patch-services_device_hid_hid__connection__fido.cc @@ -1,219 +1,219 @@ ---- services/device/hid/hid_connection_fido.cc.orig 2023-03-10 11:01:21 UTC +--- services/device/hid/hid_connection_fido.cc.orig 2024-06-22 08:49:42 UTC +++ services/device/hid/hid_connection_fido.cc @@ -0,0 +1,216 @@ +// Copyright 2014 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "services/device/hid/hid_connection_fido.h" + +#include +#include + +#include +#include +#include + +#include "base/files/file_descriptor_watcher_posix.h" +#include "base/memory/ref_counted_memory.h" +#include "base/posix/eintr_wrapper.h" +#include "base/threading/scoped_blocking_call.h" +#include "components/device_event_log/device_event_log.h" +#include "services/device/hid/hid_service.h" + +namespace device { + +class HidConnectionFido::BlockingTaskRunnerHelper { + public: + BlockingTaskRunnerHelper(base::ScopedFD fd, + scoped_refptr device_info, + base::WeakPtr connection) + : fd_(std::move(fd)), + connection_(connection), + origin_task_runner_(base::SequencedTaskRunner::GetCurrentDefault()) { + DETACH_FROM_SEQUENCE(sequence_checker_); + // Report buffers must always have room for the report ID. + report_buffer_size_ = device_info->max_input_report_size() + 1; + has_report_id_ = device_info->has_report_id(); + } + + BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete; + BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete; + + ~BlockingTaskRunnerHelper() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + } + + // Starts the FileDescriptorWatcher that reads input events from the device. + // Must be called on a thread that has a base::MessageLoopForIO. + void Start() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + file_watcher_ = base::FileDescriptorWatcher::WatchReadable( + fd_.get(), base::BindRepeating( + &BlockingTaskRunnerHelper::OnFileCanReadWithoutBlocking, + base::Unretained(this))); + } + + void Write(scoped_refptr buffer, + WriteCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + -+ auto data = buffer->front(); ++ auto data = buffer->data(); + size_t size = buffer->size(); + // if report id is 0, it shouldn't be included + if (data[0] == 0) { + data++; + size--; + } + + ssize_t result = + HANDLE_EINTR(write(fd_.get(), data, size)); + if (result < 0) { + HID_PLOG(EVENT) << "Write failed"; + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), false)); + } else { + if (static_cast(result) != size) { + HID_LOG(EVENT) << "Incomplete HID write: " << result + << " != " << buffer->size(); + } + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), true)); + } + } + + void GetFeatureReport(uint8_t report_id, + scoped_refptr buffer, + ReadCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + HID_PLOG(EVENT) << "GendFeatureReport not implemented on OpenBSD"; + origin_task_runner_->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), false, nullptr, 0)); + } + + void SendFeatureReport(scoped_refptr buffer, + WriteCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + HID_PLOG(EVENT) << "SendFeatureReport not implemented on OpenBSD"; + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), false)); + } + + private: + void OnFileCanReadWithoutBlocking() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + auto buffer = + base::MakeRefCounted(report_buffer_size_); -+ uint8_t* data = buffer->front(); ++ uint8_t* data = buffer->as_vector().data(); + size_t length = report_buffer_size_; + if (!has_report_id_) { + // Fido will not prefix the buffer with a report ID if report IDs are not + // used by the device. Prefix the buffer with 0. + *data++ = 0; + length--; + } + + ssize_t bytes_read = HANDLE_EINTR(read(fd_.get(), data, length)); + if (bytes_read < 0) { + if (errno != EAGAIN) { + HID_PLOG(EVENT) << "Read failed"; + // This assumes that the error is unrecoverable and disables reading + // from the device until it has been re-opened. + // TODO(reillyg): Investigate starting and stopping the file descriptor + // watcher in response to pending read requests so that per-request + // errors can be returned to the client. + file_watcher_.reset(); + } + return; + } + if (!has_report_id_) { + // Behave as if the byte prefixed above as the the report ID was read. + bytes_read++; + } + + origin_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&HidConnectionFido::ProcessInputReport, + connection_, buffer, bytes_read)); + } + + SEQUENCE_CHECKER(sequence_checker_); + base::ScopedFD fd_; + size_t report_buffer_size_; + bool has_report_id_; + base::WeakPtr connection_; + const scoped_refptr origin_task_runner_; + std::unique_ptr file_watcher_; +}; + +HidConnectionFido::HidConnectionFido( + scoped_refptr device_info, + base::ScopedFD fd, + scoped_refptr blocking_task_runner, + bool allow_protected_reports, + bool allow_fido_reports) + : HidConnection(device_info, allow_protected_reports, allow_fido_reports), + helper_(nullptr, base::OnTaskRunnerDeleter(blocking_task_runner)), + blocking_task_runner_(std::move(blocking_task_runner)) { + helper_.reset(new BlockingTaskRunnerHelper(std::move(fd), device_info, + weak_factory_.GetWeakPtr())); + blocking_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::Start, + base::Unretained(helper_.get()))); +} + +HidConnectionFido::~HidConnectionFido() {} + +void HidConnectionFido::PlatformClose() { + // By closing the device on the blocking task runner 1) the requirement that + // base::ScopedFD is destroyed on a thread where I/O is allowed is satisfied + // and 2) any tasks posted to this task runner that refer to this file will + // complete before it is closed. + helper_.reset(); +} + +void HidConnectionFido::PlatformWrite( + scoped_refptr buffer, + WriteCallback callback) { + // Fido expects the first byte of the buffer to always be a report ID so the + // buffer can be used directly. + blocking_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::Write, + base::Unretained(helper_.get()), buffer, + std::move(callback))); +} + +void HidConnectionFido::PlatformGetFeatureReport(uint8_t report_id, + ReadCallback callback) { + // The first byte of the destination buffer is the report ID being requested + // and is overwritten by the feature report. + DCHECK_GT(device_info()->max_feature_report_size(), 0u); + auto buffer = base::MakeRefCounted( + device_info()->max_feature_report_size() + 1); -+ buffer->data()[0] = report_id; ++ buffer->as_vector().data()[0] = report_id; + + blocking_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::GetFeatureReport, + base::Unretained(helper_.get()), report_id, + buffer, std::move(callback))); +} + +void HidConnectionFido::PlatformSendFeatureReport( + scoped_refptr buffer, + WriteCallback callback) { + // Fido expects the first byte of the buffer to always be a report ID so the + // buffer can be used directly. + blocking_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::SendFeatureReport, + base::Unretained(helper_.get()), buffer, + std::move(callback))); +} + +} // namespace device diff --git a/www/ungoogled-chromium/files/patch-services_device_hid_hid__connection__freebsd.cc b/www/ungoogled-chromium/files/patch-services_device_hid_hid__connection__freebsd.cc index 909c6812bc58..a1184540f2ca 100644 --- a/www/ungoogled-chromium/files/patch-services_device_hid_hid__connection__freebsd.cc +++ b/www/ungoogled-chromium/files/patch-services_device_hid_hid__connection__freebsd.cc @@ -1,243 +1,243 @@ ---- services/device/hid/hid_connection_freebsd.cc.orig 2023-04-08 11:38:38 UTC +--- services/device/hid/hid_connection_freebsd.cc.orig 2024-06-22 08:49:42 UTC +++ services/device/hid/hid_connection_freebsd.cc @@ -0,0 +1,240 @@ +// Copyright (c) 2014 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 "services/device/hid/hid_connection_freebsd.h" + +#include +#include + +#include "base/files/file_descriptor_watcher_posix.h" +#include "base/location.h" +#include "base/numerics/safe_math.h" +#include "base/posix/eintr_wrapper.h" +#include "base/strings/stringprintf.h" +#include "base/task/single_thread_task_runner.h" +#include "base/threading/scoped_blocking_call.h" +#include "base/threading/thread_restrictions.h" +#include "components/device_event_log/device_event_log.h" +#include "services/device/hid/hid_service.h" + +namespace device { + +class HidConnectionFreeBSD::BlockingTaskRunnerHelper { + public: + BlockingTaskRunnerHelper(base::ScopedFD fd, + scoped_refptr device_info, + base::WeakPtr connection) + : fd_(std::move(fd)), + connection_(connection), + origin_task_runner_(base::SequencedTaskRunner::GetCurrentDefault()) { + DETACH_FROM_SEQUENCE(sequence_checker_); + // Report buffers must always have room for the report ID. + report_buffer_size_ = device_info->max_input_report_size() + 1; + has_report_id_ = device_info->has_report_id(); + } + + BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete; + BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete; + + ~BlockingTaskRunnerHelper() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } + + // Starts the FileDescriptorWatcher that reads input events from the device. + // Must be called on a thread that has a base::MessageLoopForIO. + void Start() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::internal::AssertBlockingAllowed(); + + file_watcher_ = base::FileDescriptorWatcher::WatchReadable( + fd_.get(), base::BindRepeating(&BlockingTaskRunnerHelper::OnFileCanReadWithoutBlocking, + base::Unretained(this))); + } + + void Write(scoped_refptr buffer, + WriteCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + -+ auto data = buffer->front(); ++ auto data = buffer->as_vector().data(); + size_t size = buffer->size(); + // if report id is 0, it shouldn't be included + if (data[0] == 0) { + data++; + size--; + } + + ssize_t result = HANDLE_EINTR(write(fd_.get(), data, size)); + if (result < 0) { + HID_PLOG(EVENT) << "Write failed"; + origin_task_runner_->PostTask(FROM_HERE, base::BindOnce(std::move(callback), false)); + } else { + if (static_cast(result) != size) + HID_LOG(EVENT) << "Incomplete HID write: " << result << " != " << size; + origin_task_runner_->PostTask(FROM_HERE, base::BindOnce(std::move(callback), true)); + } + } + + void GetFeatureReport(uint8_t report_id, + scoped_refptr buffer, + ReadCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + struct usb_gen_descriptor ugd; + ugd.ugd_report_type = UHID_FEATURE_REPORT; -+ ugd.ugd_data = buffer->front(); ++ ugd.ugd_data = buffer->as_vector().data(); + ugd.ugd_maxlen = buffer->size(); + int result = HANDLE_EINTR( + ioctl(fd_.get(), USB_GET_REPORT, &ugd)); + if (result < 0) { + HID_PLOG(EVENT) << "Failed to get feature report"; + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), false, nullptr, 0)); + } else if (result == 0) { + HID_LOG(EVENT) << "Get feature result too short."; + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), false, nullptr, 0)); + } else { + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), true, buffer, result)); + } + } + + void SendFeatureReport(scoped_refptr buffer, + WriteCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + struct usb_gen_descriptor ugd; + ugd.ugd_report_type = UHID_FEATURE_REPORT; -+ ugd.ugd_data = buffer->front(); ++ ugd.ugd_data = buffer->as_vector().data(); + ugd.ugd_maxlen = buffer->size(); + // FreeBSD does not require report id if it's not used -+ if (buffer->front()[0] == 0) { -+ ugd.ugd_data = buffer->front() + 1; ++ if (buffer->data()[0] == 0) { ++ ugd.ugd_data = buffer->as_vector().data() + 1; + ugd.ugd_maxlen = buffer->size() - 1; + } else { -+ ugd.ugd_data = buffer->front(); ++ ugd.ugd_data = buffer->as_vector().data(); + ugd.ugd_maxlen = buffer->size(); + } + int result = HANDLE_EINTR( + ioctl(fd_.get(), USB_SET_REPORT, &ugd)); + if (result < 0) { + HID_PLOG(EVENT) << "Failed to send feature report"; + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), false)); + } else { + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), true)); + } + } + + private: + void OnFileCanReadWithoutBlocking() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + scoped_refptr buffer(new base::RefCountedBytes(report_buffer_size_)); -+ unsigned char* data = buffer->front(); ++ unsigned char* data = buffer->as_vector().data(); + size_t length = report_buffer_size_; + if (!has_report_id_) { + // FreeBSD will not prefix the buffer with a report ID if report IDs are not + // used by the device. Prefix the buffer with 0. + *data++ = 0; + length--; + } + + ssize_t bytes_read = HANDLE_EINTR(read(fd_.get(), data, length)); + if (bytes_read < 0) { + if (errno != EAGAIN) { + HID_PLOG(EVENT) << "Read failed"; + // This assumes that the error is unrecoverable and disables reading + // from the device until it has been re-opened. + // TODO(reillyg): Investigate starting and stopping the file descriptor + // watcher in response to pending read requests so that per-request + // errors can be returned to the client. + file_watcher_.reset(); + } + return; + } + if (!has_report_id_) { + // Behave as if the byte prefixed above as the the report ID was read. + bytes_read++; + } + + origin_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&HidConnectionFreeBSD::ProcessInputReport, + connection_, buffer, bytes_read)); + } + + SEQUENCE_CHECKER(sequence_checker_); + base::ScopedFD fd_; + size_t report_buffer_size_; + bool has_report_id_; + base::WeakPtr connection_; + const scoped_refptr origin_task_runner_; + std::unique_ptr file_watcher_; +}; + +HidConnectionFreeBSD::HidConnectionFreeBSD( + scoped_refptr device_info, + base::ScopedFD fd, + scoped_refptr blocking_task_runner, + bool allow_protected_reports, + bool allow_fido_reports) + : HidConnection(device_info, allow_protected_reports, allow_fido_reports), + helper_(nullptr, base::OnTaskRunnerDeleter(blocking_task_runner)), + blocking_task_runner_(std::move(blocking_task_runner)) { + helper_.reset(new BlockingTaskRunnerHelper(std::move(fd), device_info, + weak_factory_.GetWeakPtr())); + blocking_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::Start, + base::Unretained(helper_.get()))); +} + +HidConnectionFreeBSD::~HidConnectionFreeBSD() {} + +void HidConnectionFreeBSD::PlatformClose() { + // By closing the device on the blocking task runner 1) the requirement that + // base::ScopedFD is destroyed on a thread where I/O is allowed is satisfied + // and 2) any tasks posted to this task runner that refer to this file will + // complete before it is closed. + blocking_task_runner_->DeleteSoon(FROM_HERE, helper_.release()); +} + +void HidConnectionFreeBSD::PlatformWrite(scoped_refptr buffer, + WriteCallback callback) { + + blocking_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&BlockingTaskRunnerHelper::Write, base::Unretained(helper_.get()), + buffer, std::move(callback))); +} + +void HidConnectionFreeBSD::PlatformGetFeatureReport(uint8_t report_id, + ReadCallback callback) { + // The first byte of the destination buffer is the report ID being requested + // and is overwritten by the feature report. + DCHECK_GT(device_info()->max_feature_report_size(), 0u); + scoped_refptr buffer( + new base::RefCountedBytes(device_info()->max_feature_report_size() + 1)); + if (report_id != 0) -+ buffer->data()[0] = report_id; ++ buffer->as_vector().data()[0] = report_id; + + blocking_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&BlockingTaskRunnerHelper::GetFeatureReport, + base::Unretained(helper_.get()), report_id, + buffer, std::move(callback))); +} + +void HidConnectionFreeBSD::PlatformSendFeatureReport( + scoped_refptr buffer, + WriteCallback callback) { + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + blocking_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&BlockingTaskRunnerHelper::SendFeatureReport, + base::Unretained(helper_.get()), buffer, std::move(callback))); +} + +} // namespace device diff --git a/www/ungoogled-chromium/files/patch-services_device_usb_BUILD.gn b/www/ungoogled-chromium/files/patch-services_device_usb_BUILD.gn index 9765c1fe670a..15fb01818971 100644 --- a/www/ungoogled-chromium/files/patch-services_device_usb_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-services_device_usb_BUILD.gn @@ -1,52 +1,34 @@ ---- services/device/usb/BUILD.gn.orig 2024-05-23 20:04:36 UTC +--- services/device/usb/BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ services/device/usb/BUILD.gn -@@ -91,15 +91,17 @@ static_library("usb") { +@@ -91,7 +91,7 @@ static_library("usb") { deps += [ "//third_party/re2" ] } - if (is_mac) { -- sources += [ -- "usb_device_handle_mac.cc", -- "usb_device_handle_mac.h", -- "usb_device_mac.cc", -- "usb_device_mac.h", -- "usb_service_mac.cc", -- "usb_service_mac.h", -- ] + if (is_mac || is_openbsd) { -+ if (is_mac) { -+ sources += [ -+ "usb_device_handle_mac.cc", -+ "usb_device_handle_mac.h", -+ "usb_device_mac.cc", -+ "usb_device_mac.h", -+ "usb_service_mac.cc", -+ "usb_service_mac.h", -+ ] -+ } - # These sources and deps are required for libusb. - # TODO(https://crbug.com/1096743) Remove these sources. -@@ -123,6 +125,13 @@ static_library("usb") { + # TODO(crbug.com/40136337) Remove these sources. + sources += [ +@@ -114,6 +114,13 @@ static_library("usb") { deps += [ "//third_party/libusb" ] } + if (is_freebsd) { + sources += [ + "usb_service_fake.cc", + "usb_service_fake.h", + ] + } + if (is_linux || is_chromeos) { sources += [ "usb_device_linux.cc", -@@ -140,7 +149,7 @@ static_library("usb") { +@@ -131,7 +138,7 @@ static_library("usb") { deps += [ "//device/udev_linux" ] } - if (is_android || is_chromeos || is_linux) { + if (is_android || is_chromeos || is_linux && !is_bsd) { sources += [ "usb_device_handle_usbfs.cc", "usb_device_handle_usbfs.h", diff --git a/www/ungoogled-chromium/files/patch-services_device_usb_usb__service.cc b/www/ungoogled-chromium/files/patch-services_device_usb_usb__service.cc index cae2369f2d8d..022218e945d0 100644 --- a/www/ungoogled-chromium/files/patch-services_device_usb_usb__service.cc +++ b/www/ungoogled-chromium/files/patch-services_device_usb_usb__service.cc @@ -1,39 +1,35 @@ ---- services/device/usb/usb_service.cc.orig 2022-12-02 17:56:32 UTC +--- services/device/usb/usb_service.cc.orig 2024-06-22 08:49:42 UTC +++ services/device/usb/usb_service.cc -@@ -22,13 +22,17 @@ +@@ -20,12 +20,16 @@ #if BUILDFLAG(IS_ANDROID) #include "services/device/usb/usb_service_android.h" -#elif defined(USE_UDEV) +#elif defined(USE_UDEV) && !BUILDFLAG(IS_BSD) #include "services/device/usb/usb_service_linux.h" #elif BUILDFLAG(IS_MAC) #include "services/device/usb/usb_service_impl.h" - #include "services/device/usb/usb_service_mac.h" #elif BUILDFLAG(IS_WIN) #include "services/device/usb/usb_service_win.h" +#elif BUILDFLAG(IS_OPENBSD) +#include "services/device/usb/usb_service_impl.h" +#elif BUILDFLAG(IS_FREEBSD) +#include "services/device/usb/usb_service_fake.h" #endif namespace device { -@@ -51,7 +55,7 @@ constexpr base::TaskTraits UsbService::kBlockingTaskTr +@@ -48,11 +52,13 @@ constexpr base::TaskTraits UsbService::kBlockingTaskTr std::unique_ptr UsbService::Create() { #if BUILDFLAG(IS_ANDROID) return base::WrapUnique(new UsbServiceAndroid()); -#elif defined(USE_UDEV) +#elif defined(USE_UDEV) && !BUILDFLAG(IS_BSD) return base::WrapUnique(new UsbServiceLinux()); #elif BUILDFLAG(IS_WIN) return base::WrapUnique(new UsbServiceWin()); -@@ -60,6 +64,8 @@ std::unique_ptr UsbService::Create() { - return base::WrapUnique(new UsbServiceMac()); - else - return base::WrapUnique(new UsbServiceImpl()); -+#elif BUILDFLAG(IS_BSD) + #elif BUILDFLAG(IS_MAC) + return base::WrapUnique(new UsbServiceImpl()); ++#elif BUILDFLAG(IS_BSD) + return base::WrapUnique(new UsbServiceImpl()); #else return nullptr; - #endif 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 8f82e4a4ae1c..8296c7e4830d 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-05-23 20:04:36 UTC +--- services/network/network_context.cc.orig 2024-06-22 08:49:42 UTC +++ services/network/network_context.cc @@ -527,7 +527,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_) { -@@ -2284,7 +2284,7 @@ void NetworkContext::OnHttpAuthDynamicParamsChanged( +@@ -2294,7 +2294,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 f778b56cd6f0..20c83deada6f 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-05-23 20:04:36 UTC +--- services/network/network_context.h.orig 2024-06-22 08:49:42 UTC +++ services/network/network_context.h -@@ -672,7 +672,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -677,7 +677,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 43f8417c2afb..fd2bac34badc 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-05-23 20:04:36 UTC +--- services/network/public/cpp/BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ services/network/public/cpp/BUILD.gn -@@ -510,7 +510,7 @@ component("cpp_base") { +@@ -515,7 +515,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 6358606d9683..d8a2645781a4 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-05-23 20:04:36 UTC +--- services/network/public/mojom/BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ services/network/public/mojom/BUILD.gn -@@ -522,11 +522,11 @@ mojom("url_loader_base") { +@@ -524,11 +524,11 @@ mojom("url_loader_base") { } enabled_features = [] - if (is_android || is_chromeos || is_linux) { + if (!is_bsd && (is_android || is_chromeos || is_linux)) { enabled_features += [ "network_change_notifier_in_browser" ] } - if (is_linux) { + if (is_linux && !is_bsd) { - # TODO(crbug.com/1431866): Remove this once is_linux in the mojom IDL does + # TODO(crbug.com/40263697): Remove this once is_linux in the mojom IDL does # not include lacros. enabled_features += [ "use_network_interface_change_listener" ] -@@ -1471,7 +1471,7 @@ mojom("mojom") { +@@ -1489,7 +1489,7 @@ mojom("mojom") { } } - if (is_linux) { + if (is_linux && !is_bsd) { - # TODO(crbug.com/1431866): Remove this once is_linux in the mojom IDL does + # 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_ml_on__device__model__executor.cc b/www/ungoogled-chromium/files/patch-services_on__device__model_ml_on__device__model__executor.cc deleted file mode 100644 index e9408aea4a04..000000000000 --- a/www/ungoogled-chromium/files/patch-services_on__device__model_ml_on__device__model__executor.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- services/on_device_model/ml/on_device_model_executor.cc.orig 2024-05-23 20:04:36 UTC -+++ services/on_device_model/ml/on_device_model_executor.cc -@@ -60,7 +60,7 @@ const base::FeatureParam kAllowFp16{ - &optimization_guide::features::kOptimizationGuideOnDeviceModel, - "on_device_model_allow_fp16", - // TODO(b/333406033): Fix Linux fp16 issues. --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - false - #else - true 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 b7d349601f47..bfd05dce0ee1 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-05-23 20:04:36 UTC +--- services/on_device_model/on_device_model_service.h.orig 2024-06-22 08:49:42 UTC +++ services/on_device_model/on_device_model_service.h @@ -22,6 +22,10 @@ #include "sandbox/policy/linux/sandbox_linux.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + namespace on_device_model { class COMPONENT_EXPORT(ON_DEVICE_MODEL) OnDeviceModelService -@@ -31,7 +35,7 @@ class COMPONENT_EXPORT(ON_DEVICE_MODEL) OnDeviceModelS - // These are defined separately in pre_sandbox_init.cc for explicit security - // review coverage. - [[nodiscard]] static bool PreSandboxInit(); +@@ -35,7 +39,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_on__device__model_pre__sandbox__init.cc b/www/ungoogled-chromium/files/patch-services_on__device__model_pre__sandbox__init.cc index 8b13e4f64585..fb191febc4a1 100644 --- a/www/ungoogled-chromium/files/patch-services_on__device__model_pre__sandbox__init.cc +++ b/www/ungoogled-chromium/files/patch-services_on__device__model_pre__sandbox__init.cc @@ -1,38 +1,38 @@ ---- services/on_device_model/pre_sandbox_init.cc.orig 2024-05-23 20:04:36 UTC +--- services/on_device_model/pre_sandbox_init.cc.orig 2024-06-22 08:49:42 UTC +++ services/on_device_model/pre_sandbox_init.cc @@ -14,7 +14,7 @@ #include "services/on_device_model/ml/chrome_ml.h" // nogncheck #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "gpu/config/gpu_info_collector.h" // nogncheck #include "third_party/dawn/include/dawn/dawn_proc.h" // nogncheck #include "third_party/dawn/include/dawn/native/DawnNative.h" // nogncheck -@@ -25,7 +25,7 @@ namespace on_device_model { +@@ -31,7 +31,7 @@ namespace on_device_model { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) constexpr uint32_t kVendorIdAMD = 0x1002; constexpr uint32_t kVendorIdIntel = 0x8086; constexpr uint32_t kVendorIdNVIDIA = 0x10DE; -@@ -74,7 +74,7 @@ bool OnDeviceModelService::PreSandboxInit() { +@@ -80,7 +80,7 @@ bool OnDeviceModelService::PreSandboxInit() { } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Warm any relevant drivers before attempting to bring up the sandbox. For // good measure we initialize a device instance for any adapter with an // appropriate backend on top of any integrated or discrete GPU. -@@ -102,7 +102,7 @@ bool OnDeviceModelService::PreSandboxInit() { +@@ -116,7 +116,7 @@ bool OnDeviceModelService::PreSandboxInit() { return true; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // static void OnDeviceModelService::AddSandboxLinuxOptions( sandbox::policy::SandboxLinux::Options& options) { 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 4a68a93cb351..46d00e0397ae 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-05-23 20:04:36 UTC +--- services/video_capture/video_capture_service_impl.cc.orig 2024-06-22 08:49:42 UTC +++ services/video_capture/video_capture_service_impl.cc -@@ -40,7 +40,7 @@ +@@ -41,7 +41,7 @@ #include "services/video_capture/lacros/device_factory_adapter_lacros.h" #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) #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" -@@ -108,7 +108,7 @@ class VideoCaptureServiceImpl::GpuDependenciesContext +@@ -109,7 +109,7 @@ class VideoCaptureServiceImpl::GpuDependenciesContext this}; }; -#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) // 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 -@@ -303,7 +303,7 @@ void VideoCaptureServiceImpl::LazyInitializeGpuDepende +@@ -311,7 +311,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) { #else if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) { -@@ -415,7 +415,7 @@ void VideoCaptureServiceImpl::OnGpuInfoUpdate(const CH +@@ -433,7 +433,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) 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 b5ada17a504b..4a86c8f860db 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-02-25 20:22:18 UTC +--- services/video_capture/video_capture_service_impl.h.orig 2024-06-22 08:49:42 UTC +++ services/video_capture/video_capture_service_impl.h -@@ -26,7 +26,7 @@ +@@ -27,7 +27,7 @@ #include "services/video_capture/ash/video_capture_device_factory_ash.h" #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) #include "services/viz/public/cpp/gpu/gpu.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -70,7 +70,7 @@ class VideoCaptureServiceImpl : public mojom::VideoCap +@@ -71,7 +71,7 @@ class VideoCaptureServiceImpl : public mojom::VideoCap #if BUILDFLAG(IS_WIN) 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) void SetVizGpu(std::unique_ptr viz_gpu); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -107,7 +107,7 @@ class VideoCaptureServiceImpl : public mojom::VideoCap +@@ -112,7 +112,7 @@ class VideoCaptureServiceImpl : public mojom::VideoCap factory_receivers_ash_; #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) class VizGpuContextProvider; std::unique_ptr viz_gpu_context_provider_; std::unique_ptr viz_gpu_; diff --git a/www/ungoogled-chromium/files/patch-skia_ext_SkMemory__new__handler.cpp b/www/ungoogled-chromium/files/patch-skia_ext_SkMemory__new__handler.cpp index bdab574643e5..520f51690aab 100644 --- a/www/ungoogled-chromium/files/patch-skia_ext_SkMemory__new__handler.cpp +++ b/www/ungoogled-chromium/files/patch-skia_ext_SkMemory__new__handler.cpp @@ -1,20 +1,20 @@ ---- skia/ext/SkMemory_new_handler.cpp.orig 2024-04-23 07:42:17 UTC +--- skia/ext/SkMemory_new_handler.cpp.orig 2024-06-22 08:49:42 UTC +++ skia/ext/SkMemory_new_handler.cpp @@ -19,7 +19,7 @@ #include #elif BUILDFLAG(IS_APPLE) #include -#else +#elif !BUILDFLAG(IS_BSD) #include #endif -@@ -92,7 +92,7 @@ static void* malloc_nothrow(size_t size) { +@@ -105,7 +105,7 @@ static void* malloc_nothrow(size_t size, int debug_sen // TODO(b.kelemen): we should always use UncheckedMalloc but currently it // doesn't work as intended everywhere. void* result; -#if BUILDFLAG(IS_IOS) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) result = malloc(size); #else // It's the responsibility of the caller to check the return value. diff --git a/www/ungoogled-chromium/files/patch-third__party_angle_BUILD.gn b/www/ungoogled-chromium/files/patch-third__party_angle_BUILD.gn index c984e3883cbc..76d5e5cac276 100644 --- a/www/ungoogled-chromium/files/patch-third__party_angle_BUILD.gn +++ b/www/ungoogled-chromium/files/patch-third__party_angle_BUILD.gn @@ -1,29 +1,29 @@ ---- third_party/angle/BUILD.gn.orig 2024-04-23 07:42:17 UTC +--- third_party/angle/BUILD.gn.orig 2024-06-22 08:49:42 UTC +++ third_party/angle/BUILD.gn -@@ -335,7 +335,6 @@ config("extra_warnings") { +@@ -339,7 +339,6 @@ config("extra_warnings") { "-Wtautological-type-limit-compare", "-Wundefined-reinterpret-cast", "-Wunneeded-internal-declaration", - "-Wunused-but-set-variable", "-Wsuggest-destructor-override", "-Wsuggest-override", -@@ -506,7 +505,7 @@ template("angle_common_lib") { +@@ -516,7 +515,7 @@ template("angle_common_lib") { all_dependent_configs = [ ":angle_disable_pool_alloc" ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { libs = [ "dl" ] } -@@ -661,6 +660,9 @@ angle_static_library("angle_gpu_info_util") { +@@ -671,6 +670,9 @@ angle_static_library("angle_gpu_info_util") { "Xi", "Xext", ] + if (is_bsd) { + libs += [ "GL" ] + } } if (angle_use_wayland && angle_has_build) { diff --git a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py index f68cb9f752a4..b3b649f73c52 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py.orig 2022-10-01 07:40:07 UTC +--- third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py.orig 2024-06-22 08:49:42 UTC +++ third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py -@@ -28,7 +28,7 @@ def init(root_src_dir, enable_style_format=True): - root_src_dir = os.path.abspath(root_src_dir) +@@ -30,7 +30,7 @@ def init(root_src_dir, enable_style_format=True): # Determine //buildtools// directory + new_path_platform_suffix = "" - if sys.platform.startswith("linux"): + if sys.platform.startswith(("linux","openbsd","freebsd")): platform = "linux64" exe_suffix = "" elif sys.platform.startswith("darwin"): 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 e5975630beda..9e29890bd9ad 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-05-23 20:04:36 UTC +--- third_party/blink/renderer/controller/blink_initializer.cc.orig 2024-06-22 08:49:42 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 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)), -@@ -306,7 +306,7 @@ void BlinkInitializer::RegisterMemoryWatchers(Platform +@@ -303,7 +303,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_core_exported_web__view__impl.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc index 5c4b3a11728c..73502c6a8b13 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-05-23 20:04:36 UTC +--- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2024-06-22 08:49:42 UTC +++ third_party/blink/renderer/core/exported/web_view_impl.cc @@ -425,7 +425,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' -@@ -3387,7 +3387,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs +@@ -3388,7 +3388,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_layout_layout__view.cc b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc index a1bee6589591..88e0bdb510ed 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-05-23 20:04:36 UTC +--- third_party/blink/renderer/core/layout/layout_view.cc.orig 2024-06-22 08:49:42 UTC +++ third_party/blink/renderer/core/layout/layout_view.cc -@@ -73,7 +73,7 @@ +@@ -72,7 +72,7 @@ + #include "ui/display/screen_info.h" #include "ui/gfx/geometry/quad_f.h" - #include "ui/gfx/geometry/size_conversions.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 -@@ -832,7 +832,7 @@ void LayoutView::LayoutRoot() { +@@ -799,7 +799,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_modules_ml_webnn_features.gni b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_features.gni index ba9513bff4a0..7e6c79ebbac4 100644 --- a/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_features.gni +++ b/www/ungoogled-chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_features.gni @@ -1,11 +1,10 @@ ---- third_party/blink/renderer/modules/ml/webnn/features.gni.orig 2024-04-23 07:42:17 UTC +--- third_party/blink/renderer/modules/ml/webnn/features.gni.orig 2024-06-22 08:49:42 UTC +++ third_party/blink/renderer/modules/ml/webnn/features.gni -@@ -6,7 +6,7 @@ import("//build/config/chrome_build.gni") - declare_args() { +@@ -7,6 +7,6 @@ declare_args() { # This enables building WebNN with XNNPACK. Currently only available for - # Windows, macOS and Linux on x64, x86 and arm64. -- build_webnn_with_xnnpack = (is_linux || is_win || is_mac) && -+ build_webnn_with_xnnpack = !is_bsd && (is_linux || is_win || is_mac) && - (current_cpu == "x64" || current_cpu == "x86" || - (current_cpu == "arm64" && !is_win)) + # Windows and macOS on x64, x86 and arm64. + build_webnn_with_xnnpack = +- (is_win || is_mac) && ++ !is_bsd && (is_win || is_mac) && + (current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm64") } 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 bde5c2df1138..2c23c5afb644 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-05-23 20:04:36 UTC +--- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2024-06-22 08:49:42 UTC +++ third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -6355,7 +6355,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid +@@ -6351,7 +6351,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