diff --git a/www/iridium/Makefile b/www/iridium/Makefile index 6994a6d513fa..fc05a6b17926 100644 --- a/www/iridium/Makefile +++ b/www/iridium/Makefile @@ -1,358 +1,358 @@ PORTNAME= iridium -PORTVERSION= 2025.11.142.3 +PORTVERSION= 2025.12.143 PULSEMV= 16 PULSEV= ${PULSEMV}.1 CATEGORIES= www wayland MASTER_SITES= https://downloads.iridiumbrowser.de/source/ \ https://freedesktop.org/software/pulseaudio/releases/:pulseaudio PKGNAMESUFFIX= -browser DISTNAME= ${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION} DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ pulseaudio-${PULSEV}.tar.gz:pulseaudio MAINTAINER= chromium@FreeBSD.org COMMENT= Iridium browser WWW= https://iridiumbrowser.de/ LICENSE= BSD3CLAUSE LGPL21 MPL11 LICENSE_COMB= multi ONLY_FOR_ARCHS= aarch64 amd64 BUILD_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \ bindgen:devel/rust-bindgen-cli \ gperf:devel/gperf \ flock:sysutils/flock \ node:www/node \ rustc:lang/rust \ xcb-proto>0:x11/xcb-proto \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ ${LOCALBASE}/share/usbids/usb.ids:misc/usbids \ ${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib@${PY_FLAVOR} \ ${LOCALBASE}/include/va/va.h:multimedia/libva \ ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri \ ${LOCALBASE}/libdata/pkgconfig/Qt5Core.pc:devel/qt5-core \ ${LOCALBASE}/libdata/pkgconfig/Qt5Widgets.pc:x11-toolkits/qt5-widgets LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-core \ libatspi.so:accessibility/at-spi2-core \ libspeechd.so:accessibility/speech-dispatcher \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libepoll-shim.so:devel/libepoll-shim \ 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 gdkpixbuf 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+= clang_use_chrome_plugins=false \ chrome_pgo_phase=0 \ enable_backup_ref_ptr_support=false \ enable_hangout_services_extension=true \ enable_remoting=false \ fatal_linker_warnings=false \ icu_use_data_file=false \ is_clang=true \ optimize_webui=true \ toolkit_views=true \ treat_warnings_as_errors=false \ use_allocator_shim=false \ use_aura=true \ use_custom_libcxx=true \ use_custom_libunwind=true \ use_lld=true \ use_partition_alloc=true \ use_partition_alloc_as_malloc=false \ use_sysroot=false \ use_system_freetype=false \ use_system_harfbuzz=true \ use_system_libffi=true \ use_system_libjpeg=true \ use_udev=false \ extra_cxxflags="${CXXFLAGS} -I${LOCALBASE}/include/libepoll-shim ${PINCLUDES}" \ extra_ldflags="${LDFLAGS}" \ ffmpeg_branding="${FFMPEG_BRAND}" # TODO: investigate building with these options: # use_system_minigbm GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles SUB_FILES= iridium-browser.desktop iridium SUB_LIST+= COMMENT="${COMMENT}" OPTIONS_DEFINE= CODECS CUPS DEBUG KERBEROS LTO PIPEWIRE OPTIONS_DEFAULT= CODECS CUPS KERBEROS PIPEWIRE SNDIO ALSA PULSEAUDIO OPTIONS_EXCLUDE_aarch64=LTO OPTIONS_GROUP= AUDIO OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO OPTIONS_RADIO= KERBEROS OPTIONS_RADIO_KERBEROS= HEIMDAL HEIMDAL_BASE MIT OPTIONS_SUB= yes CODECS_DESC= Compile and enable patented codecs like H.264 HEIMDAL_BASE_DESC= Heimdal Kerberos (base) HEIMDAL_DESC= Heimdal Kerberos (security/heimdal) MIT_DESC= MIT Kerberos (security/krb5) ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \ alsa-lib>=1.1.1_1:audio/alsa-lib ALSA_VARS= GN_ARGS+=use_alsa=true ALSA_VARS_OFF= GN_ARGS+=use_alsa=false CODECS_VARS= GN_ARGS+=proprietary_codecs=true \ FFMPEG_BRAND="Chrome" CODECS_VARS_OFF= GN_ARGS+=proprietary_codecs=false \ FFMPEG_BRAND="Chromium" CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_VARS= GN_ARGS+=use_cups=true CUPS_VARS_OFF= GN_ARGS+=use_cups=false DEBUG_VARS= BUILDTYPE=Debug \ GN_ARGS+=is_debug=true \ GN_ARGS+=is_component_build=false \ GN_ARGS+=symbol_level=1 \ GN_BOOTSTRAP_FLAGS+=--debug \ WANTSPACE="60 GB" \ WANTMEM="32 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="35 GB" \ WANTMEM="8 GB" 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="40 GB" \ WANTMEM="16 GB" LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false MIT_LIB_DEPENDS= libkrb.so.3:security/krb5 PIPEWIRE_DESC= Screen capture via PipeWire PIPEWIRE_LIB_DEPENDS= libpipewire-0.3.so:multimedia/pipewire PIPEWIRE_VARS= GN_ARGS+=rtc_use_pipewire=true \ GN_ARGS+=rtc_link_pipewire=true PIPEWIRE_VARS_OFF= GN_ARGS+=rtc_use_pipewire=false \ GN_ARGS+=rtc_link_pipewire=false PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true \ PINCLUDES="-I${WRKDIR}/pulseaudio-${PULSEV}/src -DPA_MAJOR=${PULSEMV}" PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_VARS= GN_ARGS+=use_sndio=true SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false .include .include # for COMPILER_VERSION .if ${PORT_OPTIONS:MHEIMDAL_BASE} && !exists(/usr/lib/libkrb5.so) IGNORE= you have selected HEIMDAL_BASE but do not have Heimdal installed in base .endif LLVM_DEFAULT= 21 BUILD_DEPENDS+= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} BINARY_ALIAS+= cpp=${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT} \ cc=${LOCALBASE}/bin/clang${LLVM_DEFAULT} \ c++=${LOCALBASE}/bin/clang++${LLVM_DEFAULT} \ ar=${LOCALBASE}/bin/llvm-ar${LLVM_DEFAULT} \ nm=${LOCALBASE}/bin/llvm-nm${LLVM_DEFAULT} \ ld=${LOCALBASE}/bin/ld.lld${LLVM_DEFAULT} # - swiftshader/lib/{libEGL.so,libGLESv2.so} is x86 only # - map ffmpeg target to ${ARCH} .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " FFMPEG_TARGET= arm64 .elif ${ARCH} == amd64 BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" FFMPEG_TARGET= x64 .elif ${ARCH} == i386 BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" FFMPEG_TARGET= ia32 .endif FFMPEG_BDIR= ${WRKSRC}/third_party/ffmpeg/build.${FFMPEG_TARGET}.freebsd/${FFMPEG_BRAND} FFMPEG_CDIR= ${WRKSRC}/third_party/ffmpeg/chromium/config/${FFMPEG_BRAND}/freebsd/${FFMPEG_TARGET} # Allow relocations against read-only segments (override lld default) LDFLAGS_i386= -Wl,-znotext # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include # rust MAKE_ENV+= RUSTC_BOOTSTRAP=1 GN_ARGS+= enable_rust=true \ rust_sysroot_absolute="${LOCALBASE}" pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "To build ${PORTNAME}, you should have at least:" @${ECHO_MSG} "- ${WANTMEM} of memory" @${ECHO_MSG} "- ${WANTSPACE} of free disk space" @${ECHO_MSG} "- 1.5 million free inodes" @${ECHO_MSG} 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 harfbuzz-ng libdrm libpng \ libusb libwebp libxml libxslt openh264 opus || ${FALSE} # Iridium uses an unreleased version of FFmpeg, so configure it cd ${WRKSRC}/media/ffmpeg && \ ${PYTHON_CMD} scripts/build_ffmpeg.py freebsd ${FFMPEG_TARGET} \ --config-only --branding=${FFMPEG_BRAND} cd ${FFMPEG_BDIR} && ${GMAKE} ffversion.h ${MKDIR} ${FFMPEG_CDIR} .for _e in config.h config.asm config_components.h libavcodec libavformat libavutil -${CP} -pR ${FFMPEG_BDIR}/${_e} ${FFMPEG_CDIR} .endfor touch ${WRKDIR}/pulseaudio-${PULSEV}/src/pulse/version.h @${REINPLACE_CMD} -e 's|$${LOCALBASE}|${LOCALBASE}|;s|$${MODCLANG_VERSION}|${LLVM_DEFAULT}|' \ ${WRKSRC}/build/linux/strip_binary.gni \ ${WRKSRC}/build/rust/rust_bindgen.gni \ ${WRKSRC}/build/rust/rust_bindgen_generator.gni do-configure: # GN generator bootstrapping and generating ninja files cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \ READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn \ gen --args='${GN_ARGS}' out/${BUILDTYPE} # Setup nodejs dependency @${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin/node # Setup buildtools/freebsd @${MKDIR} ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/buildtools/linux64/clang-format ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/out/${BUILDTYPE}/gn ${WRKSRC}/buildtools/freebsd ${LN} -sf /usr/bin/strip ${WRKSRC}/buildtools/freebsd/strip do-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_MAN} ${WRKSRC}/chrome/app/resources/manpage.1.in \ ${STAGEDIR}${PREFIX}/share/man/man1/iridium.1 @${SED} -i "" -e 's,\@\@PACKAGE\@\@,chromium,g;s,\@\@MENUNAME\@\@,Iridium Web Browser,g' \ ${STAGEDIR}${PREFIX}/share/man/man1/iridium.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/iridium.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}/iridium cd ${WRKSRC}/out/${BUILDTYPE} && \ ${COPYTREE_SHARE} "locales resources" ${STAGEDIR}${DATADIR} @${MKDIR} ${STAGEDIR}${DESKTOPDIR} ${INSTALL_DATA} ${WRKDIR}/iridium-browser.desktop \ ${STAGEDIR}${DESKTOPDIR} ${INSTALL_SCRIPT} ${WRKDIR}/iridium ${STAGEDIR}${PREFIX}/bin # 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 @${MKDIR} ${STAGEDIR}${DATADIR}/swiftshader ${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} .include diff --git a/www/iridium/distinfo b/www/iridium/distinfo index cce810c954b6..207b79dfb44a 100644 --- a/www/iridium/distinfo +++ b/www/iridium/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1763962771 -SHA256 (iridium-browser-2025.11.142.3.tar.xz) = fa42c4ec1ae241b60078ad59cc4b63f46fa765f7571621d7401c6a1fb890ad08 -SIZE (iridium-browser-2025.11.142.3.tar.xz) = 1643107224 +TIMESTAMP = 1765379041 +SHA256 (iridium-browser-2025.12.143.tar.xz) = db30777d942dabad6bda57a578d28902733bde7a83530f4b58ed4018c6358914 +SIZE (iridium-browser-2025.12.143.tar.xz) = 1098996664 SHA256 (pulseaudio-16.1.tar.gz) = 027266c62f2a84422ac45fa721a649508f0f1628fb1fd9242315ac54ce2d7c92 SIZE (pulseaudio-16.1.tar.gz) = 2763111 diff --git a/www/iridium/files/patch-BUILD.gn b/www/iridium/files/patch-BUILD.gn index d3578709b83f..06dbe3d96ab4 100644 --- a/www/iridium/files/patch-BUILD.gn +++ b/www/iridium/files/patch-BUILD.gn @@ -1,98 +1,98 @@ ---- BUILD.gn.orig 2025-11-06 10:11:34 UTC +--- BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ BUILD.gn -@@ -69,7 +69,7 @@ declare_args() { +@@ -68,7 +68,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) -@@ -102,7 +102,6 @@ group("gn_all") { +@@ -101,7 +101,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", -@@ -430,7 +429,7 @@ group("gn_all") { +@@ -431,7 +430,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", -@@ -596,6 +595,15 @@ group("gn_all") { +@@ -598,6 +597,15 @@ group("gn_all") { } } + if (is_bsd) { + deps -= [ + "//third_party/breakpad:dump_syms($host_system_allocator_toolchain)", + "//third_party/breakpad:microdump_stackwalk($host_system_allocator_toolchain)", + "//third_party/breakpad:minidump_dump($host_system_allocator_toolchain)", + "//third_party/breakpad:minidump_stackwalk($host_system_allocator_toolchain)", + ] + } + if (is_mac) { deps += [ "//third_party/breakpad:dump_syms($host_system_allocator_toolchain)", -@@ -644,7 +652,7 @@ group("gn_all") { +@@ -646,7 +654,7 @@ group("gn_all") { } } - if (!is_fuchsia) { + if (!is_fuchsia && !is_bsd) { # The official builders use this binary from the default toolchain's # output directory after building in order to upload the symbols of that # binary. They build the binary like `ninja symupload` which requires the -@@ -679,7 +687,7 @@ group("gn_all") { +@@ -681,7 +689,7 @@ group("gn_all") { ] } - if (is_mac || is_win || is_android || is_linux || is_chromeos) { + if (!is_bsd && (is_mac || is_win || is_android || is_linux || is_chromeos)) { deps += [ "//third_party/crashpad/crashpad:crashpad_tests", "//third_party/crashpad/crashpad/handler:crashpad_handler", -@@ -1077,7 +1085,7 @@ if (use_blink && !is_cronet_build) { +@@ -1072,7 +1080,7 @@ if (use_blink && !is_cronet_build) { "//third_party/blink/public:all_blink", ] - if (!is_chromeos && !is_ios && !is_fuchsia && !is_android && !is_castos) { + if (!is_chromeos && !is_ios && !is_fuchsia && !is_android && !is_castos && !is_bsd) { deps += [ ":chrome_wpt_tests", ":headless_shell_wpt", -@@ -1230,7 +1238,7 @@ if (use_blink && !is_cronet_build) { +@@ -1225,7 +1233,7 @@ if (use_blink && !is_cronet_build) { data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ] } - if (!is_win && !is_android) { + if (!is_win && !is_android && !is_bsd) { # Using the default toolchain for this tool, as it's run during tests not # during the build. This places a symlink in the root_build_dir for scrips # to use. -@@ -1244,7 +1252,7 @@ if (use_blink && !is_cronet_build) { +@@ -1239,7 +1247,7 @@ if (use_blink && !is_cronet_build) { data_deps += [ "//third_party/breakpad:dump_syms" ] } - if (is_linux || is_chromeos) { + if ((is_linux && !is_bsd) || is_chromeos) { # Using the default toolchain for this tool, as it's run during tests not # during the build. This places a symlink in the root_build_dir for scrips # to use. -@@ -1541,7 +1549,7 @@ group("chromium_builder_perf") { +@@ -1536,7 +1544,7 @@ group("chromium_builder_perf") { data_deps += [ "//chrome/test:performance_browser_tests" ] } - if (!is_win) { + if (!is_win && !is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_system_allocator_toolchain)" ] } } diff --git a/www/iridium/files/patch-apps_ui_views_app__window__frame__view.cc b/www/iridium/files/patch-apps_ui_views_app__window__frame__view.cc index 4131a3a1efd2..810d8fca4cf2 100644 --- a/www/iridium/files/patch-apps_ui_views_app__window__frame__view.cc +++ b/www/iridium/files/patch-apps_ui_views_app__window__frame__view.cc @@ -1,11 +1,11 @@ ---- apps/ui/views/app_window_frame_view.cc.orig 2025-05-07 06:48:23 UTC +--- apps/ui/views/app_window_frame_view.cc.orig 2025-12-10 15:04:57 UTC +++ apps/ui/views/app_window_frame_view.cc @@ -146,7 +146,7 @@ gfx::Rect AppWindowFrameView::GetBoundsForClientView() gfx::Rect AppWindowFrameView::GetWindowBoundsForClientBounds( const gfx::Rect& client_bounds) const { gfx::Rect window_bounds = client_bounds; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || 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/iridium/files/patch-base_BUILD.gn b/www/iridium/files/patch-base_BUILD.gn index 53145e5fc8f8..ce899c09b979 100644 --- a/www/iridium/files/patch-base_BUILD.gn +++ b/www/iridium/files/patch-base_BUILD.gn @@ -1,150 +1,150 @@ ---- base/BUILD.gn.orig 2025-11-06 10:11:34 UTC +--- base/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ base/BUILD.gn -@@ -1115,11 +1115,26 @@ component("base") { +@@ -1124,11 +1124,26 @@ component("base") { # Needed for if using newer C++ library than sysroot, except if # building inside the cros_sdk environment - use host_toolchain as a # more robust check for this. - if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) && + if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos && !is_bsd)) && host_toolchain != "//build/toolchain/cros:host") { libs += [ "atomic" ] } + # *BSD needs libkvm + if (is_bsd) { + libs += [ + "kvm", + "epoll-shim", + ] + } + + if (is_freebsd) { + libs += [ + "execinfo", + "util", + ] + } + if (use_allocator_shim) { if (is_apple) { sources += [ "allocator/early_zone_registration_apple.h" ] -@@ -1139,7 +1154,7 @@ component("base") { +@@ -1148,7 +1163,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" ] } -@@ -2139,6 +2154,22 @@ component("base") { +@@ -2151,6 +2166,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 += [ -@@ -2313,6 +2344,33 @@ component("base") { +@@ -2325,6 +2356,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", -@@ -2719,7 +2777,7 @@ buildflag_header("protected_memory_buildflags") { +@@ -2728,7 +2786,7 @@ buildflag_header("protected_memory_buildflags") { header = "protected_memory_buildflags.h" header_dir = "base/memory" - protected_memory_enabled = !is_component_build && is_clang && + protected_memory_enabled = !is_openbsd && !is_component_build && is_clang && (is_win || is_linux || is_android || is_mac) flags = [ "PROTECTED_MEMORY_ENABLED=$protected_memory_enabled" ] -@@ -3225,7 +3283,7 @@ if (is_apple) { +@@ -3234,7 +3292,7 @@ if (is_apple) { } } -if (is_linux || is_chromeos) { +if (!is_bsd && (is_linux || is_chromeos)) { # This test must compile with -fstack-protector-all source_set("stack_canary_linux_unittests") { testonly = true -@@ -3923,7 +3981,7 @@ test("base_unittests") { +@@ -3941,7 +3999,7 @@ test("base_unittests") { configs += [ ":delayload_esent_dll" ] } - 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", -@@ -3947,7 +4005,7 @@ test("base_unittests") { +@@ -3965,7 +4023,7 @@ test("base_unittests") { "posix/file_descriptor_shuffle_unittest.cc", "posix/unix_domain_socket_unittest.cc", ] - if (!is_apple) { + if (!is_apple && !is_bsd) { sources += [ "profiler/stack_base_address_posix_unittest.cc", "profiler/stack_copier_signal_unittest.cc", -@@ -3958,7 +4016,7 @@ test("base_unittests") { +@@ -3976,7 +4034,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" ] } -@@ -4145,7 +4203,7 @@ test("base_unittests") { +@@ -4163,7 +4221,7 @@ test("base_unittests") { deps += [ ":base_profiler_test_support_library" ] } - if (is_fuchsia || is_linux || is_chromeos) { + if ((is_fuchsia || is_linux || is_chromeos) && !is_bsd) { sources += [ "debug/elf_reader_unittest.cc", "debug/test_elf_image_builder.cc", diff --git a/www/iridium/files/patch-base_allocator_dispatcher_tls.h b/www/iridium/files/patch-base_allocator_dispatcher_tls.h index bb6f5eb915f5..d79760a31c43 100644 --- a/www/iridium/files/patch-base_allocator_dispatcher_tls.h +++ b/www/iridium/files/patch-base_allocator_dispatcher_tls.h @@ -1,11 +1,11 @@ ---- base/allocator/dispatcher/tls.h.orig 2025-09-11 13:19:19 UTC +--- base/allocator/dispatcher/tls.h.orig 2025-12-10 15:04:57 UTC +++ base/allocator/dispatcher/tls.h @@ -86,7 +86,7 @@ struct BASE_EXPORT MMapAllocator { constexpr static size_t AllocationChunkSize = 16384; #elif BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS) constexpr static size_t AllocationChunkSize = 16384; -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) constexpr static size_t AllocationChunkSize = 16384; #else constexpr static size_t AllocationChunkSize = 4096; diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc.gni b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc.gni index 1c575c6d4d09..57b892498301 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc.gni +++ b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc.gni @@ -1,20 +1,20 @@ ---- base/allocator/partition_allocator/partition_alloc.gni.orig 2025-11-06 10:11:34 UTC +--- base/allocator/partition_allocator/partition_alloc.gni.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/partition_alloc.gni @@ -92,7 +92,7 @@ if (current_cpu == "x64" || current_cpu == "arm64" || # TODO(crbug.com/329199197): Clean this up when experiments are complete. use_large_empty_slot_span_ring = true -has_memory_tagging = current_cpu == "arm64" && is_clang && !is_asan && +has_memory_tagging = current_cpu == "arm64" && !is_bsd && is_clang && !is_asan && !is_hwasan && (is_linux || is_android) declare_args() { @@ -486,7 +486,7 @@ assert(!use_asan_backup_ref_ptr || use_raw_ptr_hookabl # dependencies that use partition_allocator are compiled in AOSP against a # version of glibc that does not include pkeys syscall numbers. is_pkeys_available = - (is_linux || is_chromeos) && current_cpu == "x64" && !is_cronet_build + !is_bsd && (is_linux || is_chromeos) && current_cpu == "x64" && !is_cronet_build declare_args() { enable_pkeys = is_pkeys_available } diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn index 36cffd4f7836..6a53298d7e19 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/BUILD.gn @@ -907,7 +907,7 @@ if (is_clang_or_gcc) { configs -= [ partition_alloc_enable_arc_config ] } } - if (is_chromeos || is_linux) { + if ((is_chromeos || is_linux) && !is_bsd) { shim_headers += [ "shim/allocator_shim_override_cpp_symbols.h", "shim/allocator_shim_override_glibc_weak_symbols.h", diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h index e434c1df7ac1..f40b1e10d38e 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h @@ -1,20 +1,20 @@ ---- base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h.orig 2025-09-11 13:19:19 UTC +--- base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h @@ -43,7 +43,7 @@ AslrMask(uintptr_t bits) { #if PA_BUILDFLAG(PA_ARCH_CPU_64_BITS) - #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) + #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) && !PA_BUILDFLAG(IS_BSD) // We shouldn't allocate system pages at all for sanitizer builds. However, // we do, and if random hint addresses interfere with address ranges @@ -130,7 +130,7 @@ AslrMask(uintptr_t bits) { return AslrAddress(0x20000000ULL); } #elif PA_BUILDFLAG(PA_ARCH_CPU_ARM64) - #if PA_BUILDFLAG(IS_LINUX) + #if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_BSD) // Linux on arm64 can use 39, 42, 48, or 52-bit user space, depending on // page size and number of levels of translation pages used. We use diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h index 0067d6386caa..dd26dddcc966 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/page_allocator.h.orig 2025-09-11 13:19:19 UTC +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator.h.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/page_allocator.h -@@ -278,7 +278,7 @@ bool DecommitAndZeroSystemPages(void* address, +@@ -284,7 +284,7 @@ bool DecommitAndZeroSystemPages(void* address, // recommitted. Do not assume that this will not change over time. constexpr PA_COMPONENT_EXPORT( PARTITION_ALLOC) bool DecommittedMemoryIsAlwaysZeroed() { -#if PA_BUILDFLAG(IS_APPLE) +#if PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_BSD) return false; #else return true; diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h index c0b397eed697..7d2268c2cb7e 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h @@ -1,15 +1,15 @@ ---- base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h.orig 2025-11-06 10:11:34 UTC +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h @@ -31,9 +31,9 @@ #define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) #elif (PA_BUILDFLAG(IS_ANDROID) && PA_BUILDFLAG(PA_ARCH_CPU_64_BITS)) || \ - (PA_BUILDFLAG(IS_LINUX) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)) || \ - (PA_BUILDFLAG(IS_LINUX) && PA_BUILDFLAG(PA_ARCH_CPU_PPC64)) || \ - (PA_BUILDFLAG(IS_LINUX) && PA_BUILDFLAG(PA_ARCH_CPU_LOONGARCH64)) + ((PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_BSD)) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)) || \ + ((PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_BSD)) && PA_BUILDFLAG(PA_ARCH_CPU_PPC64)) || \ + ((PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_BSD)) && PA_BUILDFLAG(PA_ARCH_CPU_LOONGARCH64)) // This should work for all POSIX (if needed), but currently all other // supported OS/architecture combinations use either hard-coded values // (such as x86) or have means to determine these values without needing diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.cc b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.cc index 6b2d88baca3e..503b2fcec7fb 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.cc +++ b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.cc @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc.orig 2025-09-11 13:19:19 UTC +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc @@ -44,7 +44,7 @@ uint32_t SecTaskGetCodeSignStatus(SecTaskRef task) API #if PA_BUILDFLAG(HAS_MEMORY_TAGGING) || \ (defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT == 1) && \ - __has_include()) + __has_include() && !PA_BUILDFLAG(IS_BSD)) struct __ifunc_arg_t; #include "partition_alloc/aarch64_support.h" diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h index 00cf19270b33..2442c337e5fc 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h @@ -1,16 +1,16 @@ ---- base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h.orig 2025-09-11 13:19:19 UTC +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h @@ -322,8 +322,12 @@ bool TryRecommitSystemPagesInternal( void DiscardSystemPagesInternal(uintptr_t address, size_t length) { void* ptr = reinterpret_cast(address); -#if PA_BUILDFLAG(IS_APPLE) +#if PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_BSD) +#if PA_BUILDFLAG(IS_BSD) + int ret = madvise(ptr, length, MADV_FREE); +#else int ret = madvise(ptr, length, MADV_FREE_REUSABLE); +#endif if (ret) { // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED. ret = madvise(ptr, length, MADV_DONTNEED); diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_proc__maps__linux.cc b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_proc__maps__linux.cc index 2dcad0a4188d..f745538d5c97 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_proc__maps__linux.cc +++ b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_proc__maps__linux.cc @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/proc_maps_linux.cc.orig 2025-05-07 06:48:23 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/proc_maps_linux.cc.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/proc_maps_linux.cc @@ -19,7 +19,7 @@ #include "partition_alloc/partition_alloc_check.h" #if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || \ - PA_BUILDFLAG(IS_ANDROID) + PA_BUILDFLAG(IS_ANDROID) || PA_BUILDFLAG(IS_BSD) #include #endif diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc index 6327263fec62..0e0e1371fafe 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc +++ b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc @@ -1,34 +1,34 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc.orig 2025-09-11 13:19:19 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc @@ -18,11 +18,11 @@ #include "partition_alloc/partition_alloc_base/posix/eintr_wrapper.h" #include "partition_alloc/partition_alloc_base/strings/safe_sprintf.h" -#if !PA_BUILDFLAG(IS_ANDROID) && !PA_BUILDFLAG(IS_APPLE) +#if !PA_BUILDFLAG(IS_ANDROID) && !PA_BUILDFLAG(IS_APPLE) && !PA_BUILDFLAG(IS_BSD) #include // For ElfW() macro. #endif -#if PA_BUILDFLAG(IS_APPLE) +#if PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_BSD) #include #endif @@ -30,7 +30,7 @@ namespace partition_alloc::internal::base::debug { namespace { -#if !PA_BUILDFLAG(IS_APPLE) +#if !PA_BUILDFLAG(IS_APPLE) && !PA_BUILDFLAG(IS_BSD) // On Android the 'open' function has two versions: // int open(const char *pathname, int flags); @@ -374,7 +374,7 @@ void PrintStackTraceInternal(const void** trace, size_ } #endif // !PA_BUILDFLAG(IS_APPLE) -#if PA_BUILDFLAG(IS_APPLE) +#if PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_BSD) // Since /proc/self/maps is not available, use dladdr() to obtain module // names and offsets inside the modules from the given addresses. void PrintStackTraceInternal(const void* const* trace, size_t size) { diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc index c6158d6769a0..9d21ab8b84cd 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc +++ b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc @@ -1,13 +1,13 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc.orig 2025-09-11 13:19:19 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc @@ -107,6 +107,10 @@ void RandBytes(void* output, size_t output_length) { if (getentropy(output, output_length) == 0) { return; } +#elif PA_BUILDFLAG(IS_BSD) + if (getentropy(output, output_length) == 0) { + return; + } #endif // If getrandom(2) above returned with an error and the /dev/urandom fallback // took place on Linux/ChromeOS bots, they would fail with a CHECK in diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h index 6e9f328c2129..dfcd81d3407a 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h.orig 2025-09-11 13:19:19 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h @@ -43,6 +43,8 @@ typedef DWORD PlatformThreadId; typedef zx_handle_t PlatformThreadId; #elif PA_BUILDFLAG(IS_APPLE) typedef mach_port_t PlatformThreadId; +#elif PA_BUILDFLAG(IS_BSD) +typedef uint64_t PlatformThreadId; #elif PA_BUILDFLAG(IS_POSIX) typedef pid_t PlatformThreadId; #endif diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h index 005c82e7bee5..e56d19affb96 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h.orig 2025-09-11 13:19:19 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h @@ -15,7 +15,7 @@ namespace partition_alloc::internal::base::internal { -#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) +#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD) // Current thread id is cached in thread local storage for performance reasons. // In some rare cases it's important to invalidate that cache explicitly (e.g. // after going through clone() syscall which does not call pthread_atfork() diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc index 5fc1eee444c3..0736976eff87 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc +++ b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc.orig 2025-09-11 13:19:19 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc @@ -23,7 +23,7 @@ #include "partition_alloc/partition_alloc_base/logging.h" #include "partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h" -#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) +#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD) #include #include #endif diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h index cac742dc9357..80d5449d08b1 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h @@ -1,29 +1,29 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig 2025-11-06 10:11:34 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h @@ -171,7 +171,7 @@ constexpr bool kUseLazyCommit = false; // macOS, where it yielded no beenefit (nor any real downside). constexpr bool kUseFewerMemoryRegions = #if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_ANDROID) || \ - PA_BUILDFLAG(IS_CHROMEOS) + PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD) true; #else false; @@ -181,7 +181,7 @@ constexpr bool kUseFewerMemoryRegions = // This may be required on more platforms in the future. #define PA_CONFIG_HAS_ATFORK_HANDLER() \ (PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_LINUX) || \ - PA_BUILDFLAG(IS_CHROMEOS)) + PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD)) #if PA_BUILDFLAG(MOVE_METADATA_OUT_OF_GIGACAGE_FOR_64_BITS_POINTERS) && \ PA_BUILDFLAG(HAS_64_BIT_POINTERS) @@ -238,7 +238,7 @@ constexpr bool kUseFewerMemoryRegions = // Also enabled on ARM64 macOS and iOS, as the 16kiB pages on this platform lead // to larger slot spans. #if PA_BUILDFLAG(IS_LINUX) || \ - (PA_BUILDFLAG(IS_APPLE) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)) + (PA_BUILDFLAG(IS_APPLE) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)) || PA_BUILDFLAG(IS_BSD) #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() 1 #else #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() 0 diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h index 46a0bcaa2777..faca77bcd669 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h @@ -1,20 +1,20 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h.orig 2025-10-28 14:29:43 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h @@ -315,7 +315,7 @@ PA_DEFINE_OPERATORS_FOR_FLAGS(PoolHandleMask); // 8GB for each of the glued pools). #if PA_BUILDFLAG(HAS_64_BIT_POINTERS) #if PA_BUILDFLAG(IS_ANDROID) || PA_BUILDFLAG(IS_IOS) || \ - PA_BUILDFLAG(ENABLE_POINTER_COMPRESSION) + PA_BUILDFLAG(ENABLE_POINTER_COMPRESSION) || PA_BUILDFLAG(IS_BSD) constexpr size_t kPoolMaxSize = 8 * kGiB; #else constexpr size_t kPoolMaxSize = 16 * kGiB; @@ -399,7 +399,7 @@ PA_ALWAYS_INLINE constexpr size_t MaxDirectMapped() { // TODO(casey.smalley@arm.com): under 64k pages we can end up in a situation // where a normal slot span will be large enough to contain multiple items, // but the address will go over the final partition page after being aligned. -#if PA_BUILDFLAG(IS_LINUX) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64) +#if (PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_BSD)) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64) constexpr size_t kMaxSupportedAlignment = kSuperPageSize / 4; #else constexpr size_t kMaxSupportedAlignment = kSuperPageSize / 2; diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__forward.h b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__forward.h index 93a420ad89e7..bcc3d485d7da 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__forward.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__forward.h @@ -1,16 +1,16 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h.orig 2025-09-11 13:19:19 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h @@ -34,9 +34,13 @@ namespace internal { // the second one 16. We could technically return something different for // malloc() and operator new(), but this would complicate things, and most of // our allocations are presumably coming from operator new() anyway. +#if defined(__i386__) && defined(OS_FREEBSD) +constexpr size_t kAlignment = 8; +#else constexpr inline size_t kAlignment = std::max(alignof(max_align_t), static_cast(__STDCPP_DEFAULT_NEW_ALIGNMENT__)); +#endif static_assert(base::bits::HasSingleBit(kAlignment), "Alignment must be power of two."); static_assert(kAlignment <= 16, diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc index 534c3fb96044..9fda75cd42d9 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc +++ b/www/iridium/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 2025-09-11 13:19:19 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_root.cc @@ -51,7 +51,7 @@ #include "wow64apiset.h" #endif -#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) +#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD) #include #endif // PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) @@ -300,7 +300,7 @@ void PartitionAllocMallocInitOnce() { return; } -#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) +#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD) // When fork() is called, only the current thread continues to execute in the // child process. If the lock is held, but *not* by this thread when fork() is // called, we have a deadlock. @@ -1006,7 +1006,7 @@ void PartitionRoot::Init(PartitionOptions opts) { // apple OSes. PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) || (internal::SystemPageSize() == (size_t{1} << 14))); -#elif PA_BUILDFLAG(IS_LINUX) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64) +#elif (PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_BSD)) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64) // Check runtime pagesize. Though the code is currently the same, it is // not merged with the IS_APPLE case above as a 1 << 16 case is only // supported on Linux on AArch64. diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc index 03e38a23af6b..507084890113 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc +++ b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc @@ -1,36 +1,36 @@ ---- base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc.orig 2025-11-06 10:11:34 UTC +--- base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc @@ -25,7 +25,16 @@ #endif #if PA_CONFIG(HAS_LINUX_KERNEL) +#if defined(OS_OPENBSD) +#include +#include +#elif defined(OS_FREEBSD) +#include +#include +#include +#else #include +#endif #include #include @@ -155,8 +164,16 @@ PA_ALWAYS_INLINE long FutexSyscall(volatile void* ftx, int saved_errno = errno; errno = 0; +#if defined(OS_FREEBSD) + long retval = _umtx_op(&state_, UMTX_OP_WAIT_UINT_PRIVATE, + kLockedContended, nullptr, nullptr); +#elif defined(OS_OPENBSD) + long retval = futex(reinterpret_cast(&state_), FUTEX_WAIT | FUTEX_PRIVATE_FLAG, + kLockedContended, nullptr, nullptr); +#else long retval = syscall(SYS_futex, ftx, op | FUTEX_PRIVATE_FLAG, value, nullptr, nullptr, 0); +#endif if (retval == -1) { // These are programming errors, check them. PA_DCHECK((errno != EPERM) || (errno != EACCES) || (errno != EINVAL) || diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_stack_stack.cc b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_stack_stack.cc index d9a027987173..389b7096dcba 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_stack_stack.cc +++ b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_stack_stack.cc @@ -1,50 +1,50 @@ ---- base/allocator/partition_allocator/src/partition_alloc/stack/stack.cc.orig 2025-09-11 13:19:19 UTC +--- base/allocator/partition_allocator/src/partition_alloc/stack/stack.cc.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/stack/stack.cc @@ -23,6 +23,10 @@ #include #endif +#if PA_BUILDFLAG(IS_BSD) +#include +#endif + #if PA_BUILDFLAG(PA_LIBC_GLIBC) extern "C" void* __libc_stack_end; #endif @@ -53,6 +57,36 @@ void* GetStackTop() { void* GetStackTop() { return pthread_get_stackaddr_np(pthread_self()); +} + +#elif PA_BUILDFLAG(IS_OPENBSD) + +void* GetStackTop() { + stack_t ss; + if (pthread_stackseg_np(pthread_self(), &ss) != 0) + return nullptr; + return reinterpret_cast(ss.ss_sp); +} + +#elif PA_BUILDFLAG(IS_FREEBSD) + +void* GetStackTop() { + pthread_attr_t attr; + int error = pthread_attr_init(&attr); + if (error) { + return nullptr; + } + error = pthread_attr_get_np(pthread_self(), &attr); + if (!error) { + void* base; + size_t size; + error = pthread_attr_getstack(&attr, &base, &size); + PA_CHECK(!error); + pthread_attr_destroy(&attr); + return reinterpret_cast(base) + size; + } + pthread_attr_destroy(&attr); + return nullptr; } #elif PA_BUILDFLAG(IS_POSIX) || PA_BUILDFLAG(IS_FUCHSIA) diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc index 08c246afa4b2..6bd1f1c5d94d 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc +++ b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc.orig 2025-09-11 13:19:19 UTC +--- base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc.orig 2025-12-10 15:04:57 UTC +++ base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc @@ -21,7 +21,7 @@ #include "partition_alloc/partition_alloc_check.h" #include "partition_alloc/thread_isolation/thread_isolation.h" -#if !PA_BUILDFLAG(IS_LINUX) && !PA_BUILDFLAG(IS_CHROMEOS) +#if !PA_BUILDFLAG(IS_LINUX) && !PA_BUILDFLAG(IS_CHROMEOS) && !PA_BUILDFLAG(IS_BSD) #error "This pkey code is currently only supported on Linux and ChromeOS" #endif diff --git a/www/iridium/files/patch-base_atomicops.h b/www/iridium/files/patch-base_atomicops.h index e99bb73df52a..cf71c16f95a9 100644 --- a/www/iridium/files/patch-base_atomicops.h +++ b/www/iridium/files/patch-base_atomicops.h @@ -1,14 +1,14 @@ ---- base/atomicops.h.orig 2025-09-11 13:19:19 UTC +--- base/atomicops.h.orig 2025-12-10 15:04:57 UTC +++ base/atomicops.h @@ -72,7 +72,11 @@ typedef intptr_t Atomic64; // Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or // Atomic64 routines below, depending on your architecture. +#if !defined(OS_OPENBSD) && defined(__i386__) +typedef Atomic32 AtomicWord; +#else typedef intptr_t AtomicWord; +#endif // Atomically execute: // result = *ptr; diff --git a/www/iridium/files/patch-base_base__paths__posix.cc b/www/iridium/files/patch-base_base__paths__posix.cc index 54bfbcb65de9..ecc322a1380b 100644 --- a/www/iridium/files/patch-base_base__paths__posix.cc +++ b/www/iridium/files/patch-base_base__paths__posix.cc @@ -1,108 +1,108 @@ ---- base/base_paths_posix.cc.orig 2025-05-07 06:48:23 UTC +--- base/base_paths_posix.cc.orig 2025-12-10 15:04:57 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 @@ -47,8 +52,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."; } @@ -62,14 +66,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"); + 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; } - return true; + + 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("IRIDIUM_EXE_PATH")) != NULL) + *result = FilePath(cpath); + else + *result = FilePath("/usr/local/iridium/iridium"); + return true; +#if !BUILDFLAG(IS_AIX) + } + return ret; +#endif #endif } case DIR_SRC_TEST_DATA_ROOT: { diff --git a/www/iridium/files/patch-base_compiler__specific.h b/www/iridium/files/patch-base_compiler__specific.h index 79ea3c2a5fc3..f6dda2356638 100644 --- a/www/iridium/files/patch-base_compiler__specific.h +++ b/www/iridium/files/patch-base_compiler__specific.h @@ -1,10 +1,10 @@ ---- base/compiler_specific.h.orig 2025-09-11 13:19:19 UTC +--- base/compiler_specific.h.orig 2025-12-10 15:04:57 UTC +++ base/compiler_specific.h @@ -733,6 +733,7 @@ inline constexpr bool AnalyzerAssumeTrue(bool arg) { #if __has_cpp_attribute(clang::preserve_most) && \ (defined(ARCH_CPU_ARM64) || defined(ARCH_CPU_X86_64)) && \ !defined(COMPONENT_BUILD) && \ + !BUILDFLAG(IS_OPENBSD) && \ !(BUILDFLAG(IS_WIN) && defined(ARCH_CPU_ARM64)) #define PRESERVE_MOST [[clang::preserve_most]] #else diff --git a/www/iridium/files/patch-base_debug_debugger__posix.cc b/www/iridium/files/patch-base_debug_debugger__posix.cc index 719f24035763..d9bc953056b4 100644 --- a/www/iridium/files/patch-base_debug_debugger__posix.cc +++ b/www/iridium/files/patch-base_debug_debugger__posix.cc @@ -1,70 +1,70 @@ ---- base/debug/debugger_posix.cc.orig 2025-09-11 13:19:19 UTC +--- base/debug/debugger_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/debug/debugger_posix.cc @@ -38,6 +38,10 @@ #include #endif +#if BUILDFLAG(IS_OPENBSD) +#include +#endif + #if BUILDFLAG(IS_FREEBSD) #include #endif @@ -96,33 +100,52 @@ 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/iridium/files/patch-base_debug_elf__reader.cc b/www/iridium/files/patch-base_debug_elf__reader.cc index e812468034a1..4350115f07bb 100644 --- a/www/iridium/files/patch-base_debug_elf__reader.cc +++ b/www/iridium/files/patch-base_debug_elf__reader.cc @@ -1,13 +1,13 @@ ---- base/debug/elf_reader.cc.orig 2025-05-07 06:48:23 UTC +--- base/debug/elf_reader.cc.orig 2025-12-10 15:04:57 UTC +++ base/debug/elf_reader.cc @@ -49,6 +49,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/iridium/files/patch-base_debug_proc__maps__linux.cc b/www/iridium/files/patch-base_debug_proc__maps__linux.cc index c0aeb2d7a56f..47948d9680d9 100644 --- a/www/iridium/files/patch-base_debug_proc__maps__linux.cc +++ b/www/iridium/files/patch-base_debug_proc__maps__linux.cc @@ -1,11 +1,11 @@ ---- base/debug/proc_maps_linux.cc.orig 2025-05-07 06:48:23 UTC +--- base/debug/proc_maps_linux.cc.orig 2025-12-10 15:04:57 UTC +++ base/debug/proc_maps_linux.cc @@ -22,7 +22,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/iridium/files/patch-base_debug_stack__trace.cc b/www/iridium/files/patch-base_debug_stack__trace.cc index 11fa52e6456b..39e85af62b25 100644 --- a/www/iridium/files/patch-base_debug_stack__trace.cc +++ b/www/iridium/files/patch-base_debug_stack__trace.cc @@ -1,39 +1,39 @@ ---- base/debug/stack_trace.cc.orig 2025-11-06 10:11:34 UTC +--- base/debug/stack_trace.cc.orig 2025-12-10 15:04:57 UTC +++ base/debug/stack_trace.cc @@ -292,7 +292,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; @@ -357,7 +357,9 @@ void StackTrace::OutputToStreamWithPrefix(std::ostream } return; } +#if !BUILDFLAG(IS_BSD) OutputToStreamWithPrefixImpl(os, prefix_string); +#endif } std::string StackTrace::ToString() const { @@ -366,7 +368,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(); @@ -390,7 +392,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/iridium/files/patch-base_debug_stack__trace__posix.cc b/www/iridium/files/patch-base_debug_stack__trace__posix.cc index b6b43f4a2e55..003e219b37b2 100644 --- a/www/iridium/files/patch-base_debug_stack__trace__posix.cc +++ b/www/iridium/files/patch-base_debug_stack__trace__posix.cc @@ -1,101 +1,101 @@ ---- base/debug/stack_trace_posix.cc.orig 2025-09-11 13:19:19 UTC +--- base/debug/stack_trace_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/debug/stack_trace_posix.cc @@ -51,7 +51,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 @@ -69,8 +69,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 @@ -327,7 +329,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 @@ -344,7 +346,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) @@ -548,7 +554,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; @@ -573,6 +579,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) { @@ -587,6 +594,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) @@ -779,6 +787,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. @@ -871,11 +880,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)) { @@ -893,6 +906,7 @@ class SandboxSymbolizeHelper { is_initialized_ = true; return true; +#endif } // Opens all object files and caches their file descriptors. diff --git a/www/iridium/files/patch-base_files_dir__reader__linux.h b/www/iridium/files/patch-base_files_dir__reader__linux.h index c44fbdb32aee..46a2ce6b88f2 100644 --- a/www/iridium/files/patch-base_files_dir__reader__linux.h +++ b/www/iridium/files/patch-base_files_dir__reader__linux.h @@ -1,39 +1,39 @@ ---- base/files/dir_reader_linux.h.orig 2025-05-07 06:48:23 UTC +--- base/files/dir_reader_linux.h.orig 2025-12-10 15:04:57 UTC +++ base/files/dir_reader_linux.h @@ -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; @@ -32,6 +38,7 @@ struct linux_dirent { unsigned char d_type; char d_name[0]; }; +#endif class DirReaderLinux { public: @@ -66,7 +73,11 @@ class DirReaderLinux { 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; } diff --git a/www/iridium/files/patch-base_files_dir__reader__posix.h b/www/iridium/files/patch-base_files_dir__reader__posix.h index 098168d9ea97..3b894386fcd2 100644 --- a/www/iridium/files/patch-base_files_dir__reader__posix.h +++ b/www/iridium/files/patch-base_files_dir__reader__posix.h @@ -1,20 +1,20 @@ ---- base/files/dir_reader_posix.h.orig 2025-05-07 06:48:23 UTC +--- base/files/dir_reader_posix.h.orig 2025-12-10 15:04:57 UTC +++ base/files/dir_reader_posix.h @@ -17,7 +17,7 @@ // seems worse than falling back to enumerating all file descriptors so we will // probably never implement this on the Mac. -#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/files/dir_reader_linux.h" #else #include "base/files/dir_reader_fallback.h" @@ -25,7 +25,7 @@ namespace base { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) typedef DirReaderLinux DirReaderPosix; #else typedef DirReaderFallback DirReaderPosix; diff --git a/www/iridium/files/patch-base_files_drive__info.h b/www/iridium/files/patch-base_files_drive__info.h index 3dd39a228435..50a2fcc54ac7 100644 --- a/www/iridium/files/patch-base_files_drive__info.h +++ b/www/iridium/files/patch-base_files_drive__info.h @@ -1,11 +1,11 @@ ---- base/files/drive_info.h.orig 2025-06-19 07:37:57 UTC +--- base/files/drive_info.h.orig 2025-12-10 15:04:57 UTC +++ base/files/drive_info.h @@ -48,7 +48,7 @@ struct BASE_EXPORT DriveInfo { std::optional has_seek_penalty; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Whether the drive is a "removable" drive. // // In macOS's IOKit API, a drive is "removable" if "the media is removable diff --git a/www/iridium/files/patch-base_files_drive__info__posix.cc b/www/iridium/files/patch-base_files_drive__info__posix.cc index 60a67d6e8348..614bc1ec95e8 100644 --- a/www/iridium/files/patch-base_files_drive__info__posix.cc +++ b/www/iridium/files/patch-base_files_drive__info__posix.cc @@ -1,11 +1,11 @@ ---- base/files/drive_info_posix.cc.orig 2025-11-06 10:11:34 UTC +--- base/files/drive_info_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/files/drive_info_posix.cc @@ -27,7 +27,7 @@ namespace base { std::optional GetFileDriveInfo(const FilePath& file_path) { DriveInfo drive_info; -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) drive_info.has_seek_penalty = false; return drive_info; #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/iridium/files/patch-base_files_file__path__watcher.h b/www/iridium/files/patch-base_files_file__path__watcher.h index 1a196694db42..0b6080858ffb 100644 --- a/www/iridium/files/patch-base_files_file__path__watcher.h +++ b/www/iridium/files/patch-base_files_file__path__watcher.h @@ -1,11 +1,11 @@ ---- base/files/file_path_watcher.h.orig 2025-05-07 06:48:23 UTC +--- base/files/file_path_watcher.h.orig 2025-12-10 15:04:57 UTC +++ base/files/file_path_watcher.h @@ -105,7 +105,7 @@ class BASE_EXPORT FilePathWatcher { Type type = Type::kNonRecursive; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // The callback will return the full path to a changed file instead of // the watched path supplied as |path| when Watch is called. // So the full path can be different from the watched path when a folder is diff --git a/www/iridium/files/patch-base_files_file__path__watcher__bsd.cc b/www/iridium/files/patch-base_files_file__path__watcher__bsd.cc index f6a4fa92ea2a..e8562989fd3c 100644 --- a/www/iridium/files/patch-base_files_file__path__watcher__bsd.cc +++ b/www/iridium/files/patch-base_files_file__path__watcher__bsd.cc @@ -1,57 +1,57 @@ ---- base/files/file_path_watcher_bsd.cc.orig 2025-05-07 06:48:23 UTC +--- base/files/file_path_watcher_bsd.cc.orig 2025-12-10 15:04:57 UTC +++ base/files/file_path_watcher_bsd.cc @@ -0,0 +1,54 @@ +// Copyright 2021 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 + +#include "base/files/file_path_watcher.h" +#include "base/files/file_path_watcher_kqueue.h" +#include "base/memory/ptr_util.h" +#include "build/build_config.h" + +namespace base { + +namespace { + +class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate { + public: + FilePathWatcherImpl() = default; + FilePathWatcherImpl(const FilePathWatcherImpl&) = delete; + FilePathWatcherImpl& operator=(const FilePathWatcherImpl&) = delete; + ~FilePathWatcherImpl() override = default; + + bool Watch(const FilePath& path, + Type type, + const FilePathWatcher::Callback& callback) override { + DCHECK(!impl_.get()); + if (type == Type::kRecursive) { + if (!FilePathWatcher::RecursiveWatchAvailable()) + return false; + } else { + impl_ = std::make_unique(); + } + DCHECK(impl_.get()); + return impl_->Watch(path, type, callback); + } + + void Cancel() override { + if (impl_.get()) + impl_->Cancel(); + set_cancelled(); + } + + private: + std::unique_ptr impl_; +}; + +} // namespace + +FilePathWatcher::FilePathWatcher() { + DETACH_FROM_SEQUENCE(sequence_checker_); + impl_ = std::make_unique(); +} + +} // namespace base diff --git a/www/iridium/files/patch-base_files_file__path__watcher__kqueue.h b/www/iridium/files/patch-base_files_file__path__watcher__kqueue.h index 8566580cab64..b347c1c9bcea 100644 --- a/www/iridium/files/patch-base_files_file__path__watcher__kqueue.h +++ b/www/iridium/files/patch-base_files_file__path__watcher__kqueue.h @@ -1,10 +1,10 @@ ---- base/files/file_path_watcher_kqueue.h.orig 2025-05-07 06:48:23 UTC +--- base/files/file_path_watcher_kqueue.h.orig 2025-12-10 15:04:57 UTC +++ base/files/file_path_watcher_kqueue.h @@ -5,6 +5,7 @@ #ifndef BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_ #define BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_ +#include #include #include diff --git a/www/iridium/files/patch-base_files_file__path__watcher__unittest.cc b/www/iridium/files/patch-base_files_file__path__watcher__unittest.cc index 2d05f8e5758b..4c414d79d528 100644 --- a/www/iridium/files/patch-base_files_file__path__watcher__unittest.cc +++ b/www/iridium/files/patch-base_files_file__path__watcher__unittest.cc @@ -1,29 +1,29 @@ ---- base/files/file_path_watcher_unittest.cc.orig 2025-05-07 06:48:23 UTC +--- base/files/file_path_watcher_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ base/files/file_path_watcher_unittest.cc @@ -902,7 +902,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(crbug.com/40263777): Expect that no events are fired on Mac. @@ -1848,7 +1848,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; @@ -1882,7 +1882,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/iridium/files/patch-base_files_file__util__posix.cc b/www/iridium/files/patch-base_files_file__util__posix.cc index a023f32d2f73..023eaef2c869 100644 --- a/www/iridium/files/patch-base_files_file__util__posix.cc +++ b/www/iridium/files/patch-base_files_file__util__posix.cc @@ -1,48 +1,48 @@ ---- base/files/file_util_posix.cc.orig 2025-11-06 10:11:34 UTC +--- base/files/file_util_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/files/file_util_posix.cc -@@ -943,6 +943,7 @@ bool CreateNewTempDirectory(const FilePath::StringType +@@ -943,6 +943,7 @@ bool CreateNewTempDirectory(FilePath::StringViewType p bool CreateDirectoryAndGetError(const FilePath& full_path, File::Error* error) { ScopedBlockingCall scoped_blocking_call( FROM_HERE, BlockingType::MAY_BLOCK); // For call to mkdir(). + const FilePath kFileSystemRoot("/"); // Avoid checking subdirs if directory already exists. if (DirectoryExists(full_path)) { @@ -952,8 +953,8 @@ bool CreateDirectoryAndGetError(const FilePath& full_p // Collect a list of all missing directories. std::vector missing_subpaths({full_path}); FilePath last_path = full_path; - for (FilePath path = full_path.DirName(); path.value() != last_path.value(); - path = path.DirName()) { + for (FilePath path = full_path.DirName(); (path.value() != last_path.value() && + (path != kFileSystemRoot)); path = path.DirName()) { if (DirectoryExists(path)) { break; } @@ -971,21 +972,14 @@ bool CreateDirectoryAndGetError(const FilePath& full_p } #endif // BUILDFLAG(IS_CHROMEOS) - if (File::Mkdir(subpath, mode) == 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) { + if ((mkdir(subpath.value().c_str(), mode) == -1) && + ((full_path != subpath) ? (errno != ENOENT) : (-1))) { + int saved_errno = errno; + if (error) *error = File::OSErrorToFileError(saved_errno); - } - errno = saved_errno; return false; } + errno = 0; } return true; } diff --git a/www/iridium/files/patch-base_files_file__util__unittest.cc b/www/iridium/files/patch-base_files_file__util__unittest.cc index 31e6057e8372..a8c8c301fc4c 100644 --- a/www/iridium/files/patch-base_files_file__util__unittest.cc +++ b/www/iridium/files/patch-base_files_file__util__unittest.cc @@ -1,40 +1,40 @@ ---- base/files/file_util_unittest.cc.orig 2025-11-06 10:11:34 UTC +--- base/files/file_util_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ base/files/file_util_unittest.cc @@ -4156,7 +4156,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"; @@ -4741,6 +4741,19 @@ TEST_F(FileUtilTest, CreateDirectoryOnlyCheckMissingSu #endif // BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_OPENBSD) +TEST_F(FileUtilTest, CreateDirectoryInUnveiledPath) { + FilePath dir = PathService::CheckedGet(DIR_GEN_TEST_DATA_ROOT); + dir = dir.Append(FILE_PATH_LITERAL("base")); + dir = dir.Append(FILE_PATH_LITERAL("test")); + dir = dir.Append(FILE_PATH_LITERAL("unveil")); + unveil(dir.value().c_str(), "rwc"); + EXPECT_TRUE(CreateDirectory(dir)); + dir = dir.Append(FILE_PATH_LITERAL("test")); + EXPECT_FALSE(CreateDirectory(dir)); +} +#endif + #if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) && \ defined(ARCH_CPU_32_BITS) // TODO(crbug.com/327582285): Re-enable these tests. They may be failing due to @@ -4907,7 +4920,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/iridium/files/patch-base_files_important__file__writer__cleaner.cc b/www/iridium/files/patch-base_files_important__file__writer__cleaner.cc index 27752afd7a7f..4fea55a6232a 100644 --- a/www/iridium/files/patch-base_files_important__file__writer__cleaner.cc +++ b/www/iridium/files/patch-base_files_important__file__writer__cleaner.cc @@ -1,12 +1,12 @@ ---- base/files/important_file_writer_cleaner.cc.orig 2025-05-07 06:48:23 UTC +--- base/files/important_file_writer_cleaner.cc.orig 2025-12-10 15:04:57 UTC +++ base/files/important_file_writer_cleaner.cc @@ -25,7 +25,8 @@ namespace base { namespace { base::Time GetUpperBoundTime() { -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) +// needed because of .CreationTime() pledge +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // If process creation time is not available then use instance creation // time as the upper-bound for old files. Modification times may be // rounded-down to coarse-grained increments, e.g. FAT has 2s granularity, diff --git a/www/iridium/files/patch-base_files_scoped__file.cc b/www/iridium/files/patch-base_files_scoped__file.cc index b21cd7daa04f..eeb4e3dffad7 100644 --- a/www/iridium/files/patch-base_files_scoped__file.cc +++ b/www/iridium/files/patch-base_files_scoped__file.cc @@ -1,11 +1,11 @@ ---- base/files/scoped_file.cc.orig 2025-05-07 06:48:23 UTC +--- base/files/scoped_file.cc.orig 2025-12-10 15:04:57 UTC +++ base/files/scoped_file.cc @@ -32,7 +32,7 @@ void ScopedFDCloseTraits::Free(int fd) { int ret = IGNORE_EINTR(close(fd)); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // NB: Some file descriptors can return errors from close() e.g. network // filesystems such as NFS and Linux input devices. On Linux, macOS, and // Fuchsia's POSIX layer, errors from close other than EBADF do not indicate diff --git a/www/iridium/files/patch-base_functional_unretained__traits.h b/www/iridium/files/patch-base_functional_unretained__traits.h index 75305b3b116e..4c0ab15ec3e8 100644 --- a/www/iridium/files/patch-base_functional_unretained__traits.h +++ b/www/iridium/files/patch-base_functional_unretained__traits.h @@ -1,11 +1,11 @@ ---- base/functional/unretained_traits.h.orig 2025-05-07 06:48:23 UTC +--- base/functional/unretained_traits.h.orig 2025-12-10 15:04:57 UTC +++ base/functional/unretained_traits.h -@@ -90,7 +90,7 @@ struct SupportsUnretainedImpl { +@@ -92,7 +92,7 @@ struct SupportsUnretainedImpl { // official builds, and then in non-test code as well. #if defined(FORCE_UNRETAINED_COMPLETENESS_CHECKS_FOR_TESTS) || \ (!defined(UNIT_TEST) && !defined(OFFICIAL_BUILD) && \ - (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN))) + (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD))) static_assert(v, "Argument requires unretained storage, but type is not " "fully defined. This prevents determining whether " diff --git a/www/iridium/files/patch-base_i18n_icu__util.cc b/www/iridium/files/patch-base_i18n_icu__util.cc index f1d008ba584a..3af1f556ae12 100644 --- a/www/iridium/files/patch-base_i18n_icu__util.cc +++ b/www/iridium/files/patch-base_i18n_icu__util.cc @@ -1,20 +1,20 @@ ---- base/i18n/icu_util.cc.orig 2025-09-11 13:19:19 UTC +--- base/i18n/icu_util.cc.orig 2025-12-10 15:04:57 UTC +++ base/i18n/icu_util.cc -@@ -52,7 +52,7 @@ +@@ -54,7 +54,7 @@ #include "third_party/icu/source/common/unicode/unistr.h" #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) #include "third_party/icu/source/i18n/unicode/timezone.h" #endif -@@ -318,7 +318,7 @@ void InitializeIcuTimeZone() { +@@ -327,7 +327,7 @@ void InitializeIcuTimeZone() { FuchsiaIntlProfileWatcher::GetPrimaryTimeZoneIdForIcuInitialization(); icu::TimeZone::adoptDefault( icu::TimeZone::createTimeZone(icu::UnicodeString::fromUTF8(zone_id))); -#elif BUILDFLAG(IS_CHROMEOS) || \ +#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_ANDROID) // To respond to the time zone change properly, the default time zone // cache in ICU has to be populated on starting up. diff --git a/www/iridium/files/patch-base_linux__util.cc b/www/iridium/files/patch-base_linux__util.cc index 0bceba4c0207..0788a69880d8 100644 --- a/www/iridium/files/patch-base_linux__util.cc +++ b/www/iridium/files/patch-base_linux__util.cc @@ -1,17 +1,17 @@ ---- base/linux_util.cc.orig 2025-05-07 06:48:23 UTC +--- base/linux_util.cc.orig 2025-12-10 15:04:57 UTC +++ base/linux_util.cc @@ -163,10 +163,14 @@ void SetLinuxDistro(const std::string& distro) { } bool GetThreadsForProcess(pid_t pid, std::vector* tids) { +#if BUILDFLAG(IS_BSD) + return false; +#else // 25 > strlen("/proc//task") + strlen(base::NumberToString(INT_MAX)) + 1 = 22 char buf[25]; strings::SafeSPrintf(buf, "/proc/%d/task", pid); return GetThreadsFromProcessDir(buf, tids); +#endif } bool GetThreadsForCurrentProcess(std::vector* tids) { diff --git a/www/iridium/files/patch-base_logging__unittest.cc b/www/iridium/files/patch-base_logging__unittest.cc index bb7e6f40220a..84b083f54e48 100644 --- a/www/iridium/files/patch-base_logging__unittest.cc +++ b/www/iridium/files/patch-base_logging__unittest.cc @@ -1,31 +1,31 @@ ---- base/logging_unittest.cc.orig 2025-05-07 06:48:23 UTC +--- base/logging_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ base/logging_unittest.cc @@ -40,7 +40,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 @@ -586,14 +586,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/iridium/files/patch-base_memory_discardable__memory.cc b/www/iridium/files/patch-base_memory_discardable__memory.cc index b993424a5f62..7560a8a4ba7b 100644 --- a/www/iridium/files/patch-base_memory_discardable__memory.cc +++ b/www/iridium/files/patch-base_memory_discardable__memory.cc @@ -1,38 +1,38 @@ ---- base/memory/discardable_memory.cc.orig 2025-11-06 10:11:34 UTC +--- base/memory/discardable_memory.cc.orig 2025-12-10 15:04:57 UTC +++ base/memory/discardable_memory.cc @@ -20,7 +20,7 @@ namespace features { BASE_FEATURE(kMadvFreeDiscardableMemory, base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kDiscardableMemoryBackingTrial, base::FEATURE_DISABLED_BY_DEFAULT); BASE_FEATURE_ENUM_PARAM(DiscardableMemoryTrialGroup, @@ -36,7 +36,7 @@ BASE_FEATURE_ENUM_PARAM(DiscardableMemoryTrialGroup, namespace { -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) DiscardableMemoryBacking GetBackingForFieldTrial() { DiscardableMemoryTrialGroup trial_group = @@ -54,7 +54,7 @@ DiscardableMemoryBacking GetBackingForFieldTrial() { } // namespace -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Probe capabilities of this device to determine whether we should participate // in the discardable memory backing trial. @@ -81,7 +81,7 @@ DiscardableMemory::DiscardableMemory() = default; DiscardableMemory::~DiscardableMemory() = default; DiscardableMemoryBacking GetDiscardableMemoryBacking() { -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (DiscardableMemoryBackingFieldTrialIsEnabled()) { return GetBackingForFieldTrial(); } diff --git a/www/iridium/files/patch-base_memory_discardable__memory__internal.h b/www/iridium/files/patch-base_memory_discardable__memory__internal.h index 66215c2b36f9..81efb0c5c783 100644 --- a/www/iridium/files/patch-base_memory_discardable__memory__internal.h +++ b/www/iridium/files/patch-base_memory_discardable__memory__internal.h @@ -1,11 +1,11 @@ ---- base/memory/discardable_memory_internal.h.orig 2025-05-07 06:48:23 UTC +--- base/memory/discardable_memory_internal.h.orig 2025-12-10 15:04:57 UTC +++ base/memory/discardable_memory_internal.h @@ -12,7 +12,7 @@ #include "base/metrics/field_trial_params.h" #include "build/build_config.h" -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) namespace base { diff --git a/www/iridium/files/patch-base_memory_madv__free__discardable__memory__posix.cc b/www/iridium/files/patch-base_memory_madv__free__discardable__memory__posix.cc index bc653bab5493..66931a7bba5a 100644 --- a/www/iridium/files/patch-base_memory_madv__free__discardable__memory__posix.cc +++ b/www/iridium/files/patch-base_memory_madv__free__discardable__memory__posix.cc @@ -1,21 +1,21 @@ ---- base/memory/madv_free_discardable_memory_posix.cc.orig 2025-10-28 14:29:43 UTC +--- base/memory/madv_free_discardable_memory_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/memory/madv_free_discardable_memory_posix.cc @@ -297,6 +297,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 @@ -313,6 +317,7 @@ bool MadvFreeDiscardableMemoryPosix::IsResident() cons } } return true; +#endif } bool MadvFreeDiscardableMemoryPosix::IsDiscarded() const { diff --git a/www/iridium/files/patch-base_memory_platform__shared__memory__region.h b/www/iridium/files/patch-base_memory_platform__shared__memory__region.h index e28a549e9591..1adf93984e37 100644 --- a/www/iridium/files/patch-base_memory_platform__shared__memory__region.h +++ b/www/iridium/files/patch-base_memory_platform__shared__memory__region.h @@ -1,20 +1,20 @@ ---- base/memory/platform_shared_memory_region.h.orig 2025-10-28 14:29:43 UTC +--- base/memory/platform_shared_memory_region.h.orig 2025-12-10 15:04:57 UTC +++ base/memory/platform_shared_memory_region.h @@ -99,7 +99,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { #if BUILDFLAG(IS_FUCHSIA) kNotVmo, #endif -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) kFcntlFailed, kReadOnlyFdNotReadOnly, kUnexpectedReadOnlyFd, @@ -230,7 +230,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { CheckPlatformHandlePermissionsCorrespondToMode); static PlatformSharedMemoryRegion Create(Mode mode, size_t size -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) , bool executable = false #endif diff --git a/www/iridium/files/patch-base_memory_platform__shared__memory__region__posix.cc b/www/iridium/files/patch-base_memory_platform__shared__memory__region__posix.cc index 6b9d56d7ef6e..1593e933c6e3 100644 --- a/www/iridium/files/patch-base_memory_platform__shared__memory__region__posix.cc +++ b/www/iridium/files/patch-base_memory_platform__shared__memory__region__posix.cc @@ -1,20 +1,20 @@ ---- base/memory/platform_shared_memory_region_posix.cc.orig 2025-10-28 14:29:43 UTC +--- base/memory/platform_shared_memory_region_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/memory/platform_shared_memory_region_posix.cc @@ -172,7 +172,7 @@ bool PlatformSharedMemoryRegion::ConvertToUnsafe() { // static PlatformSharedMemoryRegion PlatformSharedMemoryRegion::Create(Mode mode, size_t size -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) , bool executable #endif @@ -197,7 +197,7 @@ PlatformSharedMemoryRegion PlatformSharedMemoryRegion: // flag. FilePath directory; if (!GetShmemTempDir( -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) executable, #else false /* executable */, diff --git a/www/iridium/files/patch-base_memory_protected__memory.h b/www/iridium/files/patch-base_memory_protected__memory.h index 256bac38bfec..5f24f8a5f72c 100644 --- a/www/iridium/files/patch-base_memory_protected__memory.h +++ b/www/iridium/files/patch-base_memory_protected__memory.h @@ -1,44 +1,44 @@ ---- base/memory/protected_memory.h.orig 2025-05-07 06:48:23 UTC +--- base/memory/protected_memory.h.orig 2025-12-10 15:04:57 UTC +++ base/memory/protected_memory.h @@ -120,12 +120,12 @@ __declspec(selectany) char __stop_protected_memory; #define DECLARE_PROTECTED_DATA constinit #define DEFINE_PROTECTED_DATA constinit __declspec(allocate("prot$mem")) -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // This value is used to align the writers variable. That variable needs to be // aligned to ensure that the protected memory section starts on a page // boundary. #if (PA_BUILDFLAG(IS_ANDROID) && PA_BUILDFLAG(PA_ARCH_CPU_64_BITS)) || \ - (PA_BUILDFLAG(IS_LINUX) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)) + ((PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_BSD)) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)) // arm64 supports 4kb, 16kb, and 64kb pages. Set to the largest of 64kb as that // will guarantee the section is page aligned regardless of the choice. inline constexpr int kProtectedMemoryAlignment = 65536; @@ -340,7 +340,7 @@ class BASE_EXPORT AutoWritableMemoryBase { // where an attacker could overwrite it with a large value and invoke code // that constructs and destructs an AutoWritableMemory. After such a call // protected memory would still be set writable because writers > 0. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // On Linux, the protected memory section is not automatically page aligned. // This means that attempts to reset the protected memory region to readonly // will set some of the preceding section that is on the same page readonly @@ -354,7 +354,7 @@ class BASE_EXPORT AutoWritableMemoryBase { #endif static inline size_t writers GUARDED_BY(writers_lock()) = 0; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // On Linux, there is no guarantee the section following the protected // memory section is page aligned. This can result in attempts to change // the access permissions of the end of the protected memory section @@ -412,7 +412,7 @@ class BASE_EXPORT AutoWritableMemoryInitializer // the variable to something large before the section was read-only. WriterData::writers = 0; CHECK(SetProtectedSectionReadOnly()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Set the protected_memory_section_buffer to true to ensure the buffer // section is created. If a variable is declared but not used the memory // section won't be created. diff --git a/www/iridium/files/patch-base_memory_protected__memory__posix.cc b/www/iridium/files/patch-base_memory_protected__memory__posix.cc index 06ec4bf6df37..ac620e8c5441 100644 --- a/www/iridium/files/patch-base_memory_protected__memory__posix.cc +++ b/www/iridium/files/patch-base_memory_protected__memory__posix.cc @@ -1,20 +1,20 @@ ---- base/memory/protected_memory_posix.cc.orig 2025-05-07 06:48:23 UTC +--- base/memory/protected_memory_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/memory/protected_memory_posix.cc @@ -6,7 +6,7 @@ #include -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include #endif // BUILDFLAG(IS_LINUX) @@ -34,7 +34,7 @@ bool SetMemory(void* start, void* end, int prot) { } // namespace namespace internal { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) void CheckMemoryReadOnly(const void* ptr) { const uintptr_t page_start = bits::AlignDown(reinterpret_cast(ptr), GetPageSize()); diff --git a/www/iridium/files/patch-base_message__loop_message__pump__epoll.cc b/www/iridium/files/patch-base_message__loop_message__pump__epoll.cc index f287d9ce7a90..161771e91ddd 100644 --- a/www/iridium/files/patch-base_message__loop_message__pump__epoll.cc +++ b/www/iridium/files/patch-base_message__loop_message__pump__epoll.cc @@ -1,11 +1,11 @@ ---- base/message_loop/message_pump_epoll.cc.orig 2025-10-28 14:29:43 UTC +--- base/message_loop/message_pump_epoll.cc.orig 2025-12-10 15:04:57 UTC +++ base/message_loop/message_pump_epoll.cc @@ -44,7 +44,7 @@ std::atomic_bool g_use_batched_version = false; std::atomic_bool g_use_poll = false; constexpr std::pair kEpollToPollEvents[] = { - {EPOLLIN, POLLIN}, {EPOLLOUT, POLLOUT}, {EPOLLRDHUP, POLLRDHUP}, + {EPOLLIN, POLLIN}, {EPOLLOUT, POLLOUT}, {EPOLLPRI, POLLPRI}, {EPOLLERR, POLLERR}, {EPOLLHUP, POLLHUP}}; void SetEventsForPoll(const uint32_t epoll_events, struct pollfd* poll_entry) { diff --git a/www/iridium/files/patch-base_message__loop_message__pump__epoll.h b/www/iridium/files/patch-base_message__loop_message__pump__epoll.h index 982b5a9692e6..4b88816c849f 100644 --- a/www/iridium/files/patch-base_message__loop_message__pump__epoll.h +++ b/www/iridium/files/patch-base_message__loop_message__pump__epoll.h @@ -1,14 +1,14 @@ ---- base/message_loop/message_pump_epoll.h.orig 2025-05-07 06:48:23 UTC +--- base/message_loop/message_pump_epoll.h.orig 2025-12-10 15:04:57 UTC +++ base/message_loop/message_pump_epoll.h @@ -51,7 +51,11 @@ namespace base { // every call, don't do it when we have too many FDs. BASE_FEATURE(kUsePollForMessagePumpEpoll, "UsePollForMessagePumpEpoll", +#if BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT); +#else base::FEATURE_DISABLED_BY_DEFAULT); +#endif // A MessagePump implementation suitable for I/O message loops on Linux-based // systems with epoll API support. diff --git a/www/iridium/files/patch-base_message__loop_message__pump__glib.cc b/www/iridium/files/patch-base_message__loop_message__pump__glib.cc index 89134ca7c2f0..cf83f5410756 100644 --- a/www/iridium/files/patch-base_message__loop_message__pump__glib.cc +++ b/www/iridium/files/patch-base_message__loop_message__pump__glib.cc @@ -1,28 +1,28 @@ ---- base/message_loop/message_pump_glib.cc.orig 2025-11-06 10:11:34 UTC +--- base/message_loop/message_pump_glib.cc.orig 2025-12-10 15:04:57 UTC +++ base/message_loop/message_pump_glib.cc @@ -8,6 +8,11 @@ #include #include +#if BUILDFLAG(IS_BSD) +#include +#include +#endif + #include "base/logging.h" #include "base/memory/raw_ptr.h" #include "base/message_loop/io_watcher.h" @@ -58,9 +63,13 @@ int GetTimeIntervalMilliseconds(TimeTicks next_task_ti } bool RunningOnMainThread() { +#if BUILDFLAG(IS_BSD) + return pthread_main_np(); +#else auto pid = getpid(); auto tid = PlatformThread::CurrentId().raw(); return pid > 0 && tid > 0 && pid == tid; +#endif } // A brief refresher on GLib: diff --git a/www/iridium/files/patch-base_posix_can__lower__nice__to.cc b/www/iridium/files/patch-base_posix_can__lower__nice__to.cc index d3130b4f5c0c..4067e80ce10c 100644 --- a/www/iridium/files/patch-base_posix_can__lower__nice__to.cc +++ b/www/iridium/files/patch-base_posix_can__lower__nice__to.cc @@ -1,16 +1,16 @@ ---- base/posix/can_lower_nice_to.cc.orig 2025-05-07 06:48:23 UTC +--- base/posix/can_lower_nice_to.cc.orig 2025-12-10 15:04:57 UTC +++ base/posix/can_lower_nice_to.cc @@ -11,8 +11,12 @@ #include "build/build_config.h" +#if BUILDFLAG(IS_FREEBSD) +#include +#endif + // Not defined on AIX by default. -#if BUILDFLAG(IS_AIX) +#if BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) #if defined(RLIMIT_NICE) #error Assumption about OS_AIX is incorrect #endif diff --git a/www/iridium/files/patch-base_posix_file__descriptor__shuffle.h b/www/iridium/files/patch-base_posix_file__descriptor__shuffle.h index 1950b396906e..33e816b11661 100644 --- a/www/iridium/files/patch-base_posix_file__descriptor__shuffle.h +++ b/www/iridium/files/patch-base_posix_file__descriptor__shuffle.h @@ -1,11 +1,11 @@ ---- base/posix/file_descriptor_shuffle.h.orig 2025-05-07 06:48:23 UTC +--- base/posix/file_descriptor_shuffle.h.orig 2025-12-10 15:04:57 UTC +++ base/posix/file_descriptor_shuffle.h @@ -26,6 +26,8 @@ #include "base/base_export.h" #include "base/compiler_specific.h" +#undef close + namespace base { // A Delegate which performs the actions required to perform an injective diff --git a/www/iridium/files/patch-base_posix_sysctl.cc b/www/iridium/files/patch-base_posix_sysctl.cc index 35dfb1ea0587..72c18bd46d88 100644 --- a/www/iridium/files/patch-base_posix_sysctl.cc +++ b/www/iridium/files/patch-base_posix_sysctl.cc @@ -1,10 +1,10 @@ ---- base/posix/sysctl.cc.orig 2025-05-07 06:48:23 UTC +--- base/posix/sysctl.cc.orig 2025-12-10 15:04:57 UTC +++ base/posix/sysctl.cc @@ -4,6 +4,7 @@ #include "base/posix/sysctl.h" +#include #include #include diff --git a/www/iridium/files/patch-base_posix_unix__domain__socket.cc b/www/iridium/files/patch-base_posix_unix__domain__socket.cc index e2e4e122afac..1d7c2b528441 100644 --- a/www/iridium/files/patch-base_posix_unix__domain__socket.cc +++ b/www/iridium/files/patch-base_posix_unix__domain__socket.cc @@ -1,65 +1,65 @@ ---- base/posix/unix_domain_socket.cc.orig 2025-09-11 13:19:19 UTC +--- base/posix/unix_domain_socket.cc.orig 2025-12-10 15:04:57 UTC +++ base/posix/unix_domain_socket.cc @@ -20,6 +20,7 @@ #include "base/files/scoped_file.h" #include "base/logging.h" #include "base/notreached.h" +#include "base/notimplemented.h" #include "base/numerics/safe_conversions.h" #include "base/pickle.h" #include "base/posix/eintr_wrapper.h" @@ -47,7 +48,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 @@ -73,7 +74,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; @@ -81,7 +82,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()); @@ -133,7 +134,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)) @@ -162,7 +163,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) { @@ -199,6 +200,9 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, 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/iridium/files/patch-base_posix_unix__domain__socket__unittest.cc b/www/iridium/files/patch-base_posix_unix__domain__socket__unittest.cc index c49a277cd6bb..135c656ec73d 100644 --- a/www/iridium/files/patch-base_posix_unix__domain__socket__unittest.cc +++ b/www/iridium/files/patch-base_posix_unix__domain__socket__unittest.cc @@ -1,11 +1,11 @@ ---- base/posix/unix_domain_socket_unittest.cc.orig 2025-05-07 06:48:23 UTC +--- base/posix/unix_domain_socket_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ base/posix/unix_domain_socket_unittest.cc @@ -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/iridium/files/patch-base_process_internal__linux.h b/www/iridium/files/patch-base_process_internal__linux.h index dd38ea9cd85e..3e1f55ff1b00 100644 --- a/www/iridium/files/patch-base_process_internal__linux.h +++ b/www/iridium/files/patch-base_process_internal__linux.h @@ -1,20 +1,20 @@ ---- base/process/internal_linux.h.orig 2025-09-11 13:19:19 UTC +--- base/process/internal_linux.h.orig 2025-12-10 15:04:57 UTC +++ base/process/internal_linux.h @@ -146,6 +146,9 @@ TimeDelta ClockTicksToTimeDelta(int64_t clock_ticks); // arguments to the lambda. template void ForEachProcessTask(base::ProcessHandle process, Lambda&& lambda) { +#if BUILDFLAG(IS_BSD) + return; +#else // Iterate through the different threads tracked in /proc//task. FilePath fd_path = GetProcPidDir(process).Append("task"); @@ -169,6 +172,7 @@ void ForEachProcessTask(base::ProcessHandle process, L FilePath task_path = fd_path.Append(tid_str); lambda(tid, task_path); } +#endif } } // namespace internal diff --git a/www/iridium/files/patch-base_process_kill.h b/www/iridium/files/patch-base_process_kill.h index 11c98ba5030f..841f47bcb0f9 100644 --- a/www/iridium/files/patch-base_process_kill.h +++ b/www/iridium/files/patch-base_process_kill.h @@ -1,11 +1,11 @@ ---- base/process/kill.h.orig 2025-11-06 10:11:34 UTC +--- base/process/kill.h.orig 2025-12-10 15:04:57 UTC +++ base/process/kill.h @@ -125,7 +125,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/iridium/files/patch-base_process_kill__posix.cc b/www/iridium/files/patch-base_process_kill__posix.cc index f058bbf4ee4f..25878c75bf7a 100644 --- a/www/iridium/files/patch-base_process_kill__posix.cc +++ b/www/iridium/files/patch-base_process_kill__posix.cc @@ -1,11 +1,11 @@ ---- base/process/kill_posix.cc.orig 2025-05-07 06:48:23 UTC +--- base/process/kill_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/process/kill_posix.cc @@ -161,7 +161,7 @@ void EnsureProcessTerminated(Process process) { 0, new BackgroundReaper(std::move(process), Seconds(2))); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void EnsureProcessGetsReaped(Process process) { DCHECK(!process.is_current()); diff --git a/www/iridium/files/patch-base_process_launch.h b/www/iridium/files/patch-base_process_launch.h index 4a12b825a474..17f19357492b 100644 --- a/www/iridium/files/patch-base_process_launch.h +++ b/www/iridium/files/patch-base_process_launch.h @@ -1,11 +1,11 @@ ---- base/process/launch.h.orig 2025-09-11 13:19:19 UTC +--- base/process/launch.h.orig 2025-12-10 15:04:57 UTC +++ base/process/launch.h @@ -234,7 +234,7 @@ struct BASE_EXPORT LaunchOptions { bool clear_environment = false; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If non-zero, start the process using clone(), using flags as provided. // Unlike in clone, clone_flags may not contain a custom termination signal // that is sent to the parent when the child dies. The termination signal will diff --git a/www/iridium/files/patch-base_process_memory__linux.cc b/www/iridium/files/patch-base_process_memory__linux.cc index bc2c7a267e97..aa4793e8ef38 100644 --- a/www/iridium/files/patch-base_process_memory__linux.cc +++ b/www/iridium/files/patch-base_process_memory__linux.cc @@ -1,44 +1,44 @@ ---- base/process/memory_linux.cc.orig 2025-11-06 10:11:34 UTC +--- base/process/memory_linux.cc.orig 2025-12-10 15:04:57 UTC +++ base/process/memory_linux.cc @@ -29,6 +29,7 @@ void* __libc_calloc(size_t, size_t); namespace base { +#if !BUILDFLAG(IS_BSD) namespace { void ReleaseReservationOrTerminate() { @@ -39,12 +40,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 @@ -53,8 +56,10 @@ void EnableTerminationOnOutOfMemory() { #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 UncheckedCalloc(size_t num_items, size_t size, void** result) { #if PA_BUILDFLAG(USE_ALLOCATOR_SHIM) diff --git a/www/iridium/files/patch-base_process_process__handle.cc b/www/iridium/files/patch-base_process_process__handle.cc index 0a705004f3aa..4043d24c38a8 100644 --- a/www/iridium/files/patch-base_process_process__handle.cc +++ b/www/iridium/files/patch-base_process_process__handle.cc @@ -1,11 +1,11 @@ ---- base/process/process_handle.cc.orig 2025-05-07 06:48:23 UTC +--- base/process/process_handle.cc.orig 2025-12-10 15:04:57 UTC +++ base/process/process_handle.cc @@ -30,7 +30,7 @@ UniqueProcId GetUniqueIdForProcess() { : UniqueProcId(GetCurrentProcId()); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_AIX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) void InitUniqueIdForProcessInPidNamespace(ProcessId pid_outside_of_namespace) { DCHECK(pid_outside_of_namespace != kNullProcessId); diff --git a/www/iridium/files/patch-base_process_process__handle.h b/www/iridium/files/patch-base_process_process__handle.h index ae50196943ec..20cc7fa9fadc 100644 --- a/www/iridium/files/patch-base_process_process__handle.h +++ b/www/iridium/files/patch-base_process_process__handle.h @@ -1,11 +1,11 @@ ---- base/process/process_handle.h.orig 2025-05-07 06:48:23 UTC +--- base/process/process_handle.h.orig 2025-12-10 15:04:57 UTC +++ base/process/process_handle.h @@ -86,7 +86,7 @@ BASE_EXPORT ProcessId GetCurrentProcId(); // processes may be reused. BASE_EXPORT UniqueProcId GetUniqueIdForProcess(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // When a process is started in a different PID namespace from the browser // process, this function must be called with the process's PID in the browser's // PID namespace in order to initialize its unique ID. Not thread safe. diff --git a/www/iridium/files/patch-base_process_process__handle__freebsd.cc b/www/iridium/files/patch-base_process_process__handle__freebsd.cc index a9182153d836..60b1d2a8834e 100644 --- a/www/iridium/files/patch-base_process_process__handle__freebsd.cc +++ b/www/iridium/files/patch-base_process_process__handle__freebsd.cc @@ -1,25 +1,25 @@ ---- base/process/process_handle_freebsd.cc.orig 2025-05-07 06:48:23 UTC +--- base/process/process_handle_freebsd.cc.orig 2025-12-10 15:04:57 UTC +++ base/process/process_handle_freebsd.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/process/process_handle.h" +#include "base/files/file_util.h" #include #include @@ -20,10 +21,13 @@ namespace base { ProcessId GetParentProcessId(ProcessHandle process) { struct kinfo_proc info; - size_t length; + size_t length = sizeof(struct kinfo_proc); int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, process}; if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) { + return -1; + + if (length < sizeof(struct kinfo_proc)) return -1; } diff --git a/www/iridium/files/patch-base_process_process__handle__openbsd.cc b/www/iridium/files/patch-base_process_process__handle__openbsd.cc index 0c2cc1cbfd91..3dad2b9aa9fe 100644 --- a/www/iridium/files/patch-base_process_process__handle__openbsd.cc +++ b/www/iridium/files/patch-base_process_process__handle__openbsd.cc @@ -1,138 +1,138 @@ ---- base/process/process_handle_openbsd.cc.orig 2025-05-07 06:48:23 UTC +--- base/process/process_handle_openbsd.cc.orig 2025-12-10 15:04:57 UTC +++ base/process/process_handle_openbsd.cc @@ -3,17 +3,25 @@ // found in the LICENSE file. #include "base/process/process_handle.h" +#include "base/files/file_util.h" #include +#include +#include +#include +#include #include #include #include +#include + namespace base { ProcessId GetParentProcessId(ProcessHandle process) { - struct kinfo_proc info; + struct kinfo_proc *info; size_t length; + pid_t ppid; int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process, sizeof(struct kinfo_proc), 0}; @@ -22,37 +30,87 @@ ProcessId GetParentProcessId(ProcessHandle process) { return -1; } - mib[5] = (length / sizeof(struct kinfo_proc)); + info = (struct kinfo_proc *)malloc(length); - if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) { - return -1; + mib[5] = static_cast((length / sizeof(struct kinfo_proc))); + + if (sysctl(mib, std::size(mib), info, &length, NULL, 0) < 0) { + ppid = -1; + goto out; } - return info.p_ppid; + ppid = info->p_ppid; + +out: + free(info); + return ppid; } FilePath GetProcessExecutablePath(ProcessHandle process) { - struct kinfo_proc kp; + struct kinfo_file *files; + kvm_t *kd = NULL; + char errbuf[_POSIX2_LINE_MAX]; + char **retvalargs, *cpath, retval[PATH_MAX]; + int cnt; size_t len; - int mib[] = { - CTL_KERN, KERN_PROC, KERN_PROC_PID, process, sizeof(struct kinfo_proc), - 0}; + char *tokens[2]; + struct stat sb; + FilePath result; - if (sysctl(mib, std::size(mib), NULL, &len, NULL, 0) == -1) { - return FilePath(); + int mib[] = { CTL_KERN, KERN_PROC_ARGS, process, KERN_PROC_ARGV }; + + if ((cpath = getenv("CHROME_EXE_PATH")) != NULL) + result = FilePath(cpath); + else + result = FilePath("/usr/local/chrome/chrome"); + + if (sysctl(mib, std::size(mib), NULL, &len, NULL, 0) != -1) { + retvalargs = static_cast(malloc(len)); + if (!retvalargs) + return result; + + if (sysctl(mib, std::size(mib), retvalargs, &len, NULL, 0) < 0) { + free(retvalargs); + return result; + } + + if ((*tokens = strtok(retvalargs[0], ":")) == NULL) { + free(retvalargs); + return result; + } + + free(retvalargs); + + if (tokens[0] == NULL) + return result; + + if (realpath(tokens[0], retval) == NULL) + return result; + + if (stat(retval, &sb) < 0) + return result; + + if ((kd = kvm_openfiles(NULL, NULL, NULL, (int)KVM_NO_FILES, + errbuf)) == NULL) + return result; + + if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, process, + sizeof(struct kinfo_file), &cnt)) == NULL) { + kvm_close(kd); + return result; + } + + 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) { + kvm_close(kd); + result = FilePath(retval); + } + } } - mib[5] = (len / sizeof(struct kinfo_proc)); - if (sysctl(mib, std::size(mib), &kp, &len, NULL, 0) < 0) { - return FilePath(); - } - if ((kp.p_flag & P_SYSTEM) != 0) { - return FilePath(); - } - if (strcmp(kp.p_comm, "chrome") == 0) { - return FilePath(kp.p_comm); - } - return FilePath(); + return result; } } // namespace base diff --git a/www/iridium/files/patch-base_process_process__iterator__freebsd.cc b/www/iridium/files/patch-base_process_process__iterator__freebsd.cc index 2f449412fa23..37afc66bdaac 100644 --- a/www/iridium/files/patch-base_process_process__iterator__freebsd.cc +++ b/www/iridium/files/patch-base_process_process__iterator__freebsd.cc @@ -1,52 +1,52 @@ ---- base/process/process_iterator_freebsd.cc.orig 2025-05-07 06:48:23 UTC +--- base/process/process_iterator_freebsd.cc.orig 2025-12-10 15:04:57 UTC +++ base/process/process_iterator_freebsd.cc @@ -18,7 +18,7 @@ namespace base { ProcessIterator::ProcessIterator(const ProcessFilter* filter) : filter_(filter) { - int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_UID, getuid()}; + int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_UID, (int) getuid()}; bool done = false; int try_num = 1; @@ -37,7 +37,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter* num_of_kinfo_proc += 16; kinfo_procs_.resize(num_of_kinfo_proc); len = num_of_kinfo_proc * sizeof(struct kinfo_proc); - if (sysctl(mib, std::size(mib), &kinfo_procs_[0], &len, NULL, 0) < 0) { + if (sysctl(mib, std::size(mib), kinfo_procs_.data(), &len, NULL, 0) < 0) { // If we get a mem error, it just means we need a bigger buffer, so // loop around again. Anything else is a real error and give up. if (errno != ENOMEM) { @@ -47,7 +47,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter* } } else { // Got the list, just make sure we're sized exactly right - size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc); + num_of_kinfo_proc = len / sizeof(struct kinfo_proc); kinfo_procs_.resize(num_of_kinfo_proc); done = true; } @@ -68,19 +68,14 @@ bool ProcessIterator::CheckForNextProcess() { for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) { size_t length; struct kinfo_proc kinfo = kinfo_procs_[index_of_kinfo_proc_]; - int mib[] = {CTL_KERN, KERN_PROC_ARGS, kinfo.ki_pid}; + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ARGS, kinfo.ki_pid }; if ((kinfo.ki_pid > 0) && (kinfo.ki_stat == SZOMB)) { continue; } - length = 0; - if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) < 0) { - LOG(ERROR) << "failed to figure out the buffer size for a command line"; - continue; - } - - data.resize(length); + data.resize(ARG_MAX); + length = ARG_MAX; if (sysctl(mib, std::size(mib), &data[0], &length, NULL, 0) < 0) { LOG(ERROR) << "failed to fetch a commandline"; diff --git a/www/iridium/files/patch-base_process_process__iterator__openbsd.cc b/www/iridium/files/patch-base_process_process__iterator__openbsd.cc index d712768959a9..8fdccdf3550b 100644 --- a/www/iridium/files/patch-base_process_process__iterator__openbsd.cc +++ b/www/iridium/files/patch-base_process_process__iterator__openbsd.cc @@ -1,46 +1,46 @@ ---- base/process/process_iterator_openbsd.cc.orig 2025-05-07 06:48:23 UTC +--- base/process/process_iterator_openbsd.cc.orig 2025-12-10 15:04:57 UTC +++ base/process/process_iterator_openbsd.cc @@ -6,6 +6,9 @@ #include #include +#include +#include +#include #include #include "base/logging.h" @@ -17,12 +20,13 @@ namespace base { ProcessIterator::ProcessIterator(const ProcessFilter* filter) : filter_(filter) { int mib[] = { - CTL_KERN, KERN_PROC, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc), - 0}; + CTL_KERN, KERN_PROC, KERN_PROC_UID, static_cast(getuid()), + sizeof(struct kinfo_proc), 0 }; bool done = false; int try_num = 1; const int max_tries = 10; + size_t num_of_kinfo_proc; do { size_t len = 0; @@ -31,7 +35,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter* kinfo_procs_.resize(0); done = true; } else { - size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc); + num_of_kinfo_proc = len / sizeof(struct kinfo_proc); // Leave some spare room for process table growth (more could show up // between when we check and now) num_of_kinfo_proc += 16; @@ -47,7 +51,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter* } } else { // Got the list, just make sure we're sized exactly right - size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc); + num_of_kinfo_proc = len / sizeof(struct kinfo_proc); kinfo_procs_.resize(num_of_kinfo_proc); done = true; } diff --git a/www/iridium/files/patch-base_process_process__metrics.cc b/www/iridium/files/patch-base_process_process__metrics.cc index fef4a5ce4b46..7cd18e836b9a 100644 --- a/www/iridium/files/patch-base_process_process__metrics.cc +++ b/www/iridium/files/patch-base_process_process__metrics.cc @@ -1,38 +1,38 @@ ---- base/process/process_metrics.cc.orig 2025-09-11 13:19:19 UTC +--- base/process/process_metrics.cc.orig 2025-12-10 15:04:57 UTC +++ base/process/process_metrics.cc @@ -17,7 +17,7 @@ namespace base { namespace { #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) int CalculateEventsPerSecond(uint64_t event_count, uint64_t* last_event_count, base::TimeTicks* last_calculated) { @@ -54,7 +54,7 @@ SystemMetrics SystemMetrics::Sample() { SystemMetrics system_metrics; system_metrics.committed_memory_ = GetSystemCommitCharge(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) GetSystemMemoryInfo(&system_metrics.memory_info_); GetVmStatInfo(&system_metrics.vmstat_info_); GetSystemDiskInfo(&system_metrics.disk_info_); @@ -79,7 +79,7 @@ std::unique_ptr ProcessMetrics::Create #endif // !BUILDFLAG(IS_MAC) } -#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX) +#if BUILDFLAG(IS_POSIX) double ProcessMetrics::GetPlatformIndependentCPUUsage( TimeDelta cumulative_cpu) { TimeTicks time = TimeTicks::Now(); @@ -112,7 +112,7 @@ ProcessMetrics::GetPlatformIndependentCPUUsage() { #endif #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) int ProcessMetrics::CalculateIdleWakeupsPerSecond( uint64_t absolute_idle_wakeups) { return CalculateEventsPerSecond(absolute_idle_wakeups, diff --git a/www/iridium/files/patch-base_process_process__metrics.h b/www/iridium/files/patch-base_process_process__metrics.h index 8f71d0cce098..ea43521c4353 100644 --- a/www/iridium/files/patch-base_process_process__metrics.h +++ b/www/iridium/files/patch-base_process_process__metrics.h @@ -1,116 +1,116 @@ ---- base/process/process_metrics.h.orig 2025-10-28 14:29:43 UTC +--- base/process/process_metrics.h.orig 2025-12-10 15:04:57 UTC +++ base/process/process_metrics.h @@ -40,7 +40,7 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) #include #include #include @@ -50,7 +50,7 @@ namespace base { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Minor and major page fault counts since the process creation. // Both counts are process-wide, and exclude child processes. // @@ -88,7 +88,7 @@ struct ProcessMemoryInfo { #endif // BUILDFLAG(IS_APPLE) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) uint64_t rss_anon_bytes = 0; uint64_t vm_swap_bytes = 0; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || @@ -180,7 +180,7 @@ class BASE_EXPORT ProcessMetrics { base::expected GetCumulativeCPUUsage(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Emits the cumulative CPU usage for all currently active threads since they // were started into the output parameter (replacing its current contents). // Threads that have already terminated will not be reported. Thus, the sum of @@ -225,7 +225,7 @@ class BASE_EXPORT ProcessMetrics { int GetOpenFdSoftLimit() const; #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_BSD) // Minor and major page fault count as reported by /proc/[pid]/stat. // Returns true for success. bool GetPageFaultCounts(PageFaultCounts* counts) const; @@ -243,7 +243,7 @@ class BASE_EXPORT ProcessMetrics { #endif // !BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups); #endif #if BUILDFLAG(IS_APPLE) @@ -265,12 +265,12 @@ class BASE_EXPORT ProcessMetrics { // Used to store the previous times and CPU usage counts so we can // compute the CPU usage between calls. TimeTicks last_cpu_time_; -#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX) +#if BUILDFLAG(IS_POSIX) TimeDelta last_cumulative_cpu_; #endif #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Same thing for idle wakeups. TimeTicks last_idle_wakeups_time_; uint64_t last_absolute_idle_wakeups_; @@ -311,7 +311,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_AIX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Data about system-wide memory consumption. Available on Windows, Mac, Linux, // Android and Chrome OS. // @@ -346,7 +346,7 @@ struct BASE_EXPORT SystemMemoryInfo { #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // This provides an estimate of available memory as described here: // https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773 // NOTE: this is ONLY valid in kernels 3.14 and up. Its value will always @@ -361,7 +361,7 @@ struct BASE_EXPORT SystemMemoryInfo { #endif #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) ByteCount buffers; ByteCount cached; ByteCount active_anon; @@ -398,7 +398,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfo* // BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Parse the data found in /proc//stat and return the sum of the // CPU-related ticks. Returns -1 on parse error. // Exposed for testing. @@ -574,7 +574,7 @@ class BASE_EXPORT SystemMetrics { FRIEND_TEST_ALL_PREFIXES(SystemMetricsTest, SystemMetrics); size_t committed_memory_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) SystemMemoryInfo memory_info_; VmStatInfo vmstat_info_; SystemDiskInfo disk_info_; diff --git a/www/iridium/files/patch-base_process_process__metrics__freebsd.cc b/www/iridium/files/patch-base_process_process__metrics__freebsd.cc index 6318b26f573e..c29f6c3ff69f 100644 --- a/www/iridium/files/patch-base_process_process__metrics__freebsd.cc +++ b/www/iridium/files/patch-base_process_process__metrics__freebsd.cc @@ -1,225 +1,225 @@ ---- base/process/process_metrics_freebsd.cc.orig 2025-10-28 14:29:43 UTC +--- base/process/process_metrics_freebsd.cc.orig 2025-12-10 15:04:57 UTC +++ base/process/process_metrics_freebsd.cc @@ -3,41 +3,92 @@ // found in the LICENSE file. #include "base/process/process_metrics.h" +#include "base/notimplemented.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() { - struct kinfo_proc info; - int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, process_}; - size_t length = sizeof(info); +base::expected +ProcessMetrics::GetMemoryInfo() const { + ProcessMemoryInfo memory_info; + kvm_t *kd = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "kvm_open"); + struct kinfo_proc *pp; + int nproc; - if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) { - return base::unexpected(ProcessCPUUsageError::kSystemError); + if (kd == nullptr) { + return base::unexpected(ProcessUsageError::kSystemError); } - return base::ok(double{info.ki_pctcpu} / FSCALE * 100.0); + if ((pp = kvm_getprocs(kd, KERN_PROC_PID, process_, &nproc)) == nullptr) { + kvm_close(kd); + return base::unexpected(ProcessUsageError::kProcessNotFound); + } + + if (nproc > 0) { + memory_info.resident_set_bytes = pp->ki_rssize << GetPageShift(); + } else { + kvm_close(kd); + return base::unexpected(ProcessUsageError::kProcessNotFound); + } + + kvm_close(kd); + return memory_info; } base::expected ProcessMetrics::GetCumulativeCPUUsage() { - NOTREACHED(); + struct kinfo_proc info; + size_t length = sizeof(struct kinfo_proc); + struct timeval tv; + + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_ }; + + if (process_ == 0) { + return base::unexpected(ProcessCPUUsageError::kSystemError); + } + + if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) { + return base::unexpected(ProcessCPUUsageError::kSystemError); + } + + if (length == 0) { + return base::unexpected(ProcessCPUUsageError::kProcessNotFound); + } + + return base::ok(Microseconds(info.ki_runtime)); } size_t GetSystemCommitCharge() { @@ -65,5 +116,118 @@ size_t GetSystemCommitCharge() { 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(SystemMemoryInfo *meminfo) { + unsigned int mem_total, mem_free, swap_total, swap_used; + size_t length; + int pagesize; + + pagesize = getpagesize(); + + 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 = ByteCount::FromUnsigned(mem_total * pagesize); + meminfo->free = ByteCount::FromUnsigned(mem_free * pagesize); + meminfo->swap_total = ByteCount::FromUnsigned(swap_total * pagesize); + meminfo->swap_free = ByteCount::FromUnsigned((swap_total - swap_used) * pagesize); + + 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; +} + +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; } // namespace base diff --git a/www/iridium/files/patch-base_process_process__metrics__openbsd.cc b/www/iridium/files/patch-base_process_process__metrics__openbsd.cc index db8ca0a0b66d..b83ed951c59b 100644 --- a/www/iridium/files/patch-base_process_process__metrics__openbsd.cc +++ b/www/iridium/files/patch-base_process_process__metrics__openbsd.cc @@ -1,186 +1,186 @@ ---- base/process/process_metrics_openbsd.cc.orig 2025-10-28 14:29:43 UTC +--- base/process/process_metrics_openbsd.cc.orig 2025-12-10 15:04:57 UTC +++ base/process/process_metrics_openbsd.cc @@ -6,73 +6,85 @@ #include #include +#include #include #include +#include +#include + #include "base/memory/ptr_util.h" #include "base/types/expected.h" +#include "base/values.h" +#include "base/notimplemented.h" namespace base { -namespace { +ProcessMetrics::ProcessMetrics(ProcessHandle process) : process_(process) {} -base::expected GetProcessCPU(pid_t pid) { +base::expected +ProcessMetrics::GetMemoryInfo() const { + ProcessMemoryInfo memory_info; 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); - 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 }; + + if (process_ == 0) { + return base::unexpected(ProcessUsageError::kSystemError); } - 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::unexpected(ProcessUsageError::kSystemError); } - return base::ok(info.p_pctcpu); -} + if (length == 0) { + return base::unexpected(ProcessUsageError::kProcessNotFound); + } -} // namespace + memory_info.resident_set_bytes = + checked_cast(info.p_vm_rssize * getpagesize()); -// static -std::unique_ptr ProcessMetrics::CreateProcessMetrics( - ProcessHandle process) { - return WrapUnique(new ProcessMetrics(process)); + return memory_info; } -base::expected -ProcessMetrics::GetPlatformIndependentCPUUsage() { - TimeTicks time = TimeTicks::Now(); +base::expected +ProcessMetrics::GetCumulativeCPUUsage() { + struct kinfo_proc info; + size_t length = sizeof(struct kinfo_proc); + struct timeval tv; - if (last_cpu_time_.is_zero()) { - // First call, just set the last values. - last_cpu_time_ = time; - return base::ok(0.0); + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_, + sizeof(struct kinfo_proc), 1 }; + + if (process_ == 0) { + return base::unexpected(ProcessCPUUsageError::kSystemError); } - const base::expected cpu = GetProcessCPU(process_); - if (!cpu.has_value()) { - return base::unexpected(cpu.error()); + if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) { + return base::unexpected(ProcessCPUUsageError::kSystemError); } - last_cpu_time_ = time; - return base::ok(double{cpu.value()} / FSCALE * 100.0); + if (length == 0) { + return base::unexpected(ProcessCPUUsageError::kProcessNotFound); + } + + tv.tv_sec = info.p_rtime_sec; + tv.tv_usec = info.p_rtime_usec; + + return base::ok(Microseconds(TimeValToMicroseconds(tv))); } -base::expected -ProcessMetrics::GetCumulativeCPUUsage() { - NOTREACHED(); +// static +std::unique_ptr ProcessMetrics::CreateProcessMetrics( + ProcessHandle process) { + return WrapUnique(new ProcessMetrics(process)); } -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); @@ -85,9 +97,60 @@ 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 { + return (process_ == getpid()) ? getdtablecount() : -1; +} + +int ProcessMetrics::GetOpenFdSoftLimit() const { + return getdtablesize(); +} + +bool ProcessMetrics::GetPageFaultCounts(PageFaultCounts* counts) const { + NOTIMPLEMENTED(); + return false; +} + +bool GetSystemMemoryInfo(SystemMemoryInfo* meminfo) { + NOTIMPLEMENTED(); + return false; +} + +bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) { + NOTIMPLEMENTED(); + return false; +} + +bool GetVmStatInfo(VmStatInfo* vmstat) { + NOTIMPLEMENTED(); + return false; +} + +int ProcessMetrics::GetIdleWakeupsPerSecond() { + NOTIMPLEMENTED(); + return 0; +} + +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; } // namespace base diff --git a/www/iridium/files/patch-base_process_process__metrics__posix.cc b/www/iridium/files/patch-base_process_process__metrics__posix.cc index fb36a7372075..4ea2579ac841 100644 --- a/www/iridium/files/patch-base_process_process__metrics__posix.cc +++ b/www/iridium/files/patch-base_process_process__metrics__posix.cc @@ -1,20 +1,20 @@ ---- base/process/process_metrics_posix.cc.orig 2025-05-07 06:48:23 UTC +--- base/process/process_metrics_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/process/process_metrics_posix.cc @@ -21,6 +21,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_OPENBSD) +#include #else #include #endif @@ -136,7 +138,7 @@ size_t ProcessMetrics::GetMallocUsage() { return stats.size_in_use; #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) return GetMallocUsageMallinfo(); -#elif BUILDFLAG(IS_FUCHSIA) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. return 0; #endif diff --git a/www/iridium/files/patch-base_process_process__metrics__unittest.cc b/www/iridium/files/patch-base_process_process__metrics__unittest.cc index d7145d892bbc..208d618088bd 100644 --- a/www/iridium/files/patch-base_process_process__metrics__unittest.cc +++ b/www/iridium/files/patch-base_process_process__metrics__unittest.cc @@ -1,12 +1,12 @@ ---- base/process/process_metrics_unittest.cc.orig 2025-10-28 14:29:43 UTC +--- base/process/process_metrics_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ base/process/process_metrics_unittest.cc @@ -62,7 +62,8 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || 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/iridium/files/patch-base_process_process__posix.cc b/www/iridium/files/patch-base_process_process__posix.cc index b1a3d89f764d..c54367e5b855 100644 --- a/www/iridium/files/patch-base_process_process__posix.cc +++ b/www/iridium/files/patch-base_process_process__posix.cc @@ -1,94 +1,94 @@ ---- base/process/process_posix.cc.orig 2025-09-11 13:19:19 UTC +--- base/process/process_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/process/process_posix.cc @@ -25,10 +25,15 @@ #include "base/trace_event/trace_event.h" #include "build/build_config.h" -#if BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include #endif +#if BUILDFLAG(IS_BSD) +#include +#include +#endif + #if BUILDFLAG(CLANG_PROFILING) #include "base/test/clang_profiling.h" #endif @@ -104,7 +109,7 @@ bool WaitpidWithTimeout(base::ProcessHandle handle, } #endif -#if BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Using kqueue on Mac so that we can wait on non-child processes. // We can't use kqueues on child processes because we need to reap // our own children using wait. @@ -387,7 +392,7 @@ bool Process::WaitForExitWithTimeoutImpl(base::Process const bool exited = (parent_pid < 0); if (!exited && parent_pid != our_pid) { -#if BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // On Mac we can wait on non child processes. return WaitForSingleNonChildProcess(handle, timeout); #else @@ -424,7 +429,56 @@ void Process::Exited(int exit_code) const { int Process::GetOSPriority() const { DCHECK(IsValid()); +// avoid pledge(2) violation +#if BUILDFLAG(IS_BSD) + return 0; +#else return getpriority(PRIO_PROCESS, static_cast(process_)); +#endif } + +Time Process::CreationTime() const { +// avoid ps pledge in the network process +#if !BUILDFLAG(IS_BSD) + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid(), + sizeof(struct kinfo_proc), 0 }; + struct kinfo_proc *info = nullptr; + size_t info_size; +#endif + Time ct = Time(); + +#if !BUILDFLAG(IS_BSD) + if (sysctl(mib, std::size(mib), NULL, &info_size, NULL, 0) < 0) + goto out; + + mib[5] = (info_size / sizeof(struct kinfo_proc)); + if ((info = reinterpret_cast(malloc(info_size))) == NULL) + goto out; + + if (sysctl(mib, std::size(mib), info, &info_size, NULL, 0) < 0) + goto out; + + ct = Time::FromTimeT(info->p_ustart_sec); + +out: + if (info) + free(info); +#endif + return ct; +} + +#if BUILDFLAG(IS_BSD) +Process::Priority Process::GetPriority() const { + return Priority::kUserBlocking; +} + +bool Process::SetPriority(Priority priority) { + return false; +} + +bool Process::CanSetPriority() { + return false; +} +#endif } // namespace base diff --git a/www/iridium/files/patch-base_process_process__unittest.cc b/www/iridium/files/patch-base_process_process__unittest.cc index 06c38b92c821..bf63c2e01da9 100644 --- a/www/iridium/files/patch-base_process_process__unittest.cc +++ b/www/iridium/files/patch-base_process_process__unittest.cc @@ -1,11 +1,11 @@ ---- base/process/process_unittest.cc.orig 2025-05-07 06:48:23 UTC +--- base/process/process_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ base/process/process_unittest.cc @@ -202,7 +202,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) { // was spawned and a time recorded after it was spawned. However, since the // base::Time and process creation clocks don't match, tolerate some error. constexpr base::TimeDelta kTolerance = -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux, process creation time is relative to boot time which has a // 1-second resolution. Tolerate 1 second for the imprecise boot time and // 100 ms for the imprecise clock. diff --git a/www/iridium/files/patch-base_profiler_module__cache.cc b/www/iridium/files/patch-base_profiler_module__cache.cc index 8a8aec62bed8..afa99afc00b3 100644 --- a/www/iridium/files/patch-base_profiler_module__cache.cc +++ b/www/iridium/files/patch-base_profiler_module__cache.cc @@ -1,11 +1,11 @@ ---- base/profiler/module_cache.cc.orig 2025-05-07 06:48:23 UTC +--- base/profiler/module_cache.cc.orig 2025-12-10 15:04:57 UTC +++ base/profiler/module_cache.cc @@ -38,7 +38,7 @@ std::string TransformModuleIDToSymbolServerFormat(std: // Android and Linux Chrome builds use the "breakpad" format to index their // build id, so we transform the build id for these platforms. All other // platforms keep their symbols indexed by the original build ID. -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Linux ELF module IDs are 160bit integers, which we need to mangle // down to 128bit integers to match the id that Breakpad outputs. // Example on version '66.0.3359.170' x64: diff --git a/www/iridium/files/patch-base_profiler_sampling__profiler__thread__token.cc b/www/iridium/files/patch-base_profiler_sampling__profiler__thread__token.cc index 8cebe859ae20..05df63643d8a 100644 --- a/www/iridium/files/patch-base_profiler_sampling__profiler__thread__token.cc +++ b/www/iridium/files/patch-base_profiler_sampling__profiler__thread__token.cc @@ -1,20 +1,20 @@ ---- base/profiler/sampling_profiler_thread_token.cc.orig 2025-05-07 06:48:23 UTC +--- base/profiler/sampling_profiler_thread_token.cc.orig 2025-12-10 15:04:57 UTC +++ base/profiler/sampling_profiler_thread_token.cc @@ -6,7 +6,7 @@ #include "build/build_config.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include "base/profiler/stack_base_address_posix.h" @@ -18,7 +18,7 @@ SamplingProfilerThreadToken GetSamplingProfilerCurrent PlatformThreadId id = PlatformThread::CurrentId(); #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE) return {id, pthread_self()}; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::optional maybe_stack_base = GetThreadStackBaseAddress(id, pthread_self()); return {id, maybe_stack_base}; diff --git a/www/iridium/files/patch-base_profiler_sampling__profiler__thread__token.h b/www/iridium/files/patch-base_profiler_sampling__profiler__thread__token.h index 1d0f4f7d50c0..8be923864361 100644 --- a/www/iridium/files/patch-base_profiler_sampling__profiler__thread__token.h +++ b/www/iridium/files/patch-base_profiler_sampling__profiler__thread__token.h @@ -1,20 +1,20 @@ ---- base/profiler/sampling_profiler_thread_token.h.orig 2025-05-07 06:48:23 UTC +--- base/profiler/sampling_profiler_thread_token.h.orig 2025-12-10 15:04:57 UTC +++ base/profiler/sampling_profiler_thread_token.h @@ -13,7 +13,7 @@ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE) #include -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #endif @@ -27,7 +27,7 @@ struct SamplingProfilerThreadToken { PlatformThreadId id; #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE) pthread_t pthread_id; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Due to the sandbox, we can only retrieve the stack base address for the // current thread. We must grab it during // GetSamplingProfilerCurrentThreadToken() and not try to get it later. diff --git a/www/iridium/files/patch-base_profiler_stack__base__address__posix.cc b/www/iridium/files/patch-base_profiler_stack__base__address__posix.cc index 3d63625d79ea..07ac0dbe5655 100644 --- a/www/iridium/files/patch-base_profiler_stack__base__address__posix.cc +++ b/www/iridium/files/patch-base_profiler_stack__base__address__posix.cc @@ -1,67 +1,67 @@ ---- base/profiler/stack_base_address_posix.cc.orig 2025-10-28 14:29:43 UTC +--- base/profiler/stack_base_address_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/profiler/stack_base_address_posix.cc @@ -7,6 +7,7 @@ #include "base/check_op.h" #include "base/compiler_specific.h" #include "base/logging.h" +#include "base/numerics/safe_conversions.h" #include "base/process/process_handle.h" #include "build/build_config.h" @@ -18,6 +19,10 @@ #include "base/files/scoped_file.h" #endif +#if BUILDFLAG(IS_BSD) +#include +#endif + #if BUILDFLAG(IS_CHROMEOS) extern "C" void* __libc_stack_end; #endif @@ -49,7 +54,21 @@ std::optional GetAndroidMainThreadStackBase #if !BUILDFLAG(IS_LINUX) uintptr_t GetThreadStackBaseAddressImpl(pthread_t pthread_id) { +#if BUILDFLAG(IS_OPENBSD) + stack_t ss; + void *address; + size_t size; + if (pthread_stackseg_np(pthread_id, &ss) != 0) + return 0; + size = ss.ss_size; + address = (void*)((size_t) ss.ss_sp - ss.ss_size); +#else pthread_attr_t attr; +#if BUILDFLAG(IS_FREEBSD) + int result; + pthread_attr_init(&attr); + pthread_attr_get_np(pthread_id, &attr); +#else // pthread_getattr_np will crash on ChromeOS & Linux if we are in the sandbox // and pthread_id refers to a different thread, due to the use of // sched_getaffinity(). @@ -62,12 +81,14 @@ uintptr_t GetThreadStackBaseAddressImpl(pthread_t pthr << logging::SystemErrorCodeToString(result); // See crbug.com/617730 for limitations of this approach on Linux-like // systems. +#endif void* address; size_t size; result = pthread_attr_getstack(&attr, &address, &size); CHECK_EQ(result, 0) << "pthread_attr_getstack returned " << logging::SystemErrorCodeToString(result); pthread_attr_destroy(&attr); +#endif const uintptr_t base_address = reinterpret_cast(address) + size; return base_address; } @@ -84,7 +105,7 @@ std::optional GetThreadStackBaseAddress(Pla // trying to work around the problem. return std::nullopt; #else - const bool is_main_thread = id.raw() == GetCurrentProcId(); + const bool is_main_thread = id.raw() == (checked_cast(GetCurrentProcId())); if (is_main_thread) { #if BUILDFLAG(IS_ANDROID) // The implementation of pthread_getattr_np() in Bionic reads proc/self/maps diff --git a/www/iridium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc b/www/iridium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc index 73c54c22d667..7754f49a5f4a 100644 --- a/www/iridium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc +++ b/www/iridium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc @@ -1,11 +1,11 @@ ---- base/profiler/stack_sampling_profiler_test_util.cc.orig 2025-05-07 06:48:23 UTC +--- base/profiler/stack_sampling_profiler_test_util.cc.orig 2025-12-10 15:04:57 UTC +++ base/profiler/stack_sampling_profiler_test_util.cc @@ -50,7 +50,7 @@ // Fortunately, it provides _alloca, which functions identically. #include #define alloca _alloca -#else +#elif !BUILDFLAG(IS_BSD) #include #endif diff --git a/www/iridium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc b/www/iridium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc index 513ce798ff0f..05f2539d24a7 100644 --- a/www/iridium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc +++ b/www/iridium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc @@ -1,11 +1,11 @@ ---- base/profiler/stack_sampling_profiler_unittest.cc.orig 2025-05-07 06:48:23 UTC +--- base/profiler/stack_sampling_profiler_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ base/profiler/stack_sampling_profiler_unittest.cc @@ -47,7 +47,7 @@ #include #include -#else +#elif !BUILDFLAG(IS_BSD) #include #endif diff --git a/www/iridium/files/patch-base_profiler_thread__delegate__posix.cc b/www/iridium/files/patch-base_profiler_thread__delegate__posix.cc index 278cd56a43ab..ec26b79209cf 100644 --- a/www/iridium/files/patch-base_profiler_thread__delegate__posix.cc +++ b/www/iridium/files/patch-base_profiler_thread__delegate__posix.cc @@ -1,20 +1,20 @@ ---- base/profiler/thread_delegate_posix.cc.orig 2025-05-07 06:48:23 UTC +--- base/profiler/thread_delegate_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/profiler/thread_delegate_posix.cc @@ -15,7 +15,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 @@ -24,7 +24,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/iridium/files/patch-base_rand__util.h b/www/iridium/files/patch-base_rand__util.h index 14a7b6f9ef8e..c547dd30b7f4 100644 --- a/www/iridium/files/patch-base_rand__util.h +++ b/www/iridium/files/patch-base_rand__util.h @@ -1,11 +1,11 @@ ---- base/rand_util.h.orig 2025-05-07 06:48:23 UTC +--- base/rand_util.h.orig 2025-12-10 15:04:57 UTC +++ base/rand_util.h @@ -213,7 +213,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/iridium/files/patch-base_rand__util__posix.cc b/www/iridium/files/patch-base_rand__util__posix.cc index 87168dcf5466..fe693f515dd8 100644 --- a/www/iridium/files/patch-base_rand__util__posix.cc +++ b/www/iridium/files/patch-base_rand__util__posix.cc @@ -1,60 +1,60 @@ ---- base/rand_util_posix.cc.orig 2025-10-28 14:29:43 UTC +--- base/rand_util_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/rand_util_posix.cc @@ -30,7 +30,7 @@ #include "build/build_config.h" #include "third_party/boringssl/src/include/openssl/rand.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) #include "third_party/lss/linux_syscall_support.h" #elif BUILDFLAG(IS_MAC) // TODO(crbug.com/40641285): Waiting for this header to appear in the iOS SDK. @@ -42,6 +42,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; @@ -66,8 +67,9 @@ class URandomFd { private: const int fd_; }; +#endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)) && !BUILDFLAG(IS_BSD) bool KernelSupportsGetRandom() { return base::SysInfo::KernelVersionNumber::Current() >= @@ -120,6 +122,7 @@ bool UseBoringSSLForRandBytes() { namespace { void RandBytesInternal(span output, bool avoid_allocation) { +#if !BUILDFLAG(IS_BSD) // The BoringSSL experiment takes priority over everything else. if (!avoid_allocation && internal::UseBoringSSLForRandBytes()) { // BoringSSL's RAND_bytes always returns 1. Any error aborts the program. @@ -150,6 +153,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 @@ -169,9 +175,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/iridium/files/patch-base_strings_safe__sprintf__unittest.cc b/www/iridium/files/patch-base_strings_safe__sprintf__unittest.cc index aa66555f146c..1cbbb5a7a4fc 100644 --- a/www/iridium/files/patch-base_strings_safe__sprintf__unittest.cc +++ b/www/iridium/files/patch-base_strings_safe__sprintf__unittest.cc @@ -1,18 +1,18 @@ ---- base/strings/safe_sprintf_unittest.cc.orig 2025-10-28 14:29:43 UTC +--- base/strings/safe_sprintf_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ base/strings/safe_sprintf_unittest.cc @@ -747,6 +747,7 @@ TEST(SafeSPrintfTest, EmbeddedNul) { #endif } +#if !BUILDFLAG(IS_BSD) TEST(SafeSPrintfTest, EmitNULL) { char buf[40]; #if defined(__GNUC__) @@ -763,6 +764,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/iridium/files/patch-base_synchronization_cancelable__event.h b/www/iridium/files/patch-base_synchronization_cancelable__event.h index 971181734231..e9d9fa5e3fde 100644 --- a/www/iridium/files/patch-base_synchronization_cancelable__event.h +++ b/www/iridium/files/patch-base_synchronization_cancelable__event.h @@ -1,20 +1,20 @@ ---- base/synchronization/cancelable_event.h.orig 2025-05-07 06:48:23 UTC +--- base/synchronization/cancelable_event.h.orig 2025-12-10 15:04:57 UTC +++ base/synchronization/cancelable_event.h @@ -11,7 +11,7 @@ #if BUILDFLAG(IS_WIN) #include -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #else #include "base/synchronization/waitable_event.h" @@ -49,7 +49,7 @@ class BASE_EXPORT CancelableEvent { #if BUILDFLAG(IS_WIN) using NativeHandle = HANDLE; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) using NativeHandle = sem_t; #else using NativeHandle = WaitableEvent; diff --git a/www/iridium/files/patch-base_synchronization_lock__impl.h b/www/iridium/files/patch-base_synchronization_lock__impl.h index dec4ea589880..27051c148bc8 100644 --- a/www/iridium/files/patch-base_synchronization_lock__impl.h +++ b/www/iridium/files/patch-base_synchronization_lock__impl.h @@ -1,23 +1,23 @@ ---- base/synchronization/lock_impl.h.orig 2025-05-07 06:48:23 UTC +--- base/synchronization/lock_impl.h.orig 2025-12-10 15:04:57 UTC +++ base/synchronization/lock_impl.h @@ -110,6 +110,10 @@ void LockImpl::Unlock() { } #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FREEBSD) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wthread-safety-analysis" +#endif #if DCHECK_IS_ON() BASE_EXPORT void dcheck_trylock_result(int rv); @@ -130,6 +134,9 @@ void LockImpl::Unlock() { dcheck_unlock_result(rv); #endif } +#if BUILDFLAG(IS_FREEBSD) +#pragma GCC diagnostic pop +#endif #endif // This is an implementation used for AutoLock templated on the lock type. diff --git a/www/iridium/files/patch-base_syslog__logging.cc b/www/iridium/files/patch-base_syslog__logging.cc index 60b7d88e7c86..1c0b3fe4725d 100644 --- a/www/iridium/files/patch-base_syslog__logging.cc +++ b/www/iridium/files/patch-base_syslog__logging.cc @@ -1,20 +1,20 @@ ---- base/syslog_logging.cc.orig 2025-05-07 06:48:23 UTC +--- base/syslog_logging.cc.orig 2025-12-10 15:04:57 UTC +++ base/syslog_logging.cc @@ -17,7 +17,7 @@ #include "base/strings/string_util.h" #include "base/win/scoped_handle.h" #include "base/win/win_util.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // defines LOG_INFO, LOG_WARNING macros that could conflict with // base::LOG_INFO, base::LOG_WARNING. #include @@ -151,7 +151,7 @@ EventLogMessage::~EventLogMessage() { if (user_sid != nullptr) { ::LocalFree(user_sid); } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kEventSource[] = "chrome"; openlog(kEventSource, LOG_NOWAIT | LOG_PID, LOG_USER); // We can't use the defined names for the logging severity from syslog.h diff --git a/www/iridium/files/patch-base_system_sys__info.cc b/www/iridium/files/patch-base_system_sys__info.cc index d6fd8af66b57..bc7a51b5101f 100644 --- a/www/iridium/files/patch-base_system_sys__info.cc +++ b/www/iridium/files/patch-base_system_sys__info.cc @@ -1,11 +1,11 @@ ---- base/system/sys_info.cc.orig 2025-10-28 14:29:43 UTC +--- base/system/sys_info.cc.orig 2025-12-10 15:04:57 UTC +++ base/system/sys_info.cc -@@ -222,7 +222,7 @@ std::string SysInfo::SocManufacturer() { +@@ -233,7 +233,7 @@ std::string SysInfo::SocManufacturer() { #endif void SysInfo::GetHardwareInfo(base::OnceCallback callback) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) constexpr base::TaskTraits kTraits = {base::MayBlock()}; #else constexpr base::TaskTraits kTraits = {}; diff --git a/www/iridium/files/patch-base_system_sys__info.h b/www/iridium/files/patch-base_system_sys__info.h index 9a79dec7c55e..66c3aab8cdad 100644 --- a/www/iridium/files/patch-base_system_sys__info.h +++ b/www/iridium/files/patch-base_system_sys__info.h @@ -1,20 +1,20 @@ ---- base/system/sys_info.h.orig 2025-10-28 14:29:43 UTC +--- base/system/sys_info.h.orig 2025-12-10 15:04:57 UTC +++ base/system/sys_info.h -@@ -355,6 +355,8 @@ class BASE_EXPORT SysInfo { +@@ -354,6 +354,8 @@ class BASE_EXPORT SysInfo { static void ResetCpuSecurityMitigationsEnabledForTesting(); #endif + static uint64_t MaxSharedMemorySize(); + private: friend class test::ScopedAmountOfPhysicalMemoryOverride; FRIEND_TEST_ALL_PREFIXES(SysInfoTest, AmountOfAvailablePhysicalMemory); -@@ -367,7 +369,7 @@ class BASE_EXPORT SysInfo { +@@ -366,7 +368,7 @@ class BASE_EXPORT SysInfo { static HardwareInfo GetHardwareInfoSync(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) static ByteCount AmountOfAvailablePhysicalMemory( const SystemMemoryInfo& meminfo); #endif diff --git a/www/iridium/files/patch-base_system_sys__info__freebsd.cc b/www/iridium/files/patch-base_system_sys__info__freebsd.cc index 483ff4e74500..dd1d92806a91 100644 --- a/www/iridium/files/patch-base_system_sys__info__freebsd.cc +++ b/www/iridium/files/patch-base_system_sys__info__freebsd.cc @@ -1,103 +1,103 @@ ---- base/system/sys_info_freebsd.cc.orig 2025-10-28 14:29:43 UTC +--- base/system/sys_info_freebsd.cc.orig 2025-12-10 15:04:57 UTC +++ base/system/sys_info_freebsd.cc @@ -9,28 +9,95 @@ #include #include "base/notreached.h" +#include "base/process/process_metrics.h" +#include "base/strings/string_util.h" namespace base { +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; +} + ByteCount SysInfo::AmountOfPhysicalMemoryImpl() { - int pages, page_size; + 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(); } - return ByteCount(page_size) * pages; + + return ByteCount::FromUnsigned(static_cast(pages) * page_size); } +ByteCount 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 ByteCount(); + } + + return ByteCount::FromUnsigned(static_cast((pgfree + pginact + pgcache) * page_size)); +} + // 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(); } 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/iridium/files/patch-base_system_sys__info__openbsd.cc b/www/iridium/files/patch-base_system_sys__info__openbsd.cc index f93cb0422df5..e963ee564df5 100644 --- a/www/iridium/files/patch-base_system_sys__info__openbsd.cc +++ b/www/iridium/files/patch-base_system_sys__info__openbsd.cc @@ -1,83 +1,83 @@ ---- base/system/sys_info_openbsd.cc.orig 2025-10-28 14:29:43 UTC +--- base/system/sys_info_openbsd.cc.orig 2025-12-10 15:04:57 UTC +++ base/system/sys_info_openbsd.cc @@ -12,6 +12,7 @@ #include "base/notreached.h" #include "base/posix/sysctl.h" +#include "base/strings/string_util.h" namespace base { @@ -28,9 +29,14 @@ ByteCount AmountOfMemory(int pages_name) { } // namespace +// pledge(2) +ByteCount aofpmem = ByteCount(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) { @@ -40,8 +46,24 @@ int SysInfo::NumberOfProcessors() { } // 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 ByteCount SysInfo::AmountOfPhysicalMemoryImpl() { - return AmountOfMemory(_SC_PHYS_PAGES); + // pledge(2) + if (aofpmem == ByteCount(0)) + aofpmem = AmountOfMemory(_SC_PHYS_PAGES); + return aofpmem; } // static @@ -56,15 +78,27 @@ uint64_t SysInfo::MaxSharedMemorySize() { int mib[] = {CTL_KERN, KERN_SHMINFO, KERN_SHMINFO_SHMMAX}; size_t limit; size_t size = sizeof(limit); + // pledge(2) + if (shmmax) + goto out; if (sysctl(mib, std::size(mib), &limit, &size, NULL, 0) < 0) { NOTREACHED(); } - return 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/iridium/files/patch-base_system_sys__info__posix.cc b/www/iridium/files/patch-base_system_sys__info__posix.cc index e23f076118b1..a5d6bfc2b6a2 100644 --- a/www/iridium/files/patch-base_system_sys__info__posix.cc +++ b/www/iridium/files/patch-base_system_sys__info__posix.cc @@ -1,29 +1,29 @@ ---- base/system/sys_info_posix.cc.orig 2025-10-28 14:29:43 UTC +--- base/system/sys_info_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/system/sys_info_posix.cc -@@ -142,7 +142,7 @@ void GetKernelVersionNumbers(int32_t* major_version, +@@ -143,7 +143,7 @@ void GetKernelVersionNumbers(int32_t* major_version, namespace base { -#if !BUILDFLAG(IS_OPENBSD) +#if !BUILDFLAG(IS_BSD) // static int SysInfo::NumberOfProcessors() { #if BUILDFLAG(IS_MAC) -@@ -198,7 +198,7 @@ int SysInfo::NumberOfProcessors() { +@@ -199,7 +199,7 @@ int SysInfo::NumberOfProcessors() { return cached_num_cpus; } -#endif // !BUILDFLAG(IS_OPENBSD) +#endif // !BUILDFLAG(IS_BSD) // static - uint64_t SysInfo::AmountOfVirtualMemory() { -@@ -286,6 +286,8 @@ std::string SysInfo::OperatingSystemArchitecture() { + ByteCount SysInfo::AmountOfVirtualMemory() { +@@ -289,6 +289,8 @@ std::string SysInfo::OperatingSystemArchitecture() { arch = "x86"; } else if (arch == "amd64") { arch = "x86_64"; + } else if (arch == "arm64") { + arch = "aarch64"; } else if (std::string(info.sysname) == "AIX") { arch = "ppc64"; } diff --git a/www/iridium/files/patch-base_system_sys__info__unittest.cc b/www/iridium/files/patch-base_system_sys__info__unittest.cc index f425ddcbe5b4..84a93b94c4fe 100644 --- a/www/iridium/files/patch-base_system_sys__info__unittest.cc +++ b/www/iridium/files/patch-base_system_sys__info__unittest.cc @@ -1,20 +1,20 @@ ---- base/system/sys_info_unittest.cc.orig 2025-10-28 14:29:43 UTC +--- base/system/sys_info_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ base/system/sys_info_unittest.cc @@ -263,12 +263,16 @@ TEST_F(SysInfoTest, GetHardwareInfo) { EXPECT_TRUE(IsStringUTF8(hardware_info->model)); bool empty_result_expected = #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) false; #else true; #endif EXPECT_EQ(hardware_info->manufacturer.empty(), empty_result_expected); +#if BUILDFLAG(IS_BSD) + empty_result_expected = true; +#endif EXPECT_EQ(hardware_info->model.empty(), empty_result_expected); } diff --git a/www/iridium/files/patch-base_task_thread__pool_environment__config__unittest.cc b/www/iridium/files/patch-base_task_thread__pool_environment__config__unittest.cc index 0d5da26acc40..7f50b6e9aa4c 100644 --- a/www/iridium/files/patch-base_task_thread__pool_environment__config__unittest.cc +++ b/www/iridium/files/patch-base_task_thread__pool_environment__config__unittest.cc @@ -1,20 +1,20 @@ ---- base/task/thread_pool/environment_config_unittest.cc.orig 2025-09-11 13:19:19 UTC +--- base/task/thread_pool/environment_config_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ base/task/thread_pool/environment_config_unittest.cc @@ -14,7 +14,7 @@ TEST(ThreadPoolEnvironmentConfig, CanUseBackgroundPrio #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) EXPECT_TRUE(CanUseBackgroundThreadTypeForWorkerThread()); #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) EXPECT_FALSE(CanUseBackgroundThreadTypeForWorkerThread()); #else #error Platform doesn't match any block @@ -22,7 +22,7 @@ TEST(ThreadPoolEnvironmentConfig, CanUseBackgroundPrio #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) EXPECT_TRUE(CanUseUtilityThreadTypeForWorkerThread()); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) EXPECT_FALSE(CanUseUtilityThreadTypeForWorkerThread()); #else #error Platform doesn't match any block diff --git a/www/iridium/files/patch-base_test_launcher_test__launcher.cc b/www/iridium/files/patch-base_test_launcher_test__launcher.cc index 4b0d06341321..b11f2f083c90 100644 --- a/www/iridium/files/patch-base_test_launcher_test__launcher.cc +++ b/www/iridium/files/patch-base_test_launcher_test__launcher.cc @@ -1,10 +1,10 @@ ---- base/test/launcher/test_launcher.cc.orig 2025-05-07 06:48:23 UTC +--- base/test/launcher/test_launcher.cc.orig 2025-12-10 15:04:57 UTC +++ base/test/launcher/test_launcher.cc @@ -73,6 +73,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/iridium/files/patch-base_test_test__file__util__linux.cc b/www/iridium/files/patch-base_test_test__file__util__linux.cc index de998c10ea39..46db01358cc2 100644 --- a/www/iridium/files/patch-base_test_test__file__util__linux.cc +++ b/www/iridium/files/patch-base_test_test__file__util__linux.cc @@ -1,14 +1,14 @@ ---- base/test/test_file_util_linux.cc.orig 2025-09-11 13:19:19 UTC +--- base/test/test_file_util_linux.cc.orig 2025-12-10 15:04:57 UTC +++ base/test/test_file_util_linux.cc @@ -57,9 +57,11 @@ bool EvictFileFromSystemCache(const FilePath& file) { if (fdatasync(fd.get()) != 0) { return false; } +#if !BUILDFLAG(IS_BSD) if (posix_fadvise(fd.get(), 0, 0, POSIX_FADV_DONTNEED) != 0) { return false; } +#endif return true; } diff --git a/www/iridium/files/patch-base_test_test__file__util__posix.cc b/www/iridium/files/patch-base_test_test__file__util__posix.cc index 2da5edae5208..067e28badf53 100644 --- a/www/iridium/files/patch-base_test_test__file__util__posix.cc +++ b/www/iridium/files/patch-base_test_test__file__util__posix.cc @@ -1,11 +1,11 @@ ---- base/test/test_file_util_posix.cc.orig 2025-05-07 06:48:23 UTC +--- base/test/test_file_util_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/test/test_file_util_posix.cc @@ -93,7 +93,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/iridium/files/patch-base_threading_platform__thread.h b/www/iridium/files/patch-base_threading_platform__thread.h index d2f115a297ca..deda77c5cc03 100644 --- a/www/iridium/files/patch-base_threading_platform__thread.h +++ b/www/iridium/files/patch-base_threading_platform__thread.h @@ -1,11 +1,11 @@ ---- base/threading/platform_thread.h.orig 2025-10-28 14:29:43 UTC +--- base/threading/platform_thread.h.orig 2025-12-10 15:04:57 UTC +++ base/threading/platform_thread.h @@ -56,6 +56,8 @@ class BASE_EXPORT PlatformThreadId { using UnderlyingType = zx_koid_t; #elif BUILDFLAG(IS_APPLE) using UnderlyingType = uint64_t; +#elif BUILDFLAG(IS_BSD) + using UnderlyingType = uint64_t; #elif BUILDFLAG(IS_POSIX) using UnderlyingType = pid_t; #endif diff --git a/www/iridium/files/patch-base_threading_platform__thread__bsd.cc b/www/iridium/files/patch-base_threading_platform__thread__bsd.cc index 53ef24406fb8..8494b5c2cf20 100644 --- a/www/iridium/files/patch-base_threading_platform__thread__bsd.cc +++ b/www/iridium/files/patch-base_threading_platform__thread__bsd.cc @@ -1,34 +1,34 @@ ---- base/threading/platform_thread_bsd.cc.orig 2025-05-07 06:48:23 UTC +--- base/threading/platform_thread_bsd.cc.orig 2025-12-10 15:04:57 UTC +++ base/threading/platform_thread_bsd.cc @@ -0,0 +1,31 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// Description: These are stubs for *BSD. + +#include "base/threading/platform_thread.h" + +namespace base { +namespace internal { + +bool CanSetThreadTypeToRealtimeAudio() { + return false; +} + +bool SetCurrentThreadTypeForPlatform(ThreadType thread_type, + MessagePumpType pump_type_hint) { + return false; +} + +std::optional +GetCurrentThreadPriorityForPlatformForTest() { + return std::nullopt; +} +} // namespace internal + +// static +void PlatformThreadBase::SetName(const std::string& name) { + SetNameCommon(name); +} + +} // namespace base diff --git a/www/iridium/files/patch-base_threading_platform__thread__internal__posix.cc b/www/iridium/files/patch-base_threading_platform__thread__internal__posix.cc index ad027793e4a5..5042ab2f55a5 100644 --- a/www/iridium/files/patch-base_threading_platform__thread__internal__posix.cc +++ b/www/iridium/files/patch-base_threading_platform__thread__internal__posix.cc @@ -1,30 +1,30 @@ ---- base/threading/platform_thread_internal_posix.cc.orig 2025-10-28 14:29:43 UTC +--- base/threading/platform_thread_internal_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/threading/platform_thread_internal_posix.cc @@ -31,10 +31,19 @@ ThreadPriorityForTest NiceValueToThreadPriorityForTest } int GetCurrentThreadNiceValue() { +#if BUILDFLAG(IS_BSD) + NOTIMPLEMENTED(); + return 0; +#else return GetThreadNiceValue(PlatformThreadId{0}); +#endif } int GetThreadNiceValue(PlatformThreadId id) { +#if BUILDFLAG(IS_BSD) + NOTIMPLEMENTED(); + return 0; +#else // Need to clear errno before calling getpriority(): // http://man7.org/linux/man-pages/man2/getpriority.2.html errno = 0; @@ -46,6 +55,7 @@ int GetThreadNiceValue(PlatformThreadId id) { } return nice_value; +#endif } } // namespace base::internal diff --git a/www/iridium/files/patch-base_threading_platform__thread__metrics.cc b/www/iridium/files/patch-base_threading_platform__thread__metrics.cc index 377ed165257d..859425455988 100644 --- a/www/iridium/files/patch-base_threading_platform__thread__metrics.cc +++ b/www/iridium/files/patch-base_threading_platform__thread__metrics.cc @@ -1,11 +1,11 @@ ---- base/threading/platform_thread_metrics.cc.orig 2025-10-28 14:29:43 UTC +--- base/threading/platform_thread_metrics.cc.orig 2025-12-10 15:04:57 UTC +++ base/threading/platform_thread_metrics.cc @@ -55,7 +55,7 @@ PlatformThreadMetrics::CreateForCurrentThread() { } #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // static std::unique_ptr diff --git a/www/iridium/files/patch-base_threading_platform__thread__metrics.h b/www/iridium/files/patch-base_threading_platform__thread__metrics.h index 0c83c6f61aae..52d5da455302 100644 --- a/www/iridium/files/patch-base_threading_platform__thread__metrics.h +++ b/www/iridium/files/patch-base_threading_platform__thread__metrics.h @@ -1,20 +1,20 @@ ---- base/threading/platform_thread_metrics.h.orig 2025-10-28 14:29:43 UTC +--- base/threading/platform_thread_metrics.h.orig 2025-12-10 15:04:57 UTC +++ base/threading/platform_thread_metrics.h @@ -67,7 +67,7 @@ class BASE_EXPORT PlatformThreadMetrics { PlatformThreadHandle handle); #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || \ +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) static std::unique_ptr CreateFromId( PlatformThreadId tid); @@ -109,7 +109,7 @@ class BASE_EXPORT PlatformThreadMetrics { PlatformThreadHandle handle_; #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) explicit PlatformThreadMetrics(PlatformThreadId tid) : tid_(tid) {} PlatformThreadId tid_; diff --git a/www/iridium/files/patch-base_threading_platform__thread__posix.cc b/www/iridium/files/patch-base_threading_platform__thread__posix.cc index 8644dbb2ffef..5290791de874 100644 --- a/www/iridium/files/patch-base_threading_platform__thread__posix.cc +++ b/www/iridium/files/patch-base_threading_platform__thread__posix.cc @@ -1,82 +1,82 @@ ---- base/threading/platform_thread_posix.cc.orig 2025-10-28 14:29:43 UTC +--- base/threading/platform_thread_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/threading/platform_thread_posix.cc @@ -80,6 +80,7 @@ void* ThreadFunc(void* params) { base::DisallowSingleton(); } +#if !BUILDFLAG(IS_BSD) #if PA_BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) partition_alloc::internal::StackTopRegistry::Get().NotifyThreadCreated(); #endif @@ -93,6 +94,7 @@ void* ThreadFunc(void* params) { // where they were created. This explicitly sets the priority of all new // threads. PlatformThread::SetCurrentThreadType(thread_params->thread_type); +#endif } ThreadIdNameManager::GetInstance()->RegisterThread( @@ -270,6 +272,8 @@ PlatformThreadId PlatformThreadBase::CurrentId() { #elif BUILDFLAG(IS_POSIX) && BUILDFLAG(IS_AIX) return PlatformThreadId(pthread_self()); +#elif BUILDFLAG(IS_BSD) + return PlatformThreadId(reinterpret_cast(pthread_self())); #elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_AIX) return PlatformThreadId(reinterpret_cast(pthread_self())); #endif @@ -363,6 +367,9 @@ void PlatformThreadBase::Detach(PlatformThreadHandle t // static bool PlatformThreadBase::CanChangeThreadType(ThreadType from, ThreadType to) { +#if BUILDFLAG(IS_BSD) + return false; +#else if (from >= to) { // Decreasing thread priority on POSIX is always allowed. return true; @@ -372,12 +379,18 @@ bool PlatformThreadBase::CanChangeThreadType(ThreadTyp } return internal::CanLowerNiceTo(internal::ThreadTypeToNiceValue(to)); +#endif } namespace internal { void SetCurrentThreadTypeImpl(ThreadType thread_type, MessagePumpType pump_type_hint) { +#if BUILDFLAG(IS_BSD) + // pledge(2) violation + NOTIMPLEMENTED(); + return; +#else if (internal::SetCurrentThreadTypeForPlatform(thread_type, pump_type_hint)) { return; } @@ -393,12 +406,17 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type, DVPLOG(1) << "Failed to set nice value of thread (" << PlatformThread::CurrentId() << ") to " << nice_setting; } +#endif } } // namespace internal // static ThreadPriorityForTest PlatformThreadBase::GetCurrentThreadPriorityForTest() { +#if BUILDFLAG(IS_BSD) + NOTIMPLEMENTED(); + return ThreadPriorityForTest::kNormal; +#else // Mirrors SetCurrentThreadPriority()'s implementation. auto platform_specific_priority = internal::GetCurrentThreadPriorityForPlatformForTest(); // IN-TEST @@ -409,6 +427,7 @@ ThreadPriorityForTest PlatformThreadBase::GetCurrentTh int nice_value = internal::GetCurrentThreadNiceValue(); return internal::NiceValueToThreadPriorityForTest(nice_value); // IN-TEST +#endif } #endif // !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_FUCHSIA) diff --git a/www/iridium/files/patch-base_threading_platform__thread__unittest.cc b/www/iridium/files/patch-base_threading_platform__thread__unittest.cc index d9d4c4910011..fc8bdfae9004 100644 --- a/www/iridium/files/patch-base_threading_platform__thread__unittest.cc +++ b/www/iridium/files/patch-base_threading_platform__thread__unittest.cc @@ -1,38 +1,38 @@ ---- base/threading/platform_thread_unittest.cc.orig 2025-09-11 13:19:19 UTC +--- base/threading/platform_thread_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ base/threading/platform_thread_unittest.cc @@ -36,7 +36,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 @@ -370,7 +370,7 @@ TEST(PlatformThreadTest, // and hardcodes what we know. Please inform scheduler-dev@chromium.org 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; @@ -618,12 +618,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().raw() == reinterpret_cast(pthread_self()); +#else return PlatformThread::CurrentId().raw() == syscall(__NR_gettid); +#endif } void* CheckTidCacheCorrectWrapper(void*) { diff --git a/www/iridium/files/patch-base_time_time__now__posix.cc b/www/iridium/files/patch-base_time_time__now__posix.cc index ad3b6021abee..dd49ace2ae88 100644 --- a/www/iridium/files/patch-base_time_time__now__posix.cc +++ b/www/iridium/files/patch-base_time_time__now__posix.cc @@ -1,14 +1,14 @@ ---- base/time/time_now_posix.cc.orig 2025-09-11 13:19:19 UTC +--- base/time/time_now_posix.cc.orig 2025-12-10 15:04:57 UTC +++ base/time/time_now_posix.cc @@ -110,7 +110,11 @@ std::optional MaybeTimeTicksNowIgnoringOver } TimeTicks TimeTicksLowResolutionNowIgnoringOverride() { +#if BUILDFLAG(IS_BSD) + return TimeTicks() + Microseconds(ClockNow(CLOCK_MONOTONIC)); +#else return TimeTicks() + Microseconds(ClockNow(CLOCK_MONOTONIC_COARSE)); +#endif } } // namespace subtle diff --git a/www/iridium/files/patch-base_trace__event_malloc__dump__provider.cc b/www/iridium/files/patch-base_trace__event_malloc__dump__provider.cc index d7f20045c8c1..a8bbed33a4f8 100644 --- a/www/iridium/files/patch-base_trace__event_malloc__dump__provider.cc +++ b/www/iridium/files/patch-base_trace__event_malloc__dump__provider.cc @@ -1,30 +1,30 @@ ---- base/trace_event/malloc_dump_provider.cc.orig 2025-09-11 13:19:19 UTC +--- base/trace_event/malloc_dump_provider.cc.orig 2025-12-10 15:04:57 UTC +++ base/trace_event/malloc_dump_provider.cc @@ -31,6 +31,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_BSD) +#include #else #include #endif @@ -180,7 +182,7 @@ void ReportAppleAllocStats(size_t* total_virtual_size, #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, @@ -383,6 +385,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/iridium/files/patch-base_trace__event_memory__dump__manager.cc b/www/iridium/files/patch-base_trace__event_memory__dump__manager.cc index 498e2fb03261..758d5abdbee3 100644 --- a/www/iridium/files/patch-base_trace__event_memory__dump__manager.cc +++ b/www/iridium/files/patch-base_trace__event_memory__dump__manager.cc @@ -1,11 +1,11 @@ ---- base/trace_event/memory_dump_manager.cc.orig 2025-05-07 06:48:23 UTC +--- base/trace_event/memory_dump_manager.cc.orig 2025-12-10 15:04:57 UTC +++ base/trace_event/memory_dump_manager.cc -@@ -78,7 +78,7 @@ const char* const MemoryDumpManager::kSystemAllocatorP +@@ -79,7 +79,7 @@ const char* const MemoryDumpManager::kSystemAllocatorP #if defined(MALLOC_MEMORY_TRACING_SUPPORTED) MallocDumpProvider::kAllocatedObjects; #else - nullptr; + ""; #endif // static diff --git a/www/iridium/files/patch-base_trace__event_process__memory__dump.cc b/www/iridium/files/patch-base_trace__event_process__memory__dump.cc index 0c9d9094e534..28f474ea1c87 100644 --- a/www/iridium/files/patch-base_trace__event_process__memory__dump.cc +++ b/www/iridium/files/patch-base_trace__event_process__memory__dump.cc @@ -1,29 +1,29 @@ ---- base/trace_event/process_memory_dump.cc.orig 2025-09-11 13:19:19 UTC +--- base/trace_event/process_memory_dump.cc.orig 2025-12-10 15:04:57 UTC +++ base/trace_event/process_memory_dump.cc @@ -47,7 +47,7 @@ #include #endif -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include #include "base/notreached.h" @@ -116,7 +116,7 @@ std::optional ProcessMemoryDump::CountResident #if BUILDFLAG(IS_WIN) auto vec = base::HeapArray::WithSize(max_vec_size); -#elif BUILDFLAG(IS_APPLE) +#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) auto vec = base::HeapArray::WithSize(max_vec_size); #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) auto vec = base::HeapArray::WithSize(max_vec_size); @@ -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/42050620): Implement counting resident bytes. // For now, log and avoid unused variable warnings. NOTIMPLEMENTED_LOG_ONCE(); diff --git a/www/iridium/files/patch-base_tracing_trace__time.cc b/www/iridium/files/patch-base_tracing_trace__time.cc index 98aed3b1c5bd..675f24a5e4a0 100644 --- a/www/iridium/files/patch-base_tracing_trace__time.cc +++ b/www/iridium/files/patch-base_tracing_trace__time.cc @@ -1,20 +1,20 @@ ---- base/tracing/trace_time.cc.orig 2025-05-07 06:48:23 UTC +--- base/tracing/trace_time.cc.orig 2025-12-10 15:04:57 UTC +++ base/tracing/trace_time.cc @@ -8,12 +8,16 @@ #include "build/build_config.h" #include "third_party/perfetto/include/perfetto/base/time.h" +#if BUILDFLAG(IS_FREEBSD) +#define CLOCK_BOOTTIME CLOCK_UPTIME +#endif + namespace base::tracing { int64_t TraceBootTicksNow() { // On Windows and Mac, TRACE_TIME_TICKS_NOW() behaves like boottime already. #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) struct timespec ts; int res = clock_gettime(CLOCK_BOOTTIME, &ts); if (res != -1) { diff --git a/www/iridium/files/patch-base_tracing_trace__time.h b/www/iridium/files/patch-base_tracing_trace__time.h index fb2445ec11ee..342dc4be4785 100644 --- a/www/iridium/files/patch-base_tracing_trace__time.h +++ b/www/iridium/files/patch-base_tracing_trace__time.h @@ -1,11 +1,11 @@ ---- base/tracing/trace_time.h.orig 2025-05-07 06:48:23 UTC +--- base/tracing/trace_time.h.orig 2025-12-10 15:04:57 UTC +++ base/tracing/trace_time.h @@ -12,7 +12,7 @@ namespace base { namespace tracing { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Linux, Android, and Fuchsia all use CLOCK_MONOTONIC. See crbug.com/166153 // about efforts to unify base::TimeTicks across all platforms. constexpr perfetto::protos::pbzero::BuiltinClock kTraceClockId = diff --git a/www/iridium/files/patch-build_config_BUILD.gn b/www/iridium/files/patch-build_config_BUILD.gn index 4afe9f7a870e..3e2eca19cdb4 100644 --- a/www/iridium/files/patch-build_config_BUILD.gn +++ b/www/iridium/files/patch-build_config_BUILD.gn @@ -1,13 +1,13 @@ ---- build/config/BUILD.gn.orig 2025-09-11 13:19:19 UTC +--- build/config/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ build/config/BUILD.gn @@ -209,6 +209,10 @@ config("default_libs") { # Targets should choose to explicitly link frameworks they require. Since # linking can have run-time side effects, nothing should be listed here. libs = [] + } else if (is_bsd) { + libs = [ + "pthread", + ] } else if (is_linux || is_chromeos) { libs = [ "dl", diff --git a/www/iridium/files/patch-build_config_BUILDCONFIG.gn b/www/iridium/files/patch-build_config_BUILDCONFIG.gn index adb9c205af17..771b328f080f 100644 --- a/www/iridium/files/patch-build_config_BUILDCONFIG.gn +++ b/www/iridium/files/patch-build_config_BUILDCONFIG.gn @@ -1,45 +1,45 @@ ---- build/config/BUILDCONFIG.gn.orig 2025-10-28 14:29:43 UTC +--- build/config/BUILDCONFIG.gn.orig 2025-12-10 15:04:57 UTC +++ build/config/BUILDCONFIG.gn @@ -136,7 +136,8 @@ declare_args() { is_official_build = false # Set to true when compiling with the Clang compiler. - is_clang = current_os != "linux" || + is_clang = current_os != "linux" || current_os == "openbsd" || + current_os == "freebsd" || (current_cpu != "s390x" && current_cpu != "s390" && current_cpu != "ppc64" && current_cpu != "ppc" && - current_cpu != "mips" && current_cpu != "mips64" && -@@ -235,6 +236,10 @@ if (host_toolchain == "") { + current_cpu != "mips" && current_cpu != "mips64") +@@ -234,6 +235,10 @@ if (host_toolchain == "") { host_toolchain = "//build/toolchain/aix:$host_cpu" } else if (host_os == "zos") { host_toolchain = "//build/toolchain/zos:$host_cpu" + } else if (host_os == "openbsd") { + host_toolchain = "//build/toolchain/openbsd:clang_$host_cpu" + } else if (host_os == "freebsd") { + host_toolchain = "//build/toolchain/freebsd:clang_$host_cpu" } else { assert(false, "Unsupported host_os: $host_os") } -@@ -284,6 +289,8 @@ if (target_os == "android") { +@@ -283,6 +288,8 @@ if (target_os == "android") { assert( false, "emscripten is not a supported target_os. It is available only as secondary toolchain.") +} else if (target_os == "openbsd" || target_os == "freebsd") { + _default_toolchain = host_toolchain } else { assert(false, "Unsupported target_os: $target_os") } -@@ -318,7 +325,11 @@ is_android = current_os == "android" +@@ -317,7 +324,11 @@ is_android = current_os == "android" is_chromeos = current_os == "chromeos" is_fuchsia = current_os == "fuchsia" is_ios = current_os == "ios" -is_linux = current_os == "linux" +is_linux = current_os == "linux" || current_os == "openbsd" || + current_os == "freebsd" +is_openbsd = current_os == "openbsd" +is_freebsd = current_os == "freebsd" +is_bsd = current_os == "openbsd" || current_os == "freebsd" is_mac = current_os == "mac" is_wasm = current_os == "emscripten" is_watchos = current_os == "watchos" diff --git a/www/iridium/files/patch-build_config_c++_modules.gni b/www/iridium/files/patch-build_config_c++_modules.gni index b32ed12d44bf..38ef4d1acb8a 100644 --- a/www/iridium/files/patch-build_config_c++_modules.gni +++ b/www/iridium/files/patch-build_config_c++_modules.gni @@ -1,11 +1,11 @@ ---- build/config/c++/modules.gni.orig 2025-11-06 10:11:34 UTC +--- build/config/c++/modules.gni.orig 2025-12-10 15:04:57 UTC +++ build/config/c++/modules.gni @@ -16,7 +16,7 @@ declare_args() { # Eg. linux arm64 and windows were never supported with manual clang modules, # so they should use_autogenerated_modules = true despite not having # autogenerated modules because they're guarded by use_clang_modules. -- use_autogenerated_modules = !is_apple -+ use_autogenerated_modules = !is_apple && !is_bsd +- use_autogenerated_modules = !(is_apple && use_system_xcode) ++ use_autogenerated_modules = !(is_apple && use_system_xcode) && !is_bsd } module_platform = "${current_os}-${current_cpu}" diff --git a/www/iridium/files/patch-build_config_clang_BUILD.gn b/www/iridium/files/patch-build_config_clang_BUILD.gn index ea81c7de644c..ba36849f3b59 100644 --- a/www/iridium/files/patch-build_config_clang_BUILD.gn +++ b/www/iridium/files/patch-build_config_clang_BUILD.gn @@ -1,16 +1,16 @@ ---- build/config/clang/BUILD.gn.orig 2025-10-28 14:29:43 UTC +--- build/config/clang/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ build/config/clang/BUILD.gn @@ -224,7 +224,12 @@ template("clang_lib") { # Adds a dependency on the Clang runtime library clang_rt.builtins. clang_lib("compiler_builtins") { - if (is_mac) { + if (is_bsd) { + # Since there's no Rust in the toolchain, there's no concern that we'll use + # the Rust stdlib's intrinsics here. + # + # Don't define libname which makes this target do nothing. + } else if (is_mac) { libname = "osx" } else if (is_ios) { if (target_platform == "iphoneos") { diff --git a/www/iridium/files/patch-build_config_clang_clang.gni b/www/iridium/files/patch-build_config_clang_clang.gni index 2167516641f6..cd1b54bd97f4 100644 --- a/www/iridium/files/patch-build_config_clang_clang.gni +++ b/www/iridium/files/patch-build_config_clang_clang.gni @@ -1,11 +1,11 @@ ---- build/config/clang/clang.gni.orig 2025-11-06 10:11:34 UTC +--- build/config/clang/clang.gni.orig 2025-12-10 15:04:57 UTC +++ build/config/clang/clang.gni @@ -88,7 +88,7 @@ declare_args() { # # TODO(https://crbug.com/440260716): Enable for Cronet in AOSP once gn2bp # supports copy targets. - use_clang_modules = + use_clang_modules = !is_bsd && # Clang modules doesn't work with translation_unit used in codesearch # pipeline http://b/436082487. !enable_kythe_annotations && is_clang && diff --git a/www/iridium/files/patch-build_config_compiler_BUILD.gn b/www/iridium/files/patch-build_config_compiler_BUILD.gn index 5e6e3bb1fca1..53533ae24512 100644 --- a/www/iridium/files/patch-build_config_compiler_BUILD.gn +++ b/www/iridium/files/patch-build_config_compiler_BUILD.gn @@ -1,121 +1,121 @@ ---- build/config/compiler/BUILD.gn.orig 2025-11-06 10:11:34 UTC +--- build/config/compiler/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ build/config/compiler/BUILD.gn -@@ -196,7 +196,7 @@ declare_args() { +@@ -201,7 +201,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_win && !is_apple + simple_template_names = is_clang && !is_win && !is_apple && !is_bsd # This switch is used to enable -Wexit-time-destructors by default. This # warning serves as a flip switch to allow a gradual migration of targets -@@ -270,7 +270,7 @@ assert(!(llvm_force_head_revision && use_remoteexec && +@@ -282,7 +282,7 @@ assert(is_bot || # # Since this is referenced both when passing the file and when deciding which # warnings to enable, store it in a separate variable here. -use_clang_warning_suppression_file = +use_clang_warning_suppression_file = !is_bsd && is_clang && clang_warning_suppression_file != "" # default_include_dirs --------------------------------------------------------- -@@ -288,13 +288,16 @@ config("default_include_dirs") { +@@ -300,13 +300,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 --------------------------------------------------------------------- -@@ -567,6 +570,10 @@ config("compiler") { +@@ -579,6 +582,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ if (use_icf && (!is_apple || use_lld)) { -@@ -657,7 +664,7 @@ config("compiler") { +@@ -669,7 +676,7 @@ config("compiler") { ldflags += [ "-Wl,-z,keep-text-section-prefix" ] } - if (is_clang) { + if (is_clang && !is_bsd) { cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] if (save_reproducers_on_lld_crash && use_lld) { ldflags += [ -@@ -1315,7 +1322,7 @@ config("compiler_cpu_abi") { +@@ -1297,7 +1304,7 @@ config("compiler_cpu_abi") { # CPU architecture. We may or may not be doing a cross compile now, so for # simplicity we always explicitly set the architecture. if (current_cpu == "x64") { - if (is_clang && !is_android && !is_fuchsia && !is_chromeos_device) { + if (is_clang && !is_android && !is_fuchsia && !is_chromeos_device && !is_bsd) { cflags += [ "--target=x86_64-unknown-linux-gnu" ] ldflags += [ "--target=x86_64-unknown-linux-gnu" ] } else { -@@ -1324,7 +1331,7 @@ config("compiler_cpu_abi") { +@@ -1306,7 +1313,7 @@ config("compiler_cpu_abi") { } cflags += [ "-msse3" ] } else if (current_cpu == "x86") { - if (is_clang && !is_android && !is_chromeos_device) { + if (is_clang && !is_android && !is_chromeos_device && !Is_bsd) { cflags += [ "--target=i386-unknown-linux-gnu" ] ldflags += [ "--target=i386-unknown-linux-gnu" ] } else { -@@ -1336,7 +1343,7 @@ config("compiler_cpu_abi") { +@@ -1318,7 +1325,7 @@ config("compiler_cpu_abi") { "-msse3", ] } else if (current_cpu == "arm") { - if (is_clang && !is_android && !is_chromeos_device) { + if (is_clang && !is_android && !is_chromeos_device && !is_bsd) { cflags += [ "--target=arm-linux-gnueabihf" ] ldflags += [ "--target=arm-linux-gnueabihf" ] } -@@ -1348,7 +1355,7 @@ config("compiler_cpu_abi") { +@@ -1330,7 +1337,7 @@ config("compiler_cpu_abi") { cflags += [ "-mtune=$arm_tune" ] } } else if (current_cpu == "arm64") { - if (is_clang && !is_android && !is_fuchsia && !is_chromeos_device) { + if (is_clang && !is_android && !is_fuchsia && !is_chromeos_device && !is_bsd) { cflags += [ "--target=aarch64-linux-gnu" ] ldflags += [ "--target=aarch64-linux-gnu" ] } -@@ -1747,7 +1754,7 @@ config("compiler_deterministic") { +@@ -1735,7 +1742,7 @@ config("compiler_deterministic") { } config("clang_revision") { - if (is_clang && clang_base_path == default_clang_base_path && + if (is_clang && !is_bsd && clang_base_path == default_clang_base_path && current_os != "zos") { _perform_consistency_checks = current_toolchain == default_toolchain if (llvm_force_head_revision) { -@@ -2955,7 +2962,7 @@ config("afdo_optimize_size") { +@@ -2969,7 +2976,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. -@@ -2982,7 +2989,7 @@ config("afdo") { +@@ -2996,7 +3003,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 ] } diff --git a/www/iridium/files/patch-build_config_gcc_BUILD.gn b/www/iridium/files/patch-build_config_gcc_BUILD.gn index 471d98f1baa7..fe8b8c2e79ac 100644 --- a/www/iridium/files/patch-build_config_gcc_BUILD.gn +++ b/www/iridium/files/patch-build_config_gcc_BUILD.gn @@ -1,13 +1,13 @@ ---- build/config/gcc/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- build/config/gcc/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ build/config/gcc/BUILD.gn @@ -32,7 +32,9 @@ declare_args() { # See http://gcc.gnu.org/wiki/Visibility config("symbol_visibility_hidden") { cflags = [ "-fvisibility=hidden" ] - rustflags = [ "-Zdefault-visibility=hidden" ] + if (!is_bsd) { + rustflags = [ "-Zdefault-visibility=hidden" ] + } # Visibility attribute is not supported on AIX. if (current_os != "aix") { diff --git a/www/iridium/files/patch-build_config_linux_BUILD.gn b/www/iridium/files/patch-build_config_linux_BUILD.gn index d1959de18d5f..60ad0864ab3b 100644 --- a/www/iridium/files/patch-build_config_linux_BUILD.gn +++ b/www/iridium/files/patch-build_config_linux_BUILD.gn @@ -1,11 +1,11 @@ ---- build/config/linux/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- build/config/linux/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ build/config/linux/BUILD.gn @@ -41,7 +41,7 @@ config("runtime_library") { } if ((!is_chromeos || default_toolchain != "//build/toolchain/cros:target") && - (!use_custom_libcxx || current_cpu == "mipsel")) { + (!use_custom_libcxx || current_cpu == "mipsel") && !is_bsd) { libs = [ "atomic" ] } } diff --git a/www/iridium/files/patch-build_config_linux_libdrm_BUILD.gn b/www/iridium/files/patch-build_config_linux_libdrm_BUILD.gn index 68f16e0c5e88..eae507157ca9 100644 --- a/www/iridium/files/patch-build_config_linux_libdrm_BUILD.gn +++ b/www/iridium/files/patch-build_config_linux_libdrm_BUILD.gn @@ -1,11 +1,11 @@ ---- build/config/linux/libdrm/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- build/config/linux/libdrm/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ build/config/linux/libdrm/BUILD.gn @@ -15,7 +15,7 @@ declare_args() { } if (use_system_libdrm) { - assert(!is_linux, "System libdrm is not supported in linux") +# assert(!is_linux, "System libdrm is not supported in linux") pkg_config("libdrm_config") { packages = [ "libdrm" ] } diff --git a/www/iridium/files/patch-build_config_linux_pkg-config.py b/www/iridium/files/patch-build_config_linux_pkg-config.py index 010ae190db8f..0fdd750c25b2 100644 --- a/www/iridium/files/patch-build_config_linux_pkg-config.py +++ b/www/iridium/files/patch-build_config_linux_pkg-config.py @@ -1,11 +1,11 @@ ---- build/config/linux/pkg-config.py.orig 2025-05-07 06:48:23 UTC +--- build/config/linux/pkg-config.py.orig 2025-12-10 15:04:57 UTC +++ build/config/linux/pkg-config.py @@ -108,7 +108,7 @@ def main(): # If this is run on non-Linux platforms, just return nothing and indicate # success. This allows us to "kind of emulate" a Linux build from other # platforms. - if "linux" not in sys.platform: + if not sys.platform.startswith(tuple(['linux', 'openbsd', 'freebsd'])): print("[[],[],[],[],[]]") return 0 diff --git a/www/iridium/files/patch-build_config_ozone.gni b/www/iridium/files/patch-build_config_ozone.gni index 7ee2990192c0..62cd984bdf69 100644 --- a/www/iridium/files/patch-build_config_ozone.gni +++ b/www/iridium/files/patch-build_config_ozone.gni @@ -1,19 +1,19 @@ ---- build/config/ozone.gni.orig 2025-05-07 06:48:23 UTC +--- build/config/ozone.gni.orig 2025-12-10 15:04:57 UTC +++ build/config/ozone.gni @@ -80,7 +80,15 @@ declare_args() { ozone_platform = "x11" ozone_platform_drm = true ozone_platform_x11 = true - } else if (is_linux) { + } else if (is_linux && !is_bsd) { + ozone_platform = "x11" + ozone_platform_wayland = true + ozone_platform_x11 = true + } else if (is_openbsd) { + ozone_platform = "x11" + ozone_platform_wayland = false + ozone_platform_x11 = true + } else if (is_freebsd) { ozone_platform = "x11" ozone_platform_wayland = true ozone_platform_x11 = true diff --git a/www/iridium/files/patch-build_config_rust.gni b/www/iridium/files/patch-build_config_rust.gni index 94cefeb2bdec..68c1fc84af58 100644 --- a/www/iridium/files/patch-build_config_rust.gni +++ b/www/iridium/files/patch-build_config_rust.gni @@ -1,25 +1,25 @@ ---- build/config/rust.gni.orig 2025-11-06 10:11:34 UTC +--- build/config/rust.gni.orig 2025-12-10 15:04:57 UTC +++ build/config/rust.gni @@ -62,7 +62,8 @@ declare_args() { # set this to the output of `rustc -V`. Changing this string will cause all # Rust targets to be rebuilt, which allows you to update your toolchain and # not break incremental builds. - rustc_version = "" + rustc_version = exec_script("//build/gn_run_binary.py", + [ "/usr/local/bin/rustc", "-V" ], "trim string") # Whether artifacts produced by the Rust compiler can participate in ThinLTO. # -@@ -329,7 +330,11 @@ if (is_linux || is_chromeos) { +@@ -326,7 +327,11 @@ if (is_linux || is_chromeos) { } } -if (toolchain_has_rust) { +if (is_bsd) { + rust_abi_target = string_replace(rust_abi_target, "linux-gnu", current_os) +} + +if (toolchain_has_rust && !is_bsd) { assert(rust_abi_target != "") _known_rust_target_triples_filepath = "//build/rust/known-target-triples.txt" diff --git a/www/iridium/files/patch-build_config_v8__target__cpu.gni b/www/iridium/files/patch-build_config_v8__target__cpu.gni index cff5ee41e3d4..8dcfde02105a 100644 --- a/www/iridium/files/patch-build_config_v8__target__cpu.gni +++ b/www/iridium/files/patch-build_config_v8__target__cpu.gni @@ -1,13 +1,13 @@ ---- build/config/v8_target_cpu.gni.orig 2025-05-07 06:48:23 UTC +--- build/config/v8_target_cpu.gni.orig 2025-12-10 15:04:57 UTC +++ build/config/v8_target_cpu.gni @@ -36,6 +36,10 @@ declare_args() { if (v8_target_cpu == "") { if (current_toolchain == "//build/toolchain/linux:clang_x64_v8_arm64") { v8_target_cpu = "arm64" + } else if (current_toolchain == "//build/toolchain/openbsd:clang_arm64") { + v8_target_cpu = "arm64" + } else if (current_toolchain == "//build/toolchain/freebsd:clang_arm64") { + v8_target_cpu = "arm64" } else if (current_toolchain == "//build/toolchain/linux:clang_x86_v8_arm") { v8_target_cpu = "arm" } else if (current_toolchain == diff --git a/www/iridium/files/patch-build_detect__host__arch.py b/www/iridium/files/patch-build_detect__host__arch.py index 9e64aa01f511..2b41d88de028 100644 --- a/www/iridium/files/patch-build_detect__host__arch.py +++ b/www/iridium/files/patch-build_detect__host__arch.py @@ -1,11 +1,11 @@ ---- build/detect_host_arch.py.orig 2025-05-07 06:48:23 UTC +--- build/detect_host_arch.py.orig 2025-12-10 15:04:57 UTC +++ build/detect_host_arch.py @@ -20,6 +20,8 @@ def HostArch(): host_arch = 'ia32' elif host_arch in ['x86_64', 'amd64']: host_arch = 'x64' + elif host_arch.startswith('arm64'): + host_arch = 'arm64' elif host_arch.startswith('arm'): host_arch = 'arm' elif host_arch.startswith('aarch64'): diff --git a/www/iridium/files/patch-build_dotfile__settings.gni b/www/iridium/files/patch-build_dotfile__settings.gni index 0bf5c0590cc9..d1156f782609 100644 --- a/www/iridium/files/patch-build_dotfile__settings.gni +++ b/www/iridium/files/patch-build_dotfile__settings.gni @@ -1,10 +1,10 @@ ---- build/dotfile_settings.gni.orig 2025-11-06 10:11:34 UTC +--- build/dotfile_settings.gni.orig 2025-12-10 15:04:57 UTC +++ build/dotfile_settings.gni @@ -23,6 +23,7 @@ build_dotfile_settings = { "//build/config/mac/mac_sdk.gni", "//build/config/mac/rules.gni", "//build/config/posix/BUILD.gn", + "//build/config/rust.gni", "//build/config/win/BUILD.gn", "//build/config/win/visual_studio_version.gni", "//build/rust/analyze.gni", diff --git a/www/iridium/files/patch-build_gn__run__binary.py b/www/iridium/files/patch-build_gn__run__binary.py index fe2df98b2740..bbfea9a1c9dc 100644 --- a/www/iridium/files/patch-build_gn__run__binary.py +++ b/www/iridium/files/patch-build_gn__run__binary.py @@ -1,11 +1,11 @@ ---- build/gn_run_binary.py.orig 2025-05-07 06:48:23 UTC +--- build/gn_run_binary.py.orig 2025-12-10 15:04:57 UTC +++ build/gn_run_binary.py @@ -23,7 +23,7 @@ if not os.path.isabs(path): # The rest of the arguments are passed directly to the executable. args = [path] + sys.argv[2:] -ret = subprocess.call(args) +ret = subprocess.call(args, env={"CHROME_EXE_PATH":"${WRKSRC}/out/Release/chrome","LD_LIBRARY_PATH":"${WRKSRC}/out/Release"}) if ret != 0: if ret <= -100: # Windows error codes such as 0xC0000005 and 0xC0000409 are much easier to diff --git a/www/iridium/files/patch-build_linux_chrome.map b/www/iridium/files/patch-build_linux_chrome.map index ed040f84b25b..d4397081a2af 100644 --- a/www/iridium/files/patch-build_linux_chrome.map +++ b/www/iridium/files/patch-build_linux_chrome.map @@ -1,13 +1,13 @@ ---- build/linux/chrome.map.orig 2025-05-07 06:48:23 UTC +--- build/linux/chrome.map.orig 2025-12-10 15:04:57 UTC +++ build/linux/chrome.map @@ -20,6 +20,10 @@ global: # Program entry point. _start; + # FreeBSD specific variables. + __progname; + environ; + # Memory allocation symbols. We want chrome and any libraries to # share the same heap, so it is correct to export these symbols. aligned_alloc; diff --git a/www/iridium/files/patch-build_linux_strip__binary.gni b/www/iridium/files/patch-build_linux_strip__binary.gni index 7250ba409106..d13715d5c611 100644 --- a/www/iridium/files/patch-build_linux_strip__binary.gni +++ b/www/iridium/files/patch-build_linux_strip__binary.gni @@ -1,13 +1,13 @@ ---- build/linux/strip_binary.gni.orig 2025-11-24 05:40:57 UTC +--- build/linux/strip_binary.gni.orig 2025-12-10 15:04:57 UTC +++ build/linux/strip_binary.gni @@ -21,8 +21,8 @@ template("strip_binary") { "testonly", ]) action("${target_name}") { - llvm_strip_binary = "${clang_base_path}/bin/llvm-strip" - llvm_objcopy_binary = "${clang_base_path}/bin/llvm-objcopy" + llvm_strip_binary = "${LOCALBASE}/llvm${MODCLANG_VERSION}/bin/llvm-strip" + llvm_objcopy_binary = "${LOCALBASE}/llvm${MODCLANG_VERSION}/bin/llvm-objcopy" script = "//build/linux/strip_binary.py" if (defined(invoker.stripped_binary_output)) { diff --git a/www/iridium/files/patch-build_linux_strip__binary.py b/www/iridium/files/patch-build_linux_strip__binary.py index 5add6d000a3b..dcdfbfebb4ef 100644 --- a/www/iridium/files/patch-build_linux_strip__binary.py +++ b/www/iridium/files/patch-build_linux_strip__binary.py @@ -1,10 +1,10 @@ ---- build/linux/strip_binary.py.orig 2025-09-11 13:19:19 UTC +--- build/linux/strip_binary.py.orig 2025-12-10 15:04:57 UTC +++ build/linux/strip_binary.py @@ -10,6 +10,7 @@ import sys def main() -> int: + return 0 parser = argparse.ArgumentParser(description="Strip binary using LLVM tools.") parser.add_argument("--llvm-strip-binary-path", help="Path to llvm-strip executable.") diff --git a/www/iridium/files/patch-build_linux_unbundle_icu.gn b/www/iridium/files/patch-build_linux_unbundle_icu.gn index 5f7a5139bd98..595d242c1c57 100644 --- a/www/iridium/files/patch-build_linux_unbundle_icu.gn +++ b/www/iridium/files/patch-build_linux_unbundle_icu.gn @@ -1,43 +1,28 @@ ---- build/linux/unbundle/icu.gn.orig 2025-05-07 06:48:23 UTC +--- build/linux/unbundle/icu.gn.orig 2025-12-10 15:04:57 UTC +++ build/linux/unbundle/icu.gn @@ -17,6 +17,15 @@ config("icu_config") { "USING_SYSTEM_ICU=1", "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC", + # As of icu 73 C++ nullptr, char16_t, override, final and noexcept are used + # instead of defines. These definitions can be removed when the bundled icu + # gets updated to 73. For more details, see: + # https://unicode-org.atlassian.net/browse/ICU-21833 and + # https://github.com/unicode-org/icu/commit/28643799377ecf654564f6f31854b02788cebe33 + "U_FINAL=final", + "U_NOEXCEPT=noexcept", + "U_OVERRIDE=override", + # U_EXPORT (defined in unicode/platform.h) is used to set public visibility # on classes through the U_COMMON_API and U_I18N_API macros (among others). # When linking against the system ICU library, we want its symbols to have @@ -34,6 +43,9 @@ config("icu_config") { # to define U_IMPORT to have the same value as U_EXPORT. For more details, # please see: https://crbug.com/822820 "U_IMPORT=U_EXPORT", + + # Unbreak with icu 76 where private symbols are picked up + "U_HIDE_DRAFT_API", ] } -@@ -46,6 +58,14 @@ pkg_config("system_icuuc") { - } - - source_set("icui18n") { -+ deps = [ ":icui18n_shim" ] -+ public_configs = [ -+ ":icu_config", -+ ":system_icui18n", -+ ] -+} -+ -+source_set("icui18n_hidden_visibility") { - deps = [ ":icui18n_shim" ] - public_configs = [ - ":icu_config", diff --git a/www/iridium/files/patch-build_linux_unbundle_libpng.gn b/www/iridium/files/patch-build_linux_unbundle_libpng.gn new file mode 100644 index 000000000000..4840edd85be1 --- /dev/null +++ b/www/iridium/files/patch-build_linux_unbundle_libpng.gn @@ -0,0 +1,30 @@ +--- build/linux/unbundle/libpng.gn.orig 2025-12-10 15:04:57 UTC ++++ build/linux/unbundle/libpng.gn +@@ -21,3 +21,27 @@ source_set("libpng") { + deps = [ ":libpng_shim" ] + public_configs = [ ":libpng_config" ] + } ++ ++libpng_testonly_visibility = [ ++ "//chrome/test:accessibility_live_site_tests", ++ "//chrome/test:captured_sites_interactive_tests", ++ "//chrome/test:interactive_ui_tests", ++ "//tools/imagediff", ++ ++ # Using a wildcard, to cover template-generated targets (e.g. ++ # `run_libpng_progressive_read_fuzzer` on `ios-catalyst` trybot). ++ "//testing/libfuzzer/fuzzers:*", ++ ++ # Using a wildcard, to cover template-generated targets (e.g. ++ # `//ui/gfx:gfx_unittests__library__jni_registration__native_sources` or ++ # `//ui/gfx:gfx_unittests__exec`). ++ "//ui/gfx:*", ++] ++ ++group("libpng_for_testonly") { ++ testonly = true ++ public_deps = [ ":libpng" ] ++ ++ visibility = [] ++ visibility = libpng_testonly_visibility ++} diff --git a/www/iridium/files/patch-build_linux_unbundle_libusb.gn b/www/iridium/files/patch-build_linux_unbundle_libusb.gn index 5ac1d7e88e78..e399992d29a7 100644 --- a/www/iridium/files/patch-build_linux_unbundle_libusb.gn +++ b/www/iridium/files/patch-build_linux_unbundle_libusb.gn @@ -1,30 +1,30 @@ ---- build/linux/unbundle/libusb.gn.orig 2025-05-07 06:48:23 UTC +--- build/linux/unbundle/libusb.gn.orig 2025-12-10 15:04:57 UTC +++ build/linux/unbundle/libusb.gn @@ -1,3 +1,27 @@ +# Copyright 2016 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. + +import("//build/config/linux/pkg_config.gni") +import("//build/shim_headers.gni") + +pkg_config("system_libusb") { + packages = [ "libusb-1.0" ] +} + +shim_headers("libusb_shim") { + root_path = "src/libusb" + headers = [ + "libusb.h", + ] +} + +source_set("libusb") { + deps = [ + ":libusb_shim", + ] + public_configs = [ ":system_libusb" ] +} import("//build/config/linux/pkg_config.gni") import("//build/shim_headers.gni") diff --git a/www/iridium/files/patch-build_rust_allocator_lib.rs b/www/iridium/files/patch-build_rust_allocator_lib.rs index 5683fb4c4512..7e1eba5a7f0a 100644 --- a/www/iridium/files/patch-build_rust_allocator_lib.rs +++ b/www/iridium/files/patch-build_rust_allocator_lib.rs @@ -1,21 +1,15 @@ ---- build/rust/allocator/lib.rs.orig 2025-11-25 13:37:36 UTC +--- build/rust/allocator/lib.rs.orig 2025-12-10 15:04:57 UTC +++ build/rust/allocator/lib.rs -@@ -96,6 +96,18 @@ mod both_allocators { +@@ -96,6 +96,12 @@ mod both_allocators { 0 } -+ // TODO(crbug.com/422538133) Remove after rolling past -+ // https://github.com/rust-lang/rust/pull/141061 -+ #[no_mangle] -+ #[linkage = "weak"] -+ static __rust_no_alloc_shim_is_unstable: u8 = 0; -+ + // TODO(crbug.com/440481922): Remove this after rolling past https://github.com/rust-lang/rust/pull/143387 + #[rustc_std_internal_symbol] + #[allow(non_upper_case_globals)] + #[linkage = "weak"] + static __rust_alloc_error_handler_should_panic: u8 = 0; + // Mangle the symbol name as rustc expects. #[rustc_std_internal_symbol] #[allow(non_upper_case_globals)] diff --git a/www/iridium/files/patch-build_rust_rust__bindgen.gni b/www/iridium/files/patch-build_rust_rust__bindgen.gni index 8c777f4b406d..c8e70b9f8439 100644 --- a/www/iridium/files/patch-build_rust_rust__bindgen.gni +++ b/www/iridium/files/patch-build_rust_rust__bindgen.gni @@ -1,19 +1,19 @@ ---- build/rust/rust_bindgen.gni.orig 2025-05-07 06:48:23 UTC +--- build/rust/rust_bindgen.gni.orig 2025-12-10 15:04:57 UTC +++ build/rust/rust_bindgen.gni @@ -12,14 +12,14 @@ if (is_win) { import("//build/toolchain/win/win_toolchain_data.gni") } -_bindgen_path = "${rust_bindgen_root}/bin/bindgen" +_bindgen_path = "${LOCALBASE}/bin/bindgen" if (host_os == "win") { _bindgen_path = "${_bindgen_path}.exe" } # On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in # ../lib. -_libclang_path = rust_bindgen_root +_libclang_path = "${LOCALBASE}/llvm${MODCLANG_VERSION}" if (host_os == "win") { _libclang_path += "/bin" } else { diff --git a/www/iridium/files/patch-build_rust_rust__bindgen__generator.gni b/www/iridium/files/patch-build_rust_rust__bindgen__generator.gni index 14b2304a9a25..ccbfdc072b60 100644 --- a/www/iridium/files/patch-build_rust_rust__bindgen__generator.gni +++ b/www/iridium/files/patch-build_rust_rust__bindgen__generator.gni @@ -1,19 +1,19 @@ ---- build/rust/rust_bindgen_generator.gni.orig 2025-05-07 06:48:23 UTC +--- build/rust/rust_bindgen_generator.gni.orig 2025-12-10 15:04:57 UTC +++ build/rust/rust_bindgen_generator.gni @@ -11,14 +11,14 @@ if (is_win) { import("//build/toolchain/win/win_toolchain_data.gni") } -_bindgen_path = "${rust_bindgen_root}/bin/bindgen" +_bindgen_path = "${LOCALBASE}/bin/bindgen" if (host_os == "win") { _bindgen_path = "${_bindgen_path}.exe" } # On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in # ../lib. -_libclang_path = rust_bindgen_root +_libclang_path = "${LOCALBASE}/llvm${MODCLANG_VERSION}" if (host_os == "win") { _libclang_path += "/bin" } else { diff --git a/www/iridium/files/patch-build_rust_std_BUILD.gn b/www/iridium/files/patch-build_rust_std_BUILD.gn index da7c2a3037ee..9f2f063f7741 100644 --- a/www/iridium/files/patch-build_rust_std_BUILD.gn +++ b/www/iridium/files/patch-build_rust_std_BUILD.gn @@ -1,32 +1,32 @@ ---- build/rust/std/BUILD.gn.orig 2025-11-06 10:11:34 UTC +--- build/rust/std/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ build/rust/std/BUILD.gn @@ -49,13 +49,20 @@ if (toolchain_has_rust) { # These are no longer present in the Windows toolchain. stdlib_files += [ "addr2line", - "adler2", "gimli", "libc", "memchr", "miniz_oxide", "object", ] + + rust_revision_pieces = string_split(rustc_revision, " ") + rust_version_pieces = string_split(rust_revision_pieces[1], ".") + if (rust_version_pieces[1] == "85") { + stdlib_files += [ "adler" ] + } else { + stdlib_files += [ "adler2" ] + } } if (toolchain_for_rust_host_build_tools) { @@ -75,7 +82,6 @@ if (toolchain_has_rust) { # don't need to pass to the C++ linker because they're used for specialized # purposes. skip_stdlib_files = [ - "profiler_builtins", "rustc_std_workspace_alloc", "rustc_std_workspace_core", "rustc_std_workspace_std", diff --git a/www/iridium/files/patch-build_toolchain_freebsd_BUILD.gn b/www/iridium/files/patch-build_toolchain_freebsd_BUILD.gn index 7412250e64d1..ee2b201c6fbf 100644 --- a/www/iridium/files/patch-build_toolchain_freebsd_BUILD.gn +++ b/www/iridium/files/patch-build_toolchain_freebsd_BUILD.gn @@ -1,69 +1,69 @@ ---- build/toolchain/freebsd/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- build/toolchain/freebsd/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ build/toolchain/freebsd/BUILD.gn @@ -0,0 +1,66 @@ +# Copyright 2013 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. + +import("//build/config/sysroot.gni") +import("//build/toolchain/gcc_toolchain.gni") + +clang_toolchain("clang_x86") { + toolchain_args = { + current_cpu = "x86" + current_os = "freebsd" + } +} + +gcc_toolchain("x86") { + cc = "gcc" + cxx = "g++" + + readelf = "readelf" + nm = "nm" + ar = "ar" + ld = cxx + + toolchain_args = { + current_cpu = "x86" + current_os = "freebsd" + is_clang = false + } +} + +clang_toolchain("clang_x64") { + toolchain_args = { + current_cpu = "x64" + current_os = "freebsd" + } +} + +gcc_toolchain("x64") { + cc = "gcc" + cxx = "g++" + + readelf = "readelf" + nm = "nm" + ar = "ar" + ld = cxx + + toolchain_args = { + current_cpu = "x64" + current_os = "freebsd" + is_clang = false + } +} + +clang_toolchain("clang_arm") { + toolchain_args = { + current_cpu = "arm64" + current_os = "freebsd" + } +} + +clang_toolchain("clang_arm64") { + toolchain_args = { + current_cpu = "arm64" + current_os = "freebsd" + } +} diff --git a/www/iridium/files/patch-build_toolchain_gcc__solink__wrapper.py b/www/iridium/files/patch-build_toolchain_gcc__solink__wrapper.py index ae0a5da428be..7c979bbf41c9 100644 --- a/www/iridium/files/patch-build_toolchain_gcc__solink__wrapper.py +++ b/www/iridium/files/patch-build_toolchain_gcc__solink__wrapper.py @@ -1,11 +1,11 @@ ---- build/toolchain/gcc_solink_wrapper.py.orig 2025-05-07 06:48:23 UTC +--- build/toolchain/gcc_solink_wrapper.py.orig 2025-12-10 15:04:57 UTC +++ build/toolchain/gcc_solink_wrapper.py @@ -39,7 +39,7 @@ def CollectDynSym(args): """Replaces: nm --format=posix -g -D -p $sofile | cut -f1-2 -d' '""" toc = '' nm = subprocess.Popen(wrapper_utils.CommandToRun( - [args.nm, '--format=posix', '-g', '-D', '-p', args.sofile]), + [args.nm, '-g', '-D', '-p', args.sofile]), stdout=subprocess.PIPE, bufsize=-1, universal_newlines=True) diff --git a/www/iridium/files/patch-build_toolchain_gcc__toolchain.gni b/www/iridium/files/patch-build_toolchain_gcc__toolchain.gni index c9a16d6a763e..9cf4e33a3037 100644 --- a/www/iridium/files/patch-build_toolchain_gcc__toolchain.gni +++ b/www/iridium/files/patch-build_toolchain_gcc__toolchain.gni @@ -1,44 +1,44 @@ ---- build/toolchain/gcc_toolchain.gni.orig 2025-11-06 10:11:34 UTC +--- build/toolchain/gcc_toolchain.gni.orig 2025-12-10 15:04:57 UTC +++ build/toolchain/gcc_toolchain.gni @@ -53,6 +53,13 @@ if (enable_resource_allowlist_generation) { "enable_resource_allowlist_generation=true does not work for target_os=$target_os") } +declare_args() { + extra_cflags = "" + extra_cppflags = "" + extra_cxxflags = "" + extra_ldflags = "" +} + # This template defines a toolchain for something that works like gcc # (including clang). # @@ -885,22 +892,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/iridium/files/patch-build_toolchain_openbsd_BUILD.gn b/www/iridium/files/patch-build_toolchain_openbsd_BUILD.gn index c330d865aed3..e49b388d5db6 100644 --- a/www/iridium/files/patch-build_toolchain_openbsd_BUILD.gn +++ b/www/iridium/files/patch-build_toolchain_openbsd_BUILD.gn @@ -1,69 +1,69 @@ ---- build/toolchain/openbsd/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- build/toolchain/openbsd/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ build/toolchain/openbsd/BUILD.gn @@ -0,0 +1,66 @@ +# Copyright 2013 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. + +import("//build/config/sysroot.gni") +import("//build/toolchain/gcc_toolchain.gni") + +clang_toolchain("clang_x86") { + toolchain_args = { + current_cpu = "x86" + current_os = "openbsd" + } +} + +gcc_toolchain("x86") { + cc = "gcc" + cxx = "g++" + + readelf = "readelf" + nm = "nm" + ar = "ar" + ld = cxx + + toolchain_args = { + current_cpu = "x86" + current_os = "openbsd" + is_clang = false + } +} + +clang_toolchain("clang_x64") { + toolchain_args = { + current_cpu = "x64" + current_os = "openbsd" + } +} + +gcc_toolchain("x64") { + cc = "gcc" + cxx = "g++" + + readelf = "readelf" + nm = "nm" + ar = "ar" + ld = cxx + + toolchain_args = { + current_cpu = "x64" + current_os = "openbsd" + is_clang = false + } +} + +clang_toolchain("clang_arm") { + toolchain_args = { + current_cpu = "arm64" + current_os = "openbsd" + } +} + +clang_toolchain("clang_arm64") { + toolchain_args = { + current_cpu = "arm64" + current_os = "openbsd" + } +} diff --git a/www/iridium/files/patch-build_toolchain_toolchain.gni b/www/iridium/files/patch-build_toolchain_toolchain.gni index 70dafc955fc7..6feeecbab217 100644 --- a/www/iridium/files/patch-build_toolchain_toolchain.gni +++ b/www/iridium/files/patch-build_toolchain_toolchain.gni @@ -1,11 +1,11 @@ ---- build/toolchain/toolchain.gni.orig 2025-11-06 10:11:34 UTC +--- build/toolchain/toolchain.gni.orig 2025-12-10 15:04:57 UTC +++ build/toolchain/toolchain.gni @@ -55,7 +55,7 @@ if (host_os == "mac") { host_shlib_extension = ".dylib" } else if (host_os == "win") { host_shlib_extension = ".dll" -} else if (host_os == "linux" || host_os == "aix" || host_os == "zos") { +} else if (is_posix) { host_shlib_extension = ".so" } else { assert(false, "Host platform not supported") diff --git a/www/iridium/files/patch-cc_base_features.cc b/www/iridium/files/patch-cc_base_features.cc index 5aee85a0aa1b..d07210c22e45 100644 --- a/www/iridium/files/patch-cc_base_features.cc +++ b/www/iridium/files/patch-cc_base_features.cc @@ -1,11 +1,11 @@ ---- cc/base/features.cc.orig 2025-11-06 10:11:34 UTC +--- cc/base/features.cc.orig 2025-12-10 15:04:57 UTC +++ cc/base/features.cc @@ -42,7 +42,7 @@ const base::FeatureParam kDeferImplInvalidationFr // Note that kUseDMSAAForTiles only controls vulkan launch on android. We will // be using a separate flag to control the launch on GL. BASE_FEATURE(kUseDMSAAForTiles, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/iridium/files/patch-chrome_app_chrome__command__ids.h b/www/iridium/files/patch-chrome_app_chrome__command__ids.h index 2e03886ee5c6..1ea8398052f1 100644 --- a/www/iridium/files/patch-chrome_app_chrome__command__ids.h +++ b/www/iridium/files/patch-chrome_app_chrome__command__ids.h @@ -1,16 +1,16 @@ ---- chrome/app/chrome_command_ids.h.orig 2025-05-07 06:48:23 UTC +--- chrome/app/chrome_command_ids.h.orig 2025-12-10 15:04:57 UTC +++ chrome/app/chrome_command_ids.h @@ -72,11 +72,11 @@ #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 -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define IDC_RESTORE_WINDOW 34052 #endif diff --git a/www/iridium/files/patch-chrome_app_chrome__main.cc b/www/iridium/files/patch-chrome_app_chrome__main.cc index d0f3e7dba9c6..9da1613dcb24 100644 --- a/www/iridium/files/patch-chrome_app_chrome__main.cc +++ b/www/iridium/files/patch-chrome_app_chrome__main.cc @@ -1,43 +1,43 @@ ---- chrome/app/chrome_main.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/app/chrome_main.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/app/chrome_main.cc @@ -28,11 +28,11 @@ #include "chrome/app/chrome_main_mac.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/base_switches.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/app/chrome_main_linux.h" #endif @@ -57,7 +57,7 @@ // sometime after old headless code is removed from Chrome. // See https://crbug.com/373672160. #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #define ENABLE_OLD_HEADLESS_INFO #endif @@ -115,7 +115,7 @@ int ChromeMain(int argc, const char** argv) { #error Unknown platform. #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) PossiblyDetermineFallbackChromeChannel(argv[0]); #endif @@ -180,7 +180,7 @@ int ChromeMain(int argc, const char** argv) { SetUpBundleOverrides(); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) AppendExtraArgumentsToCommandLine(command_line); #endif diff --git a/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc b/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc index 4faff2d955e3..aa229bbcb005 100644 --- a/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc +++ b/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc @@ -1,131 +1,131 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/app/chrome_main_delegate.cc @@ -105,7 +105,7 @@ #include "ui/base/ui_base_switches.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "components/webapps/isolated_web_apps/scheme.h" #endif @@ -184,17 +184,17 @@ #include "v8/include/v8.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/environment.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/nix/scoped_xdg_activation_token_injector.h" #include "ui/linux/display_server_utils.h" #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/policy_path_parser.h" #include "components/crash/core/app/crashpad.h" #endif @@ -228,7 +228,7 @@ const char* const ChromeMainDelegate::kNonWildcardDoma #endif chrome::kChromeSearchScheme, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) webapps::kIsolatedAppScheme, #endif content::kChromeDevToolsScheme, content::kChromeUIScheme, @@ -303,7 +303,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 @@ -382,7 +382,7 @@ bool HandleVersionSwitches(const base::CommandLine& co return false; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || 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) || @@ -394,7 +394,7 @@ void HandleHelpSwitches(const base::CommandLine& comma } #endif // BUILDFLAG(IS_LINUX) -#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; @@ -476,7 +476,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. @@ -554,7 +554,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. @@ -660,7 +660,7 @@ void RecordMainStartupMetrics(const StartupTimestamps& #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Record the startup process creation time on supported platforms. On Android // this is recorded in ChromeMainDelegateAndroid. startup_metric_utils::GetCommon().RecordStartupProcessCreationTime( @@ -819,7 +819,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(); @@ -976,7 +976,7 @@ void ChromeMainDelegate::CommonEarlyInitialization() { 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; @@ -1124,7 +1124,7 @@ std::optional ChromeMainDelegate::BasicStartupCom return 0; // Got a --credits switch; exit with a success error code. } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // This will directly exit if the user asked for help. HandleHelpSwitches(command_line); #endif @@ -1437,7 +1437,7 @@ void ChromeMainDelegate::PreSandboxStartup() { CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; } -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != switches::kZygoteProcess && !command_line.HasSwitch(switches::kDisableCrashpadForTesting)) { diff --git a/www/iridium/files/patch-chrome_app_settings__strings.grdp b/www/iridium/files/patch-chrome_app_settings__strings.grdp index ddc622d84b04..65ba4004d650 100644 --- a/www/iridium/files/patch-chrome_app_settings__strings.grdp +++ b/www/iridium/files/patch-chrome_app_settings__strings.grdp @@ -1,16 +1,16 @@ ---- chrome/app/settings_strings.grdp.orig 2025-09-11 13:19:19 UTC +--- chrome/app/settings_strings.grdp.orig 2025-12-10 15:04:57 UTC +++ chrome/app/settings_strings.grdp -@@ -240,11 +240,9 @@ +@@ -237,11 +237,9 @@ Reset to default - - + Reset to default theme - - + Customize your toolbar diff --git a/www/iridium/files/patch-chrome_browser_BUILD.gn b/www/iridium/files/patch-chrome_browser_BUILD.gn index 166ce4c762a9..01e9b0fb552b 100644 --- a/www/iridium/files/patch-chrome_browser_BUILD.gn +++ b/www/iridium/files/patch-chrome_browser_BUILD.gn @@ -1,16 +1,16 @@ ---- chrome/browser/BUILD.gn.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/BUILD.gn -@@ -7144,6 +7144,13 @@ static_library("browser") { +@@ -7142,6 +7142,13 @@ static_library("browser") { [ "//third_party/webrtc/modules/desktop_capture:pipewire_config" ] } + if (is_bsd) { + sources -= [ + "metrics/bluetooth_metrics_provider.cc", + "metrics/bluetooth_metrics_provider.h", + ] + } + if (use_dbus) { sources += [ "dbus_memory_pressure_evaluator_linux.cc", diff --git a/www/iridium/files/patch-chrome_browser_about__flags.cc b/www/iridium/files/patch-chrome_browser_about__flags.cc index 2e3906748d8d..350121dc6453 100644 --- a/www/iridium/files/patch-chrome_browser_about__flags.cc +++ b/www/iridium/files/patch-chrome_browser_about__flags.cc @@ -1,403 +1,466 @@ ---- chrome/browser/about_flags.cc.orig 2025-11-12 18:20:14 UTC +--- chrome/browser/about_flags.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/about_flags.cc -@@ -334,12 +334,12 @@ +@@ -332,12 +332,12 @@ #include "components/stylus_handwriting/win/features.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/allocator/buildflags.h" #include "ui/ozone/public/ozone_switches.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/contextual_cueing/contextual_cueing_features.h" // nogncheck #include "chrome/browser/enterprise/profile_management/profile_management_features.h" #include "chrome/browser/enterprise/webstore/features.h" -@@ -896,6 +896,26 @@ const FeatureEntry::FeatureVariation +@@ -866,6 +866,26 @@ const FeatureEntry::FeatureVariation std::size(kWebIdentityDigitalIdentityCredentialHighRiskDialogParam), nullptr}}; +#if BUILDFLAG(IS_BSD) +const FeatureEntry::FeatureParam kAudioBackendPulseAudio[] = { + { "audio-backend", "pulseaudio" }}; +const FeatureEntry::FeatureParam kAudioBackendSndio[] = { + { "audio-backend", "sndio" }}; +const FeatureEntry::FeatureParam kAudioBackendAlsa[] = { + { "audio-backend", "alsa" }}; +const FeatureEntry::FeatureVariation + kAudioBackendVariations[] = { + {"using PulseAudio by default if available", kAudioBackendPulseAudio, + std::size(kAudioBackendPulseAudio), + nullptr}, + {"using sndio by default if available", kAudioBackendSndio, + std::size(kAudioBackendSndio), + nullptr}, + {"using ALSA by default if available", kAudioBackendAlsa, + std::size(kAudioBackendAlsa), + nullptr}}; +#endif + const FeatureEntry::FeatureParam kClipboardMaximumAge60Seconds[] = { {"UIClipboardMaximumAge", "60"}}; const FeatureEntry::FeatureParam kClipboardMaximumAge90Seconds[] = { -@@ -1265,7 +1285,7 @@ const FeatureEntry::FeatureVariation kRemotePageMetada +@@ -1321,7 +1341,7 @@ const FeatureEntry::FeatureVariation kRemotePageMetada }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // A limited number of combinations of the rich autocompletion params. const FeatureEntry::FeatureParam kOmniboxRichAutocompletionAggressive1[] = { -@@ -3870,7 +3890,7 @@ const FeatureEntry::FeatureVariation +@@ -3968,7 +3988,7 @@ const FeatureEntry::FeatureVariation #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const flags_ui::FeatureEntry::FeatureParam kPwaNavigationCapturingDefaultOn[] = {{"link_capturing_state", "on_by_default"}}; const flags_ui::FeatureEntry::FeatureParam kPwaNavigationCapturingDefaultOff[] = -@@ -4130,7 +4150,7 @@ const FeatureEntry::FeatureVariation kSkiaGraphiteVari +@@ -3998,7 +4018,7 @@ const flags_ui::FeatureEntry::FeatureVariation + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || + // 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) + const FeatureEntry::Choice kReplaceSyncPromosWithSignInPromosChoices[] = { + {"Default", "", ""}, + {"Disabled", switches::kDisableFeatures, +@@ -4224,7 +4244,7 @@ const FeatureEntry::FeatureVariation kSkiaGraphiteVari std::size(kSkiaGraphite_DebugLabelsEnabled), nullptr}, }; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kTranslationAPI_SkipLanguagePackLimit[] = { {"TranslationAPIAcceptLanguagesCheck", "false"}, {"TranslationAPILimitLanguagePackCount", "false"}}; -@@ -4150,7 +4170,7 @@ const FeatureEntry::FeatureVariation kSensitiveContent +@@ -4244,7 +4264,7 @@ const FeatureEntry::FeatureVariation kSensitiveContent }; #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kContextualCueingEnabledNoEngagementCap[] = { {"BackoffTime", "0h"}, {"BackoffMultiplierBase", "0.0"}, -@@ -4899,7 +4919,7 @@ const FeatureEntry::FeatureVariation kMobilePromoOnDes +@@ -5013,7 +5033,7 @@ const FeatureEntry::FeatureVariation kMobilePromoOnDes }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - const FeatureEntry::FeatureParam kNtpEnterpriseShortcutsWithFakeData[] = { - {"use_fake_data", "true"}}; - const FeatureEntry::FeatureVariation kNtpEnterpriseShortcutsVariations[] = { -@@ -5545,7 +5565,7 @@ const FeatureEntry kFeatureEntries[] = { + const FeatureEntry::FeatureParam kNtpCustomizeChromeAutoOpenOnEveryNTP[] = { + {"max_customize_chrome_auto_shown_count", "5"}, + {"max_customize_chrome_auto_shown_session_count", "5"}}; +@@ -5149,7 +5169,7 @@ const FeatureEntry::FeatureVariation kSeamlessSigninVa + nullptr}}; + #endif // BUILDFLAG(IS_ANDROID) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + const FeatureEntry::FeatureParam kProfilePickerTextVariation1[] = { + {"profile-picker-variation", "keep-work-and-life-separate"}}; + const FeatureEntry::FeatureParam kProfilePickerTextVariation2[] = { +@@ -5728,7 +5748,7 @@ const FeatureEntry kFeatureEntries[] = { }, #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { "fluent-overlay-scrollbars", flag_descriptions::kFluentOverlayScrollbarsName, -@@ -5840,7 +5860,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6026,7 +6046,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kEnableIsolatedWebAppDevModeName, flag_descriptions::kEnableIsolatedWebAppDevModeDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kIsolatedWebAppDevMode)}, -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"enable-iwa-key-distribution-component", flag_descriptions::kEnableIwaKeyDistributionComponentName, flag_descriptions::kEnableIwaKeyDistributionComponentDescription, -@@ -6032,7 +6052,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6218,7 +6238,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(media::kUseSCContentSharingPicker)}, #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"pulseaudio-loopback-for-cast", flag_descriptions::kPulseaudioLoopbackForCastName, flag_descriptions::kPulseaudioLoopbackForCastDescription, kOsLinux, -@@ -6061,6 +6081,16 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6247,6 +6267,16 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kWaylandSessionManagementName, flag_descriptions::kWaylandSessionManagementDescription, kOsLinux, FEATURE_VALUE_TYPE(features::kWaylandSessionManagement)}, + +#if BUILDFLAG(IS_BSD) + {"audio-backend", + flag_descriptions::kAudioBackendName, + flag_descriptions::kAudioBackendDescription, kOsLinux, + FEATURE_WITH_PARAMS_VALUE_TYPE( + media::kAudioBackend, + kAudioBackendVariations, + "AudioBackend")}, +#endif #endif // BUILDFLAG(IS_LINUX) #if BUILDFLAG(ENABLE_VR) -@@ -6927,7 +6957,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7117,7 +7147,7 @@ const FeatureEntry kFeatureEntries[] = { "MlUrlScoring")}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"contextual-search-box-uses-contextual-search-provider", flag_descriptions::kContextualSearchBoxUsesContextualSearchProviderName, flag_descriptions:: -@@ -7337,7 +7367,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7531,7 +7561,7 @@ const FeatureEntry kFeatureEntries[] = { kNumSrpZpsRelatedSearches, "PowerTools")}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"history-embeddings", flag_descriptions::kHistoryEmbeddingsName, flag_descriptions::kHistoryEmbeddingsDescription, kOsDesktop, FEATURE_VALUE_TYPE(history_embeddings::kHistoryEmbeddings)}, -@@ -7815,7 +7845,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7746,7 +7776,7 @@ const FeatureEntry kFeatureEntries[] = { + "NtpRealboxNext")}, + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + {"ntp-customize-chrome-auto-open", + flag_descriptions::kNtpCustomizeChromeAutoOpenName, + flag_descriptions::kNtpCustomizeChromeAutoOpenDescription, kOsDesktop, +@@ -8025,7 +8055,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(printing::features::kAddPrinterViaPrintscanmgr)}, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"cups-ipp-printing-backend", flag_descriptions::kCupsIppPrintingBackendName, flag_descriptions::kCupsIppPrintingBackendDescription, kOsDesktop, -@@ -8777,7 +8807,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8963,7 +8993,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(media::kGlobalMediaControlsUpdatedUI)}, #endif // !BUILDFLAG(IS_CHROMEOS) -#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, -@@ -9355,7 +9385,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(ash::features::kWallpaperGooglePhotosSharedAlbums)}, - #endif // BUILDFLAG(IS_CHROMEOS) - --#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 | kOsLinux, - FEATURE_VALUE_TYPE(blink::features::kGetAllScreensMedia)}, -@@ -9380,7 +9410,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9534,7 +9564,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kGlobalVaapiLockDescription, kOsCrOS | kOsLinux, FEATURE_VALUE_TYPE(media::kGlobalVaapiLock)}, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { "ui-debug-tools", flag_descriptions::kUIDebugToolsName, -@@ -9833,7 +9863,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9991,7 +10021,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, -@@ -10023,7 +10053,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10188,7 +10218,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kReduceTransferSizeUpdatedIPCDescription, kOsAll, FEATURE_VALUE_TYPE(network::features::kReduceTransferSizeUpdatedIPC)}, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"reduce-user-agent-data-linux-platform-version", flag_descriptions::kReduceUserAgentDataLinuxPlatformVersionName, flag_descriptions::kReduceUserAgentDataLinuxPlatformVersionDescription, -@@ -10495,7 +10525,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), -@@ -10606,7 +10636,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10750,7 +10780,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kRcapsDynamicProfileCountryDescription, kOsAll, FEATURE_VALUE_TYPE(switches::kDynamicProfileCountry)}, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"enable-generic-oidc-auth-profile-management", flag_descriptions::kEnableGenericOidcAuthProfileManagementName, flag_descriptions::kEnableGenericOidcAuthProfileManagementDescription, -@@ -10627,7 +10657,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10771,7 +10801,7 @@ const FeatureEntry kFeatureEntries[] = { #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"enable-user-navigation-capturing-pwa", flag_descriptions::kPwaNavigationCapturingName, flag_descriptions::kPwaNavigationCapturingDescription, -@@ -11165,7 +11195,7 @@ const FeatureEntry kFeatureEntries[] = { - kStandardBoundSessionCredentialsFederatedSessionsVariations, - "standard-device-bound-sessions-federated-sessions")}, +@@ -11285,7 +11315,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kResponsiveIframesDescription, kOsAll, + FEATURE_VALUE_TYPE(blink::features::kResponsiveIframes)}, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"replace-sync-promos-with-sign-in-promos-desktop", flag_descriptions::kReplaceSyncPromosWithSignInPromosName, flag_descriptions::kReplaceSyncPromosWithSignInPromosDescription, -@@ -11325,7 +11355,7 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kCanvasHibernationDescription, kOsAll, - FEATURE_VALUE_TYPE(blink::features::kCanvas2DHibernation)}, - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - {"sync-enable-bookmarks-in-transport-mode", - flag_descriptions::kSyncEnableBookmarksInTransportModeName, - flag_descriptions::kSyncEnableBookmarksInTransportModeDescription, -@@ -11411,7 +11441,7 @@ const FeatureEntry kFeatureEntries[] = { - "HistoryOptInEducationalTipVariations")}, - #endif // BUILDFLAG(IS_ANDROID) - --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - {"supervised-user-local-web-approvals", - flag_descriptions::kSupervisedUserLocalWebApprovalsName, - flag_descriptions::kSupervisedUserLocalWebApprovalsDescription, -@@ -11616,7 +11646,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -11701,7 +11731,7 @@ const FeatureEntry kFeatureEntries[] = { segmentation_platform::features::kSegmentationSurveyPage)}, #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) {"autofill-enable-buy-now-pay-later", flag_descriptions::kAutofillEnableBuyNowPayLaterName, flag_descriptions::kAutofillEnableBuyNowPayLaterDescription, -@@ -11704,7 +11734,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -11772,7 +11802,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE( autofill::features::kAutofillEnableCardInfoRuntimeRetrieval)}, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"translation-api", flag_descriptions::kTranslationAPIName, flag_descriptions::kTranslationAPIDescription, kOsMac | kOsWin | kOsLinux, FEATURE_WITH_PARAMS_VALUE_TYPE(blink::features::kTranslationAPI, -@@ -11738,7 +11768,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -11798,7 +11828,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE( password_manager::features::kPasswordFormClientsideClassifier)}, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"contextual-cueing", flag_descriptions::kContextualCueingName, flag_descriptions::kContextualCueingDescription, kOsLinux | kOsMac | kOsWin, -@@ -12102,7 +12132,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -12174,7 +12204,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(ui::kUseNewEtc1Encoder)}, #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"automatic-usb-detach", flag_descriptions::kAutomaticUsbDetachName, flag_descriptions::kAutomaticUsbDetachDescription, kOsAndroid | kOsLinux, FEATURE_VALUE_TYPE(features::kAutomaticUsbDetach)}, -@@ -12138,7 +12168,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -12210,7 +12240,7 @@ const FeatureEntry kFeatureEntries[] = { #endif // !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) {"autofill-enable-amount-extraction", flag_descriptions::kAutofillEnableAmountExtractionName, flag_descriptions::kAutofillEnableAmountExtractionDescription, -@@ -12290,7 +12320,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -12355,7 +12385,7 @@ const FeatureEntry kFeatureEntries[] = { apps::chrome_app_deprecation::kAllowUserInstalledChromeApps)}, #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) {"chrome-web-store-navigation-throttle", flag_descriptions::kChromeWebStoreNavigationThrottleName, flag_descriptions::kChromeWebStoreNavigationThrottleDescription, -@@ -12319,7 +12349,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -12384,7 +12414,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(supervised_user::kSupervisedUserBlockInterstitialV3)}, #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) {"autofill-enable-amount-extraction-testing", flag_descriptions::kAutofillEnableAmountExtractionTestingName, flag_descriptions::kAutofillEnableAmountExtractionTestingDescription, -@@ -12334,7 +12364,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -12399,7 +12429,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kEnableWebAppPredictableAppUpdatingDescription, kOsAll, FEATURE_VALUE_TYPE(features::kWebAppPredictableAppUpdating)}, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"root-scrollbar-follows-browser-theme", flag_descriptions::kRootScrollbarFollowsTheme, flag_descriptions::kRootScrollbarFollowsThemeDescription, -@@ -12607,7 +12637,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -12676,7 +12706,7 @@ const FeatureEntry kFeatureEntries[] = { #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"tab-group-home", tabs::flag_descriptions::kTabGroupHomeName, tabs::flag_descriptions::kTabGroupHomeDescription, kOsDesktop, FEATURE_VALUE_TYPE(tabs::kTabGroupHome)}, -@@ -12700,7 +12730,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -12766,7 +12796,7 @@ const FeatureEntry kFeatureEntries[] = { #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"enable-site-search-allow-user-override-policy", flag_descriptions::kEnableSiteSearchAllowUserOverridePolicyName, flag_descriptions::kEnableSiteSearchAllowUserOverridePolicyDescription, -@@ -12824,7 +12854,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -12878,7 +12908,7 @@ const FeatureEntry kFeatureEntries[] = { #endif // 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) {"autofill-enable-buy-now-pay-later-for-klarna", flag_descriptions::kAutofillEnableBuyNowPayLaterForKlarnaName, flag_descriptions::kAutofillEnableBuyNowPayLaterForKlarnaDescription, -@@ -12897,7 +12927,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -12951,7 +12981,7 @@ const FeatureEntry kFeatureEntries[] = { #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) #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) {"autofill-enable-buy-now-pay-later-for-externally-linked", flag_descriptions::kAutofillEnableBuyNowPayLaterForExternallyLinkedName, flag_descriptions:: -@@ -13174,7 +13204,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -13229,7 +13259,7 @@ const FeatureEntry kFeatureEntries[] = { #endif // !BUILDFLAG(IS_ANDROID), #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"enable-ntp-enterprise-shortcuts", flag_descriptions::kEnableNtpEnterpriseShortcutsName, flag_descriptions::kEnableNtpEnterpriseShortcutsDescription, -@@ -13281,7 +13311,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -13336,7 +13366,7 @@ const FeatureEntry kFeatureEntries[] = { autofill::features::kAutofillAndPasswordsInSameSurface)}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"contextual-suggestion-ui-improvements", flag_descriptions::kContextualSuggestionsUiImprovementsName, flag_descriptions::kContextualSuggestionsUiImprovementsDescription, -@@ -13309,7 +13339,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -13364,7 +13394,7 @@ const FeatureEntry kFeatureEntries[] = { "EnableBlockCanvasReadback")}, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"autofill-enable-ai-based-amount-extraction", flag_descriptions::kAutofillEnableAiBasedAmountExtractionName, flag_descriptions::kAutofillEnableAiBasedAmountExtractionDescription, -@@ -13354,7 +13384,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -13414,7 +13444,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kCryptographyComplianceCnsa)}, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"lens-reinvocation-affordance", flag_descriptions::kLensSearchReinvocationAffordanceName, flag_descriptions::kLensSearchReinvocationAffordanceDescription, +@@ -13472,7 +13502,7 @@ const FeatureEntry kFeatureEntries[] = { + STRING_VALUE_TYPE(variations::switches::kVariationsSeedCorpus, "")}, + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + {"passkey-unlock-error-ui", flag_descriptions::kPasskeyUnlockErrorUiName, + flag_descriptions::kPasskeyUnlockErrorUiDescription, kOsDesktop, + FEATURE_VALUE_TYPE(device::kPasskeyUnlockErrorUi)}, +@@ -13509,7 +13539,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(features::kUserValueDefaultBrowserStrings)}, + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + {"read-anything-read-aloud-ts-text-segmentation", + flag_descriptions::kReadAnythingReadAloudTsTextSegmentationName, + flag_descriptions::kReadAnythingReadAloudTsTextSegmentationDescription, +@@ -13521,7 +13551,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kHandleMdmErrorsForDasherAccountsDescription, kOsAll, + FEATURE_VALUE_TYPE(switches::kHandleMdmErrorsForDasherAccounts)}, + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + {"profile-creation-decline-signin-cta-experiment", + flag_descriptions::kProfileCreationDeclineSigninCTAExperimentName, + flag_descriptions::kProfileCreationDeclineSigninCTAExperimentDescription, +@@ -13529,7 +13559,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(switches::kProfileCreationDeclineSigninCTAExperiment)}, + #endif + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + {"show-profile-picker-to-all-users-experiment", + flag_descriptions::kShowProfilePickerToAllUsersExperimentName, + flag_descriptions::kShowProfilePickerToAllUsersExperimentDescription, +@@ -13579,7 +13609,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(features::kAndroidDesktopZoomScaling)}, + #endif + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + {"profile-picker-text-variations", + flag_descriptions::kProfilePickerTextVariationsName, + flag_descriptions::kProfilePickerTextVariationsDescription, +@@ -13590,7 +13620,7 @@ const FeatureEntry kFeatureEntries[] = { + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + {"lens-overlay-optimization-filter", + flag_descriptions::kLensOverlayOptimizationFilterName, + flag_descriptions::kLensOverlayOptimizationFilterDescription, kOsDesktop, +@@ -13609,7 +13639,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(network::features::kConnectionAllowlists)}, + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + {"read-anything-with-readability-enabled", + flag_descriptions::kReadAnythingWithReadabilityName, + flag_descriptions::kReadAnythingWithReadabilityDescription, kOsDesktop, +@@ -13617,7 +13647,7 @@ const FeatureEntry kFeatureEntries[] = { + #endif + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + {"lens-overlay-non-blocking-privacy-notice", + flag_descriptions::kLensOverlayNonBlockingPrivacyNoticeName, + flag_descriptions::kLensOverlayNonBlockingPrivacyNoticeDescription, diff --git a/www/iridium/files/patch-chrome_browser_after__startup__task__utils.cc b/www/iridium/files/patch-chrome_browser_after__startup__task__utils.cc index 59843f04850c..af2532fd7fad 100644 --- a/www/iridium/files/patch-chrome_browser_after__startup__task__utils.cc +++ b/www/iridium/files/patch-chrome_browser_after__startup__task__utils.cc @@ -1,11 +1,11 @@ ---- chrome/browser/after_startup_task_utils.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/after_startup_task_utils.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/after_startup_task_utils.cc @@ -112,7 +112,7 @@ void SetBrowserStartupIsComplete() { TRACE_EVENT_SCOPE_GLOBAL, "BrowserCount", browser_count); GetStartupCompleteFlag().Set(); #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Process::Current().CreationTime() is not available on all platforms. const base::Time process_creation_time = base::Process::Current().CreationTime(); diff --git a/www/iridium/files/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc b/www/iridium/files/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc index 333c6a7b56e9..e8bb5397a848 100644 --- a/www/iridium/files/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc +++ b/www/iridium/files/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc @@ -1,11 +1,11 @@ ---- chrome/browser/apps/app_service/publishers/extension_apps.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/apps/app_service/publishers/extension_apps.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/apps/app_service/publishers/extension_apps.cc @@ -23,7 +23,7 @@ ExtensionApps::ExtensionApps(AppServiceProxy* proxy) ExtensionApps::~ExtensionApps() = default; bool ExtensionApps::Accepts(const extensions::Extension* 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 (extensions::IsExtensionUnsupportedDeprecatedApp(profile(), extension->id())) { return false; diff --git a/www/iridium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc b/www/iridium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc index 87ae41a0b256..082967f46d4b 100644 --- a/www/iridium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc +++ b/www/iridium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc @@ -1,65 +1,65 @@ ---- chrome/browser/apps/platform_apps/platform_app_launch.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/apps/platform_apps/platform_app_launch.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/apps/platform_apps/platform_app_launch.cc @@ -19,7 +19,7 @@ #include "extensions/common/constants.h" #include "extensions/common/extension.h" -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_navigator.h" #include "chrome/browser/ui/browser_window.h" @@ -86,7 +86,7 @@ bool OpenExtensionApplicationWindow(Profile* profile, if (launch_container == LaunchContainer::kLaunchContainerTab) 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) if (OpenDeprecatedApplicationPrompt(profile, app_id)) { return false; } @@ -118,7 +118,7 @@ content::WebContents* OpenExtensionApplicationTab(Prof if (launch_container != apps::LaunchContainer::kLaunchContainerTab) return nullptr; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (OpenDeprecatedApplicationPrompt(profile, app_id)) { return nullptr; } @@ -134,7 +134,7 @@ content::WebContents* OpenExtensionApplicationTab(Prof return app_tab; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool OpenDeprecatedApplicationPrompt(Profile* profile, const std::string& app_id) { if (!extensions::IsExtensionUnsupportedDeprecatedApp(profile, app_id)) @@ -170,7 +170,7 @@ bool OpenExtensionApplicationWithReenablePrompt( if (!GetPlatformApp(profile, app_id)) 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) if (OpenDeprecatedApplicationPrompt(profile, app_id)) { return false; } @@ -192,7 +192,7 @@ content::WebContents* OpenExtensionAppShortcutWindow(P ->enabled_extensions() .GetAppByURL(url); if (app) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (OpenDeprecatedApplicationPrompt(profile, app->id())) { return nullptr; } @@ -215,7 +215,7 @@ void RecordExtensionAppLaunchOnTabRestored(Profile* pr if (!extension) return; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (OpenDeprecatedApplicationPrompt(profile, extension->id())) { return; } diff --git a/www/iridium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h b/www/iridium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h index 5dfd78640e8f..c35fe8bba71a 100644 --- a/www/iridium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h +++ b/www/iridium/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 2025-05-07 06:48:23 UTC +--- chrome/browser/apps/platform_apps/platform_app_launch.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/apps/platform_apps/platform_app_launch.h @@ -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) +#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/iridium/files/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc b/www/iridium/files/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc index 5999f752bd82..7b4d413eadde 100644 --- a/www/iridium/files/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc +++ b/www/iridium/files/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc @@ -1,11 +1,11 @@ ---- chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc @@ -105,7 +105,7 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForSch return metrics::OmniboxInputType::QUERY; case ExternalProtocolHandler::UNKNOWN: { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Linux impl of GetApplicationNameForScheme doesn't distinguish // between URL schemes with handers and those without. This will // make the default behaviour be search on Linux. diff --git a/www/iridium/files/patch-chrome_browser_background_extensions_background__mode__manager.cc b/www/iridium/files/patch-chrome_browser_background_extensions_background__mode__manager.cc index 47ab1d871a96..021a2e3528df 100644 --- a/www/iridium/files/patch-chrome_browser_background_extensions_background__mode__manager.cc +++ b/www/iridium/files/patch-chrome_browser_background_extensions_background__mode__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/background/extensions/background_mode_manager.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/background/extensions/background_mode_manager.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/background/extensions/background_mode_manager.cc -@@ -879,7 +879,7 @@ gfx::ImageSkia GetStatusTrayIcon() { +@@ -877,7 +877,7 @@ gfx::ImageSkia GetStatusTrayIcon() { } return family->CreateExact(size).AsImageSkia(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( IDR_PRODUCT_LOGO_128); #elif BUILDFLAG(IS_MAC) diff --git a/www/iridium/files/patch-chrome_browser_background_extensions_background__mode__optimizer.cc b/www/iridium/files/patch-chrome_browser_background_extensions_background__mode__optimizer.cc index c3205eb42ac7..01092ca3efa5 100644 --- a/www/iridium/files/patch-chrome_browser_background_extensions_background__mode__optimizer.cc +++ b/www/iridium/files/patch-chrome_browser_background_extensions_background__mode__optimizer.cc @@ -1,11 +1,11 @@ ---- chrome/browser/background/extensions/background_mode_optimizer.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/background/extensions/background_mode_optimizer.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/background/extensions/background_mode_optimizer.cc @@ -31,7 +31,7 @@ std::unique_ptr BackgroundMod return nullptr; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(features::kBackgroundModeAllowRestart)) { // Private ctor. return base::WrapUnique(new BackgroundModeOptimizer()); diff --git a/www/iridium/files/patch-chrome_browser_background_glic_glic__status__icon.cc b/www/iridium/files/patch-chrome_browser_background_glic_glic__status__icon.cc index 9d5a4646bc85..2581a707ced1 100644 --- a/www/iridium/files/patch-chrome_browser_background_glic_glic__status__icon.cc +++ b/www/iridium/files/patch-chrome_browser_background_glic_glic__status__icon.cc @@ -1,38 +1,38 @@ ---- chrome/browser/background/glic/glic_status_icon.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/background/glic/glic_status_icon.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/background/glic/glic_status_icon.cc -@@ -89,7 +89,7 @@ GlicStatusIcon::GlicStatusIcon(GlicController* control +@@ -105,7 +105,7 @@ GlicStatusIcon::GlicStatusIcon(GlicController* control return; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Set a vector icon for proper theming on Linux. status_icon_->SetIcon( GlicVectorIconManager::GetVectorIcon(IDR_GLIC_BUTTON_VECTOR_ICON)); -@@ -144,7 +144,7 @@ GlicStatusIcon::~GlicStatusIcon() { +@@ -160,7 +160,7 @@ GlicStatusIcon::~GlicStatusIcon() { context_menu_ = nullptr; if (status_icon_) { -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) status_icon_->RemoveObserver(this); #endif std::unique_ptr removed_icon = -@@ -258,7 +258,7 @@ void GlicStatusIcon::UpdateHotkey(const ui::Accelerato +@@ -290,7 +290,7 @@ void GlicStatusIcon::UpdateHotkey(const ui::Accelerato } void GlicStatusIcon::UpdateVisibilityOfExitInContextMenu() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (context_menu_) { const bool is_visible = BrowserList::GetInstance()->empty(); const std::optional index = -@@ -322,7 +322,7 @@ std::unique_ptr GlicStatusIcon::C +@@ -368,7 +368,7 @@ std::unique_ptr GlicStatusIcon::C menu->AddItem(IDC_GLIC_STATUS_ICON_MENU_SETTINGS, l10n_util::GetStringUTF16(IDS_GLIC_STATUS_ICON_MENU_SETTINGS)); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) menu->AddSeparator(ui::NORMAL_SEPARATOR); menu->AddItem(IDC_GLIC_STATUS_ICON_MENU_EXIT, l10n_util::GetStringUTF16(IDS_GLIC_STATUS_ICON_MENU_EXIT)); diff --git a/www/iridium/files/patch-chrome_browser_browser__features.cc b/www/iridium/files/patch-chrome_browser_browser__features.cc index fd902cbeb607..f368553962d3 100644 --- a/www/iridium/files/patch-chrome_browser_browser__features.cc +++ b/www/iridium/files/patch-chrome_browser_browser__features.cc @@ -1,29 +1,29 @@ ---- chrome/browser/browser_features.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/browser_features.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/browser_features.cc @@ -70,7 +70,7 @@ BASE_FEATURE(kCertVerificationNetworkTime, base::FEATU BASE_FEATURE(kClearUserDataUponProfileDestruction, base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables usage of os_crypt_async::SecretPortalKeyProvider. Once // `kSecretPortalKeyProviderUseForEncryption` is enabled, this flag cannot be // disabled without losing data. -@@ -85,7 +85,7 @@ BASE_FEATURE(kUseFreedesktopSecretKeyProvider, +@@ -80,7 +80,7 @@ BASE_FEATURE(kDbusSecretPortal, base::FEATURE_ENABLED_ // Destroy profiles when their last browser window is closed, instead of when // the browser exits. BASE_FEATURE(kDestroyProfileOnBrowserClose, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT); #else base::FEATURE_DISABLED_BY_DEFAULT); -@@ -204,7 +204,7 @@ BASE_FEATURE(kSandboxExternalProtocolBlocked, base::FE +@@ -198,7 +198,7 @@ BASE_FEATURE(kSandboxExternalProtocolBlocked, base::FE BASE_FEATURE(kSandboxExternalProtocolBlockedWarning, base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If true, encrypt new data with the key provided by SecretPortalKeyProvider. // Otherwise, it will only decrypt existing data. BASE_FEATURE(kSecretPortalKeyProviderUseForEncryption, diff --git a/www/iridium/files/patch-chrome_browser_browser__features.h b/www/iridium/files/patch-chrome_browser_browser__features.h index 7bfe16841ddd..602280029046 100644 --- a/www/iridium/files/patch-chrome_browser_browser__features.h +++ b/www/iridium/files/patch-chrome_browser_browser__features.h @@ -1,20 +1,20 @@ ---- chrome/browser/browser_features.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/browser_features.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/browser_features.h @@ -41,7 +41,7 @@ BASE_DECLARE_FEATURE(kCertificateTransparencyAskBefore BASE_DECLARE_FEATURE(kCertVerificationNetworkTime); BASE_DECLARE_FEATURE(kClearUserDataUponProfileDestruction); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kDbusSecretPortal); - BASE_DECLARE_FEATURE(kUseFreedesktopSecretKeyProvider); #endif -@@ -92,7 +92,7 @@ BASE_DECLARE_FEATURE(kRestartNetworkServiceUnsandboxed + +@@ -89,7 +89,7 @@ BASE_DECLARE_FEATURE(kRestartNetworkServiceUnsandboxed BASE_DECLARE_FEATURE(kSandboxExternalProtocolBlocked); BASE_DECLARE_FEATURE(kSandboxExternalProtocolBlockedWarning); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kSecretPortalKeyProviderUseForEncryption); - BASE_DECLARE_FEATURE(kUseFreedesktopSecretKeyProviderForEncryption); #endif + diff --git a/www/iridium/files/patch-chrome_browser_browser__process__impl.cc b/www/iridium/files/patch-chrome_browser_browser__process__impl.cc index d98e8ecf04df..95824a7e9325 100644 --- a/www/iridium/files/patch-chrome_browser_browser__process__impl.cc +++ b/www/iridium/files/patch-chrome_browser_browser__process__impl.cc @@ -1,47 +1,47 @@ ---- chrome/browser/browser_process_impl.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/browser_process_impl.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/browser_process_impl.cc -@@ -253,7 +253,7 @@ +@@ -257,7 +257,7 @@ void OnLocalStatePrefsLoaded(); #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_features.h" - #include "components/os_crypt/async/browser/fallback_linux_key_provider.h" #include "components/os_crypt/async/browser/freedesktop_secret_key_provider.h" -@@ -265,7 +265,7 @@ - #include "chrome/browser/safe_browsing/safe_browsing_service.h" - #endif - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // How often to check if the persistent instance of Chrome needs to restart - // to install an update. - static const int kUpdateCheckIntervalHours = 6; -@@ -1167,7 +1167,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySim + #include "components/os_crypt/async/browser/secret_portal_key_provider.h" +@@ -1182,7 +1182,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySim GoogleUpdateSettings::GetCollectStatsConsent()); registry->RegisterBooleanPref(prefs::kDevToolsRemoteDebuggingAllowed, true); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) os_crypt_async::SecretPortalKeyProvider::RegisterLocalPrefs(registry); #endif } -@@ -1368,7 +1368,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { +@@ -1383,7 +1383,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { local_state()))); #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); - if (cmd_line->GetSwitchValueASCII(password_manager::kPasswordStore) != - "basic") { -@@ -1718,7 +1718,7 @@ void BrowserProcessImpl::Unpin() { + const auto password_store = + cmd_line->GetSwitchValueASCII(password_manager::kPasswordStore); +@@ -1404,7 +1404,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { + password_store, l10n_util::GetStringUTF8(IDS_PRODUCT_NAME), nullptr)); + #endif // BUILDFLAG(IS_LINUX) + +-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + // On other POSIX systems, this is the only key provider. + providers.emplace_back( + /*precedence=*/5u, std::make_unique()); +@@ -1735,7 +1735,7 @@ void BrowserProcessImpl::Unpin() { } // Mac is currently not supported. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool BrowserProcessImpl::IsRunningInBackground() const { // Check if browser is in the background. diff --git a/www/iridium/files/patch-chrome_browser_browser__process__impl.h b/www/iridium/files/patch-chrome_browser_browser__process__impl.h index 1d88cd520a1c..8d66c1838db1 100644 --- a/www/iridium/files/patch-chrome_browser_browser__process__impl.h +++ b/www/iridium/files/patch-chrome_browser_browser__process__impl.h @@ -1,11 +1,11 @@ ---- chrome/browser/browser_process_impl.h.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/browser_process_impl.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/browser_process_impl.h -@@ -414,7 +414,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -413,7 +413,7 @@ class BrowserProcessImpl : public BrowserProcess, std::unique_ptr battery_metrics_; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || 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/iridium/files/patch-chrome_browser_chrome__browser__field__trials.cc b/www/iridium/files/patch-chrome_browser_chrome__browser__field__trials.cc index 5ebf4cfa0160..0b51133f4314 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__browser__field__trials.cc +++ b/www/iridium/files/patch-chrome_browser_chrome__browser__field__trials.cc @@ -1,20 +1,20 @@ ---- chrome/browser/chrome_browser_field_trials.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/chrome_browser_field_trials.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/chrome_browser_field_trials.cc -@@ -48,7 +48,7 @@ +@@ -51,7 +51,7 @@ #include "chromeos/ash/services/multidevice_setup/public/cpp/first_run_field_trial.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/nix/xdg_util.h" #include "ui/base/ui_base_features.h" #endif // BUILDFLAG(IS_LINUX) -@@ -104,7 +104,7 @@ void ChromeBrowserFieldTrials::RegisterFeatureOverride +@@ -107,7 +107,7 @@ void ChromeBrowserFieldTrials::RegisterFeatureOverride base::FeatureList* feature_list) { variations::FeatureOverrides feature_overrides(*feature_list); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Linux/Desktop platform variants, such as ozone/wayland, some features // might need to be disabled as per OzonePlatform's runtime properties. // OzonePlatform selection and initialization, in turn, depend on Chrome flags diff --git a/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders.cc b/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders.cc index 2522b69395fe..75cd742957dd 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders.cc +++ b/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders.cc @@ -1,29 +1,29 @@ ---- chrome/browser/chrome_browser_interface_binders.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/chrome_browser_interface_binders.cc @@ -82,7 +82,7 @@ #endif // BUILDFLAG(ENABLE_UNHANDLED_TAP) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/screen_ai/screen_ai_service_router.h" #include "chrome/browser/screen_ai/screen_ai_service_router_factory.h" #include "chrome/browser/ui/web_applications/sub_apps_service_impl.h" -@@ -365,7 +365,7 @@ void BindMediaFoundationPreferences( +@@ -366,7 +366,7 @@ void BindMediaFoundationPreferences( #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) void BindScreenAIAnnotator( content::RenderFrameHost* frame_host, mojo::PendingReceiver receiver) { -@@ -544,7 +544,7 @@ void PopulateChromeFrameBinders( +@@ -545,7 +545,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 diff --git a/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders__webui.cc b/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders__webui.cc index 395edb78f58d..88cef355b168 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders__webui.cc +++ b/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders__webui.cc @@ -1,20 +1,20 @@ ---- chrome/browser/chrome_browser_interface_binders_webui.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/chrome_browser_interface_binders_webui.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/chrome_browser_interface_binders_webui.cc -@@ -36,7 +36,7 @@ +@@ -40,7 +40,7 @@ #include "mojo/public/cpp/bindings/binder_map.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/discards/discards.mojom.h" #include "chrome/browser/ui/webui/discards/discards_ui.h" #include "chrome/browser/ui/webui/discards/site_data.mojom.h" -@@ -128,7 +128,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -135,7 +135,7 @@ void PopulateChromeWebUIFrameBinders( #endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder(map); diff --git a/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders__webui__parts__desktop.cc b/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders__webui__parts__desktop.cc index 8e0a772c22fa..319561f3473c 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders__webui__parts__desktop.cc +++ b/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders__webui__parts__desktop.cc @@ -1,37 +1,37 @@ ---- chrome/browser/chrome_browser_interface_binders_webui_parts_desktop.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/chrome_browser_interface_binders_webui_parts_desktop.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/chrome_browser_interface_binders_webui_parts_desktop.cc -@@ -110,7 +110,7 @@ +@@ -117,7 +117,7 @@ #include "ui/webui/resources/js/browser_command/browser_command.mojom.h" #include "ui/webui/resources/js/tracked_element/tracked_element.mojom.h" // nogncheck crbug.com/1125897 -#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_home/app_home.mojom.h" #include "chrome/browser/ui/webui/app_home/app_home_ui.h" #include "chrome/browser/ui/webui/app_settings/web_app_settings_ui.h" -@@ -331,14 +331,14 @@ void PopulateChromeWebUIFrameBindersPartsDesktop( +@@ -335,14 +335,14 @@ void PopulateChromeWebUIFrameBindersPartsDesktop( HistoryClustersSidePanelUI, NewTabPageUI, BookmarksSidePanelUI>(map); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder(map); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) RegisterWebUIControllerInterfaceBinder< browser_command::mojom::CommandHandlerFactory, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) WhatsNewUI, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) NewTabPageUI>(map); -@@ -525,7 +525,7 @@ void PopulateChromeWebUIFrameBindersPartsDesktop( - RegisterWebUIControllerInterfaceBinder< - guest_contents::mojom::GuestContentsHost, WebUIBrowserUI>(map); +@@ -548,7 +548,7 @@ void PopulateChromeWebUIFrameBindersPartsDesktop( + OmniboxPopupUI>(map); + } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< app_management::mojom::PageHandlerFactory, WebAppSettingsUI>(map); diff --git a/www/iridium/files/patch-chrome_browser_chrome__browser__main.cc b/www/iridium/files/patch-chrome_browser_chrome__browser__main.cc index 24aae69d9837..36b666138be6 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__browser__main.cc +++ b/www/iridium/files/patch-chrome_browser_chrome__browser__main.cc @@ -1,115 +1,161 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -158,7 +158,7 @@ +@@ -168,7 +168,7 @@ #endif #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "sql/database.h" #endif -@@ -184,11 +184,11 @@ +@@ -195,12 +195,12 @@ #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/first_run/upgrade_util_linux.h" + #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/headless/headless_mode_metrics.h" // nogncheck #include "chrome/browser/headless/headless_mode_util.h" // nogncheck #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h" -@@ -199,7 +199,7 @@ +@@ -211,7 +211,7 @@ #include "ui/gfx/switches.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/first_run/upgrade_util.h" #endif -@@ -272,7 +272,7 @@ +@@ -284,7 +284,7 @@ #include "chrome/browser/chrome_process_singleton.h" #include "chrome/browser/ui/startup/startup_browser_creator.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/nix/xdg_util.h" #endif #endif // BUILDFLAG(ENABLE_PROCESS_SINGLETON) -@@ -295,7 +295,7 @@ +@@ -317,7 +317,7 @@ + #include "chrome/browser/chrome_browser_main_mac.h" + #elif BUILDFLAG(IS_CHROMEOS) + #include "chrome/browser/ash/main_parts/chrome_browser_main_parts_ash.h" +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/browser/chrome_browser_main_linux.h" + #elif BUILDFLAG(IS_ANDROID) + #include "chrome/browser/chrome_browser_main_android.h" +@@ -325,7 +325,7 @@ + #include "chrome/browser/chrome_browser_main_posix.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" +@@ -334,7 +334,7 @@ namespace { + #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) constexpr base::FilePath::CharType kMediaHistoryDatabaseName[] = FILE_PATH_LITERAL("Media History"); -@@ -444,7 +444,7 @@ void ProcessSingletonNotificationCallbackImpl( +@@ -483,7 +483,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. -@@ -1005,7 +1005,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -549,7 +549,7 @@ bool ProcessSingletonNotificationCallback( + + // Drop the request if headless mode is in effect or the request is from + // a headless Chrome process. +-#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() || + command_line.HasSwitch(switches::kHeadless)) { + return false; +@@ -715,7 +715,7 @@ std::unique_ptr ChromeBrows + #elif BUILDFLAG(IS_CHROMEOS) + main_parts = std::make_unique( + is_integration_test, startup_data); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + main_parts = std::make_unique( + is_integration_test, startup_data); + #elif BUILDFLAG(IS_ANDROID) +@@ -745,7 +745,7 @@ std::unique_ptr ChromeBrows + // Construct additional browser parts. Stages are called in the order in + // which they are added. + #if defined(TOOLKIT_VIEWS) +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + main_parts->AddParts( + std::make_unique()); + #else +@@ -762,7 +762,7 @@ std::unique_ptr ChromeBrows + 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()); +@@ -1220,7 +1220,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { #if BUILDFLAG(ENABLE_EXTENSIONS_CORE) && \ (BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_ANDROID)) -+ BUILDFLAG(IS_ANDROID)) || BUILDFLAG(IS_BSD) ++ BUILDFLAG(IS_ANDROID) || 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 . -@@ -1049,7 +1049,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1264,7 +1264,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) metrics::DesktopSessionDurationTracker::Initialize(); ProfileActivityMetricsRecorder::Initialize(); TouchUIControllerStatsTracker::Initialize( -@@ -1274,7 +1274,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1478,7 +1478,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Delete the media history database if it still exists. // TODO(crbug.com/40177301): Remove this. base::ThreadPool::PostTask( -@@ -1325,7 +1325,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1529,7 +1529,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* *UrlLanguageHistogramFactory::GetForBrowserContext(profile)); #endif -#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::ReportHeadlessActionMetrics(); } -@@ -1434,7 +1434,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl( +@@ -1638,7 +1638,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_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode()) { headless::HeadlessSelectFileDialogFactory::SetUp(); } -@@ -2005,7 +2005,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_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - if (headless::IsHeadlessMode() || - command_line.HasSwitch(switches::kHeadless)) { - return false; diff --git a/www/iridium/files/patch-chrome_browser_chrome__browser__main__extra__parts__ozone.cc b/www/iridium/files/patch-chrome_browser_chrome__browser__main__extra__parts__ozone.cc index f4a5a65ac119..4ac5a0c8b750 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__browser__main__extra__parts__ozone.cc +++ b/www/iridium/files/patch-chrome_browser_chrome__browser__main__extra__parts__ozone.cc @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_browser_main_extra_parts_ozone.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/chrome_browser_main_extra_parts_ozone.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/chrome_browser_main_extra_parts_ozone.cc @@ -28,7 +28,7 @@ void ChromeBrowserMainExtraPartsOzone::PostCreateMainM } void ChromeBrowserMainExtraPartsOzone::PostMainMessageLoopRun() { -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) ui::OzonePlatform::GetInstance()->PostMainMessageLoopRun(); #endif } diff --git a/www/iridium/files/patch-chrome_browser_chrome__browser__main__linux.cc b/www/iridium/files/patch-chrome_browser_chrome__browser__main__linux.cc index 124a0b57e338..5cccd58aa5fc 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__browser__main__linux.cc +++ b/www/iridium/files/patch-chrome_browser_chrome__browser__main__linux.cc @@ -1,40 +1,40 @@ ---- chrome/browser/chrome_browser_main_linux.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/chrome_browser_main_linux.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/chrome_browser_main_linux.cc @@ -23,7 +23,7 @@ #include "device/bluetooth/dbus/bluez_dbus_manager.h" #include "ui/base/l10n/l10n_util.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "components/dbus/thread_linux/dbus_thread_linux.h" #include "ui/ozone/public/ozone_platform.h" #endif @@ -65,8 +65,10 @@ void ChromeBrowserMainPartsLinux::PostCreateMainMessag #endif // BUILDFLAG(IS_CHROMEOS) #if !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_BSD) bluez::BluezDBusManager::Initialize( dbus_thread_linux::GetSharedSystemBus().get()); +#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 @@ -92,7 +94,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(); @@ -130,7 +132,7 @@ void ChromeBrowserMainPartsLinux::PostBrowserStart() { #endif // BUILDFLAG(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/iridium/files/patch-chrome_browser_chrome__browser__main__linux.h b/www/iridium/files/patch-chrome_browser_chrome__browser__main__linux.h index 07c580860fd4..3c3b1865dff5 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__browser__main__linux.h +++ b/www/iridium/files/patch-chrome_browser_chrome__browser__main__linux.h @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_browser_main_linux.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/chrome_browser_main_linux.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/chrome_browser_main_linux.h @@ -31,7 +31,7 @@ class ChromeBrowserMainPartsLinux : public ChromeBrows // ChromeBrowserMainPartsPosix overrides. void PostCreateMainMessageLoop() override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void PostMainMessageLoopRun() override; #endif void PreProfileInit() override; diff --git a/www/iridium/files/patch-chrome_browser_chrome__browser__main__posix.cc b/www/iridium/files/patch-chrome_browser_chrome__browser__main__posix.cc index e1e159fa1010..23ac278ea188 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__browser__main__posix.cc +++ b/www/iridium/files/patch-chrome_browser_chrome__browser__main__posix.cc @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_browser_main_posix.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/chrome_browser_main_posix.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/chrome_browser_main_posix.cc @@ -77,7 +77,7 @@ void ExitHandler::ExitWhenPossibleOnUIThread(int signa // ExitHandler takes care of deleting itself. new ExitHandler(); } else { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) switch (signal) { case SIGINT: case SIGHUP: diff --git a/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc b/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc index 23047fa87aad..998c371cc951 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc +++ b/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc @@ -1,225 +1,174 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -479,7 +479,7 @@ - #include "components/user_manager/user_manager.h" - #include "services/service_manager/public/mojom/interface_provider_spec.mojom.h" - #include "storage/browser/file_system/external_mount_points.h" --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || 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) -@@ -577,7 +577,7 @@ +@@ -574,7 +574,7 @@ #include "third_party/cros_system_api/switches/chrome_switches.h" #endif // BUILDFLAG(IS_CHROMEOS) -#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 -@@ -587,12 +587,12 @@ - #include "components/crash/content/browser/crash_handler_host_linux.h" - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - #include "chrome/browser/enterprise/chrome_browser_main_extra_parts_enterprise.h" +@@ -585,7 +585,7 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/webapps/isolated_web_apps/scheme.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) -@@ -601,7 +601,7 @@ - #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.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" -@@ -1426,7 +1426,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre +@@ -1406,7 +1406,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre registry->RegisterBooleanPref(prefs::kDataURLWhitespacePreservationEnabled, true); registry->RegisterBooleanPref(prefs::kEnableUnsafeSwiftShader, false); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOutOfProcessSystemDnsResolutionEnabled, true); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) -@@ -1649,7 +1649,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo - #elif BUILDFLAG(IS_CHROMEOS) - main_parts = std::make_unique( - is_integration_test, &startup_data_); --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - main_parts = std::make_unique( - is_integration_test, &startup_data_); - #elif BUILDFLAG(IS_ANDROID) -@@ -1680,7 +1680,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo - // Construct additional browser parts. Stages are called in the order in - // which they are added. - #if defined(TOOLKIT_VIEWS) --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - main_parts->AddParts( - std::make_unique()); - #else -@@ -1697,7 +1697,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()); -@@ -1716,7 +1716,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo - - chrome::AddMetricsExtraParts(main_parts.get()); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - main_parts->AddParts( - std::make_unique< - enterprise_util::ChromeBrowserMainExtraPartsEnterprise>()); -@@ -1789,7 +1789,7 @@ ChromeContentBrowserClient::GetStoragePartitionConfigF +@@ -1676,7 +1676,7 @@ ChromeContentBrowserClient::GetStoragePartitionConfigF #if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (content::SiteIsolationPolicy::ShouldUrlUseApplicationIsolationLevel( browser_context, site)) { CHECK(url::Origin::Create(site).scheme() == webapps::kIsolatedAppScheme); -@@ -2663,7 +2663,7 @@ bool ChromeContentBrowserClient::ShouldUrlUseApplicati +@@ -2550,7 +2550,7 @@ bool ChromeContentBrowserClient::ShouldUrlUseApplicati const GURL& url) { #if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!content::AreIsolatedWebAppsEnabled(browser_context)) { return false; -@@ -2781,7 +2781,9 @@ void MaybeAppendBlinkSettingsSwitchForFieldTrial( +@@ -2674,7 +2674,9 @@ void MaybeAppendBlinkSettingsSwitchForFieldTrial( void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( base::CommandLine* command_line, int child_process_id) { -+#ifdef notyet ++#if !BUILDFLAG(IS_BSD) crash_keys::AppendStringAnnotationsCommandLineSwitch(command_line); +#endif #if BUILDFLAG(IS_MAC) std::unique_ptr client_info = GoogleUpdateSettings::LoadMetricsClientInfo(); -@@ -2790,7 +2792,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2683,7 +2685,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin client_info->client_id); } #elif BUILDFLAG(IS_POSIX) -#if !BUILDFLAG(IS_ANDROID) +#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) pid_t pid; if (crash_reporter::GetHandlerSocket(nullptr, &pid)) { command_line->AppendSwitchASCII( -@@ -3123,7 +3125,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -3016,7 +3018,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || 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)) { -@@ -4182,7 +4184,7 @@ GetPreferredColorScheme(const WebPreferences& web_pref +@@ -4075,7 +4077,7 @@ GetPreferredColorScheme(const WebPreferences& web_pref std::optional GetRootScrollbarThemeColor(WebContents* web_contents) { bool root_scrollbar_follows_browser_theme = false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) root_scrollbar_follows_browser_theme = base::FeatureList::IsEnabled( blink::features::kRootScrollbarFollowsBrowserTheme); #endif -@@ -5071,7 +5073,7 @@ void ChromeContentBrowserClient::GetAdditionalAllowedS +@@ -5001,7 +5003,7 @@ void ChromeContentBrowserClient::GetAdditionalAllowedS additional_allowed_schemes->push_back(content::kChromeUIScheme); additional_allowed_schemes->push_back(content::kChromeUIUntrustedScheme); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) additional_allowed_schemes->push_back(webapps::kIsolatedAppScheme); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) -@@ -5126,7 +5128,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -5056,7 +5058,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, -@@ -6002,7 +6004,7 @@ ChromeContentBrowserClient::CreateNonNetworkNavigation +@@ -5932,7 +5934,7 @@ ChromeContentBrowserClient::CreateNonNetworkNavigation } #endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (scheme == webapps::kIsolatedAppScheme) { if (content::AreIsolatedWebAppsEnabled(browser_context) && !browser_context->ShutdownStarted()) { -@@ -6028,7 +6030,7 @@ void ChromeContentBrowserClient:: +@@ -5958,7 +5960,7 @@ void ChromeContentBrowserClient:: DCHECK(factories); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (content::AreIsolatedWebAppsEnabled(browser_context) && !browser_context->ShutdownStarted()) { factories->emplace(webapps::kIsolatedAppScheme, -@@ -6057,7 +6059,7 @@ void ChromeContentBrowserClient:: +@@ -5987,7 +5989,7 @@ void ChromeContentBrowserClient:: DCHECK(factories); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (content::AreIsolatedWebAppsEnabled(browser_context) && !browser_context->ShutdownStarted()) { factories->emplace(webapps::kIsolatedAppScheme, -@@ -6332,7 +6334,7 @@ void ChromeContentBrowserClient:: +@@ -6262,7 +6264,7 @@ void ChromeContentBrowserClient:: #endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) { auto* rph = content::RenderProcessHost::FromID(render_process_id); content::BrowserContext* browser_context = rph->GetBrowserContext(); -@@ -7302,7 +7304,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS +@@ -6955,7 +6957,7 @@ bool ChromeContentBrowserClient::HandleWebUI( + } + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + + // Rewrite chrome://settings/autofill to chrome://settings/yourSavedInfo. + if (url->SchemeIs(content::kChromeUIScheme) && +@@ -7241,7 +7243,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) { -@@ -7725,7 +7727,7 @@ void ChromeContentBrowserClient:: +@@ -7680,7 +7682,7 @@ void ChromeContentBrowserClient:: GrantAdditionalRequestPrivilegesToWorkerProcess(int child_id, const GURL& script_url) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // IWA Service Workers need to be explicitly granted access to their origin // because isolated-app: isn't a web-safe scheme that can be accessed by // default. -@@ -8102,7 +8104,7 @@ ChromeContentBrowserClient::GetAlternativeErrorPageOve +@@ -8057,7 +8059,7 @@ ChromeContentBrowserClient::GetAlternativeErrorPageOve content::BrowserContext* browser_context, int32_t error_code) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (content::AreIsolatedWebAppsEnabled(browser_context) && url.SchemeIs(webapps::kIsolatedAppScheme)) { content::mojom::AlternativeErrorPageOverrideInfoPtr diff --git a/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.h b/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.h index eeab4ae0f583..9c6cd7051521 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.h +++ b/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.h @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_content_browser_client.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -570,7 +570,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -584,7 +584,7 @@ class ChromeContentBrowserClient : public content::Con const GURL& site_url) override; std::unique_ptr CreateTracingDelegate() override; bool IsSystemWideTracingEnabled() 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/iridium/files/patch-chrome_browser_chrome__content__browser__client__navigation__throttles.cc b/www/iridium/files/patch-chrome_browser_chrome__content__browser__client__navigation__throttles.cc index 604096246d94..a4170a5a3d9f 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__content__browser__client__navigation__throttles.cc +++ b/www/iridium/files/patch-chrome_browser_chrome__content__browser__client__navigation__throttles.cc @@ -1,38 +1,38 @@ ---- chrome/browser/chrome_content_browser_client_navigation_throttles.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/chrome_content_browser_client_navigation_throttles.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/chrome_content_browser_client_navigation_throttles.cc -@@ -126,7 +126,7 @@ +@@ -128,7 +128,7 @@ #include "chrome/browser/captive_portal/captive_portal_service_factory.h" #endif // BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) -#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/browser_switcher/browser_switcher_navigation_throttle.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" -@@ -409,7 +409,7 @@ void CreateAndAddChromeThrottlesForNavigation( +@@ -421,7 +421,7 @@ void CreateAndAddChromeThrottlesForNavigation( TypedNavigationUpgradeThrottle::MaybeCreateAndAdd(registry); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) WebAppSettingsNavigationThrottle::MaybeCreateAndAdd(registry); profile_management::ProfileManagementNavigationThrottle::MaybeCreateAndAdd( registry); -@@ -427,7 +427,7 @@ void CreateAndAddChromeThrottlesForNavigation( +@@ -439,7 +439,7 @@ void CreateAndAddChromeThrottlesForNavigation( #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) enterprise_connectors::DeviceTrustNavigationThrottle::MaybeCreateAndAdd( registry); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || -@@ -459,7 +459,7 @@ void CreateAndAddChromeThrottlesForNavigation( - } +@@ -478,7 +478,7 @@ void CreateAndAddChromeThrottlesForNavigation( + registry, ui_manager); #endif // BUILDFLAG(SAFE_BROWSING_AVAILABLE) -#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::BrowserSwitcherNavigationThrottle::MaybeCreateAndAdd( registry); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-chrome_browser_collaboration_messaging_messaging__backend__service__factory.cc b/www/iridium/files/patch-chrome_browser_collaboration_messaging_messaging__backend__service__factory.cc index b3df8b939c9c..7ef930a582ff 100644 --- a/www/iridium/files/patch-chrome_browser_collaboration_messaging_messaging__backend__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_collaboration_messaging_messaging__backend__service__factory.cc @@ -1,11 +1,11 @@ ---- chrome/browser/collaboration/messaging/messaging_backend_service_factory.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/collaboration/messaging/messaging_backend_service_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/collaboration/messaging/messaging_backend_service_factory.cc @@ -102,7 +102,7 @@ MessagingBackendServiceFactory::BuildServiceInstanceFo // This configuration object allows us to control platform specific behavior. MessagingBackendConfiguration configuration; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) configuration.clear_chip_on_tab_selection = false; #endif diff --git a/www/iridium/files/patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.cc b/www/iridium/files/patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.cc index 6ff5038f0528..81eaf34db1d1 100644 --- a/www/iridium/files/patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.cc +++ b/www/iridium/files/patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.cc @@ -1,20 +1,20 @@ ---- chrome/browser/component_updater/iwa_key_distribution_component_installer.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/component_updater/iwa_key_distribution_component_installer.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/component_updater/iwa_key_distribution_component_installer.cc @@ -77,7 +77,7 @@ bool IsOnDemandUpdateSupported() { namespace component_updater { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_FEATURE(kIwaKeyDistributionComponent, #if BUILDFLAG(IS_CHROMEOS) base::FEATURE_ENABLED_BY_DEFAULT @@ -101,7 +101,7 @@ bool IwaKeyDistributionComponentInstallerPolicy::IsSup // the main IWA feature. #if BUILDFLAG(IS_WIN) return base::FeatureList::IsEnabled(features::kIsolatedWebApps); -#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled(kIwaKeyDistributionComponent); #else return false; diff --git a/www/iridium/files/patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.h b/www/iridium/files/patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.h index 8d00c5d6742d..f3a10a82a206 100644 --- a/www/iridium/files/patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.h +++ b/www/iridium/files/patch-chrome_browser_component__updater_iwa__key__distribution__component__installer.h @@ -1,11 +1,11 @@ ---- chrome/browser/component_updater/iwa_key_distribution_component_installer.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/component_updater/iwa_key_distribution_component_installer.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/component_updater/iwa_key_distribution_component_installer.h @@ -27,7 +27,7 @@ class IwaKeyDistributionInfoProvider; namespace component_updater { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kIwaKeyDistributionComponent); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-chrome_browser_component__updater_registration.cc b/www/iridium/files/patch-chrome_browser_component__updater_registration.cc index 06b9e9858161..31e2b2051d2d 100644 --- a/www/iridium/files/patch-chrome_browser_component__updater_registration.cc +++ b/www/iridium/files/patch-chrome_browser_component__updater_registration.cc @@ -1,38 +1,38 @@ ---- chrome/browser/component_updater/registration.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/component_updater/registration.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/component_updater/registration.cc -@@ -94,7 +94,7 @@ +@@ -95,7 +95,7 @@ #endif // BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "components/component_updater/installer_policies/amount_extraction_heuristic_regexes_component_installer.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -@@ -107,7 +107,7 @@ +@@ -108,7 +108,7 @@ #include "chrome/browser/component_updater/lacros_component_remover.h" #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/component_updater/wasm_tts_engine_component_installer.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -245,7 +245,7 @@ void RegisterComponentsForUpdate() { +@@ -247,7 +247,7 @@ void RegisterComponentsForUpdate() { RegisterCookieReadinessListComponent(cus); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) RegisterAmountExtractionHeuristicRegexesComponent(cus); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) -@@ -257,7 +257,7 @@ void RegisterComponentsForUpdate() { +@@ -259,7 +259,7 @@ void RegisterComponentsForUpdate() { } #endif // BUIDLFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) RegisterWasmTtsEngineComponent(cus, g_browser_process->local_state()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-chrome_browser_component__updater_wasm__tts__engine__component__installer.cc b/www/iridium/files/patch-chrome_browser_component__updater_wasm__tts__engine__component__installer.cc index bb24a98bbafa..334e45b24d92 100644 --- a/www/iridium/files/patch-chrome_browser_component__updater_wasm__tts__engine__component__installer.cc +++ b/www/iridium/files/patch-chrome_browser_component__updater_wasm__tts__engine__component__installer.cc @@ -1,83 +1,83 @@ ---- chrome/browser/component_updater/wasm_tts_engine_component_installer.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/component_updater/wasm_tts_engine_component_installer.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/component_updater/wasm_tts_engine_component_installer.cc @@ -11,7 +11,7 @@ #include "components/prefs/pref_registry_simple.h" #include "content/public/browser/browser_thread.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/accessibility/embedded_a11y_extension_loader.h" #include "chrome/common/extensions/extension_constants.h" #include "ui/accessibility/accessibility_features.h" @@ -31,7 +31,7 @@ const base::FilePath::CharType kWorkletProcessorJsFile FILE_PATH_LITERAL("streaming_worklet_processor.js"); const base::FilePath::CharType kVoicesJsonFileName[] = FILE_PATH_LITERAL("voices.json"); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const base::FilePath::CharType kManifestV3FileName[] = FILE_PATH_LITERAL("wasm_tts_manifest_v3.json"); const base::FilePath::CharType kOffscreenHtmlFileName[] = @@ -51,7 +51,7 @@ constexpr std::array kWasmTtsEnginePublic const char kWasmTtsEngineManifestName[] = "WASM TTS Engine"; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class WasmTTSEngineDirectory { public: static WasmTTSEngineDirectory* Get() { @@ -108,7 +108,7 @@ WasmTtsEngineComponentInstallerPolicy::WasmTtsEngineCo // static void WasmTtsEngineComponentInstallerPolicy::RegisterPrefs( PrefRegistrySimple* registry) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterTimePref(prefs::kAccessibilityReadAnythingDateLastOpened, base::Time()); registry->RegisterBooleanPref( @@ -141,7 +141,7 @@ void WasmTtsEngineComponentInstallerPolicy::ComponentR VLOG(1) << "Component ready, version " << version.GetString() << " in " << install_dir.value(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!features::IsWasmTtsEngineAutoInstallDisabled()) { // Instead of installing the component extension as soon as it is ready, // store the install directory, so that the install can be triggered @@ -165,7 +165,7 @@ void WasmTtsEngineComponentInstallerPolicy::ComponentR // be removed the next time Chrome is restarted. void WasmTtsEngineComponentInstallerPolicy::MaybeReinstallTtsEngine( const base::FilePath& install_dir) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const base::Time current_time = base::Time::Now(); const base::Time date_last_opened = pref_service_->GetTime(prefs::kAccessibilityReadAnythingDateLastOpened); @@ -227,7 +227,7 @@ void WasmTtsEngineComponentInstallerPolicy::MaybeReins bool WasmTtsEngineComponentInstallerPolicy::VerifyInstallation( const base::Value::Dict& /* manifest */, const base::FilePath& install_dir) const { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (features::IsWasmTtsComponentUpdaterV3Enabled()) { return base::PathExists(install_dir.Append(kManifestV3FileName)) && base::PathExists(install_dir.Append(kBindingsMainWasmFileName)) && @@ -277,7 +277,7 @@ void RegisterWasmTtsEngineComponent(ComponentUpdateSer void WasmTtsEngineComponentInstallerPolicy::GetWasmTTSEngineDirectory( base::OnceCallback callback) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) WasmTTSEngineDirectory* wasm_directory = WasmTTSEngineDirectory::Get(); wasm_directory->Get(std::move(callback)); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) @@ -285,7 +285,7 @@ void WasmTtsEngineComponentInstallerPolicy::GetWasmTTS // static bool WasmTtsEngineComponentInstallerPolicy::IsWasmTTSEngineDirectorySet() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return WasmTTSEngineDirectory::Get()->IsSet(); #else return false; diff --git a/www/iridium/files/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc b/www/iridium/files/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc index 2b59efd0517f..b6c2da5eaee3 100644 --- a/www/iridium/files/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc +++ b/www/iridium/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 2025-05-07 06:48:23 UTC +--- chrome/browser/component_updater/widevine_cdm_component_installer.cc.orig 2025-12-10 15:04:57 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" @@ -73,7 +73,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. @@ -101,7 +101,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. @@ -392,7 +392,7 @@ void WidevineCdmComponentInstallerPolicy::UpdateCdmPat return; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || 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/iridium/files/patch-chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc b/www/iridium/files/patch-chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc index 90c953d9d4b2..9f803412fbcb 100644 --- a/www/iridium/files/patch-chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc +++ b/www/iridium/files/patch-chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc @@ -1,11 +1,11 @@ ---- chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.cc @@ -68,7 +68,7 @@ void ChromeProtocolHandlerRegistryDelegate::CheckDefau // If true default protocol handlers will be removed if the OS level // registration for a protocol is no longer Chrome. bool ChromeProtocolHandlerRegistryDelegate::ShouldRemoveHandlersNotInOS() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // We don't do this on Linux as the OS registration there is not reliable, // and Chrome OS doesn't have any notion of OS registration. // TODO(benwells): When Linux support is more reliable remove this diff --git a/www/iridium/files/patch-chrome_browser_defaults.cc b/www/iridium/files/patch-chrome_browser_defaults.cc index d41af63a1a20..efe3ade4b6b6 100644 --- a/www/iridium/files/patch-chrome_browser_defaults.cc +++ b/www/iridium/files/patch-chrome_browser_defaults.cc @@ -1,11 +1,11 @@ ---- chrome/browser/defaults.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/defaults.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/defaults.cc @@ -31,7 +31,7 @@ const bool kAlwaysCreateTabbedBrowserOnSessionRestore const bool kShowHelpMenuItemIcon = false; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const bool kScrollEventChangesTab = true; #else const bool kScrollEventChangesTab = false; diff --git a/www/iridium/files/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc b/www/iridium/files/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc index ac7c7886ca3c..4af0997bf717 100644 --- a/www/iridium/files/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- chrome/browser/device_identity/device_oauth2_token_service_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/device_identity/device_oauth2_token_service_factory.cc @@ -27,7 +27,7 @@ std::unique_ptr CreatePlatform #if BUILDFLAG(IS_CHROMEOS) return std::make_unique( local_state); -#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return std::make_unique(local_state, os_crypt_async); #else diff --git a/www/iridium/files/patch-chrome_browser_devtools_devtools__window.cc b/www/iridium/files/patch-chrome_browser_devtools_devtools__window.cc deleted file mode 100644 index f45883fc466e..000000000000 --- a/www/iridium/files/patch-chrome_browser_devtools_devtools__window.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/devtools/devtools_window.cc.orig 2025-11-06 10:11:34 UTC -+++ chrome/browser/devtools/devtools_window.cc -@@ -566,7 +566,7 @@ void DevToolsWindow::RegisterProfilePrefs( - prefs::kDevToolsGoogleDeveloperProgramProfileAvailability, - /* enabled */ 0); - #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - registry->RegisterListPref(prefs::kDeveloperToolsAvailabilityAllowlist); - registry->RegisterListPref(prefs::kDeveloperToolsAvailabilityBlocklist); - #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || diff --git a/www/iridium/files/patch-chrome_browser_devtools_remote__debugging__server.cc b/www/iridium/files/patch-chrome_browser_devtools_remote__debugging__server.cc index 31d73f90fbcf..c96e0fe79c98 100644 --- a/www/iridium/files/patch-chrome_browser_devtools_remote__debugging__server.cc +++ b/www/iridium/files/patch-chrome_browser_devtools_remote__debugging__server.cc @@ -1,29 +1,29 @@ ---- chrome/browser/devtools/remote_debugging_server.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/devtools/remote_debugging_server.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/devtools/remote_debugging_server.cc @@ -42,7 +42,7 @@ namespace { bool g_tethering_enabled = 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 g_enable_default_user_data_dir_check_for_chromium_branding_for_testing = false; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) @@ -114,7 +114,7 @@ IsRemoteDebuggingAllowed(const std::optional& is return base::unexpected( RemoteDebuggingServer::NotStartedReason::kDisabledByPolicy); } -#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(GOOGLE_CHROME_BRANDING) constexpr bool default_user_data_dir_check_enabled = true; #else @@ -140,7 +140,7 @@ void RemoteDebuggingServer::EnableTetheringForDebug() g_tethering_enabled = true; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // static void RemoteDebuggingServer::EnableDefaultUserDataDirCheckForTesting() { g_enable_default_user_data_dir_check_for_chromium_branding_for_testing = true; diff --git a/www/iridium/files/patch-chrome_browser_devtools_remote__debugging__server.h b/www/iridium/files/patch-chrome_browser_devtools_remote__debugging__server.h index 8b977fb780a2..e249e3838851 100644 --- a/www/iridium/files/patch-chrome_browser_devtools_remote__debugging__server.h +++ b/www/iridium/files/patch-chrome_browser_devtools_remote__debugging__server.h @@ -1,11 +1,11 @@ ---- chrome/browser/devtools/remote_debugging_server.h.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/devtools/remote_debugging_server.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/devtools/remote_debugging_server.h @@ -33,7 +33,7 @@ class RemoteDebuggingServer { static void EnableTetheringForDebug(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables the default user data dir check even for non-Chrome branded builds, // for testing. static void EnableDefaultUserDataDirCheckForTesting(); diff --git a/www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.h b/www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.h index 048bd0e82800..852b5239cd21 100644 --- a/www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.h +++ b/www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.h @@ -1,11 +1,11 @@ ---- chrome/browser/diagnostics/diagnostics_writer.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/diagnostics/diagnostics_writer.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/diagnostics/diagnostics_writer.h @@ -16,6 +16,8 @@ namespace diagnostics { // Console base class used internally. class SimpleConsole; +#undef MACHINE + class DiagnosticsWriter : public DiagnosticsModel::Observer { public: // The type of formatting done by this writer. diff --git a/www/iridium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc b/www/iridium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc index 9bee463bd5a9..29522c9e99d6 100644 --- a/www/iridium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc +++ b/www/iridium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc @@ -1,29 +1,29 @@ ---- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1948,7 +1948,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -2018,7 +2018,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(); } -@@ -2084,7 +2084,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow +@@ -2154,7 +2154,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()) { -@@ -2166,7 +2166,7 @@ void ChromeDownloadManagerDelegate::CheckSavePackageAl +@@ -2232,7 +2232,7 @@ void ChromeDownloadManagerDelegate::CheckSavePackageAl DCHECK(download_item->IsSavePackageDownload()); #if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC)) && \ + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) && \ BUILDFLAG(SAFE_BROWSING_AVAILABLE) std::optional settings = safe_browsing::ShouldUploadBinaryForDeepScanning(download_item); diff --git a/www/iridium/files/patch-chrome_browser_download_download__commands.cc b/www/iridium/files/patch-chrome_browser_download_download__commands.cc index 7fbdaeca575d..2318148e92e4 100644 --- a/www/iridium/files/patch-chrome_browser_download_download__commands.cc +++ b/www/iridium/files/patch-chrome_browser_download_download__commands.cc @@ -1,20 +1,20 @@ ---- chrome/browser/download/download_commands.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/download/download_commands.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/download/download_commands.cc @@ -27,7 +27,7 @@ #include "ui/base/clipboard/scoped_clipboard_writer.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - 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" @@ -174,7 +174,7 @@ void DownloadCommands::ExecuteCommand(Command command) } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) Browser* DownloadCommands::GetBrowser() const { if (!model_) diff --git a/www/iridium/files/patch-chrome_browser_download_download__commands.h b/www/iridium/files/patch-chrome_browser_download_download__commands.h index a78c9d0a7580..fc23be8f0112 100644 --- a/www/iridium/files/patch-chrome_browser_download_download__commands.h +++ b/www/iridium/files/patch-chrome_browser_download_download__commands.h @@ -1,11 +1,11 @@ ---- chrome/browser/download/download_commands.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/download/download_commands.h.orig 2025-12-10 15:04:57 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_MAC) || BUILDFLAG(IS_BSD) bool IsDownloadPdf() const; bool CanOpenPdfInSystemViewer() const; Browser* GetBrowser() const; diff --git a/www/iridium/files/patch-chrome_browser_download_download__file__picker.cc b/www/iridium/files/patch-chrome_browser_download_download__file__picker.cc index ec77b67c4812..0fd9d9813dfc 100644 --- a/www/iridium/files/patch-chrome_browser_download_download__file__picker.cc +++ b/www/iridium/files/patch-chrome_browser_download_download__file__picker.cc @@ -1,20 +1,20 @@ ---- chrome/browser/download/download_file_picker.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/download/download_file_picker.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/download/download_file_picker.cc @@ -18,7 +18,7 @@ #include "content/public/browser/web_contents.h" #include "ui/shell_dialogs/selected_file_info.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/browser_window/public/browser_window_interface_iterator.h" #include "ui/aura/window.h" @@ -83,7 +83,7 @@ DownloadFilePicker::DownloadFilePicker(download::Downl // dialog in Linux (See SelectFileImpl() in select_file_dialog_linux_gtk.cc). // and windows.Here we make owning_window host to browser current active // window if it is null. https://crbug.com/1301898 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (!owning_window || !owning_window->GetHost()) { owning_window = GetLastActiveBrowserWindowInterfaceWithAnyProfile() ->GetWindow() diff --git a/www/iridium/files/patch-chrome_browser_download_download__item__model.cc b/www/iridium/files/patch-chrome_browser_download_download__item__model.cc index 3696ab75ea28..0cd7f9f14985 100644 --- a/www/iridium/files/patch-chrome_browser_download_download__item__model.cc +++ b/www/iridium/files/patch-chrome_browser_download_download__item__model.cc @@ -1,29 +1,29 @@ ---- chrome/browser/download/download_item_model.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/download/download_item_model.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/download/download_item_model.cc @@ -724,7 +724,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(); @@ -772,7 +772,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); @@ -1175,7 +1175,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/iridium/files/patch-chrome_browser_download_download__prefs.cc b/www/iridium/files/patch-chrome_browser_download_download__prefs.cc index 4f1f31461ba2..331ec9de56f4 100644 --- a/www/iridium/files/patch-chrome_browser_download_download__prefs.cc +++ b/www/iridium/files/patch-chrome_browser_download_download__prefs.cc @@ -1,90 +1,90 @@ ---- chrome/browser/download/download_prefs.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/download/download_prefs.cc.orig 2025-12-10 15:04:57 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" @@ -62,6 +63,10 @@ #include "components/safe_browsing/content/common/file_type_policies.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + using content::BrowserContext; using content::BrowserThread; using content::DownloadManager; @@ -75,7 +80,7 @@ namespace { // Consider downloads 'dangerous' if they go to the home directory on Linux and // to the desktop on any platform. bool DownloadPathIsDangerous(const base::FilePath& download_path) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath home_dir = base::GetHomeDir(); if (download_path == home_dir) { return true; @@ -181,7 +186,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi #endif // BUILDFLAG(IS_CHROMEOS) #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 @@ -308,7 +313,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) @@ -481,7 +486,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; @@ -507,7 +512,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(); @@ -544,7 +549,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; @@ -626,7 +631,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/iridium/files/patch-chrome_browser_download_download__prefs.h b/www/iridium/files/patch-chrome_browser_download_download__prefs.h index 1a6ebbdfac86..1465f9ba99fd 100644 --- a/www/iridium/files/patch-chrome_browser_download_download__prefs.h +++ b/www/iridium/files/patch-chrome_browser_download_download__prefs.h @@ -1,20 +1,20 @@ ---- chrome/browser/download/download_prefs.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/download/download_prefs.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/download/download_prefs.h @@ -107,7 +107,7 @@ class DownloadPrefs { void DisableAutoOpenByUserBasedOnExtension(const base::FilePath& file_name); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Store the user preference to disk. If |should_open| is true, also disable // the built-in PDF plugin. If |should_open| is false, enable the PDF plugin. void SetShouldOpenPdfInSystemReader(bool should_open); @@ -171,7 +171,7 @@ class DownloadPrefs { std::unique_ptr auto_open_allowed_by_urls_; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) bool should_open_pdf_in_system_reader_; #endif diff --git a/www/iridium/files/patch-chrome_browser_enterprise_browser__management_browser__management__service.cc b/www/iridium/files/patch-chrome_browser_enterprise_browser__management_browser__management__service.cc index 5f70fb62a412..12aef97f7899 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_browser__management_browser__management__service.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_browser__management_browser__management__service.cc @@ -1,47 +1,47 @@ ---- chrome/browser/enterprise/browser_management/browser_management_service.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/enterprise/browser_management/browser_management_service.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/browser_management/browser_management_service.cc @@ -50,7 +50,7 @@ GetManagementStatusProviders(Profile* profile) { BrowserManagementService::BrowserManagementService(Profile* profile) : ManagementService(GetManagementStatusProviders(profile)) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::SequencedTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(&BrowserManagementService::UpdateManagementIconForProfile, @@ -74,7 +74,7 @@ BrowserManagementService::BrowserManagementService(Pro } ui::ImageModel* BrowserManagementService::GetManagementIconForProfile() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return management_icon_for_profile_.IsEmpty() ? nullptr : &management_icon_for_profile_; #else @@ -83,7 +83,7 @@ ui::ImageModel* BrowserManagementService::GetManagemen } gfx::Image* BrowserManagementService::GetManagementIconForBrowser() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return management_icon_for_browser_.IsEmpty() ? nullptr : &management_icon_for_browser_; #else @@ -96,7 +96,7 @@ void BrowserManagementService::TriggerPolicyStatusChan OnPolicyStatusChanged(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void BrowserManagementService::SetBrowserManagementIconForTesting( const gfx::Image& management_icon) { CHECK_IS_TEST(); @@ -185,7 +185,7 @@ void BrowserManagementService::SetManagementIconForBro #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) void BrowserManagementService::OnPolicyStatusChanged() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) NotifyEnterpriseLabelUpdated(); #endif } diff --git a/www/iridium/files/patch-chrome_browser_enterprise_browser__management_browser__management__service.h b/www/iridium/files/patch-chrome_browser_enterprise_browser__management_browser__management__service.h index f158a9dc8fa1..480053c7cb0e 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_browser__management_browser__management__service.h +++ b/www/iridium/files/patch-chrome_browser_enterprise_browser__management_browser__management__service.h @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/browser_management/browser_management_service.h.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/enterprise/browser_management/browser_management_service.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/browser_management/browser_management_service.h @@ -41,7 +41,7 @@ class BrowserManagementService : public ManagementServ void TriggerPolicyStatusChangedForTesting() override; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void SetBrowserManagementIconForTesting( const gfx::Image& management_icon) override; #endif @@ -50,7 +50,7 @@ class BrowserManagementService : public ManagementServ // PolicyStatusProvider::Observer: void OnPolicyStatusChanged() override; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Starts listening to changes to policies that affect the enterprise label // and pill. void StartListeningToPrefChanges(Profile* profile); diff --git a/www/iridium/files/patch-chrome_browser_enterprise_chrome__browser__main__extra__parts__enterprise.cc b/www/iridium/files/patch-chrome_browser_enterprise_chrome__browser__main__extra__parts__enterprise.cc new file mode 100644 index 000000000000..788516ab20d8 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_enterprise_chrome__browser__main__extra__parts__enterprise.cc @@ -0,0 +1,20 @@ +--- chrome/browser/enterprise/chrome_browser_main_extra_parts_enterprise.cc.orig 2025-12-10 15:04:57 UTC ++++ chrome/browser/enterprise/chrome_browser_main_extra_parts_enterprise.cc +@@ -7,7 +7,7 @@ + #include "components/enterprise/buildflags/buildflags.h" + #include "content/public/browser/browser_thread.h" + +-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)) && \ ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) && \ + BUILDFLAG(ENTERPRISE_LOCAL_CONTENT_ANALYSIS) + #include "chrome/browser/enterprise/connectors/analysis/content_analysis_sdk_manager.h" // nogncheck + #include "chrome/browser/enterprise/connectors/connectors_service.h" // nogncheck +@@ -53,7 +53,7 @@ ChromeBrowserMainExtraPartsEnterprise::ChromeBrowserMa + ChromeBrowserMainExtraPartsEnterprise:: + ~ChromeBrowserMainExtraPartsEnterprise() = default; + +-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)) && \ ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) && \ + BUILDFLAG(ENTERPRISE_LOCAL_CONTENT_ANALYSIS) + void ChromeBrowserMainExtraPartsEnterprise::PostProfileInit( + Profile* profile, diff --git a/www/iridium/files/patch-chrome_browser_enterprise_chrome__browser__main__extra__parts__enterprise.h b/www/iridium/files/patch-chrome_browser_enterprise_chrome__browser__main__extra__parts__enterprise.h new file mode 100644 index 000000000000..330f0d6848a0 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_enterprise_chrome__browser__main__extra__parts__enterprise.h @@ -0,0 +1,11 @@ +--- chrome/browser/enterprise/chrome_browser_main_extra_parts_enterprise.h.orig 2025-12-10 15:04:57 UTC ++++ chrome/browser/enterprise/chrome_browser_main_extra_parts_enterprise.h +@@ -25,7 +25,7 @@ class ChromeBrowserMainExtraPartsEnterprise + ~ChromeBrowserMainExtraPartsEnterprise() override; + + // ChromeBrowserMainExtraParts: +-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)) && \ ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) && \ + BUILDFLAG(ENTERPRISE_LOCAL_CONTENT_ANALYSIS) + void PostProfileInit(Profile* profile, bool is_initial_profile) override; + #endif diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc index f0643b105cc5..6c0cfd92f92d 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- chrome/browser/enterprise/connectors/analysis/analysis_service_settings.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/connectors/analysis/analysis_service_settings.cc -@@ -192,7 +192,7 @@ void AnalysisServiceSettings::ParseVerificationSignatu +@@ -55,7 +55,7 @@ void AnalysisServiceSettings::ParseVerificationSignatu 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/iridium/files/patch-chrome_browser_enterprise_connectors_common.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_common.cc index 255b5d49c683..d95cab360adb 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_common.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_common.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/connectors/common.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/enterprise/connectors/common.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/connectors/common.cc -@@ -20,7 +20,7 @@ +@@ -19,7 +19,7 @@ #include "components/user_manager/user.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #include "components/prefs/pref_service.h" #endif -@@ -306,7 +306,7 @@ std::string GetProfileEmail(Profile* profile) { +@@ -312,7 +312,7 @@ std::string GetProfileEmail(Profile* profile) { std::string email = GetProfileEmail(IdentityManagerFactory::GetForProfile(profile)); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (email.empty()) { email = profile->GetPrefs()->GetString( enterprise_signin::prefs::kProfileUserEmail); diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc index bca7e9a29ae9..07d1c72a02e5 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc @@ -1,11 +1,11 @@ ---- chrome/browser/enterprise/connectors/connectors_service.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/enterprise/connectors/connectors_service.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/connectors/connectors_service.cc @@ -449,7 +449,7 @@ policy::PolicyScope ConnectorsService::GetPolicyScope( 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/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc index 1088f5e4dc62..69836d6ce033 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc @@ -1,29 +1,29 @@ ---- chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc @@ -10,7 +10,7 @@ #include "chrome/browser/profiles/profile.h" #include "components/keyed_service/core/keyed_service.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_process.h" #include "chrome/browser/enterprise/connectors/device_trust/browser/signing_key_policy_observer.h" #include "chrome/browser/policy/chrome_browser_policy_connector.h" @@ -40,7 +40,7 @@ DeviceTrustConnectorService* DeviceTrustConnectorServi bool DeviceTrustConnectorServiceFactory::ServiceIsCreatedWithBrowserContext() const { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return true; #else return false; @@ -84,7 +84,7 @@ DeviceTrustConnectorServiceFactory::BuildServiceInstan std::unique_ptr service = std::make_unique(profile->GetPrefs()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) auto* key_manager = g_browser_process->browser_policy_connector() ->chrome_browser_cloud_management_controller() ->GetDeviceTrustKeyManager(); diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc index 1ed5ae261310..96883cd7b94e 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc +++ b/www/iridium/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 2025-05-07 06:48:23 UTC +--- chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc @@ -22,7 +22,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" @@ -53,7 +53,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->GetCloudPolicyManager(); @@ -105,7 +105,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/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc index b507aba772b6..d5f669a552c4 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc @@ -19,7 +19,7 @@ #if BUILDFLAG(IS_WIN) #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/win_key_rotation_command.h" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/linux_key_rotation_command.h" #elif BUILDFLAG(IS_MAC) #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/mac_key_rotation_command.h" @@ -53,7 +53,7 @@ std::unique_ptr KeyRotationCommand policy::DeviceManagementService* device_management_service) { #if BUILDFLAG(IS_WIN) return std::make_unique(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return std::make_unique(url_loader_factory); #elif BUILDFLAG(IS_MAC) if (IsDTCKeyRotationUploadedBySharedAPI()) { diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc index 9682a9e73abb..9ef1581de254 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/key_persistence_delegate_factory.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/key_persistence_delegate_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/key_persistence_delegate_factory.cc @@ -13,7 +13,7 @@ #include "chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/win_key_persistence_delegate.h" #elif BUILDFLAG(IS_MAC) #include "chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/mac_key_persistence_delegate.h" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/linux_key_persistence_delegate.h" #endif @@ -45,7 +45,7 @@ KeyPersistenceDelegateFactory::CreateKeyPersistenceDel return std::make_unique(); #elif BUILDFLAG(IS_MAC) return std::make_unique(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return std::make_unique(); #else NOTREACHED(); diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc index 3cb3e67ab080..82464f88b7bd 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc @@ -23,7 +23,7 @@ #include "chrome/browser/enterprise/connectors/connectors_service.h" #endif // BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "base/check.h" #include "chrome/browser/enterprise/connectors/device_trust/signals/decorators/browser/browser_signals_decorator.h" #include "chrome/browser/enterprise/core/dependency_factory_impl.h" @@ -63,7 +63,7 @@ std::unique_ptr CreateSignalsService(P profile, ConnectorsServiceFactory::GetForBrowserContext(profile)))); #endif // BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) policy::CloudPolicyManager* browser_policy_manager = nullptr; if (management_service->HasManagementAuthority( diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc index 0402cfdfefe5..7b62fae31648 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc +++ b/www/iridium/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 2025-05-07 06:48:23 UTC +--- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc @@ -13,7 +13,7 @@ namespace enterprise_connectors { BrowserCrashEventRouter::BrowserCrashEventRouter( content::BrowserContext* context) { -#if !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) CrashReportingContext* crash_reporting_context = CrashReportingContext::GetInstance(); Profile* profile = Profile::FromBrowserContext(context); @@ -23,7 +23,7 @@ BrowserCrashEventRouter::BrowserCrashEventRouter( } BrowserCrashEventRouter::~BrowserCrashEventRouter() { -#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/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.cc index 568d3db6c9e7..4cad5eef8797 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.cc +++ b/www/iridium/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 2025-09-11 13:19:19 UTC +--- chrome/browser/enterprise/connectors/reporting/crash_reporting_context.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/connectors/reporting/crash_reporting_context.cc @@ -29,7 +29,7 @@ namespace enterprise_connectors { -#if !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) namespace { diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc index b1d970069514..1b00fb5ec891 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc @@ -1,47 +1,47 @@ ---- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc @@ -53,7 +53,7 @@ #include "base/strings/utf_string_conversions.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h" #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #include "components/device_signals/core/browser/signals_aggregator.h" @@ -62,7 +62,7 @@ namespace enterprise_connectors { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) using Event = ::chrome::cros::reporting::proto::Event; #endif @@ -162,7 +162,7 @@ void RealtimeReportingClient::ReportPastEvent(const st /*include_profile_user_name=*/false); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void AddCrowdstrikeSignalsToEvent( base::Value::Dict& event, @@ -283,7 +283,7 @@ std::string RealtimeReportingClient::GetProfileUserNam username_ = identity_manager_ ? GetProfileEmail(identity_manager_) : std::string(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (username_.empty()) { username_ = Profile::FromBrowserContext(context_)->GetPrefs()->GetString( enterprise_signin::prefs::kProfileUserEmail); @@ -340,7 +340,7 @@ std::string RealtimeReportingClient::GetBrowserClientI return client_id; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(notyet) void RealtimeReportingClient::MaybeCollectDeviceSignalsAndReportEvent( Event event, policy::CloudPolicyClient* client, diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.h b/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.h index 2fdd3c249445..17a5dc2be9bc 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.h +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.h @@ -1,29 +1,29 @@ ---- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.h.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.h @@ -19,7 +19,7 @@ #include "components/keyed_service/core/keyed_service.h" #include "components/policy/core/common/cloud/cloud_policy_client.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 "components/device_signals/core/browser/signals_types.h" #endif @@ -119,7 +119,7 @@ class RealtimeReportingClient : public RealtimeReporti const std::string& dm_token) override; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(notyet) // DEPRECATED: Use MaybeCollectDeviceSignalsAndReportEvent(Event, ...). void MaybeCollectDeviceSignalsAndReportEventDeprecated( base::Value::Dict event, @@ -169,7 +169,7 @@ class RealtimeReportingClient : public RealtimeReporti base::WeakPtrFactory weak_ptr_factory_{this}; }; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Populate event dict with CrowdStrike signal values. If those signals are // available in `response`, this function returns a Dict with the following // fields added: diff --git a/www/iridium/files/patch-chrome_browser_enterprise_profile__management_profile__management__navigation__throttle.cc b/www/iridium/files/patch-chrome_browser_enterprise_profile__management_profile__management__navigation__throttle.cc index 6fbd47ab732f..6a17cc175859 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_profile__management_profile__management__navigation__throttle.cc +++ b/www/iridium/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 2025-05-07 06:48:23 UTC +--- chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc @@ -67,8 +67,8 @@ base::flat_map& Ge // 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/iridium/files/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc b/www/iridium/files/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc index c7b5d73195f0..7ce12c3b0f9a 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/remote_commands/cbcm_remote_commands_factory.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/enterprise/remote_commands/cbcm_remote_commands_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/remote_commands/cbcm_remote_commands_factory.cc @@ -11,7 +11,7 @@ #include "chrome/browser/profiles/profile_manager.h" #include "components/policy/core/common/remote_commands/remote_command_job.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/enterprise/remote_commands/rotate_attestation_credential_job.h" #include "chrome/browser/policy/chrome_browser_policy_connector.h" #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" @@ -30,7 +30,7 @@ CBCMRemoteCommandsFactory::BuildJobForType( g_browser_process->profile_manager()); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (type == enterprise_management:: RemoteCommand_Type_BROWSER_ROTATE_ATTESTATION_CREDENTIAL) { return std::make_unique( diff --git a/www/iridium/files/patch-chrome_browser_enterprise_signals_context__info__fetcher.cc b/www/iridium/files/patch-chrome_browser_enterprise_signals_context__info__fetcher.cc index c06231006954..4888c0d0adae 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_signals_context__info__fetcher.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_signals_context__info__fetcher.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/signals/context_info_fetcher.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/enterprise/signals/context_info_fetcher.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/signals/context_info_fetcher.cc -@@ -182,6 +182,8 @@ std::vector ContextInfoFetcher::GetOnSecu +@@ -183,6 +183,8 @@ std::vector ContextInfoFetcher::GetOnSecu SettingValue ContextInfoFetcher::GetOSFirewall() { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) return device_signals::GetOSFirewall(); +#elif BUILDFLAG(IS_OPENBSD) + return SettingValue::ENABLED; #elif BUILDFLAG(IS_CHROMEOS) return GetChromeosFirewall(); #else -@@ -201,7 +203,7 @@ ScopedUfwConfigPathForTesting::~ScopedUfwConfigPathFor +@@ -202,7 +204,7 @@ ScopedUfwConfigPathForTesting::~ScopedUfwConfigPathFor #endif // BUILDFLAG(IS_LINUX) std::vector ContextInfoFetcher::GetDnsServers() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return device_signals::GetSystemDnsServers(); #else return std::vector(); diff --git a/www/iridium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc b/www/iridium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc index d9ab03e2a427..e6605832de45 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/signals/device_info_fetcher.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/enterprise/signals/device_info_fetcher.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/signals/device_info_fetcher.cc @@ -10,7 +10,7 @@ #include "chrome/browser/enterprise/signals/device_info_fetcher_mac.h" #elif BUILDFLAG(IS_WIN) #include "chrome/browser/enterprise/signals/device_info_fetcher_win.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/signals/device_info_fetcher_linux.h" #endif @@ -76,7 +76,7 @@ std::unique_ptr DeviceInfoFetcher:: return CreateInstanceInternal(); } -#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN) && \ +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_BSD) && \ !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) // static std::unique_ptr DeviceInfoFetcher::CreateInstanceInternal() { diff --git a/www/iridium/files/patch-chrome_browser_enterprise_signals_signals__aggregator__factory.cc b/www/iridium/files/patch-chrome_browser_enterprise_signals_signals__aggregator__factory.cc index 59df417bb1b6..461b39ad928a 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_signals_signals__aggregator__factory.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_signals_signals__aggregator__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/signals/signals_aggregator_factory.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/enterprise/signals/signals_aggregator_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/signals/signals_aggregator_factory.cc @@ -49,7 +49,7 @@ #include "components/device_signals/core/browser/settings_client.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "components/device_signals/core/browser/agent_signals_collector.h" #include "components/device_signals/core/browser/crowdstrike_client.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) @@ -113,7 +113,7 @@ SignalsAggregatorFactory::BuildServiceInstanceForBrows service_host)); #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) collectors.push_back(std::make_unique( device_signals::CrowdStrikeClient::Create())); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-chrome_browser_enterprise_signin_enterprise__signin__service.h b/www/iridium/files/patch-chrome_browser_enterprise_signin_enterprise__signin__service.h index aede766546d4..946540d46b8f 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_signin_enterprise__signin__service.h +++ b/www/iridium/files/patch-chrome_browser_enterprise_signin_enterprise__signin__service.h @@ -1,11 +1,11 @@ ---- chrome/browser/enterprise/signin/enterprise_signin_service.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/enterprise/signin/enterprise_signin_service.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/signin/enterprise_signin_service.h @@ -9,7 +9,7 @@ #include "build/build_config.h" -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) #error EnterpriseSigninService should only be built on desktop platforms. #endif // !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)) diff --git a/www/iridium/files/patch-chrome_browser_enterprise_signin_interstitials_managed__profile__required__page.cc b/www/iridium/files/patch-chrome_browser_enterprise_signin_interstitials_managed__profile__required__page.cc index fc512e1a7223..c95817e9ea12 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_signin_interstitials_managed__profile__required__page.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_signin_interstitials_managed__profile__required__page.cc @@ -1,11 +1,11 @@ ---- chrome/browser/enterprise/signin/interstitials/managed_profile_required_page.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/enterprise/signin/interstitials/managed_profile_required_page.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/signin/interstitials/managed_profile_required_page.cc @@ -95,7 +95,7 @@ void ManagedProfileRequiredPage::CommandReceived(const switch (cmd) { case security_interstitials::CMD_DONT_PROCEED: -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (ManagedProfileRequiredNavigationThrottle::IsBlockingNavigations( web_contents()->GetBrowserContext())) { ManagedProfileRequiredNavigationThrottle::ShowBlockedWindow( diff --git a/www/iridium/files/patch-chrome_browser_enterprise_util_managed__browser__utils.cc b/www/iridium/files/patch-chrome_browser_enterprise_util_managed__browser__utils.cc index e193d546918a..ae03ec46eaea 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_util_managed__browser__utils.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_util_managed__browser__utils.cc @@ -1,38 +1,38 @@ ---- chrome/browser/enterprise/util/managed_browser_utils.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/enterprise/util/managed_browser_utils.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/enterprise/util/managed_browser_utils.cc -@@ -300,7 +300,7 @@ void SetUserAcceptedAccountManagement(Profile* profile +@@ -302,7 +302,7 @@ void SetUserAcceptedAccountManagement(Profile* profile // The updated consent screen also ask the user for consent to share device // signals. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) profile->GetPrefs()->SetBoolean( device_signals::prefs::kDeviceSignalsPermanentConsentReceived, accepted); #endif -@@ -309,7 +309,7 @@ void SetUserAcceptedAccountManagement(Profile* profile +@@ -311,7 +311,7 @@ void SetUserAcceptedAccountManagement(Profile* profile profile_manager->GetProfileAttributesStorage() .GetProfileAttributesWithPath(profile->GetPath()); if (entry) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) SetEnterpriseProfileLabel(profile); #endif entry->SetUserAcceptedAccountManagement(accepted); -@@ -408,7 +408,7 @@ bool CanShowEnterpriseProfileUI(Profile* profile) { +@@ -410,7 +410,7 @@ bool CanShowEnterpriseProfileUI(Profile* profile) { } bool CanShowEnterpriseBadgingForNTPFooter(Profile* profile) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BrowserManagementNoticeState management_notice_state = GetManagementNoticeStateForNTPFooter(profile); switch (management_notice_state) { -@@ -426,7 +426,7 @@ bool CanShowEnterpriseBadgingForNTPFooter(Profile* pro +@@ -428,7 +428,7 @@ bool CanShowEnterpriseBadgingForNTPFooter(Profile* pro BrowserManagementNoticeState GetManagementNoticeStateForNTPFooter( Profile* profile) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - if (!policy::ManagementServiceFactory::GetForProfile(profile) - ->IsBrowserManaged() || - !g_browser_process->local_state()->GetBoolean( + auto* management_service = + policy::ManagementServiceFactory::GetForProfile(profile); + if (!management_service->IsBrowserManaged() || diff --git a/www/iridium/files/patch-chrome_browser_extensions_BUILD.gn b/www/iridium/files/patch-chrome_browser_extensions_BUILD.gn index b04251dd698b..7eaee99486de 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_BUILD.gn +++ b/www/iridium/files/patch-chrome_browser_extensions_BUILD.gn @@ -1,13 +1,13 @@ ---- chrome/browser/extensions/BUILD.gn.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1518,6 +1518,10 @@ source_set("extensions") { +@@ -1516,6 +1516,10 @@ source_set("extensions") { deps += [ "//chrome/services/printing/public/mojom" ] } + if (is_bsd) { + sources -= [ "api/image_writer_private/removable_storage_provider_linux.cc" ] + } + if (enable_pdf) { deps += [ "//chrome/browser/pdf", diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc index 12fc2fbee5b2..80a4bf5d2617 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc @@ -1,29 +1,29 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc.orig 2025-06-19 07:37:57 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc @@ -24,7 +24,7 @@ #include "base/win/registry.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/environment.h" #include "base/nix/xdg_util.h" #endif @@ -264,7 +264,7 @@ base::FilePath GetEndpointVerificationDir() { bool got_path = false; #if BUILDFLAG(IS_WIN) got_path = base::PathService::Get(base::DIR_LOCAL_APP_DATA, &path); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::unique_ptr env(base::Environment::Create()); path = base::nix::GetXDGDirectory(env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir); @@ -275,7 +275,7 @@ base::FilePath GetEndpointVerificationDir() { if (!got_path) return path; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) path = path.AppendASCII("google"); #else path = path.AppendASCII("Google"); diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc index 3614ae6017a2..d7814bb918e5 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.cc @@ -8,7 +8,7 @@ #include "build/build_config.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 #include diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h index 0d32080facaf..ff4122c84436 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h +++ b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h @@ -7,7 +7,7 @@ #include "build/build_config.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 #include diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc index 94fb1b621bb6..1f1ea4e56b46 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc @@ -1,47 +1,47 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc @@ -40,7 +40,7 @@ #include "components/reporting/util/statusor.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include #include "base/strings/string_util.h" @@ -156,7 +156,7 @@ api::enterprise_reporting_private::ContextInfo ToConte } bool AllowClientCertificateReportingForUsers() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled( enterprise_signals::features::kAllowClientCertificateReportingForUsers); #else @@ -169,7 +169,7 @@ bool IsProfilePrefManaged(Profile* profile, std::strin return pref && pref->IsManaged(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) device_signals::SignalsAggregationRequest CreateAggregationRequest( device_signals::SignalName signal_name) { @@ -231,7 +231,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: // getPersistentSecret -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) EnterpriseReportingPrivateGetPersistentSecretFunction:: EnterpriseReportingPrivateGetPersistentSecretFunction() = default; @@ -671,7 +671,7 @@ void EnterpriseReportingPrivateEnqueueRecordFunction:: } #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // getFileSystemInfo diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h index b29d47f9107c..1144528cd80f 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h +++ b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h @@ -1,29 +1,29 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h @@ -20,7 +20,7 @@ #include "components/reporting/proto/synced/record.pb.h" #include "components/reporting/proto/synced/record_constants.pb.h" #include "components/reporting/util/statusor.h" -#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/time/time.h" #include "components/device_signals/core/browser/signals_types.h" #endif // BUILDFLAG(IS_CHROMEOS) @@ -56,7 +56,7 @@ class EnterpriseReportingPrivateGetDeviceIdFunction : ~EnterpriseReportingPrivateGetDeviceIdFunction() override; }; -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) class EnterpriseReportingPrivateGetPersistentSecretFunction : public ExtensionFunction { @@ -266,7 +266,7 @@ class EnterpriseReportingPrivateEnqueueRecordFunction #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class EnterpriseReportingPrivateGetFileSystemInfoFunction : public ExtensionFunction { diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc b/www/iridium/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc index 25d47e6f5433..ab4dc4349508 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc @@ -1,29 +1,29 @@ ---- chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc @@ -9,6 +9,8 @@ #include "base/task/thread_pool.h" #include "content/public/browser/browser_thread.h" +#include "base/notimplemented.h" + namespace extensions { // A device list to be returned when testing. @@ -20,6 +22,7 @@ static base::LazyInstancePostTask( FROM_HERE, @@ -33,6 +36,9 @@ void RemovableStorageProvider::GetAllDevices(DeviceLis base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}, base::BindOnce(&RemovableStorageProvider::PopulateDeviceList), std::move(callback)); +#else + NOTIMPLEMENTED(); +#endif } // static diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_messaging_launch__context__posix.cc b/www/iridium/files/patch-chrome_browser_extensions_api_messaging_launch__context__posix.cc index 609555dc8900..f82823d1c96f 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_messaging_launch__context__posix.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_api_messaging_launch__context__posix.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/messaging/launch_context_posix.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/extensions/api/messaging/launch_context_posix.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/extensions/api/messaging/launch_context_posix.cc @@ -84,7 +84,7 @@ std::optional LaunchConte options.current_directory = command_line.GetProgram().DirName(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Don't use no_new_privs mode, e.g. in case the host needs to use sudo. options.allow_new_privs = true; #endif diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc b/www/iridium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc index 9978a5c79056..b41893656d2e 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc @@ -660,7 +660,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/iridium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc b/www/iridium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc index 4d5abfef472d..087bd5cdd353 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc @@ -361,7 +361,9 @@ bool ChromeRuntimeAPIDelegate::GetPlatformInfo(Platfor } else if (os == "linux") { info->os = extensions::api::runtime::PlatformOs::kLinux; } else if (os == "openbsd") { - info->os = extensions::api::runtime::PlatformOs::kOpenbsd; + info->os = extensions::api::runtime::PlatformOs::kLinux; + } else if (os == "freebsd") { + info->os = extensions::api::runtime::PlatformOs::kLinux; } else if (os == "android") { info->os = extensions::api::runtime::PlatformOs::kAndroid; } else { diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc b/www/iridium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc index 2aaabb27304d..714d64c90a74 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc @@ -1,29 +1,29 @@ ---- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -199,7 +199,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -198,7 +198,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist (*s_allowlist)[autofill::prefs::kAutofillPaymentCardBenefits] = settings_api::PrefType::kBoolean; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) (*s_allowlist)[autofill::prefs::kAutofillBnplEnabled] = settings_api::PrefType::kBoolean; - (*s_allowlist)[autofill::prefs::kAutofillAiOptInStatus] = -@@ -219,7 +219,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist + (*s_allowlist)[autofill::prefs::kAutofillAiIdentityEntitiesEnabled] = +@@ -222,7 +222,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist (*s_allowlist)[tab_groups::prefs::kAutoPinNewTabGroups] = settings_api::PrefType::kBoolean; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kUseCustomChromeFrame] = settings_api::PrefType::kBoolean; #endif -@@ -236,7 +236,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -239,7 +239,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist (*s_allowlist)[::prefs::kPinnedActions] = settings_api::PrefType::kList; (*s_allowlist)[themes::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/iridium/files/patch-chrome_browser_extensions_api_tabs_tabs__api__non__android.cc b/www/iridium/files/patch-chrome_browser_extensions_api_tabs_tabs__api__non__android.cc index c95866801fb4..afaa9b8e0fff 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_tabs_tabs__api__non__android.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_api_tabs_tabs__api__non__android.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/tabs/tabs_api_non_android.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/extensions/api/tabs/tabs_api_non_android.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/extensions/api/tabs/tabs_api_non_android.cc -@@ -624,7 +624,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio +@@ -633,7 +633,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio // created as minimized. // TODO(crbug.com/40254339): Remove this workaround when linux is fixed. // TODO(crbug.com/40254339): Find a fix for wayland as well. -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) - if (new_window->initial_show_state() == + if (new_window->GetBrowserForMigrationOnly()->initial_show_state() == ui::mojom::WindowShowState::kMinimized) { - new_window->window()->Minimize(); + new_window->GetWindow()->Minimize(); diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc b/www/iridium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc index da44928e96ff..c059fd3d3d88 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc @@ -1,29 +1,29 @@ ---- chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc @@ -28,7 +28,7 @@ #include "extensions/browser/process_manager.h" #include "extensions/common/error_utils.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 "extensions/common/permissions/permissions_data.h" #endif @@ -41,7 +41,7 @@ namespace { bool CanEnableAudioDebugRecordingsFromExtension( const extensions::Extension* extension) { bool enabled_by_permissions = false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) if (extension) { enabled_by_permissions = extension->permissions_data()->active_permissions().HasAPIPermission( @@ -580,7 +580,7 @@ void WebrtcLoggingPrivateStartEventLoggingFunction::Fi ExtensionFunction::ResponseAction WebrtcLoggingPrivateGetLogsDirectoryFunction::Run() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Unlike other WebrtcLoggingPrivate functions that take a RequestInfo object, // this function shouldn't be called by a component extension on behalf of // some web code. It returns a DirectoryEntry for use directly in the calling diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc b/www/iridium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc index 8345b09f833e..8a07d30b046b 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- chrome/browser/extensions/api/webstore_private/webstore_private_api.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/extensions/api/webstore_private/webstore_private_api.cc @@ -937,7 +937,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/iridium/files/patch-chrome_browser_extensions_component__extensions__allowlist_allowlist.cc b/www/iridium/files/patch-chrome_browser_extensions_component__extensions__allowlist_allowlist.cc index 88f7fcd1598a..3719cde77ac1 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_component__extensions__allowlist_allowlist.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_component__extensions__allowlist_allowlist.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/component_extensions_allowlist/allowlist.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/extensions/component_extensions_allowlist/allowlist.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/extensions/component_extensions_allowlist/allowlist.cc @@ -51,7 +51,7 @@ bool IsComponentExtensionAllowlisted(const std::string #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // BUILDFLAG(IS_CHROMEOS) extension_misc::kReadingModeGDocsHelperExtensionId, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extension_misc::kTTSEngineExtensionId, extension_misc::kComponentUpdaterTTSEngineExtensionId, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) diff --git a/www/iridium/files/patch-chrome_browser_extensions_external__provider__impl.cc b/www/iridium/files/patch-chrome_browser_extensions_external__provider__impl.cc index fea52b7b9d23..f4e3438bf47a 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_external__provider__impl.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_external__provider__impl.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/external_provider_impl.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/extensions/external_provider_impl.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/extensions/external_provider_impl.cc -@@ -832,7 +832,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -836,7 +836,7 @@ void ExternalProviderImpl::CreateExternalProviders( #endif // BUILDFLAG(IS_CHROMEOS) if (!profile->GetPrefs()->GetBoolean(pref_names::kBlockExternalExtensions)) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) provider_list->push_back(std::make_unique( service, base::MakeRefCounted( -@@ -860,7 +860,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -864,7 +864,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/iridium/files/patch-chrome_browser_extensions_sync_extension__sync__service.cc b/www/iridium/files/patch-chrome_browser_extensions_sync_extension__sync__service.cc new file mode 100644 index 000000000000..82570630baa2 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_extensions_sync_extension__sync__service.cc @@ -0,0 +1,11 @@ +--- chrome/browser/extensions/sync/extension_sync_service.cc.orig 2025-12-10 15:04:57 UTC ++++ chrome/browser/extensions/sync/extension_sync_service.cc +@@ -593,7 +593,7 @@ void ExtensionSyncService::ApplySyncData( + AccountExtensionTracker::Get(profile_)->OnExtensionSyncDataReceived(id); + } + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Chrome Apps are deprecated on WML, so we do not want to sync new apps + // installed on other devices. + if (extension_sync_data.is_app()) { diff --git a/www/iridium/files/patch-chrome_browser_favicon_chrome__favicon__client.cc b/www/iridium/files/patch-chrome_browser_favicon_chrome__favicon__client.cc index 2566ec5af790..f1312e44ad98 100644 --- a/www/iridium/files/patch-chrome_browser_favicon_chrome__favicon__client.cc +++ b/www/iridium/files/patch-chrome_browser_favicon_chrome__favicon__client.cc @@ -1,20 +1,20 @@ ---- chrome/browser/favicon/chrome_favicon_client.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/favicon/chrome_favicon_client.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/favicon/chrome_favicon_client.cc @@ -15,7 +15,7 @@ #include "url/gurl.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/webapps/isolated_web_apps/scheme.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) @@ -48,7 +48,7 @@ bool ChromeFaviconClient::IsNativeApplicationURL(const #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (url.SchemeIs(webapps::kIsolatedAppScheme)) { return true; } diff --git a/www/iridium/files/patch-chrome_browser_feedback_system__logs_about__system__logs__fetcher.cc b/www/iridium/files/patch-chrome_browser_feedback_system__logs_about__system__logs__fetcher.cc index 9b47e68c415b..6bd4ab1ec920 100644 --- a/www/iridium/files/patch-chrome_browser_feedback_system__logs_about__system__logs__fetcher.cc +++ b/www/iridium/files/patch-chrome_browser_feedback_system__logs_about__system__logs__fetcher.cc @@ -1,20 +1,20 @@ ---- chrome/browser/feedback/system_logs/about_system_logs_fetcher.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/feedback/system_logs/about_system_logs_fetcher.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/feedback/system_logs/about_system_logs_fetcher.cc @@ -38,7 +38,7 @@ #include "chrome/browser/ash/system_logs/ui_hierarchy_log_source.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/feedback/system_logs/log_sources/ozone_platform_state_dump_source.h" #endif @@ -85,7 +85,7 @@ SystemLogsFetcher* BuildAboutSystemLogsFetcher(content fetcher->AddSource(std::make_unique()); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) fetcher->AddSource(std::make_unique()); #endif // BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-chrome_browser_feedback_system__logs_chrome__system__logs__fetcher.cc b/www/iridium/files/patch-chrome_browser_feedback_system__logs_chrome__system__logs__fetcher.cc index 13fea20694d1..1a935d467978 100644 --- a/www/iridium/files/patch-chrome_browser_feedback_system__logs_chrome__system__logs__fetcher.cc +++ b/www/iridium/files/patch-chrome_browser_feedback_system__logs_chrome__system__logs__fetcher.cc @@ -1,20 +1,20 @@ ---- chrome/browser/feedback/system_logs/chrome_system_logs_fetcher.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/feedback/system_logs/chrome_system_logs_fetcher.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/feedback/system_logs/chrome_system_logs_fetcher.cc @@ -45,7 +45,7 @@ #include "services/network/public/cpp/shared_url_loader_factory.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/feedback/system_logs/log_sources/ozone_platform_state_dump_source.h" #endif @@ -102,7 +102,7 @@ SystemLogsFetcher* BuildChromeSystemLogsFetcher(Profil fetcher->AddSource(std::make_unique(scrub_data)); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) fetcher->AddSource(std::make_unique()); #endif // BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc b/www/iridium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc index e7e61415615a..d556b4b20b09 100644 --- a/www/iridium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -377,7 +377,7 @@ GenerateBlockPaths(bool should_normalize_file_path) { +@@ -400,7 +400,7 @@ GenerateBlockPaths(bool should_normalize_file_path) { FILE_PATH_LITERAL("Library/Mobile Documents/com~apple~CloudDocs"), BlockType::kDontBlockChildren}, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // On Linux also block access to devices via /dev. {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), BlockType::kBlockAllChildren}, diff --git a/www/iridium/files/patch-chrome_browser_first__run_first__run__dialog.h b/www/iridium/files/patch-chrome_browser_first__run_first__run__dialog.h index c8e4df426c5c..958706c4a311 100644 --- a/www/iridium/files/patch-chrome_browser_first__run_first__run__dialog.h +++ b/www/iridium/files/patch-chrome_browser_first__run_first__run__dialog.h @@ -1,11 +1,11 @@ ---- chrome/browser/first_run/first_run_dialog.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/first_run/first_run_dialog.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/first_run/first_run_dialog.h @@ -9,7 +9,7 @@ #include "build/build_config.h" // Hide this function on platforms where the dialog does not exist. -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) namespace first_run { diff --git a/www/iridium/files/patch-chrome_browser_first__run_first__run__internal.h b/www/iridium/files/patch-chrome_browser_first__run_first__run__internal.h index 697ea7d21156..d7487d255c48 100644 --- a/www/iridium/files/patch-chrome_browser_first__run_first__run__internal.h +++ b/www/iridium/files/patch-chrome_browser_first__run_first__run__internal.h @@ -1,11 +1,11 @@ ---- chrome/browser/first_run/first_run_internal.h.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/first_run/first_run_internal.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/first_run/first_run_internal.h @@ -72,7 +72,7 @@ FirstRunState DetermineFirstRunState(bool has_sentinel bool force_first_run, bool no_first_run); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // For testing, forces the first run dialog to either be shown or not. If not // called, the decision to show the dialog or not will be made by Chrome based // on a number of factors (such as install type, whether it's a Chrome-branded diff --git a/www/iridium/files/patch-chrome_browser_first__run_first__run__internal__linux.cc b/www/iridium/files/patch-chrome_browser_first__run_first__run__internal__linux.cc index b8def59696fd..3babd57676ca 100644 --- a/www/iridium/files/patch-chrome_browser_first__run_first__run__internal__linux.cc +++ b/www/iridium/files/patch-chrome_browser_first__run_first__run__internal__linux.cc @@ -1,16 +1,16 @@ ---- chrome/browser/first_run/first_run_internal_linux.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/first_run/first_run_internal_linux.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/first_run/first_run_internal_linux.cc @@ -21,7 +21,13 @@ bool IsOrganicFirstRun() { base::FilePath InitialPrefsPath() { // The standard location of the initial prefs is next to the chrome binary. base::FilePath dir_exe; +#if BUILDFLAG(IS_OPENBSD) + dir_exe = base::FilePath("/etc/iridium"); +#elif BUILDFLAG(IS_FREEBSD) + dir_exe = base::FilePath("/usr/local/etc/iridium"); +#else dir_exe = base::FilePath("/etc/iridium-browser"); +#endif return installer::InitialPreferences::Path(dir_exe); } diff --git a/www/iridium/files/patch-chrome_browser_flag__descriptions.cc b/www/iridium/files/patch-chrome_browser_flag__descriptions.cc deleted file mode 100644 index e9c509fba28b..000000000000 --- a/www/iridium/files/patch-chrome_browser_flag__descriptions.cc +++ /dev/null @@ -1,172 +0,0 @@ ---- chrome/browser/flag_descriptions.cc.orig 2025-11-06 10:11:34 UTC -+++ chrome/browser/flag_descriptions.cc -@@ -710,7 +710,7 @@ const char kAutofillEnableAllowlistForBmoCardCategoryB - "Autofill suggestions on the allowlisted merchant websites."; - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - const char kAutofillEnableAmountExtractionName[] = - "Enable checkout amount extraction."; - const char kAutofillEnableAmountExtractionDescription[] = -@@ -726,7 +726,7 @@ const char kAutofillEnableAmountExtractionTestingDescr - // BUILDFLAG(IS_CHROMEOS) || 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) - const char kAutofillEnableBuyNowPayLaterName[] = - "Enable buy now pay later on Autofill"; - const char kAutofillEnableBuyNowPayLaterDescription[] = -@@ -1206,7 +1206,7 @@ const char kDevicePostureDescription[] = - "Enables Device Posture API (foldable devices)"; - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - const char kDocumentPictureInPictureAnimateResizeName[] = - "Document Picture-in-Picture Animate Resize"; - const char kDocumentPictureInPictureAnimateResizeDescription[] = -@@ -1330,7 +1330,7 @@ const char kContextMenuEmptySpaceDescription[] = - "space, a context menu containing page-related items will be shown."; - #endif // BUILDFLAG(IS_ANDROID) - --#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 kContextualCueingName[] = "Contextual cueing"; - const char kContextualCueingDescription[] = - "Enables the contextual cueing system to support showing actions."; -@@ -1691,7 +1691,7 @@ const char kEnableIsolatedWebAppDevModeName[] = - const char kEnableIsolatedWebAppDevModeDescription[] = - "Enables the installation of unverified Isolated Web Apps"; - --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const char kEnableIwaKeyDistributionComponentName[] = - "Enable the Iwa Key Distribution component"; - const char kEnableIwaKeyDistributionComponentDescription[] = -@@ -3660,14 +3660,14 @@ const char kReduceTransferSizeUpdatedIPCDescription[] - "When enabled, the network service will send TransferSizeUpdatedIPC IPC " - "only when DevTools is attached or the request is for an ad request."; - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const char kReduceUserAgentDataLinuxPlatformVersionName[] = - "Reduce Linux platform version Client Hint"; - const char kReduceUserAgentDataLinuxPlatformVersionDescription[] = - "Set platform version Client Hint on Linux to empty string."; - #endif // BUILDFLAG(IS_LINUX) - --#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 kReplaceSyncPromosWithSignInPromosName[] = - "Replace all sync-related UI with sign-in ones"; - const char kReplaceSyncPromosWithSignInPromosDescription[] = -@@ -3701,7 +3701,7 @@ const char kRobustWindowManagementExperimentalDescript - "switching and restoration, ensuring they never lose their work or " - "context."; - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const char kRootScrollbarFollowsTheme[] = "Make scrollbar follow theme"; - const char kRootScrollbarFollowsThemeDescription[] = - "If enabled makes the root scrollbar follow the browser's theme color."; -@@ -3950,7 +3950,7 @@ const char kDefaultSiteInstanceGroupsDescription[] = - "SiteInstance."; - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - const char kPwaNavigationCapturingName[] = "Desktop PWA Link Capturing"; - const char kPwaNavigationCapturingDescription[] = - "Enables opening links from Chrome in an installed PWA. Currently under " -@@ -4226,7 +4226,7 @@ const char kTouchTextEditingRedesignName[] = "Touch Te - const char kTouchTextEditingRedesignDescription[] = - "Enables new touch text editing features."; - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const char kTranslationAPIName[] = "Experimental translation API"; - const char kTranslationAPIDescription[] = - "Enables the on-device language translation API. " -@@ -7888,7 +7888,7 @@ const char kTetheringExperimentalFunctionalityDescript - - #endif // BUILDFLAG(IS_CHROMEOS) - --#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 " -@@ -8099,7 +8099,7 @@ const char kEnableArmHwdrmDescription[] = "Enable HW b - - // Linux ----------------------------------------------------------------------- - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - - const char kPulseaudioLoopbackForCastName[] = - "Linux System Audio Loopback for Cast (pulseaudio)"; -@@ -8131,6 +8131,17 @@ const char kWaylandSessionManagementName[] = "Wayland - const char kWaylandSessionManagementDescription[] = - "Enable Wayland's xx/xdg-session-management-v1 experimental support."; - -+#if BUILDFLAG(IS_BSD) -+const char kAudioBackendName[] = -+ "Audio Backend"; -+const char kAudioBackendDescription[] = -+#if BUILDFLAG(IS_OPENBSD) -+ "Select the desired audio backend to use. The default is sndio."; -+#elif BUILDFLAG(IS_FREEBSD) -+ "Select the desired audio backend to use. The default will automatically " -+ "enumerate through the supported backends."; -+#endif -+#endif - #endif // BUILDFLAG(IS_LINUX) - - // Random platform combinations ----------------------------------------------- -@@ -8187,7 +8198,7 @@ const char kGroupPromoPrototypeCpaDescription[] = - "Enables contextual toolbar button for group promo prototype."; - #endif // BUILDFLAG(IS_ANDROID) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - const char kEnableNetworkServiceSandboxName[] = - "Enable the network service sandbox."; - const char kEnableNetworkServiceSandboxDescription[] = -@@ -8208,7 +8219,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti - "Bluetooth"; - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) - --#if BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_PRINTING) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(ENABLE_PRINTING) - const char kCupsIppPrintingBackendName[] = "CUPS IPP Printing Backend"; - const char kCupsIppPrintingBackendDescription[] = - "Use the CUPS IPP printing backend instead of the original CUPS backend " -@@ -8355,7 +8366,7 @@ const char kElementCaptureDescription[] = - "media track into a track capturing just a specific DOM element."; - #endif // !BUILDFLAG(IS_ANDROID) - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - const char kUIDebugToolsName[] = "Debugging tools for UI"; - const char kUIDebugToolsDescription[] = - "Enables additional keyboard shortcuts to help debugging."; -@@ -8387,7 +8398,7 @@ const char kThirdPartyDisableChromeAutofillSettingsScr - "Chrome's Address and Payments Autofill are disabled in third party mode."; - #endif // IS_ANDROID - --#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 kGlicName[] = "Glic"; - const char kGlicDescription[] = "Enables glic"; - -@@ -8506,7 +8517,7 @@ const char kSupervisedUserBlockInterstitialV3Name[] = - const char kSupervisedUserBlockInterstitialV3Description[] = - "Enables URL filter interstitial V3 for Family Link users."; - --#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 kSupervisedUserLocalWebApprovalsName[] = - "Enable local web approvals feature"; - const char kSupervisedUserLocalWebApprovalsDescription[] = diff --git a/www/iridium/files/patch-chrome_browser_flag__descriptions.h b/www/iridium/files/patch-chrome_browser_flag__descriptions.h index ed47987ed825..70c837c6f9b7 100644 --- a/www/iridium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/iridium/files/patch-chrome_browser_flag__descriptions.h @@ -1,164 +1,21 @@ ---- chrome/browser/flag_descriptions.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/flag_descriptions.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/flag_descriptions.h -@@ -458,7 +458,7 @@ extern const char - kAutofillEnableAllowlistForBmoCardCategoryBenefitsDescription[]; - - #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) - extern const char kAutofillEnableAmountExtractionName[]; - extern const char kAutofillEnableAmountExtractionDescription[]; - extern const char kAutofillEnableAmountExtractionTestingName[]; -@@ -467,7 +467,7 @@ extern const char kAutofillEnableAmountExtractionTesti - // BUILDFLAG(IS_CHROMEOS) || 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) - extern const char kAutofillEnableBuyNowPayLaterName[]; - extern const char kAutofillEnableBuyNowPayLaterDescription[]; - -@@ -721,7 +721,7 @@ extern const char kContextMenuEmptySpaceName[]; - extern const char kContextMenuEmptySpaceDescription[]; - #endif // BUILDFLAG(IS_ANDROID) - --#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 kContextualCueingName[]; - extern const char kContextualCueingDescription[]; - extern const char kGlicActorName[]; -@@ -888,7 +888,7 @@ extern const char kRouteMatchingName[]; - extern const char kRouteMatchingDescription[]; - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - extern const char kDocumentPictureInPictureAnimateResizeName[]; - extern const char kDocumentPictureInPictureAnimateResizeDescription[]; - -@@ -1064,7 +1064,7 @@ extern const char kEnableIsolatedWebAppAllowlistDescri - extern const char kEnableIsolatedWebAppDevModeName[]; - extern const char kEnableIsolatedWebAppDevModeDescription[]; - --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - extern const char kEnableIwaKeyDistributionComponentName[]; - extern const char kEnableIwaKeyDistributionComponentDescription[]; - #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -2100,7 +2100,7 @@ extern const char kReduceIPAddressChangeNotificationDe - #endif // BUILDFLAG(IS_MAC) - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ -- BUILDFLAG(IS_ANDROID) -+ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - extern const char kReplaceSyncPromosWithSignInPromosName[]; - extern const char kReplaceSyncPromosWithSignInPromosDescription[]; - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || -@@ -2112,7 +2112,7 @@ extern const char kRobustWindowManagementDescription[] - extern const char kRobustWindowManagementExperimentalName[]; - extern const char kRobustWindowManagementExperimentalDescription[]; - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - extern const char kRootScrollbarFollowsTheme[]; - extern const char kRootScrollbarFollowsThemeDescription[]; - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -@@ -2254,7 +2254,7 @@ extern const char kDefaultSiteInstanceGroupsName[]; - extern const char kDefaultSiteInstanceGroupsDescription[]; - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - extern const char kPwaNavigationCapturingName[]; - extern const char kPwaNavigationCapturingDescription[]; - #endif -@@ -2434,7 +2434,7 @@ extern const char kTouchSelectionStrategyDirection[]; - extern const char kTouchTextEditingRedesignName[]; - extern const char kTouchTextEditingRedesignDescription[]; - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - extern const char kTranslationAPIName[]; - extern const char kTranslationAPIDescription[]; - -@@ -2700,7 +2700,7 @@ extern const char kReduceAcceptLanguageDescription[]; - extern const char kReduceTransferSizeUpdatedIPCName[]; - extern const char kReduceTransferSizeUpdatedIPCDescription[]; - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - extern const char kReduceUserAgentDataLinuxPlatformVersionName[]; - extern const char kReduceUserAgentDataLinuxPlatformVersionDescription[]; - #endif // #if BUILDFLAG(IS_LINUX) -@@ -4555,7 +4555,7 @@ extern const char kTetheringExperimentalFunctionalityD - - #endif // #if BUILDFLAG(IS_CHROMEOS) - --#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) -@@ -4675,7 +4675,7 @@ extern const char kEnableArmHwdrmDescription[]; - - // Linux --------------------------------------------------------------------- - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - - extern const char kPulseaudioLoopbackForCastName[]; - extern const char kPulseaudioLoopbackForCastDescription[]; -@@ -4694,6 +4694,8 @@ extern const char kWaylandPerWindowScalingDescription[ - extern const char kWaylandSessionManagementName[]; - extern const char kWaylandSessionManagementDescription[]; - -+extern const char kAudioBackendName[]; -+extern const char kAudioBackendDescription[]; - #endif // BUILDFLAG(IS_LINUX) - - // Random platform combinations ----------------------------------------------- -@@ -4708,7 +4710,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa - extern const char kWebBluetoothConfirmPairingSupportDescription[]; - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) - --#if BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_PRINTING) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(ENABLE_PRINTING) - extern const char kCupsIppPrintingBackendName[]; - extern const char kCupsIppPrintingBackendDescription[]; - #endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_PRINTING) -@@ -4735,7 +4737,7 @@ extern const char kTaskManagerDesktopRefreshName[]; - extern const char kTaskManagerDesktopRefreshDescription[]; - #endif // BUILDFLAG(IS_ANDROID) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - extern const char kEnableNetworkServiceSandboxName[]; - extern const char kEnableNetworkServiceSandboxDescription[]; - -@@ -4831,7 +4833,7 @@ extern const char kElementCaptureName[]; - extern const char kElementCaptureDescription[]; - #endif // !BUILDFLAG(IS_ANDROID) - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - extern const char kUIDebugToolsName[]; - extern const char kUIDebugToolsDescription[]; - #endif -@@ -4856,7 +4858,7 @@ extern const char kThirdPartyDisableChromeAutofillSett - extern const char kThirdPartyDisableChromeAutofillSettingsScreenDescription[]; - #endif // IS_ANDROID - --#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 kGlicName[]; - extern const char kGlicDescription[]; - -@@ -4938,7 +4940,7 @@ extern const char kSearchInSettingsDescription[]; - extern const char kSupervisedUserBlockInterstitialV3Name[]; - extern const char kSupervisedUserBlockInterstitialV3Description[]; - --#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 kSupervisedUserLocalWebApprovalsName[]; - extern const char kSupervisedUserLocalWebApprovalsDescription[]; - #endif // #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +@@ -8586,6 +8586,18 @@ inline constexpr char kHandleMdmErrorsForDasherAccount + inline constexpr char kHandleMdmErrorsForDasherAccountsDescription[] = + "Enables the mdm error handling feature for dasher accounts"; + ++#if BUILDFLAG(IS_BSD) ++inline constexpr char kAudioBackendName[] = ++ "Audio Backend"; ++inline constexpr char kAudioBackendDescription[] = ++#if BUILDFLAG(IS_OPENBSD) ++ "Select the desired audio backend to use. The default is sndio."; ++#elif BUILDFLAG(IS_FREEBSD) ++ "Select the desired audio backend to use. The default will automatically " ++ "enumerate through the supported backends."; ++#endif ++#endif ++ + // ============================================================================ + // Don't just add flags to the end, put them in the alphabetical order. + // ============================================================================ diff --git a/www/iridium/files/patch-chrome_browser_gcm_gcm__profile__service__factory.cc b/www/iridium/files/patch-chrome_browser_gcm_gcm__profile__service__factory.cc index 5554e4471944..3f76bab27b18 100644 --- a/www/iridium/files/patch-chrome_browser_gcm_gcm__profile__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_gcm_gcm__profile__service__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/gcm/gcm_profile_service_factory.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/gcm/gcm_profile_service_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/gcm/gcm_profile_service_factory.cc @@ -109,7 +109,7 @@ GCMProfileServiceFactory::ScopedTestingFactoryInstalle // static GCMProfileService* GCMProfileServiceFactory::GetForProfile( content::BrowserContext* profile) { -#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, incognito profiles are checked with IsIncognitoProfile(). // It's possible for non-incognito profiles to also be off-the-record. bool is_profile_supported = @@ -152,7 +152,7 @@ std::unique_ptr GCMProfileServiceFactory::BuildServiceInstanceForBrowserContext( content::BrowserContext* context) 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) DCHECK(!profile->IsIncognitoProfile()); #else DCHECK(!profile->IsOffTheRecord()); diff --git a/www/iridium/files/patch-chrome_browser_gcm_instance__id_instance__id__profile__service__factory.cc b/www/iridium/files/patch-chrome_browser_gcm_instance__id_instance__id__profile__service__factory.cc index 417f3c70eaca..30f1fadf2c1d 100644 --- a/www/iridium/files/patch-chrome_browser_gcm_instance__id_instance__id__profile__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_gcm_instance__id_instance__id__profile__service__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/gcm/instance_id/instance_id_profile_service_factory.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/gcm/instance_id/instance_id_profile_service_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/gcm/instance_id/instance_id_profile_service_factory.cc @@ -16,7 +16,7 @@ namespace instance_id { // static InstanceIDProfileService* InstanceIDProfileServiceFactory::GetForProfile( content::BrowserContext* profile) { -#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 @@ -65,7 +65,7 @@ std::unique_ptr InstanceIDProfileServiceFactory::BuildServiceInstanceForBrowserContext( content::BrowserContext* context) 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, incognito profiles are checked with IsIncognitoProfile(). // It's possible for non-incognito profiles to also be off-the-record. bool is_incognito = profile->IsIncognitoProfile(); diff --git a/www/iridium/files/patch-chrome_browser_glic_widget_glic__widget.cc b/www/iridium/files/patch-chrome_browser_glic_widget_glic__widget.cc index 954a32e6d53f..848b9cfee3eb 100644 --- a/www/iridium/files/patch-chrome_browser_glic_widget_glic__widget.cc +++ b/www/iridium/files/patch-chrome_browser_glic_widget_glic__widget.cc @@ -1,11 +1,20 @@ ---- chrome/browser/glic/widget/glic_widget.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/glic/widget/glic_widget.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/glic/widget/glic_widget.cc -@@ -161,7 +161,7 @@ std::unique_ptr GlicWidget::Create( - // Don't change this name. This is used by other code to identify the glic - // window. See b/404947780. - params.name = "GlicWidget"; +@@ -48,7 +48,7 @@ + #include "ui/views/win/hwnd_util.h" + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/browser/shell_integration_linux.h" + #endif + +@@ -283,7 +283,7 @@ std::unique_ptr GlicWidget::Create(views:: + #if BUILDFLAG(IS_MAC) + params.animation_enabled = true; + #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) params.wm_class_class = shell_integration_linux::GetProgramClassClass(); params.wayland_app_id = params.wm_class_class + "-glic"; - #endif + #endif // BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-chrome_browser_global__features.cc b/www/iridium/files/patch-chrome_browser_global__features.cc index 69e6e5e97425..8d3c29aa7cc9 100644 --- a/www/iridium/files/patch-chrome_browser_global__features.cc +++ b/www/iridium/files/patch-chrome_browser_global__features.cc @@ -1,29 +1,29 @@ ---- chrome/browser/global_features.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/global_features.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/global_features.cc -@@ -25,7 +25,7 @@ +@@ -27,7 +27,7 @@ #include "chrome/browser/glic/public/glic_enabling.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) // This causes a gn error on Android builds, because gn does not understand // buildflags, so we include it only on platforms where it is used. #include "chrome/browser/ui/webui/whats_new/whats_new_registrar.h" -@@ -71,7 +71,7 @@ void GlobalFeatures::ReplaceGlobalFeaturesForTesting( +@@ -73,7 +73,7 @@ void GlobalFeatures::ReplaceGlobalFeaturesForTesting( void GlobalFeatures::Init() { system_permissions_platform_handle_ = CreateSystemPermissionsPlatformHandle(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) whats_new_registry_ = CreateWhatsNewRegistry(); #endif -@@ -123,7 +123,7 @@ GlobalFeatures::CreateSystemPermissionsPlatformHandle( +@@ -134,7 +134,7 @@ GlobalFeatures::CreateSystemPermissionsPlatformHandle( return system_permission_settings::PlatformHandle::Create(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr GlobalFeatures::CreateWhatsNewRegistry() { return whats_new::CreateWhatsNewRegistry(); diff --git a/www/iridium/files/patch-chrome_browser_global__features.h b/www/iridium/files/patch-chrome_browser_global__features.h index 6986276bd9d8..8b12a355a3eb 100644 --- a/www/iridium/files/patch-chrome_browser_global__features.h +++ b/www/iridium/files/patch-chrome_browser_global__features.h @@ -1,38 +1,38 @@ ---- chrome/browser/global_features.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/global_features.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/global_features.h @@ -15,7 +15,7 @@ namespace system_permission_settings { class PlatformHandle; } // namespace system_permission_settings -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) namespace whats_new { class WhatsNewRegistry; } // namespace whats_new -@@ -67,7 +67,7 @@ class GlobalFeatures { +@@ -71,7 +71,7 @@ class GlobalFeatures { system_permissions_platform_handle() { return system_permissions_platform_handle_.get(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) whats_new::WhatsNewRegistry* whats_new_registry() { return whats_new_registry_.get(); } -@@ -112,7 +112,7 @@ class GlobalFeatures { +@@ -121,7 +121,7 @@ class GlobalFeatures { virtual std::unique_ptr CreateSystemPermissionsPlatformHandle(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) virtual std::unique_ptr CreateWhatsNewRegistry(); #endif -@@ -122,7 +122,7 @@ class GlobalFeatures { +@@ -131,7 +131,7 @@ class GlobalFeatures { std::unique_ptr system_permissions_platform_handle_; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr whats_new_registry_; #endif diff --git a/www/iridium/files/patch-chrome_browser_headless_headless__mode__util.cc b/www/iridium/files/patch-chrome_browser_headless_headless__mode__util.cc index 1bbc0697bc56..ea02b8733786 100644 --- a/www/iridium/files/patch-chrome_browser_headless_headless__mode__util.cc +++ b/www/iridium/files/patch-chrome_browser_headless_headless__mode__util.cc @@ -1,29 +1,29 @@ ---- chrome/browser/headless/headless_mode_util.cc.orig 2025-11-17 10:37:57 UTC +--- chrome/browser/headless/headless_mode_util.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/headless/headless_mode_util.cc @@ -12,7 +12,7 @@ // New headless mode is available on Linux, Windows and Mac platforms. // More platforms will be added later, so avoid function level clutter // by providing stub implementations at the end of the file. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "base/base_switches.h" #include "base/files/file_path.h" @@ -23,7 +23,7 @@ #include "chrome/common/chrome_switches.h" #include "content/public/common/content_switches.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/gl/gl_switches.h" // nogncheck #include "ui/ozone/public/ozone_switches.h" // nogncheck #endif // BUILDFLAG(IS_LINUX) @@ -113,7 +113,7 @@ class HeadlessModeHandleImpl : public HeadlessModeHand command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Headless mode on Linux relies on ozone/headless platform. command_line->AppendSwitchASCII(::switches::kOzonePlatform, switches::kHeadless); diff --git a/www/iridium/files/patch-chrome_browser_intranet__redirect__detector.h b/www/iridium/files/patch-chrome_browser_intranet__redirect__detector.h index 0a1e477cb996..83ba7cf57ab1 100644 --- a/www/iridium/files/patch-chrome_browser_intranet__redirect__detector.h +++ b/www/iridium/files/patch-chrome_browser_intranet__redirect__detector.h @@ -1,11 +1,11 @@ ---- chrome/browser/intranet_redirect_detector.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/intranet_redirect_detector.h.orig 2025-12-10 15:04:57 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_CHROMEOS) || BUILDFLAG(IS_BSD)) #error "IntranetRedirectDetector should only be built on Desktop platforms." #endif diff --git a/www/iridium/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc b/www/iridium/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc index aaa8e8f0fbff..b19908cdcf85 100644 --- a/www/iridium/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc +++ b/www/iridium/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc @@ -1,15 +1,15 @@ ---- chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc @@ -39,10 +39,12 @@ void MTPDeviceMapService::RegisterMTPFileSystem( // Note that this initializes the delegate asynchronously, but since // the delegate will only be used from the IO thread, it is guaranteed // to be created before use of it expects it to be there. +#if !BUILDFLAG(IS_BSD) CreateMTPDeviceAsyncDelegate( device_location, read_only, base::BindOnce(&MTPDeviceMapService::AddAsyncDelegate, base::Unretained(this), device_location, read_only)); +#endif mtp_device_usage_map_[key] = 0; } diff --git a/www/iridium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc b/www/iridium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc index a24386843f1c..bcc71c5f1a1d 100644 --- a/www/iridium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc +++ b/www/iridium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc @@ -1,16 +1,16 @@ ---- chrome/browser/media_galleries/media_file_system_registry.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/media_galleries/media_file_system_registry.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/media_galleries/media_file_system_registry.cc @@ -582,7 +582,12 @@ class MediaFileSystemRegistry::MediaFileSystemContextI // Constructor in 'private' section because depends on private class definition. MediaFileSystemRegistry::MediaFileSystemRegistry() : file_system_context_(new MediaFileSystemContextImpl) { - StorageMonitor::GetInstance()->AddObserver(this); + /* + * This conditional is needed for shutdown. Destructors + * try to get the media file system registry. + */ + if (StorageMonitor::GetInstance()) + StorageMonitor::GetInstance()->AddObserver(this); } MediaFileSystemRegistry::~MediaFileSystemRegistry() { diff --git a/www/iridium/files/patch-chrome_browser_media_audio__service__util.cc b/www/iridium/files/patch-chrome_browser_media_audio__service__util.cc index f88ad2879066..3f284e4b912a 100644 --- a/www/iridium/files/patch-chrome_browser_media_audio__service__util.cc +++ b/www/iridium/files/patch-chrome_browser_media_audio__service__util.cc @@ -1,20 +1,20 @@ ---- chrome/browser/media/audio_service_util.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/media/audio_service_util.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/media/audio_service_util.cc @@ -20,7 +20,7 @@ namespace { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const base::Value* GetPolicy(const char* policy_name) { const policy::PolicyMap& policies = g_browser_process->browser_policy_connector() @@ -39,7 +39,7 @@ bool GetPolicyOrFeature(const char* policy_name, const } // namespace bool IsAudioServiceSandboxEnabled() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return GetPolicyOrFeature(policy::key::kAudioSandboxEnabled, features::kAudioServiceSandbox); #else diff --git a/www/iridium/files/patch-chrome_browser_media_router_discovery_BUILD.gn b/www/iridium/files/patch-chrome_browser_media_router_discovery_BUILD.gn index 4c90accb534b..611a4984e543 100644 --- a/www/iridium/files/patch-chrome_browser_media_router_discovery_BUILD.gn +++ b/www/iridium/files/patch-chrome_browser_media_router_discovery_BUILD.gn @@ -1,11 +1,11 @@ ---- chrome/browser/media/router/discovery/BUILD.gn.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/media/router/discovery/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/media/router/discovery/BUILD.gn @@ -81,7 +81,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/iridium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc b/www/iridium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc index 6050541262fd..6428069bd06e 100644 --- a/www/iridium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc +++ b/www/iridium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc @@ -1,48 +1,48 @@ ---- chrome/browser/media/router/discovery/discovery_network_list_posix.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/media/router/discovery/discovery_network_list_posix.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/media/router/discovery/discovery_network_list_posix.cc @@ -10,11 +10,12 @@ #include "chrome/browser/media/router/discovery/discovery_network_list.h" #include +#include +#include +#include #include #include #include -#include -#include #include @@ -23,7 +24,7 @@ #include "chrome/browser/media/router/discovery/discovery_network_list_wifi.h" #include "net/base/net_errors.h" -#if !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) #include #else #include @@ -32,7 +33,7 @@ namespace media_router { namespace { -#if !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) using sll = struct sockaddr_ll; #define SOCKET_ARP_TYPE(s) ((s)->sll_hatype) #define SOCKET_ADDRESS_LEN(s) ((s)->sll_halen) @@ -43,6 +44,12 @@ using sll = struct sockaddr_dl; #define SOCKET_ARP_TYPE(s) ((s)->sdl_type) #define SOCKET_ADDRESS_LEN(s) ((s)->sdl_alen) #define SOCKET_ADDRESS(s) (LLADDR(s)) +#endif + +#if BUILDFLAG(IS_BSD) +bool MaybeGetWifiSSID(const std::string& if_name, std::string* ssid_out) { + return false; +} #endif void GetDiscoveryNetworkInfoListImpl( diff --git a/www/iridium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc b/www/iridium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc index def7c551d04f..0fbce8244f81 100644 --- a/www/iridium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc +++ b/www/iridium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc @@ -1,30 +1,30 @@ ---- chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc @@ -4,7 +4,11 @@ #include "chrome/browser/media/router/discovery/discovery_network_list_wifi.h" +#include "build/build_config.h" + +#if !BUILDFLAG(IS_BSD) #include +#endif #include #include #include @@ -20,6 +24,7 @@ namespace media_router { bool MaybeGetWifiSSID(const std::string& if_name, std::string* ssid_out) { DCHECK(ssid_out); +#if !BUILDFLAG(IS_BSD) base::ScopedFD ioctl_socket(socket(AF_INET, SOCK_DGRAM, 0)); if (!ioctl_socket.is_valid()) { // AF_INET is for IPv4, so it may fail for IPv6-only hosts even when there @@ -42,6 +47,7 @@ bool MaybeGetWifiSSID(const std::string& if_name, std: ssid_out->assign(ssid); return true; } +#endif return false; } diff --git a/www/iridium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc b/www/iridium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc index 3a515bfab99b..7c7d73b56df5 100644 --- a/www/iridium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc +++ b/www/iridium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc @@ -1,47 +1,47 @@ ---- chrome/browser/media/webrtc/chrome_screen_enumerator.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/media/webrtc/chrome_screen_enumerator.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/media/webrtc/chrome_screen_enumerator.cc @@ -21,7 +21,7 @@ #if BUILDFLAG(IS_CHROMEOS) #include "ash/shell.h" #include "ui/aura/window.h" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/functional/callback.h" #include "content/public/browser/desktop_capture.h" #endif @@ -32,7 +32,7 @@ base::LazyInstance>::DestructorAtExit g_desktop_capturer_for_testing = LAZY_INSTANCE_INITIALIZER; @@ -79,7 +79,7 @@ blink::mojom::StreamDevicesSetPtr EnumerateScreens( return stream_devices_set; } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) blink::mojom::StreamDevicesSetPtr EnumerateScreens( blink::mojom::MediaStreamType stream_type) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -132,7 +132,7 @@ void ChromeScreenEnumerator::SetRootWindowsForTesting( root_windows_for_testing_.Get() = std::move(root_windows); } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void ChromeScreenEnumerator::SetDesktopCapturerForTesting( std::unique_ptr capturer) { g_desktop_capturer_for_testing.Get() = std::move(capturer); @@ -145,7 +145,7 @@ void ChromeScreenEnumerator::EnumerateScreens( ScreensCallback screens_callback) const { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) content::GetUIThreadTaskRunner({})->PostTaskAndReplyWithResult( FROM_HERE, base::BindOnce(::EnumerateScreens, stream_type), base::BindOnce( diff --git a/www/iridium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.h b/www/iridium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.h index 1e42b35a9c01..22e2b50e46ba 100644 --- a/www/iridium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.h +++ b/www/iridium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.h @@ -1,20 +1,20 @@ ---- chrome/browser/media/webrtc/chrome_screen_enumerator.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/media/webrtc/chrome_screen_enumerator.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/media/webrtc/chrome_screen_enumerator.h @@ -18,7 +18,7 @@ namespace aura { class Window; } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) namespace webrtc { class DesktopCapturer; } @@ -39,7 +39,7 @@ class ChromeScreenEnumerator : public media::ScreenEnu #if BUILDFLAG(IS_CHROMEOS) static void SetRootWindowsForTesting( std::vector> root_windows); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) static void SetDesktopCapturerForTesting( std::unique_ptr capturer); #endif diff --git a/www/iridium/files/patch-chrome_browser_media_webrtc_desktop__media__picker__controller.cc b/www/iridium/files/patch-chrome_browser_media_webrtc_desktop__media__picker__controller.cc index 94bb9fe91e32..4f79f1cfc515 100644 --- a/www/iridium/files/patch-chrome_browser_media_webrtc_desktop__media__picker__controller.cc +++ b/www/iridium/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 2025-09-11 13:19:19 UTC +--- chrome/browser/media/webrtc/desktop_media_picker_controller.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/media/webrtc/desktop_media_picker_controller.cc @@ -99,7 +99,7 @@ bool DesktopMediaPickerController::IsSystemAudioCaptur base::FeatureList::IsEnabled( media::kMacCatapLoopbackAudioForScreenShare)); } -#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/iridium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc b/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc index b08b3a660071..c57a1d149080 100644 --- a/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc +++ b/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc @@ -1,11 +1,11 @@ ---- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/media/webrtc/webrtc_log_uploader.cc @@ -100,7 +100,7 @@ std::string GetLogUploadProduct() { const char product[] = "Chrome"; #elif BUILDFLAG(IS_MAC) const char product[] = "Chrome_Mac"; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #if !defined(ADDRESS_SANITIZER) const char product[] = "Chrome_Linux"; #else diff --git a/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc b/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc index 91ef88a82157..a08ba118e021 100644 --- a/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc +++ b/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc @@ -1,20 +1,20 @@ ---- chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/media/webrtc/webrtc_logging_controller.cc @@ -25,7 +25,7 @@ #include "components/webrtc_logging/browser/text_log_list.h" #include "content/public/browser/render_process_host.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 "content/public/browser/child_process_security_policy.h" #include "storage/browser/file_system/isolated_context.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || @@ -305,7 +305,7 @@ void WebRtcLoggingController::StartEventLogging( web_app_id, callback); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) void WebRtcLoggingController::GetLogsDirectory( LogsDirectoryCallback callback, LogsDirectoryErrorCallback error_callback) { diff --git a/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h b/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h index c1ca01c5cc62..08172bf98c62 100644 --- a/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h +++ b/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h @@ -1,20 +1,20 @@ ---- chrome/browser/media/webrtc/webrtc_logging_controller.h.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/media/webrtc/webrtc_logging_controller.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/media/webrtc/webrtc_logging_controller.h -@@ -133,7 +133,7 @@ class WebRtcLoggingController +@@ -134,7 +134,7 @@ class WebRtcLoggingController size_t web_app_id, const StartEventLoggingCallback& callback); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Ensures that the WebRTC Logs directory exists and then grants render // process access to the 'WebRTC Logs' directory, and invokes |callback| with // the ids necessary to create a DirectoryEntry object. -@@ -197,7 +197,7 @@ class WebRtcLoggingController +@@ -198,7 +198,7 @@ class WebRtcLoggingController content::BrowserContext* GetBrowserContext() const; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Grants the render process access to the 'WebRTC Logs' directory, and // invokes |callback| with the ids necessary to create a DirectoryEntry // object. If the |logs_path| couldn't be created or found, |error_callback| diff --git a/www/iridium/files/patch-chrome_browser_memory__details.cc b/www/iridium/files/patch-chrome_browser_memory__details.cc index 67f5e27a9d23..b9e3a1e6109f 100644 --- a/www/iridium/files/patch-chrome_browser_memory__details.cc +++ b/www/iridium/files/patch-chrome_browser_memory__details.cc @@ -1,11 +1,11 @@ ---- chrome/browser/memory_details.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/memory_details.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/memory_details.cc @@ -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/iridium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc b/www/iridium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc index 65a485f18645..210ab4148193 100644 --- a/www/iridium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc +++ b/www/iridium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc @@ -1,52 +1,52 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc @@ -80,7 +80,7 @@ #endif #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #if defined(__GLIBC__) #include #endif // defined(__GLIBC__) @@ -105,7 +105,7 @@ #include "chrome/installer/util/taskbar_util.h" #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/pressure/pressure_metrics_reporter.h" #endif // BUILDFLAG(IS_LINUX) @@ -114,7 +114,7 @@ #include "components/user_manager/user_manager.h" #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) #include "components/power_metrics/system_power_monitor.h" #endif @@ -888,7 +888,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, @@ -1119,11 +1119,11 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt std::make_unique(); #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/iridium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h b/www/iridium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h index 1b6c9280f30c..dc21e579971e 100644 --- a/www/iridium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h +++ b/www/iridium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h @@ -1,20 +1,20 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h @@ -29,7 +29,7 @@ class PowerMetricsReporter; class ProcessMonitor; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class PressureMetricsReporter; #endif // BUILDFLAG(IS_LINUX) @@ -126,7 +126,7 @@ class ChromeBrowserMainExtraPartsMetrics : public Chro std::unique_ptr web_app_metrics_provider_; #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Reports pressure metrics. std::unique_ptr pressure_metrics_reporter_; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc b/www/iridium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc index 4865781268b4..fa5a77205dc6 100644 --- a/www/iridium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc +++ b/www/iridium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc @@ -1,115 +1,115 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc @@ -204,11 +204,11 @@ #include "chrome/browser/metrics/google_update_metrics_provider_mac.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "components/metrics/motherboard_metrics_provider.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/chrome_metrics_service_crash_reporter.h" #endif @@ -226,7 +226,7 @@ #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/tabs/tab_metrics_provider.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) @@ -246,7 +246,7 @@ const int kMaxHistogramGatheringWaitDuration = 60000; // Needs to be kept in sync with the writer in // third_party/crashpad/crashpad/handler/handler_main.cc. const char kCrashpadHistogramAllocatorName[] = "CrashpadMetrics"; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ChromeMetricsServiceCrashReporter& GetCrashReporter() { static base::NoDestructor crash_reporter; return *crash_reporter; @@ -556,7 +556,7 @@ void ChromeMetricsServiceClient::RegisterPrefs(PrefReg #endif // BUILDFLAG(IS_CHROMEOS) #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) @@ -638,7 +638,7 @@ std::string ChromeMetricsServiceClient::GetVersionStri void ChromeMetricsServiceClient::OnEnvironmentUpdate(std::string* environment) { // TODO(https://bugs.chromium.org/p/crashpad/issues/detail?id=135): call this // on Mac when the Crashpad API supports it. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Register the environment with the crash reporter. Note that there is a // window from startup to this point during which crash reports will not have // an environment set. @@ -740,7 +740,7 @@ void ChromeMetricsServiceClient::Initialize() { this, local_state, g_browser_process->shared_url_loader_factory()); } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) metrics::structured::Recorder::GetInstance()->SetUiTaskRunner( base::SequencedTaskRunner::GetCurrentDefault()); #endif @@ -800,7 +800,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 @@ -888,7 +888,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( std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -990,7 +990,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -987,7 +987,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic std::make_unique()); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) metrics_service_->RegisterMetricsProvider( std::make_unique( g_browser_process->profile_manager())); -@@ -1002,7 +1002,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -999,7 +999,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) -@@ -1202,7 +1202,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1203,7 +1203,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve } #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 creates the DesktopProfileSessionDurationsServices if it didn't exist // already. metrics::DesktopProfileSessionDurationsServiceFactory::GetForBrowserContext( -@@ -1551,7 +1551,7 @@ void ChromeMetricsServiceClient::CreateStructuredMetri +@@ -1552,7 +1552,7 @@ void ChromeMetricsServiceClient::CreateStructuredMetri recorder = base::MakeRefCounted( cros_system_profile_provider_.get()); -#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Make sure that Structured Metrics recording delegates have been created // before the service is created. This is handled in other places for ChromeOS diff --git a/www/iridium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc b/www/iridium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc index cb853712d59c..49d779a4d491 100644 --- a/www/iridium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc +++ b/www/iridium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc @@ -1,11 +1,11 @@ ---- chrome/browser/metrics/perf/cpu_identity.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/metrics/perf/cpu_identity.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/metrics/perf/cpu_identity.cc @@ -146,7 +146,7 @@ CPUIdentity GetCPUIdentity() { result.release = #if BUILDFLAG(IS_CHROMEOS) base::SysInfo::KernelVersion(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::SysInfo::OperatingSystemVersion(); #else #error "Unsupported configuration" diff --git a/www/iridium/files/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc b/www/iridium/files/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc index b655479128c9..eb0a62af9d55 100644 --- a/www/iridium/files/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc +++ b/www/iridium/files/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc @@ -1,11 +1,11 @@ ---- chrome/browser/metrics/power/process_metrics_recorder_util.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/metrics/power/process_metrics_recorder_util.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/metrics/power/process_metrics_recorder_util.cc @@ -65,7 +65,7 @@ void RecordProcessHistograms(const char* histogram_suf const ProcessMonitor::Metrics& metrics) { RecordAverageCPUUsage(histogram_suffix, metrics.cpu_usage); #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) base::UmaHistogramCounts10000( base::StrCat({"PerformanceMonitor.IdleWakeups2.", histogram_suffix}), metrics.idle_wakeups); diff --git a/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.cc b/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.cc index e4329cd9dff7..6c9cf7a43916 100644 --- a/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.cc +++ b/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.cc @@ -1,29 +1,29 @@ ---- chrome/browser/metrics/power/process_monitor.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/metrics/power/process_monitor.cc.orig 2025-12-10 15:04:57 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 @@ -156,7 +156,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/iridium/files/patch-chrome_browser_metrics_power_process__monitor.h b/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.h index c4755a67f52e..cf52392c923f 100644 --- a/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.h +++ b/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.h @@ -1,11 +1,11 @@ ---- chrome/browser/metrics/power/process_monitor.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/metrics/power/process_monitor.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/metrics/power/process_monitor.h @@ -76,7 +76,7 @@ class ProcessMonitor : public content::BrowserChildPro std::optional cpu_usage; #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Returns the number of average idle cpu wakeups per second since the last // time the metric was sampled. int idle_wakeups = 0; diff --git a/www/iridium/files/patch-chrome_browser_net_profile__network__context__service.cc b/www/iridium/files/patch-chrome_browser_net_profile__network__context__service.cc index 418c95b415d1..51b40b916b36 100644 --- a/www/iridium/files/patch-chrome_browser_net_profile__network__context__service.cc +++ b/www/iridium/files/patch-chrome_browser_net_profile__network__context__service.cc @@ -1,29 +1,29 @@ ---- chrome/browser/net/profile_network_context_service.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/net/profile_network_context_service.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/net/profile_network_context_service.cc -@@ -143,7 +143,7 @@ +@@ -147,7 +147,7 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/client_certificates/certificate_provisioning_service_factory.h" #include "chrome/browser/policy/chrome_browser_policy_connector.h" #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" -@@ -293,7 +293,7 @@ void UpdateCookieSettings(Profile* profile, ContentSet +@@ -301,7 +301,7 @@ void UpdateCookieSettings(Profile* profile, ContentSet } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) std::unique_ptr GetWrappedCertStore( Profile* profile, std::unique_ptr platform_store) { -@@ -1269,7 +1269,7 @@ ProfileNetworkContextService::CreateClientCertStore() +@@ -1315,7 +1315,7 @@ ProfileNetworkContextService::CreateClientCertStore() std::make_unique( base::BindRepeating(&CreateCryptoModuleBlockingPasswordDelegate, kCryptoModulePasswordClientAuth)); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return GetWrappedCertStore(profile_, std::move(store)); #else return store; diff --git a/www/iridium/files/patch-chrome_browser_net_profile__network__context__service__factory.cc b/www/iridium/files/patch-chrome_browser_net_profile__network__context__service__factory.cc index 2662dce4e712..ea7138b8efcd 100644 --- a/www/iridium/files/patch-chrome_browser_net_profile__network__context__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_net_profile__network__context__service__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/net/profile_network_context_service_factory.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/net/profile_network_context_service_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/net/profile_network_context_service_factory.cc @@ -32,7 +32,7 @@ #include "chrome/browser/net/server_certificate_database_service_factory.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 "chrome/browser/enterprise/client_certificates/certificate_provisioning_service_factory.h" #endif @@ -76,7 +76,7 @@ ProfileNetworkContextServiceFactory::ProfileNetworkCon #if BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI) DependsOn(net::ServerCertificateDatabaseServiceFactory::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) DependsOn(client_certificates::CertificateProvisioningServiceFactory:: GetInstance()); #endif diff --git a/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.cc b/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.cc index 8a95f7badc4c..a16aa46cd974 100644 --- a/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.cc +++ b/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.cc @@ -1,138 +1,138 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/net/system_network_context_manager.cc @@ -138,7 +138,7 @@ enum class NetworkSandboxState { // The global instance of the SystemNetworkContextManager. SystemNetworkContextManager* g_system_network_context_manager = nullptr; -#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; @@ -146,7 +146,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) @@ -192,7 +192,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) @@ -207,7 +207,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) @@ -217,7 +217,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 @@ -265,11 +265,11 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() // it is not always initialized. CHECK_IS_TEST(); } -#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 || @@ -285,7 +285,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) @@ -588,7 +588,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) {} @@ -646,7 +646,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) @@ -660,7 +660,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) @@ -732,7 +732,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterStringPref(prefs::kAuthNegotiateDelegateAllowlist, std::string()); -#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) @@ -757,11 +757,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) @@ -815,7 +815,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) -@@ -1042,7 +1042,7 @@ bool SystemNetworkContextManager::IsNetworkSandboxEnab +@@ -1047,7 +1047,7 @@ bool SystemNetworkContextManager::IsNetworkSandboxEnab break; } -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!enabled) { g_network_service_will_allow_gssapi_library_load = true; } diff --git a/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.h b/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.h index 7fedd8af9ae5..9c6536fe8347 100644 --- a/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.h +++ b/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.h @@ -1,20 +1,20 @@ ---- chrome/browser/net/system_network_context_manager.h.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/net/system_network_context_manager.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/net/system_network_context_manager.h @@ -212,7 +212,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: @@ -295,7 +295,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/iridium/files/patch-chrome_browser_new__tab__page_modules_file__suggestion_drive__service.cc b/www/iridium/files/patch-chrome_browser_new__tab__page_modules_file__suggestion_drive__service.cc index cae3afab4fed..8ffe56bcb546 100644 --- a/www/iridium/files/patch-chrome_browser_new__tab__page_modules_file__suggestion_drive__service.cc +++ b/www/iridium/files/patch-chrome_browser_new__tab__page_modules_file__suggestion_drive__service.cc @@ -1,11 +1,11 @@ ---- chrome/browser/new_tab_page/modules/file_suggestion/drive_service.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/new_tab_page/modules/file_suggestion/drive_service.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/new_tab_page/modules/file_suggestion/drive_service.cc @@ -36,7 +36,7 @@ #include "services/network/public/cpp/resource_request.h" namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) constexpr char kPlatform[] = "LINUX"; #elif BUILDFLAG(IS_WIN) constexpr char kPlatform[] = "WINDOWS"; diff --git a/www/iridium/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc b/www/iridium/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc index 0198238f068a..c462c13c5aa9 100644 --- a/www/iridium/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc +++ b/www/iridium/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc @@ -1,11 +1,11 @@ ---- chrome/browser/new_tab_page/new_tab_page_util.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/new_tab_page/new_tab_page_util.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/new_tab_page/new_tab_page_util.cc -@@ -35,7 +35,7 @@ bool IsOsSupportedForCart() { +@@ -38,7 +38,7 @@ bool IsOsSupportedForCart() { } bool IsOsSupportedForDrive() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/iridium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc b/www/iridium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc index 6ee9c30ed4b3..c35149e27731 100644 --- a/www/iridium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc +++ b/www/iridium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc @@ -1,38 +1,38 @@ ---- chrome/browser/notifications/notification_display_service_impl.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/notifications/notification_display_service_impl.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/notifications/notification_display_service_impl.cc @@ -31,7 +31,7 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - 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 @@ -60,7 +60,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 } @@ -76,7 +76,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( @@ -84,7 +84,7 @@ NotificationDisplayServiceImpl::NotificationDisplaySer #endif #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN)) && \ + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) && \ BUILDFLAG(SAFE_BROWSING_AVAILABLE) AddNotificationHandler( NotificationHandler::Type::TAILORED_SECURITY, diff --git a/www/iridium/files/patch-chrome_browser_notifications_notification__platform__bridge__delegator.cc b/www/iridium/files/patch-chrome_browser_notifications_notification__platform__bridge__delegator.cc index 8ea750fb5486..963b3d037a62 100644 --- a/www/iridium/files/patch-chrome_browser_notifications_notification__platform__bridge__delegator.cc +++ b/www/iridium/files/patch-chrome_browser_notifications_notification__platform__bridge__delegator.cc @@ -1,11 +1,11 @@ ---- chrome/browser/notifications/notification_platform_bridge_delegator.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/notifications/notification_platform_bridge_delegator.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/notifications/notification_platform_bridge_delegator.cc @@ -55,7 +55,7 @@ bool SystemNotificationsEnabled(Profile* profile) { #elif BUILDFLAG(IS_WIN) return NotificationPlatformBridgeWin::SystemNotificationEnabled(); #else -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (profile) { // Prefs take precedence over flags. PrefService* prefs = profile->GetPrefs(); diff --git a/www/iridium/files/patch-chrome_browser_ntp__tiles_chrome__most__visited__sites__factory.cc b/www/iridium/files/patch-chrome_browser_ntp__tiles_chrome__most__visited__sites__factory.cc index 90546980de9a..244f6d0b861b 100644 --- a/www/iridium/files/patch-chrome_browser_ntp__tiles_chrome__most__visited__sites__factory.cc +++ b/www/iridium/files/patch-chrome_browser_ntp__tiles_chrome__most__visited__sites__factory.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ntp_tiles/chrome_most_visited_sites_factory.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/ntp_tiles/chrome_most_visited_sites_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ntp_tiles/chrome_most_visited_sites_factory.cc @@ -59,7 +59,7 @@ bool ShouldCreateCustomLinksManager() { bool ShouldCreateEnterpriseShortcutsManager() { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled(ntp_tiles::kNtpEnterpriseShortcuts); #else return false; diff --git a/www/iridium/files/patch-chrome_browser_page__load__metrics_page__load__metrics__initialize.cc b/www/iridium/files/patch-chrome_browser_page__load__metrics_page__load__metrics__initialize.cc index 64addcb0dd26..56c5d07be370 100644 --- a/www/iridium/files/patch-chrome_browser_page__load__metrics_page__load__metrics__initialize.cc +++ b/www/iridium/files/patch-chrome_browser_page__load__metrics_page__load__metrics__initialize.cc @@ -1,20 +1,20 @@ ---- chrome/browser/page_load_metrics/page_load_metrics_initialize.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/page_load_metrics/page_load_metrics_initialize.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/page_load_metrics/page_load_metrics_initialize.cc @@ -70,7 +70,7 @@ #include "url/gurl.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/webapps/isolated_web_apps/scheme.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) -@@ -342,7 +342,7 @@ bool PageLoadMetricsEmbedder::IsInternalWebUI(const GU +@@ -351,7 +351,7 @@ bool PageLoadMetricsEmbedder::IsInternalWebUI(const GU bool PageLoadMetricsEmbedder::ShouldObserveScheme(std::string_view scheme) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return scheme == webapps::kIsolatedAppScheme; #else // !(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS)) diff --git a/www/iridium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc b/www/iridium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc index 71e1cc8670bf..fed9f0a48fe8 100644 --- a/www/iridium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc +++ b/www/iridium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc @@ -1,38 +1,38 @@ ---- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/password_manager/chrome_password_manager_client.cc -@@ -678,7 +678,7 @@ void ChromePasswordManagerClient::ContinueShowKeyboard +@@ -694,7 +694,7 @@ void ChromePasswordManagerClient::ContinueShowKeyboard bool ChromePasswordManagerClient::IsReauthBeforeFillingRequired( device_reauth::DeviceAuthenticator* authenticator) { #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!GetLocalStatePrefs() || !GetPrefs() || !authenticator) { return false; } -@@ -955,7 +955,7 @@ void ChromePasswordManagerClient::NotifyUserCredential +@@ -988,7 +988,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()); if (manage_passwords_ui_controller) { -@@ -1987,7 +1987,7 @@ void ChromePasswordManagerClient::HideFillingUI() { +@@ -2016,7 +2016,7 @@ void ChromePasswordManagerClient::HideFillingUI() { bool ChromePasswordManagerClient::IsPasswordManagementEnabledForCurrentPage( const GURL& url) const { #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (IsPasswordManagerForUrlDisallowedByPolicy(url)) { return false; } -@@ -2026,7 +2026,7 @@ bool ChromePasswordManagerClient::IsPasswordManagement +@@ -2055,7 +2055,7 @@ bool ChromePasswordManagerClient::IsPasswordManagement } #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool ChromePasswordManagerClient::IsPasswordManagerForUrlDisallowedByPolicy( const GURL& url) const { if (!GetPrefs() || !GetPrefs()->HasPrefPath( diff --git a/www/iridium/files/patch-chrome_browser_password__manager_factories_password__reuse__manager__factory.cc b/www/iridium/files/patch-chrome_browser_password__manager_factories_password__reuse__manager__factory.cc index 47fa95f118a4..c58f54199729 100644 --- a/www/iridium/files/patch-chrome_browser_password__manager_factories_password__reuse__manager__factory.cc +++ b/www/iridium/files/patch-chrome_browser_password__manager_factories_password__reuse__manager__factory.cc @@ -1,11 +1,11 @@ ---- chrome/browser/password_manager/factories/password_reuse_manager_factory.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/password_manager/factories/password_reuse_manager_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/password_manager/factories/password_reuse_manager_factory.cc @@ -125,7 +125,7 @@ PasswordReuseManagerFactory::BuildServiceInstanceForBr // Prepare password hash data for reuse detection. reuse_manager->PreparePasswordHashData(GetSignInStateForMetrics(profile)); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr notifier = std::make_unique< password_manager::PasswordReuseManagerSigninNotifierImpl>( diff --git a/www/iridium/files/patch-chrome_browser_picture__in__picture_picture__in__picture__window__manager.cc b/www/iridium/files/patch-chrome_browser_picture__in__picture_picture__in__picture__window__manager.cc index c4cccd1506d7..2752c23e98f3 100644 --- a/www/iridium/files/patch-chrome_browser_picture__in__picture_picture__in__picture__window__manager.cc +++ b/www/iridium/files/patch-chrome_browser_picture__in__picture_picture__in__picture__window__manager.cc @@ -1,20 +1,20 @@ ---- chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc -@@ -22,7 +22,7 @@ +@@ -21,7 +21,7 @@ #include "ui/gfx/geometry/resize_utils.h" #include "ui/gfx/geometry/size.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/webapps/isolated_web_apps/scheme.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) @@ -585,7 +585,7 @@ void PictureInPictureWindowManager::SetWindowParams(Na bool PictureInPictureWindowManager::IsSupportedForDocumentPictureInPicture( const GURL& url) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Only allow document PiP to be opened if the URL is of a type that we know // how to display in the title bar. Otherwise, the title bar might be // misleading in certain scenarios. See https://crbug.com/1460025 . diff --git a/www/iridium/files/patch-chrome_browser_platform__util__linux.cc b/www/iridium/files/patch-chrome_browser_platform__util__linux.cc index ba13c13f18a8..2edea4b27e18 100644 --- a/www/iridium/files/patch-chrome_browser_platform__util__linux.cc +++ b/www/iridium/files/patch-chrome_browser_platform__util__linux.cc @@ -1,12 +1,12 @@ ---- chrome/browser/platform_util_linux.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/platform_util_linux.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/platform_util_linux.cc @@ -301,7 +301,9 @@ void OnLaunchOptionsCreated(const std::string& command argv.push_back(command); argv.push_back(arg); options.current_directory = working_directory; +#if !BUILDFLAG(IS_BSD) options.allow_new_privs = true; +#endif // xdg-open can fall back on mailcap which eventually might plumb through // to a command that needs a terminal. Set the environment variable telling // it that we definitely don't have a terminal available and that it should diff --git a/www/iridium/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc b/www/iridium/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc index 3d667ce1d7d2..45e5f77393ee 100644 --- a/www/iridium/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc +++ b/www/iridium/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc @@ -1,11 +1,11 @@ ---- chrome/browser/policy/browser_signin_policy_handler.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/policy/browser_signin_policy_handler.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/policy/browser_signin_policy_handler.cc @@ -45,7 +45,7 @@ void BrowserSigninPolicyHandler::ApplyPolicySettings(c policies.GetValue(policy_name(), base::Value::Type::INTEGER); switch (static_cast(value->GetInt())) { case BrowserSigninMode::kForced: -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) prefs->SetValue(prefs::kForceBrowserSignin, base::Value(true)); #endif [[fallthrough]]; diff --git a/www/iridium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc b/www/iridium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc index 627d78e40ba6..0f84f40eadb5 100644 --- a/www/iridium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc +++ b/www/iridium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc @@ -1,47 +1,47 @@ ---- chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc @@ -57,7 +57,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) @@ -66,7 +66,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/client_certificates/browser_context_delegate.h" #include "chrome/browser/enterprise/client_certificates/cert_utils.h" #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/device_trust_key_manager_impl.h" @@ -111,7 +111,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(); @@ -276,7 +276,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(); @@ -298,7 +298,7 @@ ChromeBrowserCloudManagementControllerDesktop::CreateD std::unique_ptr ChromeBrowserCloudManagementControllerDesktop:: CreateCertificateProvisioningService() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (!certificate_store_) { certificate_store_ = std::make_unique( diff --git a/www/iridium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc b/www/iridium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc index c11a197c834c..6515835cf4a0 100644 --- a/www/iridium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc +++ b/www/iridium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc @@ -1,215 +1,206 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -247,7 +247,7 @@ +@@ -248,7 +248,7 @@ #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/browser_switcher/browser_switcher_prefs.h" #include "chrome/browser/enterprise/idle/action.h" #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" -@@ -614,7 +614,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -623,7 +623,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kManagedDefaultSmartCardConnectSetting, base::Value::Type::INTEGER }, #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kDeletingUndecryptablePasswordsEnabled, password_manager::prefs::kDeletingUndecryptablePasswordsEnabled, base::Value::Type::BOOLEAN }, -@@ -964,7 +964,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -973,7 +973,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::LIST }, #endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ - || BUILDFLAG(IS_MAC) + || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { key::kRequireOnlineRevocationChecksForLocalAnchors, prefs::kCertRevocationCheckingRequiredLocalAnchors, base::Value::Type::BOOLEAN }, -@@ -976,7 +976,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -985,7 +985,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::LIST }, #endif // #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) // || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) { key::kFullscreenAllowed, prefs::kFullscreenAllowed, base::Value::Type::BOOLEAN }, -@@ -1858,7 +1858,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - base::Value::Type::BOOLEAN }, +@@ -1864,7 +1864,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + base::Value::Type::INTEGER}, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kGSSAPILibraryName, prefs::kGSSAPILibraryName, base::Value::Type::STRING }, -@@ -1920,7 +1920,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1926,7 +1926,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -#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 }, -@@ -1940,12 +1940,12 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1946,12 +1946,12 @@ 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 }, -@@ -1959,7 +1959,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1965,7 +1965,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kLiveTranslateEnabled, base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kDefaultBrowserSettingEnabled, prefs::kDefaultBrowserSettingEnabled, base::Value::Type::BOOLEAN }, -@@ -1971,7 +1971,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1977,7 +1977,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) \ - || BUILDFLAG(IS_CHROMEOS) + || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) { key::kAutoplayAllowed, prefs::kAutoplayAllowed, base::Value::Type::BOOLEAN }, -@@ -2081,7 +2081,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2087,7 +2087,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 }, -@@ -2186,7 +2186,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2192,7 +2192,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) { key::kAuthNegotiateDelegateByKdcPolicy, prefs::kAuthNegotiateDelegateByKdcPolicy, base::Value::Type::BOOLEAN }, -@@ -2265,7 +2265,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2271,7 +2271,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = ash::prefs::kUrlParameterToAutofillSAMLUsername, base::Value::Type::STRING }, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) { key::kNTPFooterExtensionAttributionEnabled, prefs::kNTPFooterExtensionAttributionEnabled, base::Value::Type::BOOLEAN }, -@@ -2300,7 +2300,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2306,7 +2306,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kRestrictCoreSharingOnRenderer, 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 }, -@@ -2334,7 +2334,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2340,7 +2340,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}, -@@ -2357,7 +2357,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2363,7 +2363,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { key::kTabCompareSettings, optimization_guide::prefs::kProductSpecificationsEnterprisePolicyAllowed, base::Value::Type::INTEGER}, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) { key::kChromeForTestingAllowed, prefs::kChromeForTestingAllowed, base::Value::Type::BOOLEAN }, -@@ -2436,7 +2436,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2442,7 +2442,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = policy_prefs::kBuiltInAIAPIsEnabled, base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) { key::kNTPFooterManagementNoticeEnabled, prefs::kNTPFooterManagementNoticeEnabled, base::Value::Type::BOOLEAN }, -@@ -2582,7 +2582,7 @@ std::unique_ptr BuildH +@@ -2593,7 +2593,7 @@ std::unique_ptr BuildH // Policies for all platforms - End #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique( key::kMemorySaverModeSavings, performance_manager::user_tuning::prefs::kMemorySaverModeAggressiveness, -@@ -2852,7 +2852,7 @@ std::unique_ptr BuildH +@@ -2866,7 +2866,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(std::make_unique()); -@@ -2946,7 +2946,7 @@ std::unique_ptr BuildH +@@ -2960,7 +2960,7 @@ std::unique_ptr BuildH std::vector> signin_legacy_policies; #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) signin_legacy_policies.push_back(std::make_unique( key::kForceBrowserSignin, prefs::kForceBrowserSignin, base::Value::Type::BOOLEAN)); -@@ -3328,7 +3328,7 @@ std::unique_ptr BuildH +@@ -3342,7 +3342,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( -@@ -3336,7 +3336,7 @@ std::unique_ptr BuildH +@@ -3350,7 +3350,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)); -@@ -3389,7 +3389,7 @@ std::unique_ptr BuildH +@@ -3403,7 +3403,7 @@ std::unique_ptr BuildH std::vector gen_ai_default_policies; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) gen_ai_default_policies.emplace_back( key::kAutofillPredictionSettings, optimization_guide::prefs:: -@@ -3466,7 +3466,7 @@ std::unique_ptr BuildH - std::make_unique())); - #endif // BUILDFLAG(IS_CHROMEOS) - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - handlers->AddHandler(std::make_unique( - std::make_unique( - key::kCacheEncryptionEnabled, diff --git a/www/iridium/files/patch-chrome_browser_policy_developer__tools__policy__checker__factory.cc b/www/iridium/files/patch-chrome_browser_policy_developer__tools__policy__checker__factory.cc new file mode 100644 index 000000000000..02fc6af2033f --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_policy_developer__tools__policy__checker__factory.cc @@ -0,0 +1,11 @@ +--- chrome/browser/policy/developer_tools_policy_checker_factory.cc.orig 2025-12-10 15:04:57 UTC ++++ chrome/browser/policy/developer_tools_policy_checker_factory.cc +@@ -58,7 +58,7 @@ void DeveloperToolsPolicyCheckerFactory::RegisterProfi + static_cast(DeveloperToolsPolicyHandler::Availability:: + kDisallowedForForceInstalledExtensions)); + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + registry->RegisterListPref(prefs::kDeveloperToolsAvailabilityAllowlist); + registry->RegisterListPref(prefs::kDeveloperToolsAvailabilityBlocklist); + #endif diff --git a/www/iridium/files/patch-chrome_browser_policy_device__management__service__configuration.cc b/www/iridium/files/patch-chrome_browser_policy_device__management__service__configuration.cc index db8778a2959e..00baeb9d81c6 100644 --- a/www/iridium/files/patch-chrome_browser_policy_device__management__service__configuration.cc +++ b/www/iridium/files/patch-chrome_browser_policy_device__management__service__configuration.cc @@ -1,11 +1,11 @@ ---- chrome/browser/policy/device_management_service_configuration.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/policy/device_management_service_configuration.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/policy/device_management_service_configuration.cc @@ -22,7 +22,7 @@ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ - !BUILDFLAG(IS_ANDROID)) + !BUILDFLAG(IS_ANDROID)) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/common.h" #include "chrome/browser/enterprise/connectors/connectors_service.h" #endif diff --git a/www/iridium/files/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc b/www/iridium/files/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc index 6abf6049908b..1cb8a058880d 100644 --- a/www/iridium/files/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc +++ b/www/iridium/files/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc @@ -1,11 +1,11 @@ ---- chrome/browser/policy/policy_value_and_status_aggregator.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/policy/policy_value_and_status_aggregator.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/policy/policy_value_and_status_aggregator.cc @@ -49,7 +49,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) diff --git a/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc b/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc index fc896f63452e..c32c5fa1fae2 100644 --- a/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc +++ b/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc @@ -1,68 +1,68 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -330,7 +330,7 @@ +@@ -334,7 +334,7 @@ #include "chrome/browser/devtools/devtools_window.h" #endif // BUILDFLAG(ENABLE_DEVTOOLS_FRONTEND) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/whats_new/whats_new_ui.h" #endif -@@ -497,11 +497,11 @@ +@@ -500,11 +500,11 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/device_signals/core/browser/pref_names.h" // nogncheck due to crbug.com/1125897 #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_prefs.h" #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #endif -@@ -529,7 +529,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 -@@ -1850,7 +1850,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) +@@ -1666,7 +1666,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) on_device_translation::RegisterLocalStatePrefs(registry); #endif // BUILDFLAG(ENABLE_ON_DEVICE_TRANSLATION) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) WhatsNewUI::RegisterLocalStatePrefs(registry); #endif -@@ -2001,7 +2001,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) +@@ -1817,7 +1817,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) #endif // BUILDFLAG(ENABLE_PDF) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kChromeForTestingAllowed, true); #endif -@@ -2375,13 +2375,13 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -2193,13 +2193,13 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) device_signals::RegisterProfilePrefs(registry); ntp_tiles::EnterpriseShortcutsManagerImpl::RegisterProfilePrefs(registry); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry); enterprise_signin::RegisterProfilePrefs(registry); #endif diff --git a/www/iridium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc b/www/iridium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc index 464df721babe..dc3ae865bf55 100644 --- a/www/iridium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc +++ b/www/iridium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc @@ -1,11 +1,11 @@ ---- chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/prefs/pref_service_incognito_allowlist.cc @@ -203,7 +203,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/iridium/files/patch-chrome_browser_prefs_session__startup__pref.cc b/www/iridium/files/patch-chrome_browser_prefs_session__startup__pref.cc index 1d98cf2c8327..661122a52812 100644 --- a/www/iridium/files/patch-chrome_browser_prefs_session__startup__pref.cc +++ b/www/iridium/files/patch-chrome_browser_prefs_session__startup__pref.cc @@ -1,11 +1,11 @@ ---- chrome/browser/prefs/session_startup_pref.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/prefs/session_startup_pref.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/prefs/session_startup_pref.cc @@ -71,7 +71,7 @@ SessionStartupPref::Type SessionStartupPref::GetDefaul #if BUILDFLAG(IS_CHROMEOS) return SessionStartupPref::LAST; #else -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (features::kSetDefaultToContinueSession.Get()) { return SessionStartupPref::LAST; } diff --git a/www/iridium/files/patch-chrome_browser_printing_print__backend__service__manager.cc b/www/iridium/files/patch-chrome_browser_printing_print__backend__service__manager.cc index 82dd6a7d4d46..53cf783c3dfb 100644 --- a/www/iridium/files/patch-chrome_browser_printing_print__backend__service__manager.cc +++ b/www/iridium/files/patch-chrome_browser_printing_print__backend__service__manager.cc @@ -1,29 +1,29 @@ ---- chrome/browser/printing/print_backend_service_manager.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/printing/print_backend_service_manager.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/printing/print_backend_service_manager.cc @@ -36,7 +36,7 @@ #include "printing/printing_context.h" #include "printing/printing_features.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "content/public/common/content_switches.h" #include "ui/linux/linux_ui.h" #endif @@ -886,7 +886,7 @@ PrintBackendServiceManager::GetServiceFromBundle( << remote_id << "`"; std::vector extra_switches; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (auto* linux_ui = ui::LinuxUi::instance()) { extra_switches = linux_ui->GetCmdLineFlagsForCopy(); } @@ -1072,7 +1072,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate return kNoClientsRegisteredResetOnIdleTimeout; case ClientType::kQueryWithUi: -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // No need to update if there were other query with UI clients. if (HasQueryWithUiClientForRemoteId(remote_id)) { return std::nullopt; diff --git a/www/iridium/files/patch-chrome_browser_printing_printer__query.cc b/www/iridium/files/patch-chrome_browser_printing_printer__query.cc index 35e602b6ee9b..c510673a99f9 100644 --- a/www/iridium/files/patch-chrome_browser_printing_printer__query.cc +++ b/www/iridium/files/patch-chrome_browser_printing_printer__query.cc @@ -1,11 +1,11 @@ ---- chrome/browser/printing/printer_query.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/printing/printer_query.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/printing/printer_query.cc @@ -342,7 +342,7 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Di crash_key = std::make_unique( printer_name, print_backend->GetPrinterDriverInfo(printer_name)); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS) +#if (BUILDFLAG(IS_BSD) || BUILDFLAG(IS_LINUX)) && BUILDFLAG(USE_CUPS) PrinterBasicInfo basic_info; if (print_backend->GetPrinterBasicInfo(printer_name, &basic_info) == mojom::ResultCode::kSuccess) { diff --git a/www/iridium/files/patch-chrome_browser_privacy__sandbox_incognito_privacy__sandbox__incognito__tab__observer.cc b/www/iridium/files/patch-chrome_browser_privacy__sandbox_incognito_privacy__sandbox__incognito__tab__observer.cc deleted file mode 100644 index baba7e135363..000000000000 --- a/www/iridium/files/patch-chrome_browser_privacy__sandbox_incognito_privacy__sandbox__incognito__tab__observer.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/privacy_sandbox/incognito/privacy_sandbox_incognito_tab_observer.cc.orig 2025-11-06 10:11:34 UTC -+++ chrome/browser/privacy_sandbox/incognito/privacy_sandbox_incognito_tab_observer.cc -@@ -11,7 +11,7 @@ - #include "privacy_sandbox_incognito_survey_service.h" - #include "privacy_sandbox_incognito_survey_service_factory.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 "privacy_sandbox_whats_new_survey_service.h" - #include "privacy_sandbox_whats_new_survey_service_factory.h" - #endif -@@ -40,7 +40,7 @@ void PrivacySandboxIncognitoTabObserver::DidFinishLoad - return; - } - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // What's new page is fully contained within a single iframe for all the - // contents. The survey on the "What's New" page should only appear when the - // *iframe's* content is fully loaded. This happens after the main frame's -@@ -72,7 +72,7 @@ bool PrivacySandboxIncognitoTabObserver::IsNewTabPage( - url == chrome::kChromeUINewTabURL; - } - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // constant kChromeUIWhatsNewURL is defined only for this three. - bool PrivacySandboxIncognitoTabObserver::IsWhatsNewPage(const GURL& url) { - return url == chrome::kChromeUIWhatsNewURL; diff --git a/www/iridium/files/patch-chrome_browser_privacy__sandbox_incognito_privacy__sandbox__incognito__tab__observer.h b/www/iridium/files/patch-chrome_browser_privacy__sandbox_incognito_privacy__sandbox__incognito__tab__observer.h deleted file mode 100644 index d1dfd5555d3b..000000000000 --- a/www/iridium/files/patch-chrome_browser_privacy__sandbox_incognito_privacy__sandbox__incognito__tab__observer.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/privacy_sandbox/incognito/privacy_sandbox_incognito_tab_observer.h.orig 2025-11-06 10:11:34 UTC -+++ chrome/browser/privacy_sandbox/incognito/privacy_sandbox_incognito_tab_observer.h -@@ -23,7 +23,7 @@ class PrivacySandboxIncognitoTabObserver : public cont - - private: - bool IsNewTabPage(const GURL& url); --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - bool IsWhatsNewPage(const GURL& url); - #endif - }; diff --git a/www/iridium/files/patch-chrome_browser_privacy__sandbox_incognito_privacy__sandbox__whats__new__survey__service.h b/www/iridium/files/patch-chrome_browser_privacy__sandbox_incognito_privacy__sandbox__whats__new__survey__service.h deleted file mode 100644 index 4223a980db37..000000000000 --- a/www/iridium/files/patch-chrome_browser_privacy__sandbox_incognito_privacy__sandbox__whats__new__survey__service.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/privacy_sandbox/incognito/privacy_sandbox_whats_new_survey_service.h.orig 2025-11-06 10:11:34 UTC -+++ chrome/browser/privacy_sandbox/incognito/privacy_sandbox_whats_new_survey_service.h -@@ -16,7 +16,7 @@ - #include "components/keyed_service/core/keyed_service.h" - #include "content/public/browser/web_contents.h" - --#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_LINUX) -+#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) - #error This file should only be included on Win, Mac or Linux - #endif - diff --git a/www/iridium/files/patch-chrome_browser_process__singleton__posix.cc b/www/iridium/files/patch-chrome_browser_process__singleton__posix.cc index cfcc5562179d..98c4815bedbd 100644 --- a/www/iridium/files/patch-chrome_browser_process__singleton__posix.cc +++ b/www/iridium/files/patch-chrome_browser_process__singleton__posix.cc @@ -1,20 +1,20 @@ ---- chrome/browser/process_singleton_posix.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/process_singleton_posix.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/process_singleton_posix.cc @@ -102,7 +102,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/scoped_startup_resource_bundle.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/process_singleton_dialog_linux.h" #endif @@ -360,7 +360,7 @@ bool DisplayProfileInUseError(const base::FilePath& lo if (g_disable_prompt) return g_user_opted_unlock_in_use_profile; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::u16string relaunch_button_text = l10n_util::GetStringUTF16(IDS_PROFILE_IN_USE_LINUX_RELAUNCH); return ShowProcessSingletonDialog(error, relaunch_button_text); diff --git a/www/iridium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc b/www/iridium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc index e74f2d96bfd0..7c3d9a15093a 100644 --- a/www/iridium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc +++ b/www/iridium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc @@ -1,151 +1,151 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -387,7 +387,7 @@ +@@ -390,7 +390,7 @@ #endif #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/client_certificates/certificate_provisioning_service_factory.h" #include "chrome/browser/enterprise/client_certificates/certificate_store_factory.h" #include "chrome/browser/enterprise/idle/idle_service_factory.h" -@@ -432,7 +432,7 @@ +@@ -435,7 +435,7 @@ #endif #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || 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/ui/tabs/saved_tab_groups/collaboration_messaging_observer_factory.h" -@@ -442,11 +442,11 @@ - #if !BUILDFLAG(IS_ANDROID) - #include "chrome/browser/password_manager/startup_passwords_import_service_factory.h" // nogncheck (Desktop only) +@@ -447,11 +447,11 @@ + #include "chrome/browser/webauthn/passkey_unlock_manager_factory.h" + #include "device/fido/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 -#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/browser_switcher/browser_switcher_service_factory.h" #include "chrome/browser/enterprise/signin/enterprise_signin_service_factory.h" #include "chrome/browser/enterprise/signin/oidc_authentication_signin_interceptor_factory.h" -@@ -672,7 +672,7 @@ void ChromeBrowserMainExtraPartsProfiles:: - AccountInvestigatorFactory::GetInstance(); +@@ -676,7 +676,7 @@ void ChromeBrowserMainExtraPartsProfiles:: AccountPasswordStoreFactory::GetInstance(); AccountReconcilorFactory::GetInstance(); + autofill::AccountSettingServiceFactory::GetInstance(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) AccountsPolicyManagerFactory::GetInstance(); #endif #if !BUILDFLAG(IS_ANDROID) -@@ -771,7 +771,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -775,7 +775,7 @@ void ChromeBrowserMainExtraPartsProfiles:: DiceBoundSessionCookieServiceFactory::GetInstance(); #endif #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) browser_switcher::BrowserSwitcherServiceFactory::GetInstance(); #endif browser_sync::UserEventServiceFactory::GetInstance(); -@@ -834,7 +834,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -839,7 +839,7 @@ void ChromeBrowserMainExtraPartsProfiles:: collaboration::comments::CommentsServiceFactory::GetInstance(); collaboration::messaging::MessagingBackendServiceFactory::GetInstance(); #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) tab_groups::CollaborationMessagingObserverFactory::GetInstance(); #endif commerce::ShoppingServiceFactory::GetInstance(); -@@ -842,7 +842,7 @@ void ChromeBrowserMainExtraPartsProfiles:: - contextual_tasks::ContextualTasksContextControllerFactory::GetInstance(); - contextual_tasks::ContextualTasksServiceFactory::GetInstance(); +@@ -853,7 +853,7 @@ void ChromeBrowserMainExtraPartsProfiles:: + contextual_tasks::ContextualTasksUiServiceFactory::GetInstance(); + #endif ContentIndexProviderFactory::GetInstance(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) contextual_cueing::ContextualCueingServiceFactory::GetInstance(); #endif - ContextualSessionServiceFactory::GetInstance(); -@@ -895,11 +895,11 @@ void ChromeBrowserMainExtraPartsProfiles:: + ContextualSearchServiceFactory::GetInstance(); +@@ -907,11 +907,11 @@ void ChromeBrowserMainExtraPartsProfiles:: enterprise_connectors::ConnectorsServiceFactory::GetInstance(); enterprise_connectors::ReportingEventRouterFactory::GetInstance(); #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) enterprise_connectors::DeviceTrustConnectorServiceFactory::GetInstance(); enterprise_connectors::DeviceTrustServiceFactory::GetInstance(); #endif -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) && \ BUILDFLAG(ENTERPRISE_LOCAL_CONTENT_ANALYSIS) && \ BUILDFLAG(SAFE_BROWSING_AVAILABLE) enterprise_connectors::LocalBinaryUploadServiceFactory::GetInstance(); -@@ -909,7 +909,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -921,7 +921,7 @@ void ChromeBrowserMainExtraPartsProfiles:: GetInstance(); #endif #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) enterprise_idle::IdleServiceFactory::GetInstance(); enterprise_signals::SignalsAggregatorFactory::GetInstance(); #endif -@@ -918,10 +918,10 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -930,10 +930,10 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif enterprise_reporting::LegacyTechServiceFactory::GetInstance(); #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) enterprise_signals::UserPermissionServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) enterprise_signin::EnterpriseSigninServiceFactory::GetInstance(); #endif #if BUILDFLAG(ENABLE_SESSION_SERVICE) -@@ -1059,7 +1059,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1069,7 +1069,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if BUILDFLAG(IS_ANDROID) MerchantViewerDataManagerFactory::GetInstance(); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) metrics::DesktopProfileSessionDurationsServiceFactory::GetInstance(); #endif #if !BUILDFLAG(IS_ANDROID) -@@ -1147,7 +1147,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1162,7 +1162,7 @@ void ChromeBrowserMainExtraPartsProfiles:: PasswordCounterFactory::GetInstance(); #endif // !BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) PasswordManagerBlocklistPolicyFactory::GetInstance(); #endif PasswordManagerSettingsServiceFactory::GetInstance(); -@@ -1192,7 +1192,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1205,7 +1205,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if BUILDFLAG(IS_CHROMEOS) policy::PolicyCertServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) policy::ProfileTokenPolicyWebSigninServiceFactory::GetInstance(); policy::UserPolicyOidcSigninServiceFactory::GetInstance(); #endif -@@ -1229,7 +1229,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1240,7 +1240,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) ProfileStatisticsFactory::GetInstance(); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) ProfileTokenWebSigninInterceptorFactory::GetInstance(); OidcAuthenticationSigninInterceptorFactory::GetInstance(); - PrivacySandboxWhatsNewSurveyServiceFactory::GetInstance(); -@@ -1250,7 +1250,7 @@ void ChromeBrowserMainExtraPartsProfiles:: + #endif +@@ -1260,7 +1260,7 @@ void ChromeBrowserMainExtraPartsProfiles:: ReduceAcceptLanguageFactory::GetInstance(); RendererUpdaterFactory::GetInstance(); regional_capabilities::RegionalCapabilitiesServiceFactory::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_ANDROID) + RevokedPermissionsOSNotificationDisplayManagerFactory::GetInstance(); diff --git a/www/iridium/files/patch-chrome_browser_profiles_profile__impl.cc b/www/iridium/files/patch-chrome_browser_profiles_profile__impl.cc index ef34c6450e0b..3f63bb0750f4 100644 --- a/www/iridium/files/patch-chrome_browser_profiles_profile__impl.cc +++ b/www/iridium/files/patch-chrome_browser_profiles_profile__impl.cc @@ -1,40 +1,40 @@ ---- chrome/browser/profiles/profile_impl.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/profiles/profile_impl.cc -@@ -268,6 +268,10 @@ +@@ -265,6 +265,10 @@ #include "chrome/browser/safe_browsing/safe_browsing_service.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + using bookmarks::BookmarkModel; using content::BrowserThread; using content::DownloadManagerDelegate; -@@ -602,7 +606,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async +@@ -599,7 +603,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async policy_provider = GetUserCloudPolicyManagerAsh(); #else // !BUILDFLAG(IS_CHROMEOS) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ProfileManager* profile_manager = g_browser_process->profile_manager(); ProfileAttributesEntry* entry = profile_manager->GetProfileAttributesStorage() -@@ -876,7 +880,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) +@@ -871,7 +875,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/iridium/files/patch-chrome_browser_profiles_profile__io__data.cc b/www/iridium/files/patch-chrome_browser_profiles_profile__io__data.cc index 05086a69c26d..5d711c5cbfef 100644 --- a/www/iridium/files/patch-chrome_browser_profiles_profile__io__data.cc +++ b/www/iridium/files/patch-chrome_browser_profiles_profile__io__data.cc @@ -1,20 +1,20 @@ ---- chrome/browser/profiles/profile_io_data.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/profiles/profile_io_data.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/profiles/profile_io_data.cc @@ -17,7 +17,7 @@ #include "url/gurl.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/webapps/isolated_web_apps/scheme.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) -@@ -57,7 +57,7 @@ bool ProfileIOData::IsHandledProtocol(const std::strin +@@ -57,7 +57,7 @@ bool ProfileIOData::IsHandledProtocol(std::string_view url::kFileSystemScheme, chrome::kChromeSearchScheme, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) webapps::kIsolatedAppScheme, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) diff --git a/www/iridium/files/patch-chrome_browser_profiles_profiles__state.cc b/www/iridium/files/patch-chrome_browser_profiles_profiles__state.cc index 62bfdd4b531e..ee4dc84f5551 100644 --- a/www/iridium/files/patch-chrome_browser_profiles_profiles__state.cc +++ b/www/iridium/files/patch-chrome_browser_profiles_profiles__state.cc @@ -1,29 +1,29 @@ ---- chrome/browser/profiles/profiles_state.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/profiles/profiles_state.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/profiles/profiles_state.cc @@ -191,7 +191,7 @@ bool IsGuestModeRequested(const base::CommandLine& com PrefService* local_state, bool show_warning) { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) DCHECK(local_state); // Check if guest mode enforcement commandline switch or policy are provided. @@ -227,7 +227,7 @@ bool IsGuestModeEnabled() { return false; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // If there are any supervised profiles, disable guest mode. if (std::ranges::any_of(g_browser_process->profile_manager() ->GetProfileAttributesStorage() @@ -243,7 +243,7 @@ bool IsGuestModeEnabled() { } bool IsGuestModeEnabled(const Profile& profile) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) ProfileAttributesEntry* profile_attributes = g_browser_process->profile_manager() ->GetProfileAttributesStorage() diff --git a/www/iridium/files/patch-chrome_browser_regional__capabilities_regional__capabilities__service__factory.cc b/www/iridium/files/patch-chrome_browser_regional__capabilities_regional__capabilities__service__factory.cc index 71d7cf106819..ac092eb6eb59 100644 --- a/www/iridium/files/patch-chrome_browser_regional__capabilities_regional__capabilities__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_regional__capabilities_regional__capabilities__service__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/regional_capabilities/regional_capabilities_service_factory.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/regional_capabilities/regional_capabilities_service_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/regional_capabilities/regional_capabilities_service_factory.cc @@ -21,7 +21,7 @@ #include "chrome/browser/regional_capabilities/regional_capabilities_service_client_chromeos.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/regional_capabilities/regional_capabilities_service_client_linux.h" #endif @@ -72,7 +72,7 @@ RegionalCapabilitiesServiceFactory::BuildServiceInstan #elif BUILDFLAG(IS_CHROMEOS) std::make_unique( g_browser_process->variations_service()); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::make_unique( g_browser_process->variations_service()); #else diff --git a/www/iridium/files/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc b/www/iridium/files/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc index 25c4eb01019e..a474b8feb194 100644 --- a/www/iridium/files/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc +++ b/www/iridium/files/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc @@ -1,20 +1,20 @@ ---- chrome/browser/renderer_context_menu/render_view_context_menu.cc.orig 2025-11-12 18:20:14 UTC +--- chrome/browser/renderer_context_menu/render_view_context_menu.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/renderer_context_menu/render_view_context_menu.cc -@@ -243,7 +243,7 @@ +@@ -248,7 +248,7 @@ #include "url/origin.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/webapps/isolated_web_apps/scheme.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) -@@ -4985,7 +4985,7 @@ void RenderViewContextMenu::OpenLinkInSplitView() { +@@ -5024,7 +5024,7 @@ void RenderViewContextMenu::OpenLinkInSplitView() { #endif // !BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool RenderViewContextMenu::IsLinkToIsolatedWebApp() const { // Using `unfiltered_link_url`, because `link_url` is being replaced with // about:blank#blocked if the source is a normal site. diff --git a/www/iridium/files/patch-chrome_browser_renderer__preferences__util.cc b/www/iridium/files/patch-chrome_browser_renderer__preferences__util.cc index ffdda830dc91..99f76cf2fca8 100644 --- a/www/iridium/files/patch-chrome_browser_renderer__preferences__util.cc +++ b/www/iridium/files/patch-chrome_browser_renderer__preferences__util.cc @@ -1,29 +1,29 @@ ---- chrome/browser/renderer_preferences_util.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/renderer_preferences_util.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/renderer_preferences_util.cc @@ -38,7 +38,7 @@ #include "ui/base/ui_base_features.h" #include "ui/native_theme/native_theme.h" -#if defined(USE_AURA) && BUILDFLAG(IS_LINUX) +#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" #include "ui/linux/linux_ui.h" @@ -109,7 +109,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc Profile* profile) { const PrefService* pref_service = profile->GetPrefs(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) content::UpdateFontRendererPreferencesFromSystemSettings(prefs); #endif prefs->focus_ring_color = BUILDFLAG(IS_MAC) ? SkColorSetRGB(0x00, 0x5F, 0xCC) @@ -123,7 +123,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc prefs->inactive_selection_fg_color = SK_ColorBLACK; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(profile)) { if (ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme()) { linux_ui_theme->GetFocusRingColor(&prefs->focus_ring_color); diff --git a/www/iridium/files/patch-chrome_browser_resources_settings_autofill__page_passwords__shared.css b/www/iridium/files/patch-chrome_browser_resources_settings_autofill__page_passwords__shared.css index 9d30e71682ca..904ed586ff05 100644 --- a/www/iridium/files/patch-chrome_browser_resources_settings_autofill__page_passwords__shared.css +++ b/www/iridium/files/patch-chrome_browser_resources_settings_autofill__page_passwords__shared.css @@ -1,11 +1,11 @@ ---- chrome/browser/resources/settings/autofill_page/passwords_shared.css.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/resources/settings/autofill_page/passwords_shared.css.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/resources/settings/autofill_page/passwords_shared.css @@ -100,7 +100,7 @@ cr-input.password-input::part(input), * necessary to prevent Chrome from using the operating system's font * instead of the Material Design font. * TODO(dbeam): why not font: inherit? */ - + font-family: 'DejaVu Sans Mono', monospace; diff --git a/www/iridium/files/patch-chrome_browser_resources_signin_signin__shared.css b/www/iridium/files/patch-chrome_browser_resources_signin_signin__shared.css index 374335f3860b..5bd9950b4178 100644 --- a/www/iridium/files/patch-chrome_browser_resources_signin_signin__shared.css +++ b/www/iridium/files/patch-chrome_browser_resources_signin_signin__shared.css @@ -1,11 +1,11 @@ ---- chrome/browser/resources/signin/signin_shared.css.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/resources/signin/signin_shared.css.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/resources/signin/signin_shared.css @@ -54,7 +54,7 @@ a { border-radius: var(--scrollbar-width); } - + .action-container { flex-flow: row-reverse; justify-content: flex-start; diff --git a/www/iridium/files/patch-chrome_browser_safe__browsing_chrome__password__protection__service.cc b/www/iridium/files/patch-chrome_browser_safe__browsing_chrome__password__protection__service.cc index 212a00189f18..9eb51c0a44c0 100644 --- a/www/iridium/files/patch-chrome_browser_safe__browsing_chrome__password__protection__service.cc +++ b/www/iridium/files/patch-chrome_browser_safe__browsing_chrome__password__protection__service.cc @@ -1,11 +1,11 @@ ---- chrome/browser/safe_browsing/chrome_password_protection_service.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/safe_browsing/chrome_password_protection_service.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/safe_browsing/chrome_password_protection_service.cc -@@ -1288,7 +1288,7 @@ std::string ChromePasswordProtectionService::GetOrgani +@@ -1292,7 +1292,7 @@ std::string ChromePasswordProtectionService::GetOrgani ReusedPasswordAccountType password_type) const { if (base::FeatureList::IsEnabled( safe_browsing::kEnterprisePasswordReuseUiRefresh)) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return GetPrefs()->GetString(prefs::kEnterpriseCustomLabelForProfile); #else return std::string(); diff --git a/www/iridium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc b/www/iridium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc index dcd911767459..cc8d70b8f4d8 100644 --- a/www/iridium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc +++ b/www/iridium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_binary__upload__service.cc @@ -1,11 +1,11 @@ ---- chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc -@@ -20,7 +20,7 @@ +@@ -21,7 +21,7 @@ #include "components/safe_browsing/core/common/safebrowsing_switches.h" #include "net/base/url_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/connectors/analysis/local_binary_upload_service_factory.h" #endif diff --git a/www/iridium/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc b/www/iridium/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc index c8b30da578c1..e873a29dd75f 100644 --- a/www/iridium/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc +++ b/www/iridium/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc @@ -1,11 +1,11 @@ ---- chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc @@ -695,7 +695,7 @@ void IncidentReportingService::OnEnvironmentDataCollec // Process::Current().CreationTime() is missing on some platforms. #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::TimeDelta uptime = first_incident_time_ - base::Process::Current().CreationTime(); environment_data->mutable_process()->set_uptime_msec(uptime.InMilliseconds()); diff --git a/www/iridium/files/patch-chrome_browser_safe__browsing_safe__browsing__pref__change__handler.cc b/www/iridium/files/patch-chrome_browser_safe__browsing_safe__browsing__pref__change__handler.cc index d88ac96bd09a..db8eb869018e 100644 --- a/www/iridium/files/patch-chrome_browser_safe__browsing_safe__browsing__pref__change__handler.cc +++ b/www/iridium/files/patch-chrome_browser_safe__browsing_safe__browsing__pref__change__handler.cc @@ -1,29 +1,29 @@ ---- chrome/browser/safe_browsing/safe_browsing_pref_change_handler.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/safe_browsing/safe_browsing_pref_change_handler.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/safe_browsing/safe_browsing_pref_change_handler.cc -@@ -12,7 +12,7 @@ +@@ -14,7 +14,7 @@ #include "content/public/browser/web_contents.h" #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/browser_window/public/browser_window_features.h" #include "chrome/browser/ui/toasts/api/toast_id.h" -@@ -59,7 +59,7 @@ SafeBrowsingPrefChangeHandler::~SafeBrowsingPrefChange +@@ -61,7 +61,7 @@ SafeBrowsingPrefChangeHandler::~SafeBrowsingPrefChange void SafeBrowsingPrefChangeHandler:: MaybeShowEnhancedProtectionSettingChangeNotification() { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (!profile_ || !base::FeatureList::IsEnabled(safe_browsing::kEsbAsASyncedSetting)) { return; -@@ -186,7 +186,7 @@ void SafeBrowsingPrefChangeHandler:: +@@ -216,7 +216,7 @@ void SafeBrowsingPrefChangeHandler:: } #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) void SafeBrowsingPrefChangeHandler::SetToastControllerForTesting( ToastController* controller) { toast_controller_for_testing_ = controller; diff --git a/www/iridium/files/patch-chrome_browser_safe__browsing_safe__browsing__pref__change__handler.h b/www/iridium/files/patch-chrome_browser_safe__browsing_safe__browsing__pref__change__handler.h index 785848d530d1..e56a19b8ee13 100644 --- a/www/iridium/files/patch-chrome_browser_safe__browsing_safe__browsing__pref__change__handler.h +++ b/www/iridium/files/patch-chrome_browser_safe__browsing_safe__browsing__pref__change__handler.h @@ -1,29 +1,29 @@ ---- chrome/browser/safe_browsing/safe_browsing_pref_change_handler.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/safe_browsing/safe_browsing_pref_change_handler.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/safe_browsing/safe_browsing_pref_change_handler.h @@ -20,7 +20,7 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/toasts/toast_controller.h" #endif @@ -63,7 +63,7 @@ class SafeBrowsingPrefChangeHandler { virtual void MaybeShowEnhancedProtectionSettingChangeNotification(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) void SetToastControllerForTesting(ToastController* controller); #endif @@ -72,7 +72,7 @@ class SafeBrowsingPrefChangeHandler { raw_ptr profile_; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) raw_ptr toast_controller_for_testing_ = nullptr; #endif diff --git a/www/iridium/files/patch-chrome_browser_screen__ai_screen__ai__install__state.cc b/www/iridium/files/patch-chrome_browser_screen__ai_screen__ai__install__state.cc index 4450b64953f9..680205d9ace3 100644 --- a/www/iridium/files/patch-chrome_browser_screen__ai_screen__ai__install__state.cc +++ b/www/iridium/files/patch-chrome_browser_screen__ai_screen__ai__install__state.cc @@ -1,11 +1,11 @@ ---- chrome/browser/screen_ai/screen_ai_install_state.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/screen_ai/screen_ai_install_state.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/screen_ai/screen_ai_install_state.cc @@ -30,7 +30,7 @@ bool IsDeviceCompatible() { // TODO(crbug.com/381256355): Update when ScreenAI library is compatible with // older CPUs. static const bool device_compatible = base::CPU().has_sse42(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Linux, the library is only built for X86 CPUs. static constexpr bool device_compatible = false; #else diff --git a/www/iridium/files/patch-chrome_browser_screen__ai_screen__ai__service__handler__base.cc b/www/iridium/files/patch-chrome_browser_screen__ai_screen__ai__service__handler__base.cc index 36e934d33416..8ffd283d4028 100644 --- a/www/iridium/files/patch-chrome_browser_screen__ai_screen__ai__service__handler__base.cc +++ b/www/iridium/files/patch-chrome_browser_screen__ai_screen__ai__service__handler__base.cc @@ -1,20 +1,20 @@ ---- chrome/browser/screen_ai/screen_ai_service_handler_base.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/screen_ai/screen_ai_service_handler_base.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/screen_ai/screen_ai_service_handler_base.cc @@ -253,7 +253,7 @@ void ScreenAIServiceHandlerBase::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())}; @@ -268,7 +268,7 @@ void ScreenAIServiceHandlerBase::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) .WithProcessCallback( diff --git a/www/iridium/files/patch-chrome_browser_sessions_session__restore.cc b/www/iridium/files/patch-chrome_browser_sessions_session__restore.cc index 709ab14a7f9f..5b3373ac6853 100644 --- a/www/iridium/files/patch-chrome_browser_sessions_session__restore.cc +++ b/www/iridium/files/patch-chrome_browser_sessions_session__restore.cc @@ -1,20 +1,20 @@ ---- chrome/browser/sessions/session_restore.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/sessions/session_restore.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/sessions/session_restore.cc @@ -109,7 +109,7 @@ #include "ui/wm/core/scoped_animation_disabler.h" #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/whats_new/whats_new_fetcher.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) @@ -1183,7 +1183,7 @@ class SessionRestoreImpl : public BrowserListObserver bool is_first_tab = true; for (const auto& startup_tab : startup_tabs) { const GURL& url = startup_tab.url; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (url == whats_new::GetWebUIStartupURL()) { whats_new::StartWhatsNewFetch(browser); continue; diff --git a/www/iridium/files/patch-chrome_browser_sharing_sharing__handler__registry__impl.cc b/www/iridium/files/patch-chrome_browser_sharing_sharing__handler__registry__impl.cc index 060d9176decb..af7298d3392f 100644 --- a/www/iridium/files/patch-chrome_browser_sharing_sharing__handler__registry__impl.cc +++ b/www/iridium/files/patch-chrome_browser_sharing_sharing__handler__registry__impl.cc @@ -1,20 +1,20 @@ ---- chrome/browser/sharing/sharing_handler_registry_impl.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/sharing/sharing_handler_registry_impl.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/sharing/sharing_handler_registry_impl.cc @@ -21,7 +21,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/sharing/shared_clipboard/remote_copy_message_handler.h" #endif @@ -72,7 +72,7 @@ SharingHandlerRegistryImpl::SharingHandlerRegistryImpl #endif // !BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (sharing_device_registration->IsRemoteCopySupported()) { AddSharingHandler( std::make_unique(profile), diff --git a/www/iridium/files/patch-chrome_browser_shortcuts_icon__badging.cc b/www/iridium/files/patch-chrome_browser_shortcuts_icon__badging.cc index 495438038a32..b2672bb3ff19 100644 --- a/www/iridium/files/patch-chrome_browser_shortcuts_icon__badging.cc +++ b/www/iridium/files/patch-chrome_browser_shortcuts_icon__badging.cc @@ -1,11 +1,11 @@ ---- chrome/browser/shortcuts/icon_badging.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/shortcuts/icon_badging.cc.orig 2025-12-10 15:04:57 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/iridium/files/patch-chrome_browser_signin_chrome__signin__client.cc b/www/iridium/files/patch-chrome_browser_signin_chrome__signin__client.cc index 8d0f59acf43c..d5f1a38c99b4 100644 --- a/www/iridium/files/patch-chrome_browser_signin_chrome__signin__client.cc +++ b/www/iridium/files/patch-chrome_browser_signin_chrome__signin__client.cc @@ -1,11 +1,11 @@ ---- chrome/browser/signin/chrome_signin_client.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/signin/chrome_signin_client.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/signin/chrome_signin_client.cc -@@ -164,7 +164,7 @@ signin_metrics::ProfileSignout kAlwaysAllowedSignoutSo +@@ -165,7 +165,7 @@ signin_metrics::ProfileSignout kAlwaysAllowedSignoutSo std::string HatsSurveyTriggerForAccessPoint( signin_metrics::AccessPoint access_point) { switch (access_point) { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) case signin_metrics::AccessPoint::kAddressBubble: return kHatsSurveyTriggerIdentityAddressBubbleSignin; case signin_metrics::AccessPoint::kAvatarBubbleSignIn: diff --git a/www/iridium/files/patch-chrome_browser_signin_signin__hats__util.cc b/www/iridium/files/patch-chrome_browser_signin_signin__hats__util.cc index 7740a92deb4c..49645dc2854f 100644 --- a/www/iridium/files/patch-chrome_browser_signin_signin__hats__util.cc +++ b/www/iridium/files/patch-chrome_browser_signin_signin__hats__util.cc @@ -1,29 +1,29 @@ ---- chrome/browser/signin/signin_hats_util.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/signin/signin_hats_util.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/signin/signin_hats_util.cc -@@ -36,7 +36,7 @@ +@@ -39,7 +39,7 @@ namespace { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) constexpr char kChannel[] = "Channel"; constexpr char kChromeVersion[] = "Chrome Version"; constexpr char kNumberOfChromeProfiles[] = "Number of Chrome Profiles"; -@@ -153,7 +153,7 @@ SurveyStringData GetSigninSurveyStringData( +@@ -123,7 +123,7 @@ SurveyStringData GetSigninSurveyStringData( namespace signin { bool IsFeatureEnabledForSigninHatsTrigger(const std::string& trigger) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - for (const auto& entry : kChromeIdentityHatsTriggerFeatureMapping) { - if (trigger == entry.trigger) { - return base::FeatureList::IsEnabled(*entry.feature); -@@ -171,7 +171,7 @@ void LaunchSigninHatsSurveyForProfile(const std::strin + static const base::NoDestructor< + base::flat_map> + kChromeIdentityHatsTriggerFeatureMap({ +@@ -168,7 +168,7 @@ void LaunchSigninHatsSurveyForProfile(const std::strin bool defer_if_no_browser, std::optional access_point_for_data_type_promo) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!profile || !IsFeatureEnabledForSigninHatsTrigger(trigger)) { return; } diff --git a/www/iridium/files/patch-chrome_browser_signin_signin__util.cc b/www/iridium/files/patch-chrome_browser_signin_signin__util.cc index 62058de6d2e1..d9b15e19ad4d 100644 --- a/www/iridium/files/patch-chrome_browser_signin_signin__util.cc +++ b/www/iridium/files/patch-chrome_browser_signin_signin__util.cc @@ -1,29 +1,29 @@ ---- chrome/browser/signin/signin_util.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/signin/signin_util.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/signin/signin_util.cc @@ -50,7 +50,7 @@ #include "services/network/public/mojom/cookie_manager.mojom.h" #include "ui/base/l10n/l10n_util.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/browser_dialogs.h" #include "chrome/browser/ui/browser_finder.h" #include "components/strings/grit/components_strings.h" @@ -97,7 +97,7 @@ CookiesMover::CookiesMover(base::WeakPtr sour CookiesMover::~CookiesMover() = default; void CookiesMover::StartMovingCookies() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) bool allow_cookies_to_be_moved = base::FeatureList::IsEnabled( profile_management::features::kThirdPartyProfileManagement); #else @@ -399,7 +399,7 @@ bool IsSyncingUserSelectableTypesAllowedByPolicy( return true; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) bool HasExplicitlyDisabledHistorySync(Profile& profile) { // If the user is signed out, we cannot know if the toggles were interacted // with or not. diff --git a/www/iridium/files/patch-chrome_browser_signin_signin__util.h b/www/iridium/files/patch-chrome_browser_signin_signin__util.h index ddd4cdff8efd..5374471c518f 100644 --- a/www/iridium/files/patch-chrome_browser_signin_signin__util.h +++ b/www/iridium/files/patch-chrome_browser_signin_signin__util.h @@ -1,11 +1,11 @@ ---- chrome/browser/signin/signin_util.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/signin/signin_util.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/signin/signin_util.h @@ -203,7 +203,7 @@ bool IsSyncingUserSelectableTypesAllowedByPolicy( const syncer::SyncService* sync_service, const syncer::UserSelectableTypeSet& types); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // True if the user has explicitly disabled syncing history, tabs or saved tab // groups through the settings. // This method does not take into account the feature flag diff --git a/www/iridium/files/patch-chrome_browser_supervised__user_classify__url__navigation__throttle.cc b/www/iridium/files/patch-chrome_browser_supervised__user_classify__url__navigation__throttle.cc index df6653eaf981..66e60e3053c6 100644 --- a/www/iridium/files/patch-chrome_browser_supervised__user_classify__url__navigation__throttle.cc +++ b/www/iridium/files/patch-chrome_browser_supervised__user_classify__url__navigation__throttle.cc @@ -1,20 +1,20 @@ ---- chrome/browser/supervised_user/classify_url_navigation_throttle.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/supervised_user/classify_url_navigation_throttle.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/supervised_user/classify_url_navigation_throttle.cc @@ -41,7 +41,7 @@ namespace supervised_user { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) bool ShouldShowReAuthInterstitial( content::NavigationHandle& navigation_handle) { Profile* profile = Profile::FromBrowserContext( @@ -208,7 +208,7 @@ void ClassifyUrlNavigationThrottle::OnInterstitialResu } case InterstitialResultCallbackActions::kCancelWithInterstitial: { CHECK(navigation_handle()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (ShouldShowReAuthInterstitial(*navigation_handle())) { // Show the re-authentication interstitial if the user signed out of // the content area, as parent's approval requires authentication. diff --git a/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.cc b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.cc index e519ca552099..f78e70c7e127 100644 --- a/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.cc +++ b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.cc @@ -1,20 +1,20 @@ ---- chrome/browser/supervised_user/supervised_user_browser_utils.cc.orig 2025-06-19 07:37:57 UTC +--- chrome/browser/supervised_user/supervised_user_browser_utils.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/supervised_user/supervised_user_browser_utils.cc @@ -40,7 +40,7 @@ #include "chrome/browser/ash/profiles/profile_helper.h" #include "components/user_manager/user.h" #include "components/user_manager/user_type.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/supervised_user/supervised_user_verification_controller_client.h" #include "chrome/browser/supervised_user/supervised_user_verification_page_blocked_sites.h" #include "chrome/browser/supervised_user/supervised_user_verification_page_youtube.h" -@@ -158,7 +158,7 @@ void AssertChildStatusOfTheUser(Profile* profile, bool +@@ -157,7 +157,7 @@ void AssertChildStatusOfTheUser(Profile* profile, bool #endif } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) std::string CreateReauthenticationInterstitialForYouTube( content::NavigationHandle& navigation_handle) { content::WebContents* web_contents = navigation_handle.GetWebContents(); diff --git a/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.h b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.h index 1251b1889d50..6fb1393cc7c3 100644 --- a/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.h +++ b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.h @@ -1,11 +1,11 @@ ---- chrome/browser/supervised_user/supervised_user_browser_utils.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/supervised_user/supervised_user_browser_utils.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/supervised_user/supervised_user_browser_utils.h @@ -52,7 +52,7 @@ std::string GetAccountGivenName(Profile& profile); // of the user. void AssertChildStatusOfTheUser(Profile* profile, bool is_child); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Returns the html content of the reauthentication interstitial for blocked // sites. This interstitial is associated with the given NavigationHandle. std::string CreateReauthenticationInterstitialForBlockedSites( diff --git a/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc index 380e234bfad6..d5a5c20d6bbe 100644 --- a/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc +++ b/www/iridium/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 2025-10-28 14:29:43 UTC +--- chrome/browser/supervised_user/supervised_user_extensions_delegate_impl.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/supervised_user/supervised_user_extensions_delegate_impl.cc @@ -194,7 +194,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(); // Always invoke the parent permission dialog. diff --git a/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc index f85949dc6bea..f145747c3239 100644 --- a/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc +++ b/www/iridium/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 2025-10-28 14:29:43 UTC +--- chrome/browser/supervised_user/supervised_user_extensions_manager.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/supervised_user/supervised_user_extensions_manager.cc @@ -345,7 +345,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) } @@ -444,7 +444,7 @@ bool SupervisedUserExtensionsManager::ShouldBlockExten return false; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void SupervisedUserExtensionsManager:: MaybeMarkExtensionsLocallyParentApproved() { supervised_user::LocallyParentApprovedExtensionsMigrationState diff --git a/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h index 96a7d2bc8cec..b7fb9c5f5d9b 100644 --- a/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h +++ b/www/iridium/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 2025-10-28 14:29:43 UTC +--- chrome/browser/supervised_user/supervised_user_extensions_manager.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/supervised_user/supervised_user_extensions_manager.h -@@ -151,7 +151,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/iridium/files/patch-chrome_browser_supervised__user_supervised__user__google__auth__navigation__throttle.cc b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__google__auth__navigation__throttle.cc index ee7cd9fa7782..6739b28de751 100644 --- a/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__google__auth__navigation__throttle.cc +++ b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__google__auth__navigation__throttle.cc @@ -1,26 +1,26 @@ ---- chrome/browser/supervised_user/supervised_user_google_auth_navigation_throttle.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/supervised_user/supervised_user_google_auth_navigation_throttle.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/supervised_user/supervised_user_google_auth_navigation_throttle.cc @@ -33,12 +33,12 @@ #include "chrome/browser/supervised_user/child_accounts/child_account_service_android.h" #include "components/signin/public/identity_manager/identity_manager.h" #include "ui/android/view_android.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/supervised_user/supervised_user_verification_controller_client.h" #include "chrome/browser/supervised_user/supervised_user_verification_page.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) namespace { bool IsYouTubeInfrastructureSubframe(content::NavigationHandle* handle) { if (handle->GetNavigatingFrameType() != content::FrameType::kSubframe) { @@ -160,7 +160,7 @@ SupervisedUserGoogleAuthNavigationThrottle::ShouldProc return content::NavigationThrottle::DEFER; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // When an unauthenticated supervised user tries to access YouTube, we force // re-authentication with an interstitial so that YouTube can be subject to // content restrictions. This interstitial is only available on Desktop diff --git a/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__metrics__service__factory.cc b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__metrics__service__factory.cc index 65277a008055..b7e64d6d9073 100644 --- a/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__metrics__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__metrics__service__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/supervised_user/supervised_user_metrics_service_factory.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/supervised_user/supervised_user_metrics_service_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/supervised_user/supervised_user_metrics_service_factory.cc @@ -15,7 +15,7 @@ #include "content/public/browser/browser_context.h" #include "chrome/browser/supervised_user/metrics_service_accessor_delegate.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/supervised_user/linux_mac_windows/supervised_user_extensions_metrics_delegate_impl.h" #endif @@ -63,7 +63,7 @@ SupervisedUserMetricsServiceFactory::BuildServiceInsta std::unique_ptr extensions_metrics_delegate = nullptr; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extensions_metrics_delegate = std::make_unique( extensions::ExtensionRegistry::Get(profile), profile); diff --git a/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__navigation__observer.cc b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__navigation__observer.cc index 57a195a7f5af..8fb7f76330d3 100644 --- a/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__navigation__observer.cc +++ b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__navigation__observer.cc @@ -1,20 +1,20 @@ ---- chrome/browser/supervised_user/supervised_user_navigation_observer.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/supervised_user/supervised_user_navigation_observer.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/supervised_user/supervised_user_navigation_observer.cc @@ -49,7 +49,7 @@ #include "chrome/browser/supervised_user/android/supervised_user_web_content_handler_impl.h" #elif BUILDFLAG(IS_CHROMEOS) #include "chrome/browser/supervised_user/chromeos/supervised_user_web_content_handler_impl.h" -#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/supervised_user/linux_mac_windows/supervised_user_web_content_handler_impl.h" #endif @@ -69,7 +69,7 @@ std::unique_ptr Cr #elif BUILDFLAG(IS_ANDROID) return std::make_unique( web_contents, frame_id, navigation_id); -#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return std::make_unique( web_contents, frame_id, navigation_id); #endif diff --git a/www/iridium/files/patch-chrome_browser_sync_chrome__sync__controller__builder.cc b/www/iridium/files/patch-chrome_browser_sync_chrome__sync__controller__builder.cc index e3c0e903b085..bec32ebad819 100644 --- a/www/iridium/files/patch-chrome_browser_sync_chrome__sync__controller__builder.cc +++ b/www/iridium/files/patch-chrome_browser_sync_chrome__sync__controller__builder.cc @@ -1,11 +1,11 @@ ---- chrome/browser/sync/chrome_sync_controller_builder.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/sync/chrome_sync_controller_builder.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/sync/chrome_sync_controller_builder.cc @@ -297,7 +297,7 @@ ChromeSyncControllerBuilder::Build(syncer::SyncService #if BUILDFLAG(ENABLE_SPELLCHECK) // 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 (spellcheck_service_.value()) { controllers.push_back( diff --git a/www/iridium/files/patch-chrome_browser_sync_device__info__sync__client__impl.cc b/www/iridium/files/patch-chrome_browser_sync_device__info__sync__client__impl.cc index 948467ef8b14..fbd08aba6c23 100644 --- a/www/iridium/files/patch-chrome_browser_sync_device__info__sync__client__impl.cc +++ b/www/iridium/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 2025-05-07 06:48:23 UTC +--- chrome/browser/sync/device_info_sync_client_impl.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/sync/device_info_sync_client_impl.cc @@ -34,7 +34,7 @@ DeviceInfoSyncClientImpl::~DeviceInfoSyncClientImpl() std::string DeviceInfoSyncClientImpl::GetSigninScopedDeviceId() const { // Since the local sync backend is currently only supported on Windows, Mac and // Linux don't even check the pref on other os-es. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) syncer::SyncPrefs prefs(profile_->GetPrefs()); if (prefs.IsLocalSyncEnabled()) { return "local_device"; diff --git a/www/iridium/files/patch-chrome_browser_sync_sync__service__factory.cc b/www/iridium/files/patch-chrome_browser_sync_sync__service__factory.cc index 969ad6324408..18bc85044c17 100644 --- a/www/iridium/files/patch-chrome_browser_sync_sync__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_sync_sync__service__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/sync/sync_service_factory.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/sync/sync_service_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/sync/sync_service_factory.cc -@@ -134,7 +134,7 @@ namespace { +@@ -135,7 +135,7 @@ namespace { tab_groups::TabGroupSyncService* GetTabGroupSyncService(Profile* profile) { CHECK(profile); #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) tab_groups::TabGroupSyncService* service = tab_groups::TabGroupSyncServiceFactory::GetForProfile(profile); CHECK(service); -@@ -399,7 +399,7 @@ std::unique_ptr BuildSyncService( +@@ -402,7 +402,7 @@ std::unique_ptr BuildSyncService( bool local_sync_backend_enabled = false; // Only check the local sync backend pref on the supported platforms of // Windows, Mac and Linux. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) syncer::SyncPrefs prefs(profile->GetPrefs()); local_sync_backend_enabled = prefs.IsLocalSyncEnabled(); base::UmaHistogramBoolean("Sync.Local.Enabled2", local_sync_backend_enabled); diff --git a/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__group.cc b/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__group.cc index 8dac021ef9fd..ce118cfa8b9d 100644 --- a/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__group.cc +++ b/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__group.cc @@ -1,29 +1,29 @@ ---- chrome/browser/task_manager/sampling/task_group.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/task_manager/sampling/task_group.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/task_manager/sampling/task_group.cc @@ -33,7 +33,7 @@ const int kBackgroundRefreshTypesMask = #if BUILDFLAG(IS_WIN) REFRESH_TYPE_START_TIME | REFRESH_TYPE_CPU_TIME | #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) REFRESH_TYPE_FD_COUNT | #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) REFRESH_TYPE_PRIORITY; @@ -93,7 +93,7 @@ TaskGroup::TaskGroup( weak_ptr_factory_.GetWeakPtr()), base::BindRepeating(&TaskGroup::OnIdleWakeupsRefreshDone, weak_ptr_factory_.GetWeakPtr()), -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) base::BindRepeating(&TaskGroup::OnOpenFdCountRefreshDone, weak_ptr_factory_.GetWeakPtr()), #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) @@ -236,7 +236,7 @@ void TaskGroup::RefreshWindowsHandles() { #endif // BUILDFLAG(IS_WIN) } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) void TaskGroup::OnOpenFdCountRefreshDone(int open_fd_count) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); diff --git a/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__group.h b/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__group.h index 066fa93d34a1..d669ad8f9f99 100644 --- a/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__group.h +++ b/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__group.h @@ -1,38 +1,38 @@ ---- chrome/browser/task_manager/sampling/task_group.h.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/task_manager/sampling/task_group.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/task_manager/sampling/task_group.h @@ -41,7 +41,7 @@ inline constexpr int kUnsupportedVMRefreshFlags = REFRESH_TYPE_WEBCACHE_STATS | REFRESH_TYPE_NETWORK_USAGE | REFRESH_TYPE_IDLE_WAKEUPS | REFRESH_TYPE_HANDLES | REFRESH_TYPE_START_TIME | REFRESH_TYPE_CPU_TIME | REFRESH_TYPE_PRIORITY | -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) REFRESH_TYPE_FD_COUNT | #endif REFRESH_TYPE_HARD_FAULTS; @@ -141,7 +141,7 @@ class TaskGroup { int64_t hard_faults_per_second() const { return hard_faults_per_second_; } #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) int open_fd_count() const { return open_fd_count_; } void set_open_fd_count(int open_fd_count) { open_fd_count_ = open_fd_count; } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) @@ -156,7 +156,7 @@ class TaskGroup { void RefreshWindowsHandles(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) void OnOpenFdCountRefreshDone(int open_fd_count); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) @@ -226,7 +226,7 @@ class TaskGroup { int64_t user_peak_handles_ = -1; int64_t hard_faults_per_second_ = -1; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // The number of file descriptors currently open by the process. int open_fd_count_ = -1; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) diff --git a/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc b/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc index 9a0a1bc05f6b..889e47904268 100644 --- a/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc +++ b/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc @@ -1,47 +1,47 @@ ---- chrome/browser/task_manager/sampling/task_group_sampler.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/task_manager/sampling/task_group_sampler.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/task_manager/sampling/task_group_sampler.cc @@ -45,7 +45,7 @@ TaskGroupSampler::TaskGroupSampler( const OnCpuRefreshCallback& on_cpu_refresh, const OnSwappedMemRefreshCallback& on_swapped_mem_refresh, const OnIdleWakeupsCallback& on_idle_wakeups, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const OnOpenFdCountCallback& on_open_fd_count, #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) const OnProcessPriorityCallback& on_process_priority) @@ -55,7 +55,7 @@ TaskGroupSampler::TaskGroupSampler( on_cpu_refresh_callback_(on_cpu_refresh), on_swapped_mem_refresh_callback_(on_swapped_mem_refresh), on_idle_wakeups_callback_(on_idle_wakeups), -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) on_open_fd_count_callback_(on_open_fd_count), #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) on_process_priority_callback_(on_process_priority) { @@ -85,7 +85,7 @@ void TaskGroupSampler::Refresh(int64_t refresh_flags) base::BindOnce(on_swapped_mem_refresh_callback_)); } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (TaskManagerObserver::IsResourceRefreshEnabled(REFRESH_TYPE_IDLE_WAKEUPS, refresh_flags)) { blocking_pool_runner_->PostTaskAndReplyWithResult( @@ -95,7 +95,7 @@ void TaskGroupSampler::Refresh(int64_t refresh_flags) } #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (TaskManagerObserver::IsResourceRefreshEnabled(REFRESH_TYPE_FD_COUNT, refresh_flags)) { blocking_pool_runner_->PostTaskAndReplyWithResult( @@ -152,7 +152,7 @@ int TaskGroupSampler::RefreshIdleWakeupsPerSecond() { return process_metrics_->GetIdleWakeupsPerSecond(); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) int TaskGroupSampler::RefreshOpenFdCount() { DCHECK_CALLED_ON_VALID_SEQUENCE(worker_pool_sequenced_checker_); diff --git a/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.h b/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.h index c206aac024eb..546d4990e106 100644 --- a/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.h +++ b/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.h @@ -1,38 +1,38 @@ ---- chrome/browser/task_manager/sampling/task_group_sampler.h.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/task_manager/sampling/task_group_sampler.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/task_manager/sampling/task_group_sampler.h @@ -33,7 +33,7 @@ class TaskGroupSampler : public base::RefCountedThread using OnSwappedMemRefreshCallback = base::RepeatingCallback; using OnIdleWakeupsCallback = base::RepeatingCallback; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) using OnOpenFdCountCallback = base::RepeatingCallback; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) using OnProcessPriorityCallback = @@ -45,7 +45,7 @@ class TaskGroupSampler : public base::RefCountedThread const OnCpuRefreshCallback& on_cpu_refresh, const OnSwappedMemRefreshCallback& on_memory_refresh, const OnIdleWakeupsCallback& on_idle_wakeups, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const OnOpenFdCountCallback& on_open_fd_count, #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) const OnProcessPriorityCallback& on_process_priority); @@ -65,7 +65,7 @@ class TaskGroupSampler : public base::RefCountedThread double RefreshCpuUsage(); base::ByteCount RefreshSwappedMem(); int RefreshIdleWakeupsPerSecond(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) int RefreshOpenFdCount(); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) base::Process::Priority RefreshProcessPriority(); @@ -89,7 +89,7 @@ class TaskGroupSampler : public base::RefCountedThread const OnCpuRefreshCallback on_cpu_refresh_callback_; const OnSwappedMemRefreshCallback on_swapped_mem_refresh_callback_; const OnIdleWakeupsCallback on_idle_wakeups_callback_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const OnOpenFdCountCallback on_open_fd_count_callback_; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) const OnProcessPriorityCallback on_process_priority_callback_; diff --git a/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__manager__impl.cc b/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__manager__impl.cc index 1c8005ff768f..c74cf0515c26 100644 --- a/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__manager__impl.cc +++ b/www/iridium/files/patch-chrome_browser_task__manager_sampling_task__manager__impl.cc @@ -1,11 +1,11 @@ ---- chrome/browser/task_manager/sampling/task_manager_impl.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/task_manager/sampling/task_manager_impl.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/task_manager/sampling/task_manager_impl.cc @@ -227,7 +227,7 @@ void TaskManagerImpl::GetUSERHandles(TaskId task_id, } int TaskManagerImpl::GetOpenFdCount(TaskId task_id) const { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return GetTaskGroupByTaskId(task_id)->open_fd_count(); #else return -1; diff --git a/www/iridium/files/patch-chrome_browser_task__manager_task__manager__observer.h b/www/iridium/files/patch-chrome_browser_task__manager_task__manager__observer.h index f07e34fc02be..8e997b0f5c94 100644 --- a/www/iridium/files/patch-chrome_browser_task__manager_task__manager__observer.h +++ b/www/iridium/files/patch-chrome_browser_task__manager_task__manager__observer.h @@ -1,11 +1,11 @@ ---- chrome/browser/task_manager/task_manager_observer.h.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/task_manager/task_manager_observer.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/task_manager/task_manager_observer.h @@ -45,7 +45,7 @@ enum RefreshType { // or backgrounded. REFRESH_TYPE_PRIORITY = 1 << 12, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // For observers interested in getting the number of open file descriptors of // processes. REFRESH_TYPE_FD_COUNT = 1 << 13, diff --git a/www/iridium/files/patch-chrome_browser_themes_theme__helper.cc b/www/iridium/files/patch-chrome_browser_themes_theme__helper.cc index cbb200e2a3c2..c729bdc6355e 100644 --- a/www/iridium/files/patch-chrome_browser_themes_theme__helper.cc +++ b/www/iridium/files/patch-chrome_browser_themes_theme__helper.cc @@ -1,11 +1,11 @@ ---- chrome/browser/themes/theme_helper.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/themes/theme_helper.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/themes/theme_helper.cc @@ -16,7 +16,7 @@ #include "ui/gfx/image/image.h" #include "ui/native_theme/native_theme.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui.h" #endif diff --git a/www/iridium/files/patch-chrome_browser_themes_theme__service.cc b/www/iridium/files/patch-chrome_browser_themes_theme__service.cc index d38f8eeed026..702e0d8c250f 100644 --- a/www/iridium/files/patch-chrome_browser_themes_theme__service.cc +++ b/www/iridium/files/patch-chrome_browser_themes_theme__service.cc @@ -1,20 +1,20 @@ ---- chrome/browser/themes/theme_service.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/themes/theme_service.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/themes/theme_service.cc @@ -75,7 +75,7 @@ #include "extensions/browser/extension_registry_observer.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui.h" #include "ui/ozone/public/ozone_platform.h" // nogncheck #endif @@ -344,7 +344,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/iridium/files/patch-chrome_browser_themes_theme__service__aura__linux.cc b/www/iridium/files/patch-chrome_browser_themes_theme__service__aura__linux.cc index d3fe580b4d25..307bee7201d3 100644 --- a/www/iridium/files/patch-chrome_browser_themes_theme__service__aura__linux.cc +++ b/www/iridium/files/patch-chrome_browser_themes_theme__service__aura__linux.cc @@ -1,11 +1,11 @@ ---- chrome/browser/themes/theme_service_aura_linux.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/themes/theme_service_aura_linux.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/themes/theme_service_aura_linux.cc @@ -23,7 +23,7 @@ namespace { ui::SystemTheme ValidateSystemTheme(ui::SystemTheme system_theme) { switch (system_theme) { case ui::SystemTheme::kDefault: -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) case ui::SystemTheme::kGtk: case ui::SystemTheme::kQt: #endif diff --git a/www/iridium/files/patch-chrome_browser_themes_theme__service__factory.cc b/www/iridium/files/patch-chrome_browser_themes_theme__service__factory.cc index 78466864c8af..a650f0ed5f49 100644 --- a/www/iridium/files/patch-chrome_browser_themes_theme__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_themes_theme__service__factory.cc @@ -1,29 +1,29 @@ ---- chrome/browser/themes/theme_service_factory.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/themes/theme_service_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/themes/theme_service_factory.cc @@ -27,7 +27,7 @@ #include "chrome/browser/themes/theme_helper_win.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/themes/theme_service_aura_linux.h" #include "ui/linux/linux_ui_factory.h" #endif @@ -106,7 +106,7 @@ ThemeServiceFactory::~ThemeServiceFactory() = default; std::unique_ptr ThemeServiceFactory::BuildServiceInstanceForBrowserContext( content::BrowserContext* profile) const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) using ThemeService = ThemeServiceAuraLinux; #endif @@ -118,7 +118,7 @@ ThemeServiceFactory::BuildServiceInstanceForBrowserCon void ThemeServiceFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterIntegerPref(prefs::kSystemTheme, static_cast(ui::GetDefaultSystemTheme())); #endif diff --git a/www/iridium/files/patch-chrome_browser_ui_accelerator__table.cc b/www/iridium/files/patch-chrome_browser_ui_accelerator__table.cc index f6a21aa8ce2d..dfe3f4ed5628 100644 --- a/www/iridium/files/patch-chrome_browser_ui_accelerator__table.cc +++ b/www/iridium/files/patch-chrome_browser_ui_accelerator__table.cc @@ -1,43 +1,43 @@ ---- chrome/browser/ui/accelerator_table.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/accelerator_table.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/accelerator_table.cc @@ -73,11 +73,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}, @@ -105,7 +105,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}, @@ -157,7 +157,7 @@ const AcceleratorMapping kAcceleratorMap[] = { IDC_SHOW_AVATAR_MENU}, // Platform-specific key maps. -#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}, @@ -311,7 +311,7 @@ std::vector GetAcceleratorList() { std::end(kDevToolsAcceleratorMap)); if (features::IsSideBySideKeyboardShortcutEnabled()) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) accelerators->emplace_back( AcceleratorMapping({ui::VKEY_N, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, IDC_NEW_SPLIT_TAB})); diff --git a/www/iridium/files/patch-chrome_browser_ui_actions_chrome__action__id.h b/www/iridium/files/patch-chrome_browser_ui_actions_chrome__action__id.h index fb0cb8e2c8b7..7df504ee5ce9 100644 --- a/www/iridium/files/patch-chrome_browser_ui_actions_chrome__action__id.h +++ b/www/iridium/files/patch-chrome_browser_ui_actions_chrome__action__id.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/actions/chrome_action_id.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/actions/chrome_action_id.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/actions/chrome_action_id.h -@@ -512,7 +512,7 @@ +@@ -519,7 +519,7 @@ #if BUILDFLAG(IS_CHROMEOS) #define CHROME_PLATFORM_SPECIFIC_ACTION_IDS \ E(kToggleMultitaskMenu, IDC_TOGGLE_MULTITASK_MENU) -#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/iridium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc b/www/iridium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc index f873b9cff13f..832f1ff913b1 100644 --- a/www/iridium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc +++ b/www/iridium/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 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/autofill/payments/desktop_payments_window_manager.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/autofill/payments/desktop_payments_window_manager.cc @@ -58,7 +58,7 @@ gfx::Rect GetPopupSizeForBnpl() { DesktopPaymentsWindowManager::DesktopPaymentsWindowManager( ContentAutofillClient* client) : client_(CHECK_DEREF(client)) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) scoped_observation_.Observe(BrowserList::GetInstance()); #endif // BUILDFLAG(IS_LINUX) } @@ -151,7 +151,7 @@ void DesktopPaymentsWindowManager::WebContentsDestroye } } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || 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/iridium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h b/www/iridium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h index ee5a2d93070d..be88049a9ce0 100644 --- a/www/iridium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h +++ b/www/iridium/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 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/autofill/payments/desktop_payments_window_manager.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/autofill/payments/desktop_payments_window_manager.h @@ -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) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/scoped_observation.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_list_observer.h" @@ -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) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) public BrowserListObserver, #endif // BUILDFLAG(IS_LINUX) public content::WebContentsObserver { @@ -59,7 +59,7 @@ class DesktopPaymentsWindowManager : public PaymentsWi content::NavigationHandle* navigation_handle) override; void WebContentsDestroyed() override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // BrowserListObserver: void OnBrowserSetLastActive(Browser* browser) override; #endif // BUILDFLAG(IS_LINUX) @@ -130,7 +130,7 @@ class DesktopPaymentsWindowManager : public PaymentsWi // Used in tests to notify the test infrastructure that the pop-up has closed. base::RepeatingClosure popup_closed_closure_for_testing_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::ScopedObservation scoped_observation_{ this}; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-chrome_browser_ui_browser.h b/www/iridium/files/patch-chrome_browser_ui_browser.h index f5bb84354958..db3a8609f296 100644 --- a/www/iridium/files/patch-chrome_browser_ui_browser.h +++ b/www/iridium/files/patch-chrome_browser_ui_browser.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/browser.h.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/ui/browser.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/browser.h -@@ -270,7 +270,7 @@ class Browser : public TabStripModelObserver, +@@ -258,7 +258,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/iridium/files/patch-chrome_browser_ui_browser__command__controller.cc b/www/iridium/files/patch-chrome_browser_ui_browser__command__controller.cc index 10918f6db64c..e41c3420bc0e 100644 --- a/www/iridium/files/patch-chrome_browser_ui_browser__command__controller.cc +++ b/www/iridium/files/patch-chrome_browser_ui_browser__command__controller.cc @@ -1,74 +1,74 @@ ---- chrome/browser/ui/browser_command_controller.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/browser_command_controller.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/browser_command_controller.cc -@@ -129,7 +129,7 @@ +@@ -130,7 +130,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_edit_commands.h" #include "ui/base/ime/text_input_flags.h" #include "ui/linux/linux_ui.h" -@@ -139,7 +139,7 @@ +@@ -140,7 +140,7 @@ #include "ui/ozone/public/ozone_platform.h" #endif -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/shortcuts/desktop_shortcuts_utils.h" #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -@@ -373,7 +373,7 @@ bool BrowserCommandController::IsReservedCommandOrKey( +@@ -374,7 +374,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(); -@@ -676,7 +676,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -677,7 +677,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo break; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) case IDC_MINIMIZE_WINDOW: browser_->window()->Minimize(); break; -@@ -898,7 +898,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -907,7 +907,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) chrome::CreateDesktopShortcutForActiveWebContents(browser_); #else web_app::CreateWebAppFromCurrentWebContents( -@@ -1075,7 +1075,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -1087,7 +1087,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) case IDC_CHROME_WHATS_NEW: #if BUILDFLAG(GOOGLE_CHROME_BRANDING) && \ - (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)) + (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) ShowChromeWhatsNew(browser_); break; #else -@@ -1464,7 +1464,7 @@ void BrowserCommandController::InitCommandState() { +@@ -1474,7 +1474,7 @@ void BrowserCommandController::InitCommandState() { command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_4, true); command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_5, true); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) command_updater_.UpdateCommandEnabled(IDC_MINIMIZE_WINDOW, true); command_updater_.UpdateCommandEnabled(IDC_MAXIMIZE_WINDOW, true); command_updater_.UpdateCommandEnabled(IDC_RESTORE_WINDOW, true); -@@ -1824,7 +1824,7 @@ void BrowserCommandController::UpdateCommandsForTabSta +@@ -1838,7 +1838,7 @@ void BrowserCommandController::UpdateCommandsForTabSta bool can_create_web_app = web_app::CanCreateWebApp(browser_); command_updater_.UpdateCommandEnabled(IDC_INSTALL_PWA, can_create_web_app); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) command_updater_.UpdateCommandEnabled( IDC_CREATE_SHORTCUT, shortcuts::CanCreateDesktopShortcut(current_web_contents)); diff --git a/www/iridium/files/patch-chrome_browser_ui_browser__commands.cc b/www/iridium/files/patch-chrome_browser_ui_browser__commands.cc index 7f0a74d1a282..19a3ec72ad9d 100644 --- a/www/iridium/files/patch-chrome_browser_ui_browser__commands.cc +++ b/www/iridium/files/patch-chrome_browser_ui_browser__commands.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/browser_commands.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/browser_commands.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/browser_commands.cc -@@ -2298,7 +2298,7 @@ void OpenUpdateChromeDialog(Browser* browser) { +@@ -2354,7 +2354,7 @@ void OpenUpdateChromeDialog(Browser* browser) { } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) { UpgradeDetector::GetInstance()->NotifyOutdatedInstallNoAutoUpdate(); } else { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(features::kFewerUpdateConfirmations)) { chrome::AttemptRelaunch(); return; diff --git a/www/iridium/files/patch-chrome_browser_ui_browser__ui__prefs.cc b/www/iridium/files/patch-chrome_browser_ui_browser__ui__prefs.cc index ca3816e18cb2..cc4da31fc8a5 100644 --- a/www/iridium/files/patch-chrome_browser_ui_browser__ui__prefs.cc +++ b/www/iridium/files/patch-chrome_browser_ui_browser__ui__prefs.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/browser_ui_prefs.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/browser_ui_prefs.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/browser_ui_prefs.cc -@@ -82,7 +82,7 @@ void RegisterBrowserPrefs(PrefRegistrySimple* registry +@@ -85,7 +85,7 @@ void RegisterBrowserPrefs(PrefRegistrySimple* registry registry->RegisterTimePref(prefs::kPinInfoBarLastShown, base::Time()); registry->RegisterIntegerPref(prefs::kPinInfoBarTimesShown, 0); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) registry->RegisterStringPref(prefs::kEnterpriseCustomLabelForBrowser, std::string()); registry->RegisterStringPref(prefs::kEnterpriseLogoUrlForBrowser, -@@ -103,7 +103,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistry +@@ -106,7 +106,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistry user_prefs::PrefRegistrySyncable::SYNCABLE_PREF; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) registry->RegisterIntegerPref(prefs::kSessionRestoreInfoBarTimesShown, 0); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -@@ -216,7 +216,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistry +@@ -219,7 +219,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistry registry->RegisterDictionaryPref(prefs::kHttpsUpgradeFallbacks); registry->RegisterDictionaryPref(prefs::kHttpsUpgradeNavigations); registry->RegisterBooleanPref(prefs::kHttpsOnlyModeAutoEnabled, false); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) registry->RegisterStringPref(prefs::kEnterpriseLogoUrlForProfile, std::string()); registry->RegisterStringPref(prefs::kEnterpriseCustomLabelForProfile, diff --git a/www/iridium/files/patch-chrome_browser_ui_browser__view__prefs.cc b/www/iridium/files/patch-chrome_browser_ui_browser__view__prefs.cc index d0f8cca08cea..ba1197d813f5 100644 --- a/www/iridium/files/patch-chrome_browser_ui_browser__view__prefs.cc +++ b/www/iridium/files/patch-chrome_browser_ui_browser__view__prefs.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/browser_view_prefs.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/browser_view_prefs.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/browser_view_prefs.cc @@ -14,7 +14,7 @@ namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool GetCustomFramePrefDefault() { #if BUILDFLAG(IS_OZONE) return ui::OzonePlatform::GetInstance() @@ -30,7 +30,7 @@ bool GetCustomFramePrefDefault() { void RegisterBrowserViewProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kUseCustomChromeFrame, GetCustomFramePrefDefault()); #endif diff --git a/www/iridium/files/patch-chrome_browser_ui_browser__window_internal_browser__window__features.cc b/www/iridium/files/patch-chrome_browser_ui_browser__window_internal_browser__window__features.cc index 70f81c2410f8..a2f992752e50 100644 --- a/www/iridium/files/patch-chrome_browser_ui_browser__window_internal_browser__window__features.cc +++ b/www/iridium/files/patch-chrome_browser_ui_browser__window_internal_browser__window__features.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/browser_window/internal/browser_window_features.cc.orig 2025-11-12 18:20:14 UTC +--- chrome/browser/ui/browser_window/internal/browser_window_features.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/browser_window/internal/browser_window_features.cc -@@ -133,7 +133,7 @@ +@@ -145,7 +145,7 @@ #include "chrome/browser/ui/startup/default_browser_prompt/pin_infobar/pin_infobar_controller.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/views/session_restore_infobar/session_restore_infobar_controller.h" #endif -@@ -374,7 +374,7 @@ void BrowserWindowFeatures::Init(BrowserWindowInterfac +@@ -391,7 +391,7 @@ void BrowserWindowFeatures::Init(BrowserWindowInterfac browser_select_file_dialog_controller_ = std::make_unique(profile); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) profile_customization_bubble_sync_controller_ = std::make_unique(browser, profile); diff --git a/www/iridium/files/patch-chrome_browser_ui_browser__window_public_browser__window__features.h b/www/iridium/files/patch-chrome_browser_ui_browser__window_public_browser__window__features.h index 285a9aa67321..e73006ec0730 100644 --- a/www/iridium/files/patch-chrome_browser_ui_browser__window_public_browser__window__features.h +++ b/www/iridium/files/patch-chrome_browser_ui_browser__window_public_browser__window__features.h @@ -1,29 +1,29 @@ ---- chrome/browser/ui/browser_window/public/browser_window_features.h.orig 2025-11-12 18:20:14 UTC +--- chrome/browser/ui/browser_window/public/browser_window_features.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/browser_window/public/browser_window_features.h -@@ -94,7 +94,7 @@ class PinInfoBarController; +@@ -101,7 +101,7 @@ class PinInfoBarController; } // namespace default_browser #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class ProfileCustomizationBubbleSyncController; namespace session_restore_infobar { class SessionRestoreInfobarController; -@@ -428,7 +428,7 @@ class BrowserWindowFeatures { +@@ -449,7 +449,7 @@ class BrowserWindowFeatures { return browser_select_file_dialog_controller_.get(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ProfileCustomizationBubbleSyncController* profile_customization_bubble_sync_controller() { return profile_customization_bubble_sync_controller_.get(); -@@ -597,7 +597,7 @@ class BrowserWindowFeatures { +@@ -619,7 +619,7 @@ class BrowserWindowFeatures { std::unique_ptr browser_select_file_dialog_controller_; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr profile_customization_bubble_sync_controller_; diff --git a/www/iridium/files/patch-chrome_browser_ui_chrome__pages.cc b/www/iridium/files/patch-chrome_browser_ui_chrome__pages.cc index 81cca1a6f56b..e01795d23a06 100644 --- a/www/iridium/files/patch-chrome_browser_ui_chrome__pages.cc +++ b/www/iridium/files/patch-chrome_browser_ui_chrome__pages.cc @@ -1,44 +1,44 @@ ---- chrome/browser/ui/chrome_pages.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/chrome_pages.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/chrome_pages.cc @@ -86,12 +86,12 @@ #include "components/signin/public/identity_manager/identity_manager.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/web_applications/web_app_utils.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/webapps/isolated_web_apps/scheme.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) @@ -253,7 +253,7 @@ bool SiteGURLIsValid(const GURL& url) { return !site_origin.opaque() && (url.SchemeIsHTTPOrHTTPS() || url.SchemeIs(extensions::kExtensionScheme) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) || url.SchemeIs(webapps::kIsolatedAppScheme) #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) @@ -415,7 +415,7 @@ void ShowChromeTips(Browser* browser) { ShowSingletonTab(browser, GURL(kChromeTipsURL)); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void ShowChromeWhatsNew(Browser* browser) { ShowSingletonTab(browser, GURL(kChromeUIWhatsNewURL)); } @@ -744,7 +744,7 @@ void ShowShortcutCustomizationApp(Profile* profile, } #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void ShowWebAppSettingsImpl(Browser* browser, Profile* profile, const std::string& app_id, diff --git a/www/iridium/files/patch-chrome_browser_ui_chrome__pages.h b/www/iridium/files/patch-chrome_browser_ui_chrome__pages.h index 067e52bb91ee..715885d1d6ae 100644 --- a/www/iridium/files/patch-chrome_browser_ui_chrome__pages.h +++ b/www/iridium/files/patch-chrome_browser_ui_chrome__pages.h @@ -1,20 +1,20 @@ ---- chrome/browser/ui/chrome_pages.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/chrome_pages.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/chrome_pages.h @@ -39,7 +39,7 @@ namespace signin { enum class ConsentLevel; } // namespace signin -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) namespace web_app { enum class AppSettingsPageEntryPoint; } // namespace web_app @@ -182,7 +182,7 @@ void ShowShortcutCustomizationApp(Profile* profile, const std::string& category); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Show chrome://app-settings/ page. void ShowWebAppSettings(Browser* browser, const std::string& app_id, diff --git a/www/iridium/files/patch-chrome_browser_ui_color_native__chrome__color__mixer.cc b/www/iridium/files/patch-chrome_browser_ui_color_native__chrome__color__mixer.cc index 1e02a604e745..bbfefbb29e0e 100644 --- a/www/iridium/files/patch-chrome_browser_ui_color_native__chrome__color__mixer.cc +++ b/www/iridium/files/patch-chrome_browser_ui_color_native__chrome__color__mixer.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/color/native_chrome_color_mixer.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/color/native_chrome_color_mixer.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/color/native_chrome_color_mixer.cc @@ -7,7 +7,7 @@ #include "build/build_config.h" #if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_MAC) && \ - !BUILDFLAG(IS_WIN) + !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_BSD) void AddNativeChromeColorMixer(ui::ColorProvider* provider, const ui::ColorProviderKey& key) {} #endif diff --git a/www/iridium/files/patch-chrome_browser_ui_hats_survey__config.cc b/www/iridium/files/patch-chrome_browser_ui_hats_survey__config.cc index 11a2bde9f447..00881547792b 100644 --- a/www/iridium/files/patch-chrome_browser_ui_hats_survey__config.cc +++ b/www/iridium/files/patch-chrome_browser_ui_hats_survey__config.cc @@ -1,20 +1,11 @@ ---- chrome/browser/ui/hats/survey_config.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/hats/survey_config.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/hats/survey_config.cc -@@ -166,7 +166,7 @@ constexpr char kHatsSurveyOrganicTriggerSafetyHubAndro - "safety_hub_android_organic_survey"; - #endif // #if !BUILDFLAG(IS_ANDROID) - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - constexpr char kHatsSurveyTriggerPrivacySandboxWhatsNewSurvey[] = - "privacy-sandbox-whats-new-survey"; - #endif // !BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) @@ -505,7 +505,7 @@ std::vector GetAllSurveyConfigs() &features::kHappinessTrackingSurveysForWallpaperSearch, kHatsSurveyTriggerWallpaperSearch); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::vector identity_string_psd_fields{ "Channel", "Chrome Version", "Number of Chrome Profiles", "Number of Google Accounts", "Sign-in Status"}; diff --git a/www/iridium/files/patch-chrome_browser_ui_hats_survey__config.h b/www/iridium/files/patch-chrome_browser_ui_hats_survey__config.h deleted file mode 100644 index ad5e5c2d17ac..000000000000 --- a/www/iridium/files/patch-chrome_browser_ui_hats_survey__config.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/ui/hats/survey_config.h.orig 2025-11-06 10:11:34 UTC -+++ chrome/browser/ui/hats/survey_config.h -@@ -89,7 +89,7 @@ extern const char kHatsSurveyTriggerSafetyHubAndroid[] - extern const char kHatsSurveyOrganicTriggerSafetyHubAndroid[]; - #endif // #if !BUILDFLAG(IS_ANDROID) - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - extern const char kHatsSurveyTriggerPrivacySandboxWhatsNewSurvey[]; - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - diff --git a/www/iridium/files/patch-chrome_browser_ui_hats_trust__safety__sentiment__service__factory.cc b/www/iridium/files/patch-chrome_browser_ui_hats_trust__safety__sentiment__service__factory.cc index 840b84633d83..80ba87a42481 100644 --- a/www/iridium/files/patch-chrome_browser_ui_hats_trust__safety__sentiment__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_ui_hats_trust__safety__sentiment__service__factory.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/hats/trust_safety_sentiment_service_factory.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/hats/trust_safety_sentiment_service_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/hats/trust_safety_sentiment_service_factory.cc @@ -59,7 +59,7 @@ TrustSafetySentimentServiceFactory::BuildServiceInstan // TrustSafetySentimentSurvey is conducted only for Windows, MacOS and Linux // currently. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS)) // TrustSafetySentimentSurvey is conducted only in English currently. const std::string& application_locale = diff --git a/www/iridium/files/patch-chrome_browser_ui_managed__ui.cc b/www/iridium/files/patch-chrome_browser_ui_managed__ui.cc index 38de43aa6f30..64a2d25bbbcd 100644 --- a/www/iridium/files/patch-chrome_browser_ui_managed__ui.cc +++ b/www/iridium/files/patch-chrome_browser_ui_managed__ui.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/managed_ui.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/managed_ui.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/managed_ui.cc @@ -433,7 +433,7 @@ std::optional GetDeviceManagerIdentity() g_browser_process->platform_part()->browser_policy_connector_ash(); return connector->GetEnterpriseDomainManager(); #else -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled( features::kEnterpriseManagementDisclaimerUsesCustomLabel)) { std::string custom_management_label = @@ -463,7 +463,7 @@ std::optional GetAccountManagerIdentity(P return std::nullopt; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled( features::kEnterpriseManagementDisclaimerUsesCustomLabel)) { std::string custom_management_label = diff --git a/www/iridium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc b/www/iridium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc index 5fe9384baaf9..d8970c888b33 100644 --- a/www/iridium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc +++ b/www/iridium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc @@ -1964,7 +1964,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 omnibox::kShareLinuxChromeRefreshIcon; #else return omnibox::kShareChromeRefreshIcon; diff --git a/www/iridium/files/patch-chrome_browser_ui_passwords_bubble__controllers_relaunch__chrome__bubble__controller.cc b/www/iridium/files/patch-chrome_browser_ui_passwords_bubble__controllers_relaunch__chrome__bubble__controller.cc index 51081decc7ee..e116bae0b152 100644 --- a/www/iridium/files/patch-chrome_browser_ui_passwords_bubble__controllers_relaunch__chrome__bubble__controller.cc +++ b/www/iridium/files/patch-chrome_browser_ui_passwords_bubble__controllers_relaunch__chrome__bubble__controller.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/passwords/bubble_controllers/relaunch_chrome_bubble_controller.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/passwords/bubble_controllers/relaunch_chrome_bubble_controller.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/passwords/bubble_controllers/relaunch_chrome_bubble_controller.cc @@ -44,7 +44,7 @@ std::u16string RelaunchChromeBubbleController::GetTitl #if BUILDFLAG(IS_MAC) ? IDS_PASSWORD_MANAGER_RELAUNCH_CHROME_BUBBLE_TITLE_BRANDED : IDS_PASSWORD_MANAGER_RELAUNCH_CHROME_BUBBLE_TITLE_NON_BRANDED -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ? IDS_PASSWORD_MANAGER_RELAUNCH_CHROME_BUBBLE_TITLE_LINUX_BRANDED : IDS_PASSWORD_MANAGER_RELAUNCH_CHROME_BUBBLE_TITLE_LINUX_NON_BRANDED #endif @@ -57,7 +57,7 @@ std::u16string RelaunchChromeBubbleController::GetBody #if BUILDFLAG(IS_MAC) ? IDS_PASSWORD_MANAGER_RELAUNCH_CHROME_BUBBLE_DESCRIPTION_BRANDED : IDS_PASSWORD_MANAGER_RELAUNCH_CHROME_BUBBLE_DESCRIPTION_NON_BRANDED -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ? IDS_PASSWORD_MANAGER_RELAUNCH_CHROME_BUBBLE_DESCRIPTION_LINUX_BRANDED : IDS_PASSWORD_MANAGER_RELAUNCH_CHROME_BUBBLE_DESCRIPTION_LINUX_NON_BRANDED #endif diff --git a/www/iridium/files/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc b/www/iridium/files/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc index 5dd93b41f849..7c727b84f246 100644 --- a/www/iridium/files/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/passwords/manage_passwords_ui_controller.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/passwords/manage_passwords_ui_controller.cc -@@ -115,7 +115,7 @@ namespace { +@@ -116,7 +116,7 @@ namespace { using Logger = autofill::SavePasswordProgressLogger; -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Should be kept in sync with constant declared in // bubble_controllers/relaunch_chrome_bubble_controller.cc. constexpr int kMaxNumberOfTimesKeychainErrorBubbleIsShown = 3; -@@ -626,7 +626,7 @@ void ManagePasswordsUIController::OnBiometricAuthBefor +@@ -628,7 +628,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/iridium/files/patch-chrome_browser_ui_prefs_prefs__tab__helper.cc b/www/iridium/files/patch-chrome_browser_ui_prefs_prefs__tab__helper.cc index 8b488712ba1c..ff07d8ed4a6d 100644 --- a/www/iridium/files/patch-chrome_browser_ui_prefs_prefs__tab__helper.cc +++ b/www/iridium/files/patch-chrome_browser_ui_prefs_prefs__tab__helper.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/prefs/prefs_tab_helper.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/ui/prefs/prefs_tab_helper.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/prefs/prefs_tab_helper.cc @@ -64,7 +64,7 @@ #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(ENABLE_DESKTOP_ANDROID_EXTENSIONS) + BUILDFLAG(ENABLE_DESKTOP_ANDROID_EXTENSIONS) || BUILDFLAG(IS_BSD) // If a font name in prefs default values starts with a comma, consider it's a // comma-separated font list and resolve it to the first available font. #define PREFS_FONT_LIST 1 diff --git a/www/iridium/files/patch-chrome_browser_ui_sad__tab.cc b/www/iridium/files/patch-chrome_browser_ui_sad__tab.cc index 9e5bc7511249..1a34f4b32560 100644 --- a/www/iridium/files/patch-chrome_browser_ui_sad__tab.cc +++ b/www/iridium/files/patch-chrome_browser_ui_sad__tab.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/sad_tab.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/sad_tab.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/sad_tab.cc @@ -180,7 +180,7 @@ std::vector SadTab::GetSubMessages() { if (!web_contents_->GetBrowserContext()->IsOffTheRecord()) { message_ids.insert(message_ids.begin(), IDS_SAD_TAB_RELOAD_INCOGNITO); } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Note: on macOS, Linux and ChromeOS, the first bullet is either one of // IDS_SAD_TAB_RELOAD_CLOSE_TABS or IDS_SAD_TAB_RELOAD_CLOSE_NOTABS // followed by one of the above suggestions. diff --git a/www/iridium/files/patch-chrome_browser_ui_sharing__hub_sharing__hub__bubble__controller.h b/www/iridium/files/patch-chrome_browser_ui_sharing__hub_sharing__hub__bubble__controller.h index d08f90b00660..cc57e5dc8ad5 100644 --- a/www/iridium/files/patch-chrome_browser_ui_sharing__hub_sharing__hub__bubble__controller.h +++ b/www/iridium/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 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/sharing_hub/sharing_hub_bubble_controller.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/sharing_hub/sharing_hub_bubble_controller.h -@@ -36,7 +36,7 @@ class SharingHubBubbleController { +@@ -39,7 +39,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) +#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/iridium/files/patch-chrome_browser_ui_signin_signin__view__controller.cc b/www/iridium/files/patch-chrome_browser_ui_signin_signin__view__controller.cc index fd193e453d75..34d546eb0307 100644 --- a/www/iridium/files/patch-chrome_browser_ui_signin_signin__view__controller.cc +++ b/www/iridium/files/patch-chrome_browser_ui_signin_signin__view__controller.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/signin/signin_view_controller.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/signin/signin_view_controller.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/signin/signin_view_controller.cc -@@ -476,7 +476,7 @@ void SigninViewController::ShowModalSyncConfirmationDi +@@ -472,7 +472,7 @@ void SigninViewController::ShowModalSyncConfirmationDi GetOnModalDialogClosedCallback()); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void SigninViewController::ShowModalHistorySyncOptInDialog( HistorySyncOptinHelper::FlowCompletedCallback callback) { CHECK( -@@ -493,7 +493,7 @@ void SigninViewController::ShowModalHistorySyncOptInDi +@@ -489,7 +489,7 @@ void SigninViewController::ShowModalHistorySyncOptInDi void SigninViewController::ShowModalManagedUserNoticeDialog( std::unique_ptr create_param) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) CloseModalSignin(); dialog_ = std::make_unique( SigninViewControllerDelegate::CreateManagedUserNoticeDelegate( diff --git a/www/iridium/files/patch-chrome_browser_ui_signin_signin__view__controller.h b/www/iridium/files/patch-chrome_browser_ui_signin_signin__view__controller.h index 63e4cc472109..4396259ce328 100644 --- a/www/iridium/files/patch-chrome_browser_ui_signin_signin__view__controller.h +++ b/www/iridium/files/patch-chrome_browser_ui_signin_signin__view__controller.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/signin/signin_view_controller.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/signin/signin_view_controller.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/signin/signin_view_controller.h @@ -170,7 +170,7 @@ class SigninViewController { void ShowModalSyncConfirmationDialog(bool is_signin_intercept, bool is_sync_promo); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Shows the modal history sync opt in dialog as a browser-modal dialog on top // of the `browser_`'s window. Executes the provided callback when the dialog // closes. diff --git a/www/iridium/files/patch-chrome_browser_ui_signin_signin__view__controller__delegate.h b/www/iridium/files/patch-chrome_browser_ui_signin_signin__view__controller__delegate.h index a959234bdeeb..f6e13798cc52 100644 --- a/www/iridium/files/patch-chrome_browser_ui_signin_signin__view__controller__delegate.h +++ b/www/iridium/files/patch-chrome_browser_ui_signin_signin__view__controller__delegate.h @@ -1,20 +1,20 @@ ---- chrome/browser/ui/signin/signin_view_controller_delegate.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/signin/signin_view_controller_delegate.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/signin/signin_view_controller_delegate.h @@ -50,7 +50,7 @@ class SigninViewControllerDelegate { SyncConfirmationStyle style, bool is_sync_promo); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Returns a platform-specific SigninViewControllerDelegate instance that // displays the modal history sync opt in dialog. The returned object should // delete itself when the window it's managing is closed. @@ -91,7 +91,7 @@ class SigninViewControllerDelegate { SignoutConfirmationCallback callback); #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Returns a platform-specific SigninViewContolllerDelegate instance that // displays the managed user notice modal dialog. The returned object // should delete itself when the window it's managing is closed. diff --git a/www/iridium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc b/www/iridium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc index 6386b704f9c9..0b414541d276 100644 --- a/www/iridium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc +++ b/www/iridium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/startup/bad_flags_prompt.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/startup/bad_flags_prompt.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/startup/bad_flags_prompt.cc -@@ -105,7 +105,7 @@ const char* const kBadFlags[] = { +@@ -111,7 +111,7 @@ const char* const kBadFlags[] = { extensions::switches::kExtensionsOnExtensionURLs, #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || 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/iridium/files/patch-chrome_browser_ui_startup_infobar__utils.cc b/www/iridium/files/patch-chrome_browser_ui_startup_infobar__utils.cc index 7053c6499445..839b8fa74fdf 100644 --- a/www/iridium/files/patch-chrome_browser_ui_startup_infobar__utils.cc +++ b/www/iridium/files/patch-chrome_browser_ui_startup_infobar__utils.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/startup/infobar_utils.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/startup/infobar_utils.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/startup/infobar_utils.cc @@ -46,7 +46,7 @@ #include "chrome/browser/ui/startup/default_browser_prompt/pin_infobar/pin_infobar_controller.h" #endif -#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/ui/views/session_restore_infobar/session_restore_infobar_controller.h" #include "chrome/browser/ui/views/session_restore_infobar/session_restore_infobar_model.h" #endif @@ -231,7 +231,7 @@ void AddInfoBarsIfNecessary(BrowserWindowInterface* br } #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -#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(features::kSessionRestoreInfobar)) { auto* session_restore_infobar_controller = session_restore_infobar::SessionRestoreInfobarController::From(browser); diff --git a/www/iridium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc b/www/iridium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc index 4d34d6d41c36..1d0586e8fa5c 100644 --- a/www/iridium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc +++ b/www/iridium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc @@ -1,38 +1,38 @@ ---- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/startup/startup_browser_creator.cc @@ -135,7 +135,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" -@@ -987,7 +987,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -991,7 +991,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())) { -@@ -1090,7 +1090,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1114,7 +1114,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) && -@@ -1307,7 +1307,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1331,7 +1331,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/iridium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc b/www/iridium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc index c53abcc2acb8..12694b195ea1 100644 --- a/www/iridium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc +++ b/www/iridium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/startup/startup_browser_creator_impl.cc @@ -81,7 +81,7 @@ #include "components/app_restore/full_restore_utils.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/whats_new/whats_new_fetcher.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) @@ -221,7 +221,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 @@ -251,7 +251,7 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser( continue; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Start the What's New fetch but don't add the tab at this point. The tab // will open as the foreground tab only if the remote content can be // retrieved successfully. This prevents needing to automatically close the diff --git a/www/iridium/files/patch-chrome_browser_ui_startup_startup__tab__provider.cc b/www/iridium/files/patch-chrome_browser_ui_startup_startup__tab__provider.cc index f232d32a4b80..16bacc7e3f2d 100644 --- a/www/iridium/files/patch-chrome_browser_ui_startup_startup__tab__provider.cc +++ b/www/iridium/files/patch-chrome_browser_ui_startup_startup__tab__provider.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/startup/startup_tab_provider.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/ui/startup/startup_tab_provider.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/startup/startup_tab_provider.cc -@@ -63,7 +63,7 @@ +@@ -66,7 +66,7 @@ #include "extensions/common/manifest_handlers/chrome_url_overrides_handler.h" #endif // !BUILDFLAG(IS_ANDROID) -#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" #endif -@@ -102,7 +102,7 @@ bool ValidateUrl(const GURL& url) { +@@ -124,7 +124,7 @@ bool ValidateUrl(const GURL& url) { #endif // BUILDFLAG(IS_CHROMEOS) bool url_scheme_is_chrome = false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // In Headless mode, allow any URL pattern that matches chrome:// scheme if // the user explicitly allowed it. if (headless::IsHeadlessMode() && url.SchemeIs(content::kChromeUIScheme)) { diff --git a/www/iridium/files/patch-chrome_browser_ui_tab__helpers.cc b/www/iridium/files/patch-chrome_browser_ui_tab__helpers.cc index 179ccf0c0387..09117f6df9dc 100644 --- a/www/iridium/files/patch-chrome_browser_ui_tab__helpers.cc +++ b/www/iridium/files/patch-chrome_browser_ui_tab__helpers.cc @@ -1,26 +1,26 @@ ---- chrome/browser/ui/tab_helpers.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/tab_helpers.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/tab_helpers.cc -@@ -222,7 +222,7 @@ +@@ -221,7 +221,7 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/blocked_content/framebust_block_tab_helper.h" #include "chrome/browser/ui/hats/hats_helper.h" #include "chrome/browser/ui/performance_controls/performance_controls_hats_service_factory.h" -@@ -718,12 +718,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con +@@ -724,12 +724,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con webapps::PreRedirectionURLObserver::CreateForWebContents(web_contents); #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::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/iridium/files/patch-chrome_browser_ui_tabs_features.cc b/www/iridium/files/patch-chrome_browser_ui_tabs_features.cc index 0c84dffafa0e..843e209dfd92 100644 --- a/www/iridium/files/patch-chrome_browser_ui_tabs_features.cc +++ b/www/iridium/files/patch-chrome_browser_ui_tabs_features.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/tabs/features.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/tabs/features.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/tabs/features.cc -@@ -52,7 +52,7 @@ bool CanShowTabSearchPositionSetting() { +@@ -50,7 +50,7 @@ bool CanShowTabSearchPositionSetting() { } // Mac and other platforms will always have the tab search position in the // correct location, cros/linux/win git the user the option to change. -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled(kTabSearchPositionSetting); #else return false; diff --git a/www/iridium/files/patch-chrome_browser_ui_tabs_public_tab__features.h b/www/iridium/files/patch-chrome_browser_ui_tabs_public_tab__features.h index e84ca90e5b32..b10a12608fd5 100644 --- a/www/iridium/files/patch-chrome_browser_ui_tabs_public_tab__features.h +++ b/www/iridium/files/patch-chrome_browser_ui_tabs_public_tab__features.h @@ -1,20 +1,20 @@ ---- chrome/browser/ui/tabs/public/tab_features.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/tabs/public/tab_features.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/tabs/public/tab_features.h -@@ -118,7 +118,7 @@ class TabContextualizationController; +@@ -119,7 +119,7 @@ class TabContextualizationController; } // namespace lens #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) namespace wallet { class ChromeWalletablePassClient; } // namespace wallet -@@ -451,7 +451,7 @@ class TabFeatures { - bookmarkbar_preload_pipeline_manager_; +@@ -468,7 +468,7 @@ class TabFeatures { + new_tab_page_preload_pipeline_manager_; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::unique_ptr walletable_pass_client_; #endif // Must be the last member. diff --git a/www/iridium/files/patch-chrome_browser_ui_tabs_tab__dialog__manager.cc b/www/iridium/files/patch-chrome_browser_ui_tabs_tab__dialog__manager.cc index 53f59c8d9a7a..b5d04f722680 100644 --- a/www/iridium/files/patch-chrome_browser_ui_tabs_tab__dialog__manager.cc +++ b/www/iridium/files/patch-chrome_browser_ui_tabs_tab__dialog__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/tabs/tab_dialog_manager.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/tabs/tab_dialog_manager.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/tabs/tab_dialog_manager.cc -@@ -88,7 +88,7 @@ bool SupportsGlobalScreenCoordinates() { +@@ -90,7 +90,7 @@ bool SupportsGlobalScreenCoordinates() { } bool PlatformClipsChildrenToViewport() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/iridium/files/patch-chrome_browser_ui_tabs_tab__features.cc b/www/iridium/files/patch-chrome_browser_ui_tabs_tab__features.cc index 9b0084affe3d..f96ef857a07e 100644 --- a/www/iridium/files/patch-chrome_browser_ui_tabs_tab__features.cc +++ b/www/iridium/files/patch-chrome_browser_ui_tabs_tab__features.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/tabs/tab_features.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/tabs/tab_features.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/tabs/tab_features.cc -@@ -80,7 +80,7 @@ +@@ -82,7 +82,7 @@ #include "chrome/browser/ui/web_applications/pwa_install_page_action.h" #include "chrome/browser/ui/webui/webui_embedding_context.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/wallet/chrome_walletable_pass_client.h" #endif #include "chrome/browser/web_applications/web_app_tab_helper.h" -@@ -401,7 +401,7 @@ void TabFeatures::Init(TabInterface& tab, Profile* pro +@@ -419,7 +419,7 @@ void TabFeatures::Init(TabInterface& tab, Profile* pro task_manager::WebContentsTags::CreateForTabContents(tab.GetContents()); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) inactive_window_mouse_event_controller_ = std::make_unique(); diff --git a/www/iridium/files/patch-chrome_browser_ui_tabs_tab__strip__prefs.cc b/www/iridium/files/patch-chrome_browser_ui_tabs_tab__strip__prefs.cc index c0871bce19ac..91189b8c5ab5 100644 --- a/www/iridium/files/patch-chrome_browser_ui_tabs_tab__strip__prefs.cc +++ b/www/iridium/files/patch-chrome_browser_ui_tabs_tab__strip__prefs.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/tabs/tab_strip_prefs.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/tabs/tab_strip_prefs.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/tabs/tab_strip_prefs.cc @@ -21,7 +21,7 @@ namespace tabs { bool GetDefaultTabSearchRightAligned() { // These platforms are all left aligned, the others should be right. -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return false; #else return true; diff --git a/www/iridium/files/patch-chrome_browser_ui_task__manager_task__manager__columns.h b/www/iridium/files/patch-chrome_browser_ui_task__manager_task__manager__columns.h index 5f4b862b101d..ec2cbefe9e36 100644 --- a/www/iridium/files/patch-chrome_browser_ui_task__manager_task__manager__columns.h +++ b/www/iridium/files/patch-chrome_browser_ui_task__manager_task__manager__columns.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/task_manager/task_manager_columns.h.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/task_manager/task_manager_columns.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/task_manager/task_manager_columns.h @@ -264,7 +264,7 @@ inline constexpr std::array kColumns = { .default_visibility = false}, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) TableColumnData{.id = IDS_TASK_MANAGER_OPEN_FD_COUNT_COLUMN, .align = ui::TableColumn::RIGHT, .width = -1, diff --git a/www/iridium/files/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc b/www/iridium/files/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc index 811718ee3057..60ee33aa0b69 100644 --- a/www/iridium/files/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc +++ b/www/iridium/files/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc @@ -1,38 +1,38 @@ ---- chrome/browser/ui/task_manager/task_manager_table_model.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/ui/task_manager/task_manager_table_model.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/task_manager/task_manager_table_model.cc @@ -374,7 +374,7 @@ TaskManagerTableModel::~TaskManagerTableModel() { // Note: system_total_time_ is used for both since there is no functional // difference between browser & system (they are essentially the same tab). // Instead, the data is routed to the platform appropriate bucket. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) task_manager::RecordTabSwitchEvent(CategoryRecord::kBrowser, system_total_time_); #elif BUILDFLAG(IS_CHROMEOS) @@ -507,7 +507,7 @@ std::u16string TaskManagerTableModel::GetText(size_t r ? stringifier_->backgrounded_string() : stringifier_->foregrounded_string(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) case IDS_TASK_MANAGER_OPEN_FD_COUNT_COLUMN: { const int fd_count = observed_task_manager()->GetOpenFdCount(tasks_[row]); return fd_count >= 0 ? base::FormatNumber(fd_count) @@ -665,7 +665,7 @@ int TaskManagerTableModel::CompareValues(size_t row1, return BooleanCompare(is_proc1_bg, is_proc2_bg); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) case IDS_TASK_MANAGER_OPEN_FD_COUNT_COLUMN: { const int proc1_fd_count = observed_task_manager()->GetOpenFdCount(tasks_[row1]); @@ -977,7 +977,7 @@ void TaskManagerTableModel::UpdateRefreshTypes(int col type = REFRESH_TYPE_KEEPALIVE_COUNT; break; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) case IDS_TASK_MANAGER_OPEN_FD_COUNT_COLUMN: type = REFRESH_TYPE_FD_COUNT; break; diff --git a/www/iridium/files/patch-chrome_browser_ui_test_popup__browsertest.cc b/www/iridium/files/patch-chrome_browser_ui_test_popup__browsertest.cc index 546227069b76..62a7a4f4817d 100644 --- a/www/iridium/files/patch-chrome_browser_ui_test_popup__browsertest.cc +++ b/www/iridium/files/patch-chrome_browser_ui_test_popup__browsertest.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/test/popup_browsertest.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/test/popup_browsertest.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/test/popup_browsertest.cc @@ -76,7 +76,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/40815883) Desktop Linux window bounds are inaccurate. expected.Outset(50); EXPECT_TRUE(expected.Contains(popup->window()->GetBounds())) @@ -108,7 +108,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/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/iridium/files/patch-chrome_browser_ui_test_test__browser__ui.cc b/www/iridium/files/patch-chrome_browser_ui_test_test__browser__ui.cc index 0f66fd22e38e..e0323a4a9e14 100644 --- a/www/iridium/files/patch-chrome_browser_ui_test_test__browser__ui.cc +++ b/www/iridium/files/patch-chrome_browser_ui_test_test__browser__ui.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/test/test_browser_ui.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/test/test_browser_ui.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/test/test_browser_ui.cc @@ -21,7 +21,7 @@ #include "ui/views/widget/widget.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 "content/public/common/content_switches.h" #include "ui/base/test/skia_gold_matching_algorithm.h" #include "ui/compositor/compositor.h" @@ -35,7 +35,7 @@ #endif // TODO(crbug.com/40625383) support Mac for pixel tests. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define SUPPORTS_PIXEL_TEST #endif diff --git a/www/iridium/files/patch-chrome_browser_ui_ui__features.cc b/www/iridium/files/patch-chrome_browser_ui_ui__features.cc index f83f81a39c10..f03113308f35 100644 --- a/www/iridium/files/patch-chrome_browser_ui_ui__features.cc +++ b/www/iridium/files/patch-chrome_browser_ui_ui__features.cc @@ -1,38 +1,38 @@ ---- chrome/browser/ui/ui_features.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/ui_features.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/ui_features.cc -@@ -38,7 +38,7 @@ BASE_FEATURE(kCloseOmniboxPopupOnInactiveAreaClick, +@@ -39,7 +39,7 @@ BASE_FEATURE(kCloseOmniboxPopupOnInactiveAreaClick, BASE_FEATURE(kCreateNewTabGroupAppMenuTopLevel, base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables the feature to remove the last confirmation dialog when relaunching // to update Chrome. BASE_FEATURE(kFewerUpdateConfirmations, base::FEATURE_ENABLED_BY_DEFAULT); -@@ -148,7 +148,7 @@ BASE_FEATURE_PARAM(int, +@@ -170,7 +170,7 @@ BASE_FEATURE_PARAM(int, "drop_target_hide_for_os_width", #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) 32 -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) 50 #else 0 -@@ -434,7 +434,7 @@ BASE_FEATURE(kViewsFirstRunDialog, base::FEATURE_DISAB +@@ -471,7 +471,7 @@ BASE_FEATURE(kViewsFirstRunDialog, base::FEATURE_ENABL BASE_FEATURE(kViewsJSAppModalDialog, base::FEATURE_DISABLED_BY_DEFAULT); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kUsePortalAccentColor, base::FEATURE_ENABLED_BY_DEFAULT); #endif -@@ -634,7 +634,7 @@ bool IsBookmarkTabGroupConversionEnabled() { +@@ -677,7 +677,7 @@ bool IsBookmarkTabGroupConversionEnabled() { return base::FeatureList::IsEnabled(kBookmarkTabGroupConversion); } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_FEATURE(kSessionRestoreInfobar, base::FEATURE_DISABLED_BY_DEFAULT); BASE_FEATURE_PARAM(bool, diff --git a/www/iridium/files/patch-chrome_browser_ui_ui__features.h b/www/iridium/files/patch-chrome_browser_ui_ui__features.h index 2d7f3b35d4ab..e3ad06a53ab7 100644 --- a/www/iridium/files/patch-chrome_browser_ui_ui__features.h +++ b/www/iridium/files/patch-chrome_browser_ui_ui__features.h @@ -1,29 +1,29 @@ ---- chrome/browser/ui/ui_features.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/ui_features.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/ui_features.h @@ -30,7 +30,7 @@ BASE_DECLARE_FEATURE(kCloseOmniboxPopupOnInactiveAreaC BASE_DECLARE_FEATURE(kCreateNewTabGroupAppMenuTopLevel); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kFewerUpdateConfirmations); #endif -@@ -63,7 +63,7 @@ enum class PdfInfoBarTrigger { kPdfLoad = 0, kStartup +@@ -61,7 +61,7 @@ enum class PdfInfoBarTrigger { kPdfLoad = 0, kStartup BASE_DECLARE_FEATURE_PARAM(PdfInfoBarTrigger, kPdfInfoBarTrigger); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // When enabled, user may see the session restore UI flow. BASE_DECLARE_FEATURE(kSessionRestoreInfobar); -@@ -345,7 +345,7 @@ BASE_DECLARE_FEATURE(kViewsFirstRunDialog); +@@ -366,7 +366,7 @@ BASE_DECLARE_FEATURE(kViewsFirstRunDialog); BASE_DECLARE_FEATURE(kViewsJSAppModalDialog); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kUsePortalAccentColor); #endif diff --git a/www/iridium/files/patch-chrome_browser_ui_url__identity.cc b/www/iridium/files/patch-chrome_browser_ui_url__identity.cc index 19ac2ce2c213..3d0798fcf942 100644 --- a/www/iridium/files/patch-chrome_browser_ui_url__identity.cc +++ b/www/iridium/files/patch-chrome_browser_ui_url__identity.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/url_identity.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/url_identity.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/url_identity.cc @@ -17,7 +17,7 @@ #include "url/gurl.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/webapps/isolated_web_apps/scheme.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) @@ -97,7 +97,7 @@ std::optional GetIsolatedWebAppIdFromU } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) UrlIdentity CreateIsolatedWebAppIdentityFromUrl(Profile* profile, const GURL& url, const FormatOptions& options) { @@ -155,7 +155,7 @@ UrlIdentity UrlIdentity::CreateFromUrl(Profile* profil } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (url.SchemeIs(webapps::kIsolatedAppScheme)) { DCHECK(allowed_types.Has(Type::kIsolatedWebApp)); return CreateIsolatedWebAppIdentityFromUrl(profile, url, options); diff --git a/www/iridium/files/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc b/www/iridium/files/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc index 9b5bbe5b7872..c7ae66ab2342 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc @@ -19,7 +19,7 @@ #include "ui/menus/simple_menu_model.h" #include "ui/views/widget/widget.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/shell_integration_linux.h" #endif @@ -49,7 +49,7 @@ void ChromeNativeAppWindowViewsAura::OnBeforeWidgetIni const AppWindow::CreateParams& create_params, views::Widget::InitParams* init_params, views::Widget* widget) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::string app_name = web_app::GenerateApplicationNameFromAppId(app_window()->extension_id()); // Set up a custom WM_CLASS for app windows. This allows task switchers in diff --git a/www/iridium/files/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc b/www/iridium/files/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc index 683e866d6a3a..10d6f3cdc9bd 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc @@ -36,7 +36,7 @@ #include "ui/wm/core/wm_state.h" #endif // defined(USE_AURA) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include #include #include @@ -131,7 +131,7 @@ void ChromeBrowserMainExtraPartsViews::PreProfileInit( return controller; })); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On the Linux desktop, we want to prevent the user from logging in as root, // so that we don't destroy the profile. Now that we have some minimal ui // initialized, check to see if we're running as root and bail if we are. diff --git a/www/iridium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h b/www/iridium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h index a2f7fe8bdfe6..f793340721c2 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h +++ b/www/iridium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/chrome_views_delegate.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/views/chrome_views_delegate.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/chrome_views_delegate.h @@ -52,7 +52,7 @@ class ChromeViewsDelegate : public views::ViewsDelegat base::OnceClosure callback) override; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool WindowManagerProvidesTitleBar(bool maximized) override; gfx::ImageSkia* GetDefaultWindowIcon() const override; #endif diff --git a/www/iridium/files/patch-chrome_browser_ui_views_chrome__views__delegate__linux.cc b/www/iridium/files/patch-chrome_browser_ui_views_chrome__views__delegate__linux.cc index 0d1d76a807a0..fab3d51de3cd 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_chrome__views__delegate__linux.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_chrome__views__delegate__linux.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/chrome_views_delegate_linux.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/views/chrome_views_delegate_linux.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/chrome_views_delegate_linux.cc @@ -27,7 +27,7 @@ bool IsDesktopEnvironmentUnity() { return desktop_env == base::nix::DESKTOP_ENVIRONMENT_UNITY; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) int GetWindowIconResourceId() { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) switch (chrome::GetChannel()) { @@ -85,7 +85,7 @@ views::NativeWidget* ChromeViewsDelegate::CreateNative delegate); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gfx::ImageSkia* ChromeViewsDelegate::GetDefaultWindowIcon() const { ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); return rb.GetImageSkiaNamed(GetWindowIconResourceId()); diff --git a/www/iridium/files/patch-chrome_browser_ui_views_compose_compose__dialog__view.cc b/www/iridium/files/patch-chrome_browser_ui_views_compose_compose__dialog__view.cc index afa9273acc3c..ac6da33b03ed 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_compose_compose__dialog__view.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_compose_compose__dialog__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/compose/compose_dialog_view.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/views/compose/compose_dialog_view.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/compose/compose_dialog_view.cc @@ -160,7 +160,7 @@ void ComposeDialogView::OnBeforeBubbleWidgetInit( views::Widget::InitParams* params, views::Widget* widget) const { WebUIBubbleDialogView::OnBeforeBubbleWidgetInit(params, widget); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // In linux, windows 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/iridium/files/patch-chrome_browser_ui_views_data__sharing_collaboration__controller__delegate__desktop.cc b/www/iridium/files/patch-chrome_browser_ui_views_data__sharing_collaboration__controller__delegate__desktop.cc index 2989b8d41614..8033fa315620 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_data__sharing_collaboration__controller__delegate__desktop.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_data__sharing_collaboration__controller__delegate__desktop.cc @@ -1,38 +1,47 @@ ---- chrome/browser/ui/views/data_sharing/collaboration_controller_delegate_desktop.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/data_sharing/collaboration_controller_delegate_desktop.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/data_sharing/collaboration_controller_delegate_desktop.cc -@@ -91,7 +91,7 @@ DialogText GetPromptDialogTextFromStatus( +@@ -94,7 +94,7 @@ DialogText GetPromptDialogTextFromStatus( break; } -#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( syncer::kReplaceSyncPromosWithSignInPromos) && status.signin_status != collaboration::SigninStatus::kSigninDisabled) { -@@ -404,7 +404,7 @@ void CollaborationControllerDelegateDesktop::ShowError +@@ -421,7 +421,7 @@ void CollaborationControllerDelegateDesktop::ShowError chrome::ShowBrowserModal(browser_, std::move(dialog_model)); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void CollaborationControllerDelegateDesktop:: MaybeShowSignInUiForHistorySyncOptin() { collaboration::ServiceStatus status = GetServiceStatus(); -@@ -516,7 +516,7 @@ void CollaborationControllerDelegateDesktop:: - .SetLabel(dialog_text.ok_button_text) - .SetEnabled(true)); +@@ -510,7 +510,7 @@ void CollaborationControllerDelegateDesktop:: + } + AccountInfo account_for_promo = -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - AccountInfo account_for_promo = signin_ui_util::GetSingleAccountForPromos( - IdentityManagerFactory::GetForProfile(browser_->profile())); + signin_ui_util::GetSingleAccountForPromos( + IdentityManagerFactory::GetForProfile(browser_->profile())); + #else +@@ -545,7 +545,7 @@ void CollaborationControllerDelegateDesktop:: + .SetLabel(dialog_text.ok_button_text) + .SetEnabled(true)); -@@ -569,7 +569,7 @@ void CollaborationControllerDelegateDesktop::OnPromptD +-#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( + syncer::kReplaceSyncPromosWithSignInPromos)) { + dialog_builder.SetFootnote(ui::DialogModelLabel(dialog_text.footnote)); +@@ -598,7 +598,7 @@ void CollaborationControllerDelegateDesktop::OnPromptD .Run(CollaborationControllerDelegate::Outcome::kSuccess); } -#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( syncer::kReplaceSyncPromosWithSignInPromos)) { MaybeShowSignInUiForHistorySyncOptin(); diff --git a/www/iridium/files/patch-chrome_browser_ui_views_data__sharing_collaboration__controller__delegate__desktop.h b/www/iridium/files/patch-chrome_browser_ui_views_data__sharing_collaboration__controller__delegate__desktop.h index 625384e0ee14..bf44f8e286bf 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_data__sharing_collaboration__controller__delegate__desktop.h +++ b/www/iridium/files/patch-chrome_browser_ui_views_data__sharing_collaboration__controller__delegate__desktop.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/data_sharing/collaboration_controller_delegate_desktop.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/data_sharing/collaboration_controller_delegate_desktop.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/data_sharing/collaboration_controller_delegate_desktop.h -@@ -81,7 +81,7 @@ class CollaborationControllerDelegateDesktop +@@ -83,7 +83,7 @@ class CollaborationControllerDelegateDesktop std::optional progress); void ShowErrorDialog(const ErrorInfo& error); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void MaybeShowSignInUiForHistorySyncOptin(); #endif void MaybeShowSignInAndSyncUi(); diff --git a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__factory__views.cc b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__factory__views.cc index 87dd873faeb9..c15c4be723a5 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__factory__views.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__factory__views.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/frame/browser_frame_view_factory_views.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/frame/browser_frame_view_factory_views.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/frame/browser_frame_view_factory_views.cc @@ -17,7 +17,7 @@ #include "chrome/browser/ui/views/frame/browser_frame_view_win.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/views/frame/browser_frame_view_layout_linux.h" #include "chrome/browser/ui/views/frame/browser_frame_view_layout_linux_native.h" #include "chrome/browser/ui/views/frame/browser_frame_view_linux_native.h" @@ -32,7 +32,7 @@ namespace chrome { namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr CreateOpaqueBrowserFrameViewLinux( BrowserWidget* widget, BrowserView* browser_view) { diff --git a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux.cc b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux.cc index 2caf136d266e..470f78011f24 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/frame/browser_frame_view_layout_linux.cc.orig 2025-06-19 07:37:57 UTC +--- chrome/browser/ui/views/frame/browser_frame_view_layout_linux.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/frame/browser_frame_view_layout_linux.cc @@ -55,7 +55,7 @@ gfx::Insets BrowserFrameViewLayoutLinux::RestoredFrame OpaqueBrowserFrameViewLayout::RestoredFrameBorderInsets()); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const bool tiled = delegate_->IsTiled(); #else const bool tiled = false; diff --git a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux__native.cc b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux__native.cc index 3f2418654d5a..417c27346310 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux__native.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__layout__linux__native.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/frame/browser_frame_view_layout_linux_native.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/views/frame/browser_frame_view_layout_linux_native.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/frame/browser_frame_view_layout_linux_native.cc @@ -18,7 +18,7 @@ BrowserFrameViewLayoutLinuxNative::~BrowserFrameViewLa ui::WindowFrameProvider* BrowserFrameViewLayoutLinuxNative::GetFrameProvider() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const bool tiled = delegate_->IsTiled(); const bool maximized = delegate_->IsMaximized(); #else diff --git a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__linux.cc b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__linux.cc index 2d735a592ebf..5b3c71e17c77 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__linux.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame__view__linux.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/frame/browser_frame_view_linux.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/frame/browser_frame_view_linux.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/frame/browser_frame_view_linux.cc -@@ -70,7 +70,7 @@ gfx::ShadowValues BrowserFrameViewLinux::GetShadowValu +@@ -71,7 +71,7 @@ gfx::ShadowValues BrowserFrameViewLinux::GetShadowValu void BrowserFrameViewLinux::PaintRestoredFrameBorder( gfx::Canvas* canvas) const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const bool tiled = browser_widget()->tiled(); #else const bool tiled = false; -@@ -125,7 +125,7 @@ int BrowserFrameViewLinux::NonClientHitTest(const gfx: +@@ -126,7 +126,7 @@ int BrowserFrameViewLinux::NonClientHitTest(const gfx: } float BrowserFrameViewLinux::GetRestoredCornerRadiusDip() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const bool tiled = browser_widget()->tiled(); #else const bool tiled = false; diff --git a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__view.cc b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__view.cc index 15d73b928960..fbd16374d277 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__view.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__view.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/views/frame/browser_view.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/frame/browser_view.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -2313,7 +2313,7 @@ void BrowserView::ToolbarSizeChanged(bool is_animating +@@ -2305,7 +2305,7 @@ void BrowserView::ToolbarSizeChanged(bool is_animating } void BrowserView::TabDraggingStatusChanged(bool is_dragging) { -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) std::vector contents_web_views = GetAllVisibleContentsWebViews(); -@@ -5880,7 +5880,7 @@ void BrowserView::MaybeShowProfileSwitchIPH() { +@@ -5919,7 +5919,7 @@ void BrowserView::MaybeShowProfileSwitchIPH() { } void BrowserView::MaybeShowSupervisedUserProfileSignInIPH() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!ShouldShowAvatarToolbarIPH()) { return; } -@@ -5890,7 +5890,7 @@ void BrowserView::MaybeShowSupervisedUserProfileSignIn +@@ -5929,7 +5929,7 @@ void BrowserView::MaybeShowSupervisedUserProfileSignIn } void BrowserView::MaybeShowSignInBenefitsIPH() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!ShouldShowAvatarToolbarIPH()) { return; } diff --git a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__widget.cc b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__widget.cc index 06d26f229651..bd29ead29905 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__widget.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__widget.cc @@ -1,65 +1,56 @@ ---- chrome/browser/ui/views/frame/browser_widget.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/frame/browser_widget.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/frame/browser_widget.cc -@@ -53,7 +53,7 @@ +@@ -52,7 +52,7 @@ #include "ui/aura/window.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/display/screen.h" #include "ui/linux/linux_ui.h" #endif -@@ -68,7 +68,7 @@ namespace { - constexpr double kTitlePaddingWidthFraction = 0.1; - #endif - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // These values are used for Linux/GTK. - constexpr int kIconTitleSpacing = 4; - constexpr int kCaptionSpacing = 5; -@@ -98,7 +98,7 @@ class ThemeChangedObserver : public views::WidgetObser +@@ -87,7 +87,7 @@ class ThemeChangedObserver : public views::WidgetObser }; bool IsUsingLinuxSystemTheme(Profile* profile) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme(); #else return false; -@@ -214,7 +214,7 @@ void BrowserWidget::InitBrowserWidget() { +@@ -203,7 +203,7 @@ void BrowserWidget::InitBrowserWidget() { Init(std::move(params)); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) SelectNativeTheme(); #else SetNativeTheme(ui::NativeTheme::GetInstanceForNativeUi()); -@@ -419,7 +419,7 @@ void BrowserWidget::OnNativeWidgetWorkspaceChanged() { +@@ -342,7 +342,7 @@ void BrowserWidget::OnNativeWidgetWorkspaceChanged() { chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace()); chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(), IsVisibleOnAllWorkspaces()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If the window was sent to a different workspace, prioritize it if // it was sent to the current workspace and deprioritize it // otherwise. This is done by MoveBrowsersInWorkspaceToFront() -@@ -606,7 +606,7 @@ void BrowserWidget::OnMenuClosed() { +@@ -531,7 +531,7 @@ void BrowserWidget::OnMenuClosed() { } void BrowserWidget::SelectNativeTheme() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Use the regular NativeTheme instance if running incognito mode, regardless // of system theme (gtk, qt etc). ui::NativeTheme* native_theme = ui::NativeTheme::GetInstanceForNativeUi(); -@@ -647,7 +647,7 @@ void BrowserWidget::OnTouchUiChanged() { +@@ -572,7 +572,7 @@ void BrowserWidget::OnTouchUiChanged() { bool BrowserWidget::RegenerateFrameOnThemeChange( BrowserThemeChangeType theme_change_type) { bool need_regenerate = false; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // System and user theme changes can both change frame buttons, so the frame // always needs to be regenerated on Linux. need_regenerate = true; diff --git a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__widget.h b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__widget.h index 5f488469735d..6c37405d320b 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__widget.h +++ b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__widget.h @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/frame/browser_widget.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/frame/browser_widget.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/frame/browser_widget.h -@@ -66,7 +66,7 @@ class BrowserWidget : public views::Widget, +@@ -65,7 +65,7 @@ class BrowserWidget : public views::Widget, ~BrowserWidget() override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Returns whether the frame is in a tiled state. bool tiled() const { return tiled_; } void set_tiled(bool tiled) { tiled_ = tiled; } -@@ -198,7 +198,7 @@ class BrowserWidget : public views::Widget, +@@ -187,7 +187,7 @@ class BrowserWidget : public views::Widget, // contents for smoother dragging. TabDragKind tab_drag_kind_ = TabDragKind::kNone; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool tiled_ = false; #endif }; diff --git a/www/iridium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc b/www/iridium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc index 64071fae6cc1..5f2feafbe30a 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/frame/opaque_browser_frame_view.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/frame/opaque_browser_frame_view.cc -@@ -54,7 +54,7 @@ +@@ -55,7 +55,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 -@@ -584,7 +584,7 @@ bool OpaqueBrowserFrameView::EverHasVisibleBackgroundT +@@ -605,7 +605,7 @@ bool OpaqueBrowserFrameView::IsFrameCondensed() const OpaqueBrowserFrameView::FrameButtonStyle OpaqueBrowserFrameView::GetFrameButtonStyle() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return FrameButtonStyle::kMdButton; #else return FrameButtonStyle::kImageButton; -@@ -603,7 +603,7 @@ bool OpaqueBrowserFrameView::ShouldDrawRestoredFrameSh +@@ -624,7 +624,7 @@ bool OpaqueBrowserFrameView::ShouldDrawRestoredFrameSh return false; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool OpaqueBrowserFrameView::IsTiled() const { return browser_widget()->tiled(); } -@@ -835,7 +835,7 @@ gfx::Rect OpaqueBrowserFrameView::GetIconBounds() cons +@@ -856,7 +856,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/iridium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.h b/www/iridium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.h index 98079c21ad03..6b4b3473e5ee 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.h +++ b/www/iridium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.h @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/frame/opaque_browser_frame_view.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/frame/opaque_browser_frame_view.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/frame/opaque_browser_frame_view.h @@ -109,7 +109,7 @@ class OpaqueBrowserFrameView : public BrowserFrameView FrameButtonStyle GetFrameButtonStyle() const override; void UpdateWindowControlsOverlay(const gfx::Rect& bounding_rect) override; bool ShouldDrawRestoredFrameShadow() const override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool IsTiled() const override; #endif int WebAppButtonHeight() const override; -@@ -229,7 +229,7 @@ class OpaqueBrowserFrameView : public BrowserFrameView +@@ -232,7 +232,7 @@ class OpaqueBrowserFrameView : public BrowserFrameView // Background painter for the window frame. std::unique_ptr frame_background_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr menu_runner_; #endif diff --git a/www/iridium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout__delegate.h b/www/iridium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout__delegate.h index bf4f3650bf4b..bc371b904195 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout__delegate.h +++ b/www/iridium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout__delegate.h @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegate.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegate.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegate.h @@ -9,7 +9,7 @@ #include "build/build_config.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/base/ui_base_types.h" #endif -@@ -92,7 +92,7 @@ class OpaqueBrowserFrameViewLayoutDelegate { +@@ -88,7 +88,7 @@ class OpaqueBrowserFrameViewLayoutDelegate { // Returns true if a client-side shadow should be drawn for restored windows. virtual bool ShouldDrawRestoredFrameShadow() const = 0; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Returns whether the window is in a tiled state. virtual bool IsTiled() const = 0; #endif diff --git a/www/iridium/files/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc b/www/iridium/files/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc index ceba557369e9..68d7b962a075 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/frame/system_menu_model_builder.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/frame/system_menu_model_builder.cc @@ -81,7 +81,7 @@ void SystemMenuModelBuilder::BuildMenu(ui::SimpleMenuM void SystemMenuModelBuilder::BuildSystemMenuForBrowserWindow( ui::SimpleMenuModel* model) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) 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); @@ -130,7 +130,7 @@ void SystemMenuModelBuilder::BuildSystemMenuForBrowser model->AddSeparator(ui::NORMAL_SEPARATOR); model->AddItemWithStringId(IDC_TASK_MANAGER_CONTEXT_MENU, IDS_TASK_MANAGER); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) model->AddSeparator(ui::NORMAL_SEPARATOR); bool supports_server_side_decorations = true; #if BUILDFLAG(IS_OZONE) && !BUILDFLAG(IS_CHROMEOS) @@ -204,7 +204,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/iridium/files/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc b/www/iridium/files/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc index 8e7f24206f57..35ef4d8ecab2 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc +++ b/www/iridium/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 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/views/frame/system_menu_model_delegate.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/frame/system_menu_model_delegate.cc -@@ -21,7 +21,7 @@ +@@ -22,7 +22,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" #endif -@@ -38,7 +38,7 @@ SystemMenuModelDelegate::SystemMenuModelDelegate( +@@ -39,7 +39,7 @@ SystemMenuModelDelegate::SystemMenuModelDelegate( SystemMenuModelDelegate::~SystemMenuModelDelegate() = default; 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); -@@ -64,7 +64,7 @@ bool SystemMenuModelDelegate::IsCommandIdEnabled(int c +@@ -65,7 +65,7 @@ bool SystemMenuModelDelegate::IsCommandIdEnabled(int c } bool SystemMenuModelDelegate::IsCommandIdVisible(int command_id) const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool is_maximized = browser_->window()->IsMaximized(); switch (command_id) { case IDC_MAXIMIZE_WINDOW: diff --git a/www/iridium/files/patch-chrome_browser_ui_views_frame_tab__strip__region__view.cc b/www/iridium/files/patch-chrome_browser_ui_views_frame_tab__strip__region__view.cc deleted file mode 100644 index 35ac5a696ffd..000000000000 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_tab__strip__region__view.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/ui/views/frame/tab_strip_region_view.cc.orig 2025-11-06 10:11:34 UTC -+++ chrome/browser/ui/views/frame/tab_strip_region_view.cc -@@ -302,7 +302,7 @@ TabStripRegionView::TabStripRegionView(std::unique_ptr - new_tab_button_->GetViewAccessibility().SetName( - l10n_util::GetStringUTF16(IDS_ACCNAME_NEWTAB)); - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // The New Tab Button can be middle-clicked on Linux. - new_tab_button_->SetTriggerableEventFlags( - new_tab_button_->GetTriggerableEventFlags() | diff --git a/www/iridium/files/patch-chrome_browser_ui_views_hung__renderer__view.cc b/www/iridium/files/patch-chrome_browser_ui_views_hung__renderer__view.cc index 82d1e5441fce..a34dd284c392 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_hung__renderer__view.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_hung__renderer__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/hung_renderer_view.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/views/hung_renderer_view.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/hung_renderer_view.cc @@ -452,7 +452,7 @@ void HungRendererDialogView::ForceCrashHungRenderer() content::RenderProcessHost* rph = hung_pages_table_model_->GetRenderWidgetHost()->GetProcess(); if (rph) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // A generic |CrashDumpHungChildProcess()| is not implemented for Linux. // Instead we send an explicit IPC to crash on the renderer's IO thread. rph->ForceCrash(); diff --git a/www/iridium/files/patch-chrome_browser_ui_views_location__bar_location__bar__view.cc b/www/iridium/files/patch-chrome_browser_ui_views_location__bar_location__bar__view.cc index 6872d5d0bc9c..dad6a19291c1 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_location__bar_location__bar__view.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_location__bar_location__bar__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/location_bar/location_bar_view.cc.orig 2025-11-12 18:20:14 UTC +--- chrome/browser/ui/views/location_bar/location_bar_view.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/location_bar/location_bar_view.cc -@@ -539,7 +539,7 @@ bool LocationBarView::IsInitialized() const { - } +@@ -1768,7 +1768,7 @@ void LocationBarView::OnPopupStateChanged(OmniboxPopup + weak_factory_.GetWeakPtr()), + base::Milliseconds(100)); - void LocationBarView::OnPopupOpened() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // It's not great for promos to overlap the omnibox if the user opens the - // drop-down after showing the promo. This especially causes issues on Mac and - // Linux due to z-order/rendering issues, see crbug.com/1225046 and + if (new_state != OmniboxPopupState::kNone) { + // Close any overlapping user education bubbles when any popup opens. + // It's not great for promos to overlap the omnibox if the user opens the diff --git a/www/iridium/files/patch-chrome_browser_ui_views_new__tab__footer_footer__controller.cc b/www/iridium/files/patch-chrome_browser_ui_views_new__tab__footer_footer__controller.cc index 15d2ccb67cdf..34be4e542bae 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_new__tab__footer_footer__controller.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_new__tab__footer_footer__controller.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/new_tab_footer/footer_controller.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/views/new_tab_footer/footer_controller.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/new_tab_footer/footer_controller.cc @@ -44,7 +44,7 @@ NewTabFooterController::NewTabFooterController( base::BindRepeating(&NewTabFooterController::UpdateFooterVisibilities, weak_factory_.GetWeakPtr(), /*log_on_load_metric=*/false)); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) local_state_pref_change_registrar_.Init(g_browser_process->local_state()); local_state_pref_change_registrar_.Add( prefs::kNTPFooterManagementNoticeEnabled, diff --git a/www/iridium/files/patch-chrome_browser_ui_views_passwords_password__bubble__view__base.cc b/www/iridium/files/patch-chrome_browser_ui_views_passwords_password__bubble__view__base.cc index 0e322e5415fc..2e2153711f1a 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_passwords_password__bubble__view__base.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/passwords/password_bubble_view_base.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/passwords/password_bubble_view_base.cc @@ -42,7 +42,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 @@ -158,7 +158,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/iridium/files/patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.cc b/www/iridium/files/patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.cc index 6b7b4b01e707..755222de8cb4 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/profiles/avatar_toolbar_button.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/profiles/avatar_toolbar_button.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/profiles/avatar_toolbar_button.cc -@@ -404,7 +404,7 @@ void AvatarToolbarButton::MaybeShowProfileSwitchIPH() +@@ -405,7 +405,7 @@ void AvatarToolbarButton::MaybeShowProfileSwitchIPH() } } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void AvatarToolbarButton::MaybeShowSupervisedUserSignInIPH() { if (!base::FeatureList::IsEnabled( feature_engagement::kIPHSupervisedUserProfileSigninFeature)) { diff --git a/www/iridium/files/patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.h b/www/iridium/files/patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.h index 4664ef2db5b1..86bf1f402714 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.h +++ b/www/iridium/files/patch-chrome_browser_ui_views_profiles_avatar__toolbar__button.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/profiles/avatar_toolbar_button.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/profiles/avatar_toolbar_button.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/profiles/avatar_toolbar_button.h @@ -96,7 +96,7 @@ class AvatarToolbarButton : public ToolbarButton, // Attempts showing the In-Product-Help for profile Switching. void MaybeShowProfileSwitchIPH(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Attempts showing the In-Product-Help when a supervised user signs-in in a // profile. void MaybeShowSupervisedUserSignInIPH(); diff --git a/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__menu__coordinator.cc b/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__menu__coordinator.cc index bf47c91edfe4..a6c0860171ee 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__menu__coordinator.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__menu__coordinator.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc @@ -87,7 +87,7 @@ void ProfileMenuCoordinator::ShowWithPromoResults( ->NotifyFeaturePromoFeatureUsed( feature_engagement::kIPHProfileSwitchFeature, FeaturePromoFeatureUsedAction::kClosePromoIfPresent); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BrowserUserEducationInterface::From(GetBrowser()) ->NotifyFeaturePromoFeatureUsed( feature_engagement::kIPHSupervisedUserProfileSigninFeature, diff --git a/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view.cc b/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view.cc index d22013b5cdbd..973527773bc2 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/profiles/profile_menu_view.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/profiles/profile_menu_view.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/profiles/profile_menu_view.cc -@@ -107,7 +107,7 @@ +@@ -108,7 +108,7 @@ #include "ui/views/accessibility/view_accessibility.h" #include "ui/views/widget/widget.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 -@@ -563,7 +563,7 @@ void ProfileMenuView::SetMenuTitleForAccessibility() { +@@ -552,7 +552,7 @@ void ProfileMenuView::SetMenuTitleForAccessibility() { case signin_util::SignedInState::kSignedOut: case signin_util::SignedInState::kWebOnlySignedIn: { std::string profile_user_display_name, profile_user_email; -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) profile_user_display_name = profile().GetPrefs()->GetString( enterprise_signin::prefs::kProfileUserDisplayName); profile_user_email = profile().GetPrefs()->GetString( diff --git a/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__picker__view.cc b/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__picker__view.cc index ea9b77956263..78be6d8bb748 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__picker__view.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__picker__view.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/profiles/profile_picker_view.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/views/profiles/profile_picker_view.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/profiles/profile_picker_view.cc @@ -81,7 +81,7 @@ #include "chrome/browser/global_keyboard_shortcuts_mac.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/shell_integration_linux.h" #endif @@ -107,7 +107,7 @@ class ProfilePickerWidget : public views::Widget { views::Widget::InitParams params( views::Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET); params.delegate = profile_picker_view_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) params.wm_class_name = shell_integration_linux::GetProgramClassName(); params.wm_class_class = shell_integration_linux::GetProgramClassClass(); params.wayland_app_id = params.wm_class_class; diff --git a/www/iridium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc b/www/iridium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc index 61c260166170..f3ef59e93b3a 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc @@ -1,73 +1,73 @@ ---- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc @@ -65,14 +65,14 @@ #include "chrome/browser/ui/webui/signin/signout_confirmation/signout_confirmation_ui.h" #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/signin/history_sync_optin/history_sync_optin_ui.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) namespace { const int kModalDialogWidth = 448; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const int kManagedUserNoticeConfirmationDialogWidth = 780; const int kManagedUserNoticeConfirmationDialogHeight = 560; #endif @@ -139,7 +139,7 @@ SigninViewControllerDelegateViews::CreateSyncConfirmat kSyncConfirmationDialogWidth, InitializeSigninWebDialogUI(true)); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) std::unique_ptr SigninViewControllerDelegateViews::CreateHistorySyncOptInWebView( Browser* browser, @@ -230,7 +230,7 @@ SigninViewControllerDelegateViews::CreateSignoutConfir } #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // static std::unique_ptr SigninViewControllerDelegateViews::CreateManagedUserNoticeConfirmationWebView( @@ -406,7 +406,7 @@ SigninViewControllerDelegateViews::SigninViewControlle SetButtons(static_cast(ui::mojom::DialogButton::kNone)); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || 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) { @@ -498,7 +498,7 @@ void SigninViewControllerDelegateViews::DisplayModal() content_view_->RequestFocus(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void SigninViewControllerDelegateViews::DeleteProfileOnCancel() { ProfileAttributesEntry* entry = g_browser_process->profile_manager() @@ -538,7 +538,7 @@ SigninViewControllerDelegate::CreateSyncConfirmationDe /*animate_on_resize=*/true); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // static SigninViewControllerDelegate* SigninViewControllerDelegate::CreateSyncHistoryOptInDelegate( @@ -597,7 +597,7 @@ SigninViewControllerDelegate::CreateSignoutConfirmatio } #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // static SigninViewControllerDelegate* SigninViewControllerDelegate::CreateManagedUserNoticeDelegate( diff --git a/www/iridium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h b/www/iridium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h index 89881aaa4f1a..d4b13ee606c1 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h +++ b/www/iridium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h @@ -1,29 +1,29 @@ ---- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h @@ -58,7 +58,7 @@ class SigninViewControllerDelegateViews SyncConfirmationStyle style, bool is_sync_promo); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) static std::unique_ptr CreateHistorySyncOptInWebView( Browser* browser, HistorySyncOptinLaunchContext launch_context, @@ -82,7 +82,7 @@ class SigninViewControllerDelegateViews SignoutConfirmationCallback callback); #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) static std::unique_ptr CreateManagedUserNoticeConfirmationWebView( Browser* browser, @@ -153,7 +153,7 @@ class SigninViewControllerDelegateViews std::optional dialog_width, InitializeSigninWebDialogUI initialize_signin_web_dialog_ui); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Deletes the ephemeral profile when cancelling the local profile creation // dialog. void DeleteProfileOnCancel(); diff --git a/www/iridium/files/patch-chrome_browser_ui_views_tabs_dragging_tab__drag__controller.cc b/www/iridium/files/patch-chrome_browser_ui_views_tabs_dragging_tab__drag__controller.cc index 963fb071ee67..2eac6451d917 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_tabs_dragging_tab__drag__controller.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_tabs_dragging_tab__drag__controller.cc @@ -1,47 +1,47 @@ ---- chrome/browser/ui/views/tabs/dragging/tab_drag_controller.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/ui/views/tabs/dragging/tab_drag_controller.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/tabs/dragging/tab_drag_controller.cc -@@ -179,7 +179,7 @@ bool IsWindowDragUsingSystemDragDropAllowed() { +@@ -181,7 +181,7 @@ bool IsWindowDragUsingSystemDragDropAllowed() { void UpdateSystemDnDDragImage(TabDragContext* attached_context, const gfx::ImageSkia& image) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) VLOG(1) << __func__ << " image size=" << image.size().ToString(); aura::Window* root_window = attached_context->GetWidget()->GetNativeWindow()->GetRootWindow(); -@@ -391,7 +391,7 @@ TabDragController::Liveness TabDragController::Init( +@@ -393,7 +393,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) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ref->can_release_capture_ = false; #endif ref->start_point_in_screen_ = -@@ -982,7 +982,7 @@ TabDragController::Liveness TabDragController::DragBro +@@ -984,7 +984,7 @@ TabDragController::Liveness TabDragController::DragBro CHECK_EQ(SetCapture(target_context), Liveness::ALIVE); } -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !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. -@@ -2135,7 +2135,7 @@ void TabDragController::CompleteDrag() { +@@ -2115,7 +2115,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 -@@ -2551,7 +2551,7 @@ TabDragController::Liveness TabDragController::GetLoca +@@ -2531,7 +2531,7 @@ TabDragController::Liveness TabDragController::GetLoca } } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || 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/iridium/files/patch-chrome_browser_ui_views_tabs_tab.cc b/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab.cc index eceb16b534f5..f2a4b6603d50 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/tabs/tab.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/ui/views/tabs/tab.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/tabs/tab.cc -@@ -678,7 +678,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& +@@ -679,7 +679,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/iridium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc b/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc index 88b9e21e2633..621dbee50c2e 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc +++ b/www/iridium/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 2025-10-28 14:29:43 UTC +--- chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc @@ -381,7 +381,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/iridium/files/patch-chrome_browser_ui_views_tabs_tab__style__views.cc b/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab__style__views.cc index 61aca3d55d2f..e06ee602be71 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab__style__views.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab__style__views.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/tabs/tab_style_views.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/ui/views/tabs/tab_style_views.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/tabs/tab_style_views.cc -@@ -557,7 +557,7 @@ float TabStyleViewsImpl::GetCurrentActiveOpacity() con +@@ -567,7 +567,7 @@ float TabStyleViewsImpl::GetCurrentActiveOpacity() con if (!IsHoverAnimationActive()) { return base_opacity; } - return std::lerp(base_opacity, GetHoverOpacity(), GetHoverAnimationValue()); + return std::lerp(base_opacity, GetHoverOpacity(), static_cast(GetHoverAnimationValue())); } TabActive TabStyleViewsImpl::GetApparentActiveState() const { diff --git a/www/iridium/files/patch-chrome_browser_ui_views_task__manager__search__bar__view.cc b/www/iridium/files/patch-chrome_browser_ui_views_task__manager__search__bar__view.cc index 86896a84534e..11fb40bc3944 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_task__manager__search__bar__view.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_task__manager__search__bar__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/task_manager_search_bar_view.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/views/task_manager_search_bar_view.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/task_manager_search_bar_view.cc @@ -27,7 +27,7 @@ TaskManagerSearchBarView::TaskManagerSearchBarView( const gfx::Insets& margins, Delegate& delegate) : delegate_(delegate) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) , textfield_placeholder_color_id_(kColorTaskManagerSearchBarPlaceholderText) #endif diff --git a/www/iridium/files/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc b/www/iridium/files/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc index 51b74ca76e9c..e28aff47be1c 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/user_education/browser_user_education_service.cc.orig 2025-11-12 18:20:14 UTC +--- chrome/browser/ui/views/user_education/browser_user_education_service.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/user_education/browser_user_education_service.cc -@@ -1165,7 +1165,7 @@ void MaybeRegisterChromeFeaturePromos( +@@ -1178,7 +1178,7 @@ void MaybeRegisterChromeFeaturePromos( "Triggered when a shared tab becomes the active tab."))); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // kIPHSupervisedUserProfileSigninFeature: registry.RegisterFeature(std::move( FeaturePromoSpecification::CreateForCustomAction( -@@ -1433,7 +1433,7 @@ void MaybeRegisterChromeFeaturePromos( +@@ -1446,7 +1446,7 @@ void MaybeRegisterChromeFeaturePromos( "Triggered to inform users of the availability of the " "new translate screen feature on the Lens Overlay."))); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // kIPHDesktopPWAsLinkCapturingLaunch: registry.RegisterFeature(std::move( FeaturePromoSpecification::CreateForCustomAction( diff --git a/www/iridium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc b/www/iridium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc index 5a8a0c8fa60f..1b61fe4defc8 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc -@@ -516,7 +516,7 @@ std::string GetFileExtension(FileExtension file_extens +@@ -518,7 +518,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; -@@ -2088,7 +2088,7 @@ void WebAppIntegrationTestDriver::DeletePlatformShortc +@@ -2099,7 +2099,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( -@@ -3408,7 +3408,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginEna +@@ -3426,7 +3426,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 -@@ -3423,7 +3423,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3441,7 +3441,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 -@@ -3433,7 +3433,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3451,7 +3451,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; } -@@ -3449,7 +3449,7 @@ void WebAppIntegrationTestDriver::CheckSiteHandlesFile +@@ -3467,7 +3467,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; } -@@ -4274,7 +4274,7 @@ base::FilePath WebAppIntegrationTestDriver::GetShortcu +@@ -4298,7 +4298,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 -@@ -4474,7 +4474,7 @@ bool WebAppIntegrationTestDriver::IsShortcutAndIconCre +@@ -4498,7 +4498,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); -@@ -4518,7 +4518,7 @@ bool WebAppIntegrationTestDriver::DoIconColorsMatch(Pr +@@ -4542,7 +4542,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/iridium/files/patch-chrome_browser_ui_web__applications_app__browser__controller.cc b/www/iridium/files/patch-chrome_browser_ui_web__applications_app__browser__controller.cc index 0566ca117711..1a32878bbe06 100644 --- a/www/iridium/files/patch-chrome_browser_ui_web__applications_app__browser__controller.cc +++ b/www/iridium/files/patch-chrome_browser_ui_web__applications_app__browser__controller.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/web_applications/app_browser_controller.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/web_applications/app_browser_controller.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/web_applications/app_browser_controller.cc -@@ -492,7 +492,7 @@ std::u16string AppBrowserController::GetLaunchFlashTex +@@ -500,7 +500,7 @@ std::u16string AppBrowserController::GetLaunchFlashTex // web bundle. The flash text is not needed on platforms that already display // the app name in the title bar (e.g. Mac, Windows, and Linux). if (IsIsolatedWebApp()) { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return std::u16string(); #else // !(BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)) return GetAppShortName(); diff --git a/www/iridium/files/patch-chrome_browser_ui_web__applications_web__app__dialogs.h b/www/iridium/files/patch-chrome_browser_ui_web__applications_web__app__dialogs.h index eb8f7be31035..1e532020e3b7 100644 --- a/www/iridium/files/patch-chrome_browser_ui_web__applications_web__app__dialogs.h +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/web_applications/web_app_dialogs.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/web_applications/web_app_dialogs.h @@ -25,7 +25,7 @@ #include "ui/gfx/native_ui_types.h" static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || - BUILDFLAG(IS_CHROMEOS)); + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)); class GURL; class Profile; diff --git a/www/iridium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.cc b/www/iridium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.cc index 26dad823a3de..5c9c4623d2d3 100644 --- a/www/iridium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.cc +++ b/www/iridium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc -@@ -579,7 +579,7 @@ void WebAppUiManagerImpl::MaybeShowIPHPromoForAppsLaun +@@ -587,7 +587,7 @@ void WebAppUiManagerImpl::MaybeShowIPHPromoForAppsLaun Browser* browser, Profile* profile, const std::string& app_id) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) WebAppProvider* provider = WebAppProvider::GetForWebApps(profile); CHECK(provider); -@@ -800,7 +800,7 @@ void WebAppUiManagerImpl::ClearWebAppSiteDataIfNeeded( +@@ -808,7 +808,7 @@ void WebAppUiManagerImpl::ClearWebAppSiteDataIfNeeded( } } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const base::Feature& GetPromoFeatureEngagementFromBrowser( const BrowserWindowInterface* browser) { diff --git a/www/iridium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.h b/www/iridium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.h index 0b073b20a1c4..bc586c9aac54 100644 --- a/www/iridium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.h +++ b/www/iridium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/web_applications/web_app_ui_manager_impl.h.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/web_applications/web_app_ui_manager_impl.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/web_applications/web_app_ui_manager_impl.h -@@ -243,7 +243,7 @@ class WebAppUiManagerImpl : public BrowserListObserver +@@ -244,7 +244,7 @@ class WebAppUiManagerImpl : public BrowserListObserver UninstallCompleteCallback uninstall_complete_callback, webapps::UninstallResultCode uninstall_code); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void ShowIPHPromoForAppsLaunchedViaLinkCapturing(Browser* browser, const webapps::AppId& app_id, bool is_activated); diff --git a/www/iridium/files/patch-chrome_browser_ui_webui__browser_webui__browser__window.cc b/www/iridium/files/patch-chrome_browser_ui_webui__browser_webui__browser__window.cc index 3c4995b7d294..8e911a9218b1 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui__browser_webui__browser__window.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui__browser_webui__browser__window.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/webui_browser/webui_browser_window.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/webui_browser/webui_browser_window.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui_browser/webui_browser_window.cc @@ -54,7 +54,7 @@ const char* const kWebUIBrowserWindowKey = "__WEBUI_BR // Copied from chrome/browser/ui/views/frame/browser_widget.cc. bool IsUsingLinuxSystemTheme(Profile* profile) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme(); #else return false; diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_about_about__ui.cc b/www/iridium/files/patch-chrome_browser_ui_webui_about_about__ui.cc index ac9e4613638f..a6b25247af5c 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_about_about__ui.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_about_about__ui.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/webui/about/about_ui.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/webui/about/about_ui.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/about/about_ui.cc @@ -415,7 +415,7 @@ using about_ui::AppendHeader; namespace { -#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, @@ -445,7 +445,7 @@ TermsUIConfig::TermsUIConfig() : AboutUIConfigBase(chrome::kChromeUITermsHost) {} #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) LinuxProxyConfigUI::LinuxProxyConfigUI() : AboutUIConfigBase(chrome::kChromeUILinuxProxyConfigHost) {} #endif @@ -495,7 +495,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/iridium/files/patch-chrome_browser_ui_webui_about_about__ui.h b/www/iridium/files/patch-chrome_browser_ui_webui_about_about__ui.h index beda04ba8640..2decbb248ee5 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_about_about__ui.h +++ b/www/iridium/files/patch-chrome_browser_ui_webui_about_about__ui.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/webui/about/about_ui.h.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/webui/about/about_ui.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/about/about_ui.h @@ -43,7 +43,7 @@ class TermsUIConfig : public AboutUIConfigBase { }; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // chrome://linux-proxy-config class LinuxProxyConfigUI : public AboutUIConfigBase { public: diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc b/www/iridium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc index e2639e43ee57..c7fd5ef4b3c5 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/webui/app_home/app_home_page_handler.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/webui/app_home/app_home_page_handler.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/app_home/app_home_page_handler.cc -@@ -62,7 +62,7 @@ +@@ -61,7 +61,7 @@ #include "ui/base/window_open_disposition_utils.h" #include "url/gurl.h" -static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)); +static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)); using content::WebUI; using extensions::Extension; diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.h b/www/iridium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.h index 700ca26bbd4e..630d5209b33e 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.h +++ b/www/iridium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/webui/app_home/app_home_page_handler.h.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/webui/app_home/app_home_page_handler.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/app_home/app_home_page_handler.h @@ -23,7 +23,7 @@ #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" -static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)); +static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)); class Browser; class ExtensionEnableFlow; diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_app__settings_web__app__settings__ui.h b/www/iridium/files/patch-chrome_browser_ui_webui_app__settings_web__app__settings__ui.h index e86dd16658b3..f443b77e083d 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_app__settings_web__app__settings__ui.h +++ b/www/iridium/files/patch-chrome_browser_ui_webui_app__settings_web__app__settings__ui.h @@ -1,18 +1,18 @@ ---- chrome/browser/ui/webui/app_settings/web_app_settings_ui.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/webui/app_settings/web_app_settings_ui.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/app_settings/web_app_settings_ui.h @@ -14,13 +14,13 @@ #include "ui/webui/mojo_web_ui_controller.h" #include "ui/webui/resources/cr_components/app_management/app_management.mojom-forward.h" -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/common/webui_url_constants.h" #include "content/public/browser/webui_config.h" #include "content/public/common/url_constants.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class WebAppSettingsUI; class WebAppSettingsUIConfig diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_certificate__manager_certificate__manager__handler.cc b/www/iridium/files/patch-chrome_browser_ui_webui_certificate__manager_certificate__manager__handler.cc index 69935fae3230..b6d8fe16dd19 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_certificate__manager_certificate__manager__handler.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_certificate__manager_certificate__manager__handler.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/webui/certificate_manager/certificate_manager_handler.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/ui/webui/certificate_manager/certificate_manager_handler.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/certificate_manager/certificate_manager_handler.cc @@ -217,7 +217,7 @@ CertificateManagerPageHandler::GetCertSource( CERTIFICATE_TRUST_TYPE_DISTRUSTED, profile_, &remote_client_); break; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) case certificate_manager::mojom::CertificateSource:: kProvisionedClientCert: source_ptr = CreateProvisionedClientCertSource(profile_); diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.cc b/www/iridium/files/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.cc index 36a31e8fb961..c68f7952467d 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.cc @@ -1,74 +1,74 @@ ---- chrome/browser/ui/webui/certificate_manager/client_cert_sources.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/webui/certificate_manager/client_cert_sources.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/certificate_manager/client_cert_sources.cc @@ -56,7 +56,7 @@ #include "net/ssl/client_cert_store_mac.h" #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_process.h" #include "chrome/browser/enterprise/client_certificates/certificate_provisioning_service_factory.h" #include "chrome/browser/policy/chrome_browser_policy_connector.h" @@ -131,7 +131,7 @@ class ClientCertStoreLoader { active_requests_; }; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class ClientCertStoreFactoryNSS : public ClientCertStoreFactory { public: std::unique_ptr CreateClientCertStore() override { @@ -156,7 +156,7 @@ class ClientCertStoreFactoryMac : public ClientCertSto }; #endif -#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) std::unique_ptr CreatePlatformClientCertLoader( Profile* profile) { #if BUILDFLAG(IS_WIN) @@ -171,7 +171,7 @@ std::unique_ptr CreatePlatformC } #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class ClientCertStoreFactoryProvisioned : public ClientCertStoreFactory { public: explicit ClientCertStoreFactoryProvisioned( @@ -331,7 +331,7 @@ class ClientCertSource : public CertificateManagerPage std::optional certs_; }; -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // ChromeOS currently can use either Kcer or NSS for listing client certs, and // Linux uses NSS only. This interface provides an abstraction to hide that // from WritableClientCertSource. Currently this class only handles reading -@@ -1052,7 +1052,7 @@ CreatePlatformClientCertSource( +@@ -1054,7 +1054,7 @@ CreatePlatformClientCertSource( mojo::Remote* remote_client, Profile* profile) { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return std::make_unique(remote_client, profile); #else return std::make_unique( -@@ -1060,7 +1060,7 @@ CreatePlatformClientCertSource( +@@ -1062,7 +1062,7 @@ CreatePlatformClientCertSource( #endif } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr CreateProvisionedClientCertSource(Profile* profile) { return std::make_unique( -@@ -1110,7 +1110,7 @@ bool ClientCertManagementAccessControls::IsChangeAllow +@@ -1112,7 +1112,7 @@ bool ClientCertManagementAccessControls::IsChangeAllow return client_cert_policy_ == ClientCertificateManagementPermission::kAll; } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ClientCertManagementAccessControls::ClientCertManagementAccessControls( Profile* profile) {} diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.h b/www/iridium/files/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.h index e8c1ae8c1d2e..707b41fed655 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.h +++ b/www/iridium/files/patch-chrome_browser_ui_webui_certificate__manager_client__cert__sources.h @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/certificate_manager/client_cert_sources.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/webui/certificate_manager/client_cert_sources.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/certificate_manager/client_cert_sources.h @@ -19,7 +19,7 @@ CreatePlatformClientCertSource( remote_client, Profile* profile); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr CreateProvisionedClientCertSource(Profile* profile); #endif @@ -29,7 +29,7 @@ std::unique_ptr()); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) map.AddWebUIConfig(std::make_unique()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || // BUILDFLAG(IS_OPENBSD) -@@ -381,7 +381,7 @@ void RegisterChromeWebUIConfigs() { +@@ -383,7 +383,7 @@ void RegisterChromeWebUIConfigs() { map.AddWebUIConfig(std::make_unique()); #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) map.AddWebUIConfig(std::make_unique()); map.AddWebUIConfig(std::make_unique()); map.AddWebUIConfig(std::make_unique()); -@@ -390,13 +390,13 @@ void RegisterChromeWebUIConfigs() { +@@ -392,13 +392,13 @@ void RegisterChromeWebUIConfigs() { #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) map.AddWebUIConfig(std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) || BUILDFLAG(IS_BSD) map.AddWebUIConfig(std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc b/www/iridium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc index d9d11f060bc5..beed897d10be 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc @@ -1,51 +1,51 @@ ---- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -116,18 +116,18 @@ +@@ -115,18 +115,18 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/commerce/product_specifications_ui.h" #include "components/webapps/isolated_web_apps/scheme.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) #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) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/whats_new/whats_new_ui.h" #endif -@@ -276,7 +276,7 @@ void ChromeWebUIControllerFactory::GetFaviconForURL( +@@ -275,7 +275,7 @@ void ChromeWebUIControllerFactory::GetFaviconForURL( const std::vector& desired_sizes_in_pixel, favicon_base::FaviconResultsCallback callback) const { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (page_url.SchemeIs(webapps::kIsolatedAppScheme)) { ReadIsolatedWebAppFaviconsFromDisk(profile, page_url, std::move(callback)); return; -@@ -411,7 +411,7 @@ base::RefCountedMemory* ChromeWebUIControllerFactory:: +@@ -410,7 +410,7 @@ base::RefCountedMemory* ChromeWebUIControllerFactory:: return NewTabPageUI::GetFaviconResourceBytes(scale_factor); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - if (page_url.host_piece() == chrome::kChromeUIWhatsNewHost) { + if (page_url.host() == chrome::kChromeUIWhatsNewHost) { return WhatsNewUI::GetFaviconResourceBytes(scale_factor); } -@@ -450,7 +450,7 @@ base::RefCountedMemory* ChromeWebUIControllerFactory:: +@@ -449,7 +449,7 @@ base::RefCountedMemory* ChromeWebUIControllerFactory:: } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (page_url.host_piece() == commerce::kChromeUICompareHost) { + if (page_url.host() == commerce::kChromeUICompareHost) { return commerce::ProductSpecificationsUI::GetFaviconResourceBytes( scale_factor); diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_connectors__internals_connectors__internals__page__handler.cc b/www/iridium/files/patch-chrome_browser_ui_webui_connectors__internals_connectors__internals__page__handler.cc index 4841dec31320..c750a539c8ec 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_connectors__internals_connectors__internals__page__handler.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_connectors__internals_connectors__internals__page__handler.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/connectors_internals/connectors_internals_page_handler.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/ui/webui/connectors_internals/connectors_internals_page_handler.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/connectors_internals/connectors_internals_page_handler.cc @@ -85,7 +85,7 @@ connectors_internals::mojom::ClientIdentityPtr GetIden #endif // BUILDFLAG(ENTERPRISE_CLIENT_CERTIFICATES) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) std::string GetStringFromTimestamp(base::Time timestamp) { return (timestamp == base::Time()) ? std::string() : base::UnlocalizedTimeFormatWithPattern( @@ -200,7 +200,7 @@ void ConnectorsInternalsPageHandler::GetClientCertific void ConnectorsInternalsPageHandler::GetSignalsReportingState( GetSignalsReportingStateCallback callback) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) auto* profile_prefs = profile_->GetPrefs(); std::string last_upload_attempt_time_string = diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc b/www/iridium/files/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc index f20b6d6e03be..8f0b0708bb1b 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/webui/connectors_internals/device_trust_utils.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/webui/connectors_internals/device_trust_utils.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/connectors_internals/device_trust_utils.cc @@ -8,7 +8,7 @@ #include "components/enterprise/buildflags/buildflags.h" #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "base/base64url.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/policy/chrome_browser_policy_connector.h" @@ -42,7 +42,7 @@ namespace enterprise_connectors::utils { namespace { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) connectors_internals::mojom::KeyTrustLevel ParseTrustLevel( BPKUR::KeyTrustLevel trust_level) { @@ -182,7 +182,7 @@ connectors_internals::mojom::CertificateMetadataPtr Co connectors_internals::mojom::KeyInfoPtr GetKeyInfo() { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) auto* key_manager = g_browser_process->browser_policy_connector() ->chrome_browser_cloud_management_controller() ->GetDeviceTrustKeyManager(); diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_interstitials_interstitial__ui.cc b/www/iridium/files/patch-chrome_browser_ui_webui_interstitials_interstitial__ui.cc index 5a8f48d5d48b..5f42554db80e 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_interstitials_interstitial__ui.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_interstitials_interstitial__ui.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/webui/interstitials/interstitial_ui.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/webui/interstitials/interstitial_ui.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/interstitials/interstitial_ui.cc @@ -75,7 +75,7 @@ #include "components/security_interstitials/content/captive_portal_blocking_page.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/supervised_user/supervised_user_verification_controller_client.h" #include "chrome/browser/supervised_user/supervised_user_verification_page_blocked_sites.h" #include "chrome/browser/supervised_user/supervised_user_verification_page_youtube.h" @@ -404,7 +404,7 @@ std::unique_ptr CreateEnterpriseWa } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) std::unique_ptr CreateSupervisedUserVerificationPageForYouTube( content::WebContents* web_contents, @@ -631,7 +631,7 @@ void InterstitialHTMLSource::StartDataRequest( interstitial_delegate = CreateInsecureFormPage(web_contents); } else if (path_without_query == "/https_only") { interstitial_delegate = CreateHttpsOnlyModePage(web_contents); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) } else if (path_without_query == "/supervised-user-verify") { interstitial_delegate = CreateSupervisedUserVerificationPageForYouTube( web_contents, /*is_main_frame=*/true); diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui.cc b/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui.cc index 0c34609d7d33..f9f65cbd7ad2 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui.cc @@ -1,16 +1,16 @@ ---- chrome/browser/ui/webui/management/management_ui.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/webui/management/management_ui.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/management/management_ui.cc @@ -183,11 +183,11 @@ void ManagementUI::GetLocalizedStrings( IDS_MANAGEMENT_FILE_TRANSFER_VISIBLE_DATA}, {kManagementReportFileEvents, IDS_MANAGEMENT_REPORT_FILE_EVENTS}, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {kManagementScreenCaptureEvent, IDS_MANAGEMENT_SCREEN_CAPTURE_EVENT}, {kManagementScreenCaptureData, IDS_MANAGEMENT_SCREEN_CAPTURE_DATA}, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {kManagementDeviceSignalsDisclosure, IDS_MANAGEMENT_DEVICE_SIGNALS_DISCLOSURE}, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui__constants.cc b/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui__constants.cc index fbde1daed041..33be07d4e740 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui__constants.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui__constants.cc @@ -1,17 +1,17 @@ ---- chrome/browser/ui/webui/management/management_ui_constants.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/webui/management/management_ui_constants.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/management/management_ui_constants.cc @@ -89,12 +89,12 @@ const char kProfileReportingExtension[] = "profileRepo const char kProfileReportingPolicy[] = "profileReportingPolicy"; const char kProfileReportingLearnMore[] = "profileReportingLearnMore"; -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kManagementScreenCaptureEvent[] = "managementScreenCaptureEvent"; const char kManagementScreenCaptureData[] = "managementScreenCaptureData"; #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kManagementDeviceSignalsDisclosure[] = "managementDeviceSignalsDisclosure"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui__constants.h b/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui__constants.h index adf0a7003569..6b67483bcf35 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui__constants.h +++ b/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui__constants.h @@ -1,19 +1,19 @@ ---- chrome/browser/ui/webui/management/management_ui_constants.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/webui/management/management_ui_constants.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/management/management_ui_constants.h @@ -7,14 +7,14 @@ #include "build/build_config.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/iridium/files/patch-chrome_browser_ui_webui_management_management__ui__handler.cc b/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui__handler.cc index d70f03914a2e..5216db7e2b12 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui__handler.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui__handler.cc @@ -1,38 +1,38 @@ ---- chrome/browser/ui/webui/management/management_ui_handler.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/ui/webui/management/management_ui_handler.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/management/management_ui_handler.cc @@ -70,7 +70,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) @@ -383,7 +383,7 @@ void ManagementUIHandler::AddReportingInfo(base::Value report_sources->Append(std::move(data)); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto device_signal_data = GetDeviceSignalGrantedMessage(); if (!device_signal_data.empty()) { report_sources->Append(std::move(device_signal_data)); @@ -405,7 +405,7 @@ void ManagementUIHandler::AddReportingInfo(base::Value report_sources->Append(std::move(data)); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto device_signal_data = GetDeviceSignalGrantedMessage(); if (!device_signal_data.empty()) { report_sources->Append(std::move(device_signal_data)); @@ -595,7 +595,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/iridium/files/patch-chrome_browser_ui_webui_management_management__ui__handler.h b/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui__handler.h index c177f42ba0d0..e5831af0f5f2 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui__handler.h +++ b/www/iridium/files/patch-chrome_browser_ui_webui_management_management__ui__handler.h @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/management/management_ui_handler.h.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/ui/webui/management/management_ui_handler.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/management/management_ui_handler.h @@ -34,7 +34,7 @@ namespace enterprise_management { class GetUserEligiblePromotionsResponse; } // namespace enterprise_management -#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 @@ -91,7 +91,7 @@ class ManagementUIHandler : public content::WebUIMessa base::Value::List GetManagedWebsitesInfo(Profile* profile) const; base::Value::List GetApplicationsInfo(Profile* profile) const; virtual policy::PolicyService* GetPolicyService(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) virtual device_signals::UserPermissionService* GetUserPermissionService(); base::Value::Dict GetDeviceSignalGrantedMessage(); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_password__manager_promo__cards__handler.cc b/www/iridium/files/patch-chrome_browser_ui_webui_password__manager_promo__cards__handler.cc index 14c11afc3d38..0c82c1cdd9ea 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_password__manager_promo__cards__handler.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_password__manager_promo__cards__handler.cc @@ -1,20 +1,38 @@ ---- chrome/browser/ui/webui/password_manager/promo_cards_handler.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/webui/password_manager/promo_cards_handler.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/password_manager/promo_cards_handler.cc @@ -28,7 +28,7 @@ #include "chrome/browser/ui/webui/password_manager/promo_cards/web_password_manager_promo.h" #endif -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/browser/browser_process.h" #include "chrome/browser/ui/webui/password_manager/promo_cards/relaunch_chrome_promo.h" - #endif - -@@ -71,7 +71,7 @@ std::vector> Ge + #include "components/os_crypt/async/browser/os_crypt_async.h" +@@ -74,7 +74,7 @@ PromoCardsHandler::PromoCardsHandler(Profile* profile) .get())); #endif -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - promo_cards.push_back( - std::make_unique(profile->GetPrefs())); - #endif + auto relaunch_promo = + std::make_unique(profile->GetPrefs()); + relaunch_chrome_promo_ = relaunch_promo.get(); +@@ -114,7 +114,7 @@ void PromoCardsHandler::HandleGetAvailablePromoCard( + CHECK_EQ(1U, args.size()); + const base::Value& callback_id = args[0]; + +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (relaunch_chrome_promo_ && + !relaunch_chrome_promo_->is_encryption_available().has_value()) { + g_browser_process->os_crypt_async()->GetInstance( +@@ -177,7 +177,7 @@ PasswordPromoCardBase* PromoCardsHandler::GetPromoToSh + return promo_to_show; + } + +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void PromoCardsHandler::OnEncryptorReceived( + base::Value callback_id, + os_crypt_async::Encryptor encryptor) { diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_password__manager_promo__cards__handler.h b/www/iridium/files/patch-chrome_browser_ui_webui_password__manager_promo__cards__handler.h new file mode 100644 index 000000000000..5bbc1a5279d7 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_ui_webui_password__manager_promo__cards__handler.h @@ -0,0 +1,20 @@ +--- chrome/browser/ui/webui/password_manager/promo_cards_handler.h.orig 2025-12-10 15:04:57 UTC ++++ chrome/browser/ui/webui/password_manager/promo_cards_handler.h +@@ -52,7 +52,7 @@ class PromoCardsHandler : public content::WebUIMessage + + PasswordPromoCardBase* GetPromoToShowAndUpdatePref(); + +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void OnEncryptorReceived(base::Value callback_id, + os_crypt_async::Encryptor encryptor); + #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +@@ -60,7 +60,7 @@ class PromoCardsHandler : public content::WebUIMessage + raw_ptr profile_; + + std::vector> promo_cards_; +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // This points into `promo_cards_`, so should be ordered after it. + raw_ptr relaunch_chrome_promo_ = nullptr; + diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_password__manager_promo__cards_relaunch__chrome__promo.cc b/www/iridium/files/patch-chrome_browser_ui_webui_password__manager_promo__cards_relaunch__chrome__promo.cc index d17dac5b1934..e2dc954112f4 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_password__manager_promo__cards_relaunch__chrome__promo.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_password__manager_promo__cards_relaunch__chrome__promo.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/password_manager/promo_cards/relaunch_chrome_promo.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/ui/webui/password_manager/promo_cards/relaunch_chrome_promo.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/password_manager/promo_cards/relaunch_chrome_promo.cc -@@ -37,7 +37,7 @@ std::u16string RelaunchChromePromo::GetTitle() const { +@@ -36,7 +36,7 @@ std::u16string RelaunchChromePromo::GetTitle() const { return l10n_util::GetStringUTF16( #if BUILDFLAG(IS_MAC) IDS_PASSWORD_MANAGER_UI_RELAUNCH_CHROME_PROMO_CARD_TITLE -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) IDS_PASSWORD_MANAGER_UI_RELAUNCH_CHROME_PROMO_CARD_TITLE_LINUX #endif ); -@@ -47,7 +47,7 @@ std::u16string RelaunchChromePromo::GetDescription() c +@@ -46,7 +46,7 @@ std::u16string RelaunchChromePromo::GetDescription() c return l10n_util::GetStringUTF16( #if BUILDFLAG(IS_MAC) IDS_PASSWORD_MANAGER_UI_RELAUNCH_CHROME_PROMO_CARD_DESCRIPTION -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) IDS_PASSWORD_MANAGER_UI_RELAUNCH_CHROME_PROMO_CARD_DESCRIPTION_LINUX #endif ); diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc b/www/iridium/files/patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc index a1b3450a8e86..73f1596dcac2 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/webui/searchbox/searchbox_handler.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/webui/searchbox/searchbox_handler.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/searchbox/searchbox_handler.cc -@@ -157,7 +157,7 @@ const char* kMacShareIconResourceName = +@@ -160,7 +160,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 -@@ -217,7 +217,7 @@ static void DefineChromeRefreshRealboxIcons() { +@@ -220,7 +220,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 -@@ -523,7 +523,7 @@ std::string SearchboxHandler::AutocompleteIconToResour +@@ -539,7 +539,7 @@ std::string SearchboxHandler::AutocompleteIconToResour if (icon.name == omnibox::kShareWinChromeRefreshIcon.name) { return kWinShareIconResourceName; } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (icon.name == omnibox::kShareLinuxChromeRefreshIcon.name) { return kLinuxShareIconResourceName; } diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.cc b/www/iridium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.cc index a45091dd50b4..5ccdf203f2e3 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/webui/settings/appearance_handler.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/ui/webui/settings/appearance_handler.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/settings/appearance_handler.cc @@ -33,7 +33,7 @@ void AppearanceHandler::RegisterMessages() { "useDefaultTheme", base::BindRepeating(&AppearanceHandler::HandleUseTheme, base::Unretained(this), ui::SystemTheme::kDefault)); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) web_ui()->RegisterMessageCallback( "useGtkTheme", base::BindRepeating(&AppearanceHandler::HandleUseTheme, diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc b/www/iridium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc index f1af83be2d0f..7ca4e0594b9d 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc @@ -1,70 +1,70 @@ ---- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -137,7 +137,7 @@ +@@ -135,7 +135,7 @@ #include "chrome/browser/ui/webui/settings/system_handler.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/display/screen.h" #endif -@@ -146,7 +146,7 @@ +@@ -144,7 +144,7 @@ #include "device/fido/win/webauthn_api.h" #endif // BUILDFLAG(IS_WIN) -#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 -@@ -271,7 +271,7 @@ void AddA11yStrings(content::WebUIDataSource* html_sou +@@ -277,7 +277,7 @@ void AddA11yStrings(content::WebUIDataSource* html_sou {"toastAlertLevelDescription", IDS_SETTINGS_ACCESSIBILITY_TOAST_FREQUENCY_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", -@@ -545,7 +545,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -551,7 +551,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht {"uiFeatureAlignLeft", IDS_SETTINGS_UI_FEATURE_ALIGN_LEFT}, {"uiFeatureAlignRight", IDS_SETTINGS_UI_FEATURE_ALIGN_RIGHT}, {"resetToDefault", IDS_SETTINGS_RESET_TO_DEFAULT}, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"gtkTheme", IDS_SETTINGS_GTK_THEME}, {"useGtkTheme", IDS_SETTINGS_USE_GTK_THEME}, {"qtTheme", IDS_SETTINGS_QT_THEME}, -@@ -553,11 +553,11 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -559,11 +559,11 @@ void AddAppearanceStrings(content::WebUIDataSource* ht {"classicTheme", IDS_SETTINGS_CLASSIC_THEME}, {"useClassicTheme", IDS_SETTINGS_USE_CLASSIC_THEME}, #endif -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"resetToDefaultTheme", IDS_SETTINGS_RESET_TO_DEFAULT_THEME}, #endif {"resetToolbarToDefault", IDS_SETTINGS_RESET_TOOLBAR_TO_DEFAULT}, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, #endif #if BUILDFLAG(IS_MAC) -@@ -581,7 +581,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -587,7 +587,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht html_source->AddBoolean("tabSearchIsRightAlignedAtStartup", tabs::GetTabSearchTrailingTabstrip(profile)); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool show_custom_chrome_frame = ui::OzonePlatform::GetInstance() ->GetPlatformRuntimeProperties() .supports_server_side_window_decorations; -@@ -1591,7 +1591,7 @@ void AddSignOutDialogStrings(content::WebUIDataSource* +@@ -1743,7 +1743,7 @@ void AddSignOutDialogStrings(content::WebUIDataSource* g_browser_process->GetApplicationLocale()) .spec(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) html_source->AddString( "syncDisconnectManagedProfileExplanation", l10n_util::GetStringFUTF8( diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_settings_site__settings__handler.cc b/www/iridium/files/patch-chrome_browser_ui_webui_settings_site__settings__handler.cc index c7e90f6a7264..b85a143f6059 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_settings_site__settings__handler.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_settings_site__settings__handler.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/webui/settings/site_settings_handler.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/webui/settings/site_settings_handler.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/settings/site_settings_handler.cc -@@ -118,7 +118,7 @@ +@@ -121,7 +121,7 @@ #include "url/url_constants.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/webapps/isolated_web_apps/scheme.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) -@@ -2016,7 +2016,7 @@ void SiteSettingsHandler::SendZoomLevels() { +@@ -2086,7 +2086,7 @@ void SiteSettingsHandler::SendZoomLevels() { base::Value::List zoom_levels_exceptions; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Show any non-default Isolated Web App zoom levels at the top of the page. auto* web_app_provider = web_app::WebAppProvider::GetForWebApps(profile_); if (web_app_provider) { -@@ -2118,7 +2118,7 @@ void SiteSettingsHandler::HandleRemoveZoomLevel(const +@@ -2188,7 +2188,7 @@ void SiteSettingsHandler::HandleRemoveZoomLevel(const GURL url(host_or_spec); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (url.is_valid() && url.scheme() == webapps::kIsolatedAppScheme) { + if (url.is_valid() && url.GetScheme() == webapps::kIsolatedAppScheme) { base::expected iwa_url_info = web_app::IsolatedWebAppUrlInfo::Create(url); diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.cc b/www/iridium/files/patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.cc index 89624ed92bee..50419cb59f4e 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_page_handler.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_page_handler.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_page_handler.cc -@@ -549,7 +549,7 @@ void CustomizeChromePageHandler::UpdateFooterSettings( +@@ -572,7 +572,7 @@ void CustomizeChromePageHandler::UpdateFooterSettings( side_panel::mojom::ManagementNoticeState::New(); management_notice_state->can_be_shown = false; management_notice_state->enabled_by_policy = false; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_util::BrowserManagementNoticeState state = enterprise_util::GetManagementNoticeStateForNTPFooter(profile_); switch (state) { diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.h b/www/iridium/files/patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.h index 347f441124ae..75e219aac48a 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.h +++ b/www/iridium/files/patch-chrome_browser_ui_webui_side__panel_customize__chrome_customize__chrome__page__handler.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_page_handler.h.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_page_handler.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_page_handler.h -@@ -208,7 +208,7 @@ class CustomizeChromePageHandler +@@ -217,7 +217,7 @@ class CustomizeChromePageHandler // value needs to be requeried by the page. GURL last_source_url_{GURL(chrome::kChromeUINewTabPageURL)}; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) PrefChangeRegistrar browser_pref_change_registrar_; #endif PrefChangeRegistrar pref_change_registrar_; diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_signin_profile__picker__handler.cc b/www/iridium/files/patch-chrome_browser_ui_webui_signin_profile__picker__handler.cc index 215a6f393315..09ab3a57f17b 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_signin_profile__picker__handler.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_signin_profile__picker__handler.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/webui/signin/profile_picker_handler.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/webui/signin/profile_picker_handler.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/signin/profile_picker_handler.cc -@@ -172,7 +172,7 @@ base::Value::Dict CreateProfileState(const ProfileAttr +@@ -173,7 +173,7 @@ base::Value::Dict CreateProfileState(const ProfileAttr IDS_PROFILE_PICKER_PROFILE_CARD_LABEL, local_profile_name); if (entry->GetIsManaged() == signin::Tribool::kTrue) { profile_entry.Set("avatarBadge", "cr:domain"); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) } else if (entry->IsSupervised()) { profileCardButtonLabel = l10n_util::GetStringFUTF16( IDS_PROFILE_PICKER_PROFILE_CARD_LABEL_SUPERVISED, local_profile_name); diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_user__education__internals_user__education__internals__page__handler__impl.cc b/www/iridium/files/patch-chrome_browser_ui_webui_user__education__internals_user__education__internals__page__handler__impl.cc index 4f5df2620c84..a40ad0073fcb 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_user__education__internals_user__education__internals__page__handler__impl.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_user__education__internals_user__education__internals__page__handler__impl.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/webui/user_education_internals/user_education_internals_page_handler_impl.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/ui/webui/user_education_internals/user_education_internals_page_handler_impl.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/webui/user_education_internals/user_education_internals_page_handler_impl.cc @@ -49,7 +49,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/webui/resource_path.h" -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/browser_navigator.h" #include "chrome/browser/ui/browser_navigator_params.h" #include "net/base/url_util.h" @@ -89,7 +89,7 @@ user_education::NewBadgeRegistry* GetNewBadgeRegistry( } whats_new::WhatsNewRegistry* GetWhatsNewRegistry() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return g_browser_process->GetFeatures()->whats_new_registry(); #else return nullptr; @@ -913,7 +913,7 @@ void UserEducationInternalsPageHandlerImpl::ClearWhats } void UserEducationInternalsPageHandlerImpl::LaunchWhatsNewStaging() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) GURL url = net::AppendQueryParameter(GURL(chrome::kChromeUIWhatsNewURL), "staging", "true"); NavigateParams params(profile_, url, ui::PAGE_TRANSITION_TYPED); diff --git a/www/iridium/files/patch-chrome_browser_ui_window__sizer_window__sizer.cc b/www/iridium/files/patch-chrome_browser_ui_window__sizer_window__sizer.cc index 536ffaa36788..a2fe41de4c47 100644 --- a/www/iridium/files/patch-chrome_browser_ui_window__sizer_window__sizer.cc +++ b/www/iridium/files/patch-chrome_browser_ui_window__sizer_window__sizer.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/window_sizer/window_sizer.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/ui/window_sizer/window_sizer.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/ui/window_sizer/window_sizer.cc @@ -227,7 +227,7 @@ void WindowSizer::GetBrowserWindowBoundsAndShowState( browser, window_bounds, show_state); } -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Linux has its own implementation, see WindowSizerLinux. // static void WindowSizer::GetBrowserWindowBoundsAndShowState( diff --git a/www/iridium/files/patch-chrome_browser_upgrade__detector_version__history__client.cc b/www/iridium/files/patch-chrome_browser_upgrade__detector_version__history__client.cc index ce447a176bab..e63885eeb835 100644 --- a/www/iridium/files/patch-chrome_browser_upgrade__detector_version__history__client.cc +++ b/www/iridium/files/patch-chrome_browser_upgrade__detector_version__history__client.cc @@ -1,11 +1,11 @@ ---- chrome/browser/upgrade_detector/version_history_client.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/upgrade_detector/version_history_client.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/upgrade_detector/version_history_client.cc @@ -176,7 +176,7 @@ GURL GetVersionReleasesUrl(base::Version version) { #define CURRENT_PLATFORM "win" #endif -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define CURRENT_PLATFORM "linux" diff --git a/www/iridium/files/patch-chrome_browser_visited__url__ranking_visited__url__ranking__service__factory.cc b/www/iridium/files/patch-chrome_browser_visited__url__ranking_visited__url__ranking__service__factory.cc index bfc3b0d2668e..723f224a378a 100644 --- a/www/iridium/files/patch-chrome_browser_visited__url__ranking_visited__url__ranking__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_visited__url__ranking_visited__url__ranking__service__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/visited_url_ranking/visited_url_ranking_service_factory.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/visited_url_ranking/visited_url_ranking_service_factory.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/visited_url_ranking/visited_url_ranking_service_factory.cc @@ -45,7 +45,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" #elif BUILDFLAG(IS_ANDROID) #include "chrome/browser/visited_url_ranking/android_tab_model_url_visit_data_fetcher.h" @@ -119,7 +119,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/iridium/files/patch-chrome_browser_web__applications_commands_launch__web__app__command.cc b/www/iridium/files/patch-chrome_browser_web__applications_commands_launch__web__app__command.cc index db6dcffc1f50..5da9a5322b1c 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_commands_launch__web__app__command.cc +++ b/www/iridium/files/patch-chrome_browser_web__applications_commands_launch__web__app__command.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/commands/launch_web_app_command.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/web_applications/commands/launch_web_app_command.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/web_applications/commands/launch_web_app_command.cc @@ -101,7 +101,7 @@ void LaunchWebAppCommand::StartWithLock(std::unique_pt // OsIntegrationTestOverride can use the xdg install command to detect // install. SynchronizeOsOptions options; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) options.add_shortcut_to_desktop = true; #endif lock_->os_integration_manager().Synchronize( diff --git a/www/iridium/files/patch-chrome_browser_web__applications_commands_set__user__display__mode__command.cc b/www/iridium/files/patch-chrome_browser_web__applications_commands_set__user__display__mode__command.cc index 6f2e5f7e537c..6112810f07b8 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_commands_set__user__display__mode__command.cc +++ b/www/iridium/files/patch-chrome_browser_web__applications_commands_set__user__display__mode__command.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/commands/set_user_display_mode_command.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/web_applications/commands/set_user_display_mode_command.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/web_applications/commands/set_user_display_mode_command.cc @@ -56,7 +56,7 @@ void SetUserDisplayModeCommand::StartWithLock( // OsIntegrationTestOverride can use the xdg install command to detect // install. SynchronizeOsOptions options; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) options.add_shortcut_to_desktop = true; #endif app_lock_->os_integration_manager().Synchronize( diff --git a/www/iridium/files/patch-chrome_browser_web__applications_extension__status__utils.h b/www/iridium/files/patch-chrome_browser_web__applications_extension__status__utils.h index fefb00abd936..ca45d3fa48c4 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_extension__status__utils.h +++ b/www/iridium/files/patch-chrome_browser_web__applications_extension__status__utils.h @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/extension_status_utils.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/web_applications/extension_status_utils.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/web_applications/extension_status_utils.h @@ -50,7 +50,7 @@ bool IsExtensionDefaultInstalled(content::BrowserConte bool IsExternalExtensionUninstalled(content::BrowserContext* context, const std::string& extension_id); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If this method returns true, then |extension_id| will not be launchable. // // The eventual goal is that this method should return true for all hosted apps, diff --git a/www/iridium/files/patch-chrome_browser_web__applications_extensions_extension__status__utils.cc b/www/iridium/files/patch-chrome_browser_web__applications_extensions_extension__status__utils.cc index b5953d6b938d..f000dcc4c49d 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_extensions_extension__status__utils.cc +++ b/www/iridium/files/patch-chrome_browser_web__applications_extensions_extension__status__utils.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/extensions/extension_status_utils.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/web_applications/extensions/extension_status_utils.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/web_applications/extensions/extension_status_utils.cc @@ -94,7 +94,7 @@ bool IsExternalExtensionUninstalled(content::BrowserCo return prefs && prefs->IsExternalExtensionUninstalled(extension_id); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool IsExtensionUnsupportedDeprecatedApp(content::BrowserContext* context, const std::string& extension_id) { if (testing::g_enable_chrome_apps_for_testing) { diff --git a/www/iridium/files/patch-chrome_browser_web__applications_icons_icon__masker.cc b/www/iridium/files/patch-chrome_browser_web__applications_icons_icon__masker.cc index d6d60ae34e06..7aea3b8fe913 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_icons_icon__masker.cc +++ b/www/iridium/files/patch-chrome_browser_web__applications_icons_icon__masker.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/icons/icon_masker.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/web_applications/icons/icon_masker.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/web_applications/icons/icon_masker.cc @@ -12,7 +12,7 @@ namespace web_app { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) void MaskIconOnOs(SkBitmap input_bitmap, MaskedIconCallback masked_callback) { base::SequencedTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, diff --git a/www/iridium/files/patch-chrome_browser_web__applications_os__integration_os__integration__manager.cc b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_os__integration__manager.cc index 6f7c37c85e34..3eb830d77f6b 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_os__integration_os__integration__manager.cc +++ b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_os__integration__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/os_integration/os_integration_manager.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/web_applications/os_integration/os_integration_manager.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/web_applications/os_integration/os_integration_manager.cc @@ -665,7 +665,7 @@ std::unique_ptr OsIntegrationManager::Bu } } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const std::vector& shortcuts_menu_item_infos = app->shortcuts_menu_item_infos(); DCHECK_LE(shortcuts_menu_item_infos.size(), kMaxApplicationDockMenuItems); diff --git a/www/iridium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h index 744d489b4ffa..6a9e2a361c09 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h +++ b/www/iridium/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 2025-05-07 06:48:23 UTC +--- chrome/browser/web_applications/os_integration/os_integration_test_override.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/web_applications/os_integration/os_integration_test_override.h @@ -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/iridium/files/patch-chrome_browser_web__applications_os__integration_run__on__os__login__sub__manager.cc b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_run__on__os__login__sub__manager.cc index 6b5373227b09..de11c2bc64d4 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_os__integration_run__on__os__login__sub__manager.cc +++ b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_run__on__os__login__sub__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/os_integration/run_on_os_login_sub_manager.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/web_applications/os_integration/run_on_os_login_sub_manager.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/web_applications/os_integration/run_on_os_login_sub_manager.cc @@ -55,7 +55,7 @@ proto::os_state::RunOnOsLogin::Mode ConvertWebAppRunOn // different from other platforms, see web_app_run_on_os_login_manager.h for // more info. bool DoesRunOnOsLoginRequireExecution() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled(features::kDesktopPWAsRunOnOsLogin); #else return false; diff --git a/www/iridium/files/patch-chrome_browser_web__applications_os__integration_shortcut__sub__manager.cc b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_shortcut__sub__manager.cc index ab0ee115ed9c..43209a6cde73 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_os__integration_shortcut__sub__manager.cc +++ b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_shortcut__sub__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/os_integration/shortcut_sub_manager.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/browser/web_applications/os_integration/shortcut_sub_manager.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/web_applications/os_integration/shortcut_sub_manager.cc @@ -198,7 +198,7 @@ void ShortcutSubManager::Execute( return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Protocol handler update detection. Shortcuts need to be updated in this // case on Linux & Mac because the shortcut itself includes the protocol // handling metadata. diff --git a/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h index b3e3af680e26..76b763dcabaf 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h +++ b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h @@ -43,7 +43,7 @@ void UnregisterFileHandlersWithOs(const webapps::AppId const base::FilePath& profile_path, ResultCallback callback); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Exposed for testing purposes. Register the set of // MIME-type-to-file-extensions mappings corresponding to |file_handlers|. File // I/O and callouts to the Linux shell are performed asynchronously. diff --git a/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc index 2fe2788a28b5..30241df6fb94 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc +++ b/www/iridium/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 2025-10-28 14:29:43 UTC +--- chrome/browser/web_applications/os_integration/web_app_shortcut.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/web_applications/os_integration/web_app_shortcut.cc @@ -67,7 +67,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}; @@ -249,7 +249,7 @@ std::unique_ptr BuildShortcutInfoWithout // 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/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h index 1451a6dab595..85ff59920b71 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h +++ b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h @@ -1,20 +1,20 @@ ---- chrome/browser/web_applications/os_integration/web_app_shortcut.h.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/web_applications/os_integration/web_app_shortcut.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/web_applications/os_integration/web_app_shortcut.h @@ -23,7 +23,7 @@ #include "ui/gfx/image/image_family.h" #include "url/gurl.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/web_applications/os_integration/web_app_shortcut_linux.h" #endif // BUILDFLAG(IS_LINUX) @@ -78,7 +78,7 @@ struct ShortcutInfo { // the installed PWA experience and thus the icons are not designed to be // displayed on an OS dock. bool is_diy_app = false; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::set actions; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc b/www/iridium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc index 8b439ebfb384..4db7c0e8f2ff 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc +++ b/www/iridium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/policy/web_app_policy_manager.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/web_applications/policy/web_app_policy_manager.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/web_applications/policy/web_app_policy_manager.cc @@ -135,7 +135,7 @@ GetPreinstalledWebAppsMappingForTesting() { namespace web_app { BASE_FEATURE(kDesktopPWAsForceUnregisterOSIntegration, -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/iridium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.cc b/www/iridium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.cc index 703a186779cc..e695f482a359 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.cc +++ b/www/iridium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.cc @@ -1,119 +1,119 @@ ---- chrome/browser/web_applications/test/os_integration_test_override_impl.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/web_applications/test/os_integration_test_override_impl.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/web_applications/test/os_integration_test_override_impl.cc @@ -45,7 +45,7 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkColor.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/nix/xdg_util.h" #endif -@@ -130,7 +130,7 @@ std::vector GetFileExtensionsForProgId( +@@ -132,7 +132,7 @@ std::vector GetFileExtensionsForProgId( } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Performs a blocking read of app icons from the disk. std::optional IconManagerReadIconForSize( WebAppIconManager& icon_manager, -@@ -315,7 +315,7 @@ bool OsIntegrationTestOverrideImpl::SimulateDeleteShor +@@ -317,7 +317,7 @@ bool OsIntegrationTestOverrideImpl::SimulateDeleteShor GetShortcutPath(profile, chrome_apps_folder(), app_id, app_name); CHECK(base::PathExists(app_folder_shortcut_path)); return base::DeletePathRecursively(app_folder_shortcut_path); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FilePath desktop_shortcut_path = GetShortcutPath(profile, desktop(), app_id, app_name); LOG(INFO) << desktop_shortcut_path; -@@ -362,7 +362,7 @@ bool OsIntegrationTestOverrideImpl::DeleteApplicationM +@@ -364,7 +364,7 @@ bool OsIntegrationTestOverrideImpl::DeleteApplicationM } #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool OsIntegrationTestOverrideImpl::DeleteDesktopDirOnLinux() { if (desktop_.IsValid()) { return desktop_.Delete(); -@@ -376,7 +376,7 @@ bool OsIntegrationTestOverrideImpl::IsRunOnOsLoginEnab +@@ -378,7 +378,7 @@ bool OsIntegrationTestOverrideImpl::IsRunOnOsLoginEnab Profile* profile, const webapps::AppId& app_id, const std::string& app_name) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::string shortcut_filename = "chrome-" + app_id + "-" + profile->GetBaseName().value() + ".desktop"; return base::PathExists(startup().Append(shortcut_filename)); -@@ -431,7 +431,7 @@ bool OsIntegrationTestOverrideImpl::IsFileExtensionHan +@@ -433,7 +433,7 @@ bool OsIntegrationTestOverrideImpl::IsFileExtensionHan is_file_handled = shell_integration::CanApplicationHandleURL(app_path, test_file_url); base::DeleteFile(test_file_path); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FilePath user_applications_dir = applications(); bool database_update_called = false; for (const LinuxFileRegistration& command : linux_file_registration_) { -@@ -481,7 +481,7 @@ std::optional OsIntegrationTestOverrideImpl: +@@ -483,7 +483,7 @@ std::optional OsIntegrationTestOverrideImpl: return std::nullopt; } return GetIconFromShortcutFile(shortcut_path); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) WebAppProvider* provider = WebAppProvider::GetForLocalAppsUnchecked(profile); if (!provider) { return std::nullopt; -@@ -547,7 +547,7 @@ base::FilePath OsIntegrationTestOverrideImpl::GetShort - app_installed_profiles.end()) { - return shortcut_path; +@@ -550,7 +550,7 @@ base::FilePath OsIntegrationTestOverrideImpl::GetShort + return bundle.bundle_path(); + } } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::string shortcut_filename = "chrome-" + app_id + "-" + profile->GetBaseName().value() + ".desktop"; base::FilePath shortcut_path = shortcut_dir.Append(shortcut_filename); -@@ -572,7 +572,7 @@ bool OsIntegrationTestOverrideImpl::IsShortcutCreated( +@@ -575,7 +575,7 @@ bool OsIntegrationTestOverrideImpl::IsShortcutCreated( base::FilePath app_shortcut_path = GetShortcutPath(profile, chrome_apps_folder(), app_id, app_name); return base::PathExists(app_shortcut_path); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FilePath desktop_shortcut_path = GetShortcutPath(profile, desktop(), app_id, app_name); return base::PathExists(desktop_shortcut_path); -@@ -764,7 +764,7 @@ void OsIntegrationTestOverrideImpl::EnableOrDisablePat +@@ -767,7 +767,7 @@ void OsIntegrationTestOverrideImpl::EnableOrDisablePat } #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FilePath OsIntegrationTestOverrideImpl::desktop() { return desktop_.GetPath(); } -@@ -815,7 +815,7 @@ OsIntegrationTestOverrideImpl::OsIntegrationTestOverri +@@ -818,7 +818,7 @@ OsIntegrationTestOverrideImpl::OsIntegrationTestOverri success = chrome_apps_folder_.CreateUniqueTempDirUnderPath( outer_temp_dir_.GetPath()); CHECK(success); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) success = desktop_.CreateUniqueTempDirUnderPath(outer_temp_dir_.GetPath()); CHECK(success); success = startup_.CreateUniqueTempDirUnderPath(outer_temp_dir_.GetPath()); -@@ -828,7 +828,7 @@ OsIntegrationTestOverrideImpl::OsIntegrationTestOverri +@@ -831,7 +831,7 @@ OsIntegrationTestOverrideImpl::OsIntegrationTestOverri CHECK(success); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto callback = base::BindRepeating([](base::FilePath filename_in, std::string xdg_command, std::string file_contents) { -@@ -900,7 +900,7 @@ OsIntegrationTestOverrideImpl::~OsIntegrationTestOverr +@@ -903,7 +903,7 @@ OsIntegrationTestOverrideImpl::~OsIntegrationTestOverr EXPECT_TRUE(!startup_.IsValid() || startup_.Delete()); #elif BUILDFLAG(IS_MAC) EXPECT_TRUE(!chrome_apps_folder_.IsValid() || DeleteChromeAppsDir()); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) EXPECT_TRUE(!desktop_.IsValid() || desktop_.Delete()); EXPECT_TRUE(!startup_.IsValid() || startup_.Delete()); EXPECT_TRUE(!xdg_data_home_dir_.IsValid() || xdg_data_home_dir_.Delete()); diff --git a/www/iridium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h b/www/iridium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h index 958288bbb756..3666acc65df0 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h +++ b/www/iridium/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 2025-05-07 06:48:23 UTC +--- chrome/browser/web_applications/test/os_integration_test_override_impl.h.orig 2025-12-10 15:04:57 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; @@ -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) @@ -250,7 +250,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(); @@ -323,7 +323,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/iridium/files/patch-chrome_browser_web__applications_web__app.cc b/www/iridium/files/patch-chrome_browser_web__applications_web__app.cc index 18d64c6096db..7fb264d57c88 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_web__app.cc +++ b/www/iridium/files/patch-chrome_browser_web__applications_web__app.cc @@ -1,20 +1,20 @@ ---- chrome/browser/web_applications/web_app.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/web_applications/web_app.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/web_applications/web_app.cc @@ -76,7 +76,7 @@ #include "url/origin.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/webapps/isolated_web_apps/scheme.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) -@@ -737,7 +737,7 @@ void WebApp::SetCurrentOsIntegrationStates( +@@ -754,7 +754,7 @@ void WebApp::SetCurrentOsIntegrationStates( void WebApp::SetIsolationData(IsolationData isolation_data) { CHECK(manifest_id_.is_valid() #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) && manifest_id_.SchemeIs(webapps::kIsolatedAppScheme)) #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) diff --git a/www/iridium/files/patch-chrome_browser_web__applications_web__app__helpers.cc b/www/iridium/files/patch-chrome_browser_web__applications_web__app__helpers.cc index 427b97fc4bcb..86a9f80f85ee 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_web__app__helpers.cc +++ b/www/iridium/files/patch-chrome_browser_web__applications_web__app__helpers.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/web_app_helpers.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/web_applications/web_app_helpers.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/web_applications/web_app_helpers.cc @@ -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) +#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 = false; diff --git a/www/iridium/files/patch-chrome_browser_web__applications_web__app__install__info.h b/www/iridium/files/patch-chrome_browser_web__applications_web__app__install__info.h index dba7d8ad7298..7f2ed5b5ed33 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_web__app__install__info.h +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- chrome/browser/web_applications/web_app_install_info.h.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/web_applications/web_app_install_info.h @@ -41,7 +41,7 @@ #include "url/gurl.h" static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || - BUILDFLAG(IS_CHROMEOS)); + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)); namespace web_app { diff --git a/www/iridium/files/patch-chrome_browser_webapps_chrome__webapps__client.cc b/www/iridium/files/patch-chrome_browser_webapps_chrome__webapps__client.cc index 02578e0b7386..1399cd675ac2 100644 --- a/www/iridium/files/patch-chrome_browser_webapps_chrome__webapps__client.cc +++ b/www/iridium/files/patch-chrome_browser_webapps_chrome__webapps__client.cc @@ -1,20 +1,20 @@ ---- chrome/browser/webapps/chrome_webapps_client.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/webapps/chrome_webapps_client.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/webapps/chrome_webapps_client.cc @@ -11,7 +11,7 @@ #include "url/origin.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/webapps/isolated_web_apps/scheme.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) @@ -20,7 +20,7 @@ namespace webapps { bool ChromeWebappsClient::IsOriginConsideredSecure(const url::Origin& origin) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return origin.scheme() == webapps::kIsolatedAppScheme; #else // !(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS)) diff --git a/www/iridium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc b/www/iridium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc index 872496dbca14..0415d566d918 100644 --- a/www/iridium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc +++ b/www/iridium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc @@ -1,11 +1,11 @@ ---- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/webauthn/chrome_authenticator_request_delegate.cc @@ -546,7 +546,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/iridium/files/patch-chrome_browser_webauthn_enclave__manager.cc b/www/iridium/files/patch-chrome_browser_webauthn_enclave__manager.cc index 1110a453a3a2..e7c4d604b6e6 100644 --- a/www/iridium/files/patch-chrome_browser_webauthn_enclave__manager.cc +++ b/www/iridium/files/patch-chrome_browser_webauthn_enclave__manager.cc @@ -1,20 +1,20 @@ ---- chrome/browser/webauthn/enclave_manager.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/browser/webauthn/enclave_manager.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/webauthn/enclave_manager.cc -@@ -779,7 +779,7 @@ base::flat_set GetGaiaIDs( +@@ -795,7 +795,7 @@ base::flat_set GetGaiaIDs( std::string UserVerifyingLabelToString(crypto::UserVerifyingKeyLabel label) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return label; #else return std::string("placeholder"); -@@ -789,7 +789,7 @@ std::string UserVerifyingLabelToString(crypto::UserVer +@@ -805,7 +805,7 @@ std::string UserVerifyingLabelToString(crypto::UserVer std::optional UserVerifyingKeyLabelFromString( std::string saved_label) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return saved_label; #else return std::nullopt; diff --git a/www/iridium/files/patch-chrome_browser_webauthn_gpm__user__verification__policy.cc b/www/iridium/files/patch-chrome_browser_webauthn_gpm__user__verification__policy.cc index c31c63431c7b..b02c2e185307 100644 --- a/www/iridium/files/patch-chrome_browser_webauthn_gpm__user__verification__policy.cc +++ b/www/iridium/files/patch-chrome_browser_webauthn_gpm__user__verification__policy.cc @@ -1,11 +1,11 @@ ---- chrome/browser/webauthn/gpm_user_verification_policy.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/webauthn/gpm_user_verification_policy.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/webauthn/gpm_user_verification_policy.cc @@ -17,7 +17,7 @@ bool GpmWillDoUserVerification(device::UserVerificatio return platform_has_biometrics; #elif BUILDFLAG(IS_MAC) return platform_has_biometrics; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return false; #else // This default is for unit tests. diff --git a/www/iridium/files/patch-chrome_browser_webauthn_password__credential__ui__controller.cc b/www/iridium/files/patch-chrome_browser_webauthn_password__credential__ui__controller.cc index c271ee667fdd..ee3e0560a94c 100644 --- a/www/iridium/files/patch-chrome_browser_webauthn_password__credential__ui__controller.cc +++ b/www/iridium/files/patch-chrome_browser_webauthn_password__credential__ui__controller.cc @@ -1,11 +1,11 @@ ---- chrome/browser/webauthn/password_credential_ui_controller.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/browser/webauthn/password_credential_ui_controller.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/webauthn/password_credential_ui_controller.cc @@ -26,7 +26,7 @@ using content::WebContents; namespace { std::u16string GetAuthenticationMessage(std::string_view rp_id) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return u""; #else return l10n_util::GetStringFUTF16(IDS_PASSWORD_MANAGER_FILLING_REAUTH, diff --git a/www/iridium/files/patch-chrome_browser_webauthn_unexportable__key__utils.cc b/www/iridium/files/patch-chrome_browser_webauthn_unexportable__key__utils.cc index e8f50c6fbcd1..b7011f4d67ee 100644 --- a/www/iridium/files/patch-chrome_browser_webauthn_unexportable__key__utils.cc +++ b/www/iridium/files/patch-chrome_browser_webauthn_unexportable__key__utils.cc @@ -1,11 +1,11 @@ ---- chrome/browser/webauthn/unexportable_key_utils.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/browser/webauthn/unexportable_key_utils.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/browser/webauthn/unexportable_key_utils.cc -@@ -33,7 +33,7 @@ GetWebAuthnUnexportableKeyProvider() { +@@ -42,7 +42,7 @@ GetWebAuthnUnexportableKeyProvider() { // If there is a scoped UnexportableKeyProvider configured, we always use // that so that tests can still override the key provider. const bool use_software_provider = -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) !crypto::internal::HasScopedUnexportableKeyProvider(); #else false; diff --git a/www/iridium/files/patch-chrome_common_channel__info.h b/www/iridium/files/patch-chrome_common_channel__info.h index 52fed33d6c15..4821069b638f 100644 --- a/www/iridium/files/patch-chrome_common_channel__info.h +++ b/www/iridium/files/patch-chrome_common_channel__info.h @@ -1,20 +1,20 @@ ---- chrome/common/channel_info.h.orig 2025-05-07 06:48:23 UTC +--- chrome/common/channel_info.h.orig 2025-12-10 15:04:57 UTC +++ chrome/common/channel_info.h @@ -11,7 +11,7 @@ #include "build/branding_buildflags.h" #include "build/build_config.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) namespace base { class Environment; } @@ -99,7 +99,7 @@ void ClearChannelIdForTesting(); std::string GetChannelSuffixForDataDir(); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::string GetChannelSuffixForExtraFlagsEnvVarName(); // Returns the channel-specific filename of the desktop shortcut used to launch diff --git a/www/iridium/files/patch-chrome_common_channel__info__posix.cc b/www/iridium/files/patch-chrome_common_channel__info__posix.cc index e599b263b155..3681b89158df 100644 --- a/www/iridium/files/patch-chrome_common_channel__info__posix.cc +++ b/www/iridium/files/patch-chrome_common_channel__info__posix.cc @@ -1,20 +1,20 @@ ---- chrome/common/channel_info_posix.cc.orig 2025-06-19 07:37:57 UTC +--- chrome/common/channel_info_posix.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/common/channel_info_posix.cc @@ -95,7 +95,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(); @@ -121,7 +121,7 @@ std::string GetChannelSuffixForExtraFlagsEnvVarName() } #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || 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/iridium/files/patch-chrome_common_chrome__content__client.cc b/www/iridium/files/patch-chrome_common_chrome__content__client.cc index e3955f0087e8..489c7bda13cb 100644 --- a/www/iridium/files/patch-chrome_common_chrome__content__client.cc +++ b/www/iridium/files/patch-chrome_common_chrome__content__client.cc @@ -1,44 +1,44 @@ ---- chrome/common/chrome_content_client.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/common/chrome_content_client.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/common/chrome_content_client.cc @@ -62,12 +62,12 @@ #include "url/url_constants.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/webapps/isolated_web_apps/scheme.h" #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) #include #include "sandbox/linux/services/credentials.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -187,7 +187,7 @@ static const char* const kChromeStandardURLSchemes[] = extensions::kExtensionScheme, #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) webapps::kIsolatedAppScheme, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) @@ -211,7 +211,7 @@ void ChromeContentClient::AddAdditionalSchemes(Schemes #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) schemes->isolated_app_schemes.push_back(webapps::kIsolatedAppScheme); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) @@ -260,7 +260,7 @@ void ChromeContentClient::AddAdditionalSchemes(Schemes #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) schemes->secure_schemes.push_back(webapps::kIsolatedAppScheme); schemes->cors_enabled_schemes.push_back(webapps::kIsolatedAppScheme); schemes->service_worker_schemes.push_back(webapps::kIsolatedAppScheme); diff --git a/www/iridium/files/patch-chrome_common_chrome__features.cc b/www/iridium/files/patch-chrome_common_chrome__features.cc index 71f98153a01e..803abea6a135 100644 --- a/www/iridium/files/patch-chrome_common_chrome__features.cc +++ b/www/iridium/files/patch-chrome_common_chrome__features.cc @@ -1,65 +1,65 @@ ---- chrome/common/chrome_features.cc.orig 2025-11-24 05:40:57 UTC +--- chrome/common/chrome_features.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/common/chrome_features.cc -@@ -86,7 +86,7 @@ BASE_FEATURE(kUseAdHocSigningForWebAppShims, base::FEA +@@ -90,7 +90,7 @@ BASE_FEATURE(kUseKeychainKeyProvider, base::FEATURE_EN #endif // BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Enables or disables the Autofill survey triggered by opening a prompt to // save address info. BASE_FEATURE(kAutofillAddressSurvey, base::FEATURE_DISABLED_BY_DEFAULT); -@@ -98,7 +98,7 @@ BASE_FEATURE(kAutofillCardSurvey, base::FEATURE_DISABL +@@ -102,7 +102,7 @@ BASE_FEATURE(kAutofillCardSurvey, base::FEATURE_DISABL 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. -@@ -214,7 +214,7 @@ BASE_FEATURE(kDesktopPWAsElidedExtensionsMenu, +@@ -218,7 +218,7 @@ BASE_FEATURE(kDesktopPWAsElidedExtensionsMenu, // Enables or disables Desktop PWAs to be auto-started on OS login. BASE_FEATURE(kDesktopPWAsRunOnOsLogin, #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 -@@ -248,7 +248,7 @@ BASE_FEATURE(kEnableFullscreenToAnyScreenAndroid, - base::FEATURE_DISABLED_BY_DEFAULT); - #endif +@@ -255,7 +255,7 @@ BASE_FEATURE(kEnableFullscreenToAnyScreenAndroid, + // Enables the new reset banner on the settings page. + BASE_FEATURE(kShowResetProfileBannerV2, 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) // 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. -@@ -625,7 +625,7 @@ BASE_FEATURE(kGlicWarming, base::FEATURE_DISABLED_BY_D +@@ -790,7 +790,7 @@ BASE_FEATURE(kGlicWarming, base::FEATURE_DISABLED_BY_D // Killswitch that controls whether the guest WebContents visibility state is // set to hidden when the Glic panel is warming. BASE_FEATURE(kGlicGuestContentsVisibilityState, -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT); #else base::FEATURE_DISABLED_BY_DEFAULT); -@@ -1086,7 +1086,7 @@ BASE_FEATURE(kKAnonymityServiceOHTTPRequests, base::FE +@@ -1295,7 +1295,7 @@ BASE_FEATURE(kKAnonymityServiceOHTTPRequests, base::FE // public keys. BASE_FEATURE(kKAnonymityServiceStorage, base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS) BASE_FEATURE(kLinuxLowMemoryMonitor, base::FEATURE_DISABLED_BY_DEFAULT); // Values taken from the low-memory-monitor documentation and also apply to the // portal API: -@@ -1097,7 +1097,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit +@@ -1306,7 +1306,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, base::FEATURE_DISABLED_BY_DEFAULT); #endif diff --git a/www/iridium/files/patch-chrome_common_chrome__features.h b/www/iridium/files/patch-chrome_common_chrome__features.h index 3729fdf3f457..a906c8d61a52 100644 --- a/www/iridium/files/patch-chrome_common_chrome__features.h +++ b/www/iridium/files/patch-chrome_common_chrome__features.h @@ -1,45 +1,45 @@ ---- chrome/common/chrome_features.h.orig 2025-11-24 05:40:57 UTC +--- chrome/common/chrome_features.h.orig 2025-12-10 15:04:57 UTC +++ chrome/common/chrome_features.h -@@ -83,13 +83,13 @@ BASE_DECLARE_FEATURE(kUseAdHocSigningForWebAppShims); +@@ -85,13 +85,13 @@ BASE_DECLARE_FEATURE(kUseKeychainKeyProvider); #endif // BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillAddressSurvey); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillCardSurvey); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillPasswordSurvey); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kBackgroundModeAllowRestart); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -173,7 +173,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsPreventClose); +@@ -178,7 +178,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings); COMPONENT_EXPORT(CHROME_FEATURES) - BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings); + BASE_DECLARE_FEATURE(kShowResetProfileBannerV2); -#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); -@@ -806,7 +806,7 @@ BASE_DECLARE_FEATURE(kKAnonymityServiceOHTTPRequests); +@@ -952,7 +952,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; -@@ -814,7 +814,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -960,7 +960,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/iridium/files/patch-chrome_common_chrome__paths.cc b/www/iridium/files/patch-chrome_common_chrome__paths.cc index f463b2140b76..8c17f05c8312 100644 --- a/www/iridium/files/patch-chrome_common_chrome__paths.cc +++ b/www/iridium/files/patch-chrome_common_chrome__paths.cc @@ -1,82 +1,82 @@ ---- chrome/common/chrome_paths.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/common/chrome_paths.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/common/chrome_paths.cc @@ -31,7 +31,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 @@ -47,14 +47,14 @@ namespace { std::optional g_override_using_default_data_directory_for_testing; -#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/chromium/extensions"); #else - FILE_PATH_LITERAL("/usr/share/chromium/extensions"); + FILE_PATH_LITERAL("/usr/local/share/chromium/extensions"); #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -175,7 +175,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; } @@ -405,13 +405,13 @@ bool PathProvider(int key, base::FilePath* result) { break; } #endif -#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; } #endif -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && BUILDFLAG(CHROMIUM_BRANDING)) case chrome::DIR_USER_EXTERNAL_EXTENSIONS: { if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur)) { @@ -421,7 +421,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; @@ -460,7 +460,7 @@ bool PathProvider(int key, base::FilePath* result) { #if BUILDFLAG(ENABLE_EXTENSIONS_CORE) && \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_ANDROID)) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)) case chrome::DIR_NATIVE_MESSAGING: #if BUILDFLAG(IS_MAC) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) @@ -474,6 +474,9 @@ bool PathProvider(int key, base::FilePath* result) { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) cur = base::FilePath( FILE_PATH_LITERAL("/etc/iridium-browser/native-messaging-hosts")); +#elif BUILDFLAG(IS_FREEBSD) + cur = base::FilePath(FILE_PATH_LITERAL( + "/usr/local/etc/iridium-browser/native-messaging-hosts")); #else cur = base::FilePath( FILE_PATH_LITERAL("/etc/iridium-browser/native-messaging-hosts")); diff --git a/www/iridium/files/patch-chrome_common_chrome__paths.h b/www/iridium/files/patch-chrome_common_chrome__paths.h index 778d30fac228..a887dcdf2230 100644 --- a/www/iridium/files/patch-chrome_common_chrome__paths.h +++ b/www/iridium/files/patch-chrome_common_chrome__paths.h @@ -1,29 +1,29 @@ ---- chrome/common/chrome_paths.h.orig 2025-10-28 14:29:43 UTC +--- chrome/common/chrome_paths.h.orig 2025-12-10 15:04:57 UTC +++ chrome/common/chrome_paths.h @@ -58,7 +58,7 @@ enum { // to set policies for chrome. This directory // contains subdirectories. #endif -#if BUILDFLAG(IS_CHROMEOS) || \ +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && BUILDFLAG(CHROMIUM_BRANDING)) || BUILDFLAG(IS_MAC) DIR_USER_EXTERNAL_EXTENSIONS, // Directory for per-user external extensions // on Chrome Mac and Chromium Linux. @@ -67,7 +67,7 @@ enum { // create it. #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) DIR_STANDALONE_EXTERNAL_EXTENSIONS, // Directory for 'per-extension' // definition manifest files that // describe extensions which are to be @@ -107,7 +107,7 @@ enum { #if BUILDFLAG(ENABLE_EXTENSIONS_CORE) && \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_ANDROID)) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)) DIR_NATIVE_MESSAGING, // System directory where native messaging host // manifest files are stored. DIR_USER_NATIVE_MESSAGING, // Directory with Native Messaging Hosts diff --git a/www/iridium/files/patch-chrome_common_chrome__paths__internal.h b/www/iridium/files/patch-chrome_common_chrome__paths__internal.h index 89653870748e..1bc259b14dd2 100644 --- a/www/iridium/files/patch-chrome_common_chrome__paths__internal.h +++ b/www/iridium/files/patch-chrome_common_chrome__paths__internal.h @@ -1,11 +1,11 @@ ---- chrome/common/chrome_paths_internal.h.orig 2025-05-07 06:48:23 UTC +--- chrome/common/chrome_paths_internal.h.orig 2025-12-10 15:04:57 UTC +++ chrome/common/chrome_paths_internal.h @@ -53,7 +53,7 @@ void GetUserCacheDirectory(const base::FilePath& profi // Get the path to the user's documents directory. bool GetUserDocumentsDirectory(base::FilePath* result); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Gets the path to a safe default download directory for a user. bool GetUserDownloadsDirectorySafe(base::FilePath* result); #endif diff --git a/www/iridium/files/patch-chrome_common_chrome__switches.cc b/www/iridium/files/patch-chrome_common_chrome__switches.cc index f1a6dcd4a1fe..13338ba984bc 100644 --- a/www/iridium/files/patch-chrome_common_chrome__switches.cc +++ b/www/iridium/files/patch-chrome_common_chrome__switches.cc @@ -1,20 +1,20 @@ ---- chrome/common/chrome_switches.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/common/chrome_switches.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/common/chrome_switches.cc -@@ -939,7 +939,7 @@ const char kDebugPrint[] = "debug-print"; +@@ -934,7 +934,7 @@ const char kDebugPrint[] = "debug-print"; #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const char kEnableNewAppMenuIcon[] = "enable-new-app-menu-icon"; // Causes the browser to launch directly in guest mode. -@@ -975,7 +975,7 @@ const char kGlicHostLogging[] = "glic-host-logging"; +@@ -970,7 +970,7 @@ const char kGlicHostLogging[] = "glic-host-logging"; const char kGlicAdminRedirectPatterns[] = "glic-admin-redirect-patterns"; #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 diff --git a/www/iridium/files/patch-chrome_common_chrome__switches.h b/www/iridium/files/patch-chrome_common_chrome__switches.h index 014f4e914f01..993541e233eb 100644 --- a/www/iridium/files/patch-chrome_common_chrome__switches.h +++ b/www/iridium/files/patch-chrome_common_chrome__switches.h @@ -1,20 +1,20 @@ ---- chrome/common/chrome_switches.h.orig 2025-11-06 10:11:34 UTC +--- chrome/common/chrome_switches.h.orig 2025-12-10 15:04:57 UTC +++ chrome/common/chrome_switches.h -@@ -285,7 +285,7 @@ extern const char kDebugPrint[]; +@@ -284,7 +284,7 @@ extern const char kDebugPrint[]; #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extern const char kEnableNewAppMenuIcon[]; extern const char kGuest[]; extern const char kForceNtpMobilePromo[]; -@@ -305,7 +305,7 @@ extern const char kGlicHostLogging[]; +@@ -304,7 +304,7 @@ extern const char kGlicHostLogging[]; extern const char kGlicAdminRedirectPatterns[]; #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/iridium/files/patch-chrome_common_controlled__frame_controlled__frame.cc b/www/iridium/files/patch-chrome_common_controlled__frame_controlled__frame.cc index f3d4c7ab833e..5eac6459110b 100644 --- a/www/iridium/files/patch-chrome_common_controlled__frame_controlled__frame.cc +++ b/www/iridium/files/patch-chrome_common_controlled__frame_controlled__frame.cc @@ -1,20 +1,20 @@ ---- chrome/common/controlled_frame/controlled_frame.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/common/controlled_frame/controlled_frame.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/common/controlled_frame/controlled_frame.cc @@ -18,7 +18,7 @@ #include "third_party/blink/public/common/features.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/webapps/isolated_web_apps/scheme.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) @@ -89,7 +89,7 @@ bool AvailabilityCheck(const std::string& api_full_nam } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Verify that the current context is an Isolated Web App and the API name is // in our expected list. return (extension == nullptr) && url.SchemeIs(webapps::kIsolatedAppScheme) && diff --git a/www/iridium/files/patch-chrome_common_crash__keys.cc b/www/iridium/files/patch-chrome_common_crash__keys.cc index eaa1a1b5dc4b..4263c906093f 100644 --- a/www/iridium/files/patch-chrome_common_crash__keys.cc +++ b/www/iridium/files/patch-chrome_common_crash__keys.cc @@ -1,28 +1,28 @@ ---- chrome/common/crash_keys.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/common/crash_keys.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/common/crash_keys.cc @@ -51,7 +51,9 @@ class CrashKeyWithName { ~CrashKeyWithName() = delete; std::string_view Name() const { return name_; } +#if BUILDFLAG(USE_CRASHPAD_ANNOTATION) std::string_view Value() const { return crash_key_.value(); } +#endif void Clear() { crash_key_.Clear(); } void Set(std::string_view value) { crash_key_.Set(value); } @@ -195,6 +197,7 @@ void AllocateCrashKeyInBrowserAndChildren(std::string_ GetCommandLineStringAnnotations().emplace_back(std::string(key)).Set(value); } +#if BUILDFLAG(USE_CRASHPAD_ANNOTATION) void AppendStringAnnotationsCommandLineSwitch(base::CommandLine* command_line) { std::string string_annotations; for (const auto& crash_key : GetCommandLineStringAnnotations()) { @@ -209,6 +212,7 @@ void AppendStringAnnotationsCommandLineSwitch(base::Co } command_line->AppendSwitchASCII(kStringAnnotationsSwitch, string_annotations); } +#endif void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) { SetStringAnnotations(command_line); diff --git a/www/iridium/files/patch-chrome_common_extensions_extension__constants.cc b/www/iridium/files/patch-chrome_common_extensions_extension__constants.cc index 916cfcbf62da..ac7c505a6020 100644 --- a/www/iridium/files/patch-chrome_common_extensions_extension__constants.cc +++ b/www/iridium/files/patch-chrome_common_extensions_extension__constants.cc @@ -1,11 +1,11 @@ ---- chrome/common/extensions/extension_constants.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/common/extensions/extension_constants.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/common/extensions/extension_constants.cc @@ -38,7 +38,7 @@ const char* const kBuiltInFirstPartyExtensionIds[] = { kGoogleSpeechSynthesisExtensionId, #endif // BUILDFLAG(IS_CHROMEOS) kReadingModeGDocsHelperExtensionId, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) kTTSEngineExtensionId, kComponentUpdaterTTSEngineExtensionId, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) diff --git a/www/iridium/files/patch-chrome_common_extensions_extension__constants.h b/www/iridium/files/patch-chrome_common_extensions_extension__constants.h index 78e9b0ba5599..16ebd761fcd4 100644 --- a/www/iridium/files/patch-chrome_common_extensions_extension__constants.h +++ b/www/iridium/files/patch-chrome_common_extensions_extension__constants.h @@ -1,11 +1,11 @@ ---- chrome/common/extensions/extension_constants.h.orig 2025-09-11 13:19:19 UTC +--- chrome/common/extensions/extension_constants.h.orig 2025-12-10 15:04:57 UTC +++ chrome/common/extensions/extension_constants.h @@ -313,7 +313,7 @@ inline constexpr char kReadingModeGDocsHelperExtension inline constexpr base::FilePath::CharType kReadingModeGDocsHelperManifestFilename[] = FILE_PATH_LITERAL("reading_mode_gdocs_helper_manifest.json"); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // The extension id of the google tts engine extension to use on-device natural // Google voices. inline constexpr char kTTSEngineExtensionId[] = diff --git a/www/iridium/files/patch-chrome_common_extensions_permissions_chrome__permission__message__rules.cc b/www/iridium/files/patch-chrome_common_extensions_permissions_chrome__permission__message__rules.cc index bdaa8ae3604a..a29b5342829f 100644 --- a/www/iridium/files/patch-chrome_common_extensions_permissions_chrome__permission__message__rules.cc +++ b/www/iridium/files/patch-chrome_common_extensions_permissions_chrome__permission__message__rules.cc @@ -1,11 +1,11 @@ ---- chrome/common/extensions/permissions/chrome_permission_message_rules.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/common/extensions/permissions/chrome_permission_message_rules.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/common/extensions/permissions/chrome_permission_message_rules.cc @@ -280,7 +280,7 @@ class USBDevicesFormatter : public ChromePermissionMes int GetEnterpriseReportingPrivatePermissionMessageId() { #if BUILDFLAG(IS_WIN) return IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_REPORTING_PRIVATE_ENABLED_WIN; -#elif BUILDFLAG(IS_LINUX) or BUILDFLAG(IS_MAC) +#elif BUILDFLAG(IS_LINUX) or BUILDFLAG(IS_MAC) or BUILDFLAG(IS_BSD) return IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_REPORTING_PRIVATE_ENABLED_LINUX_AND_MACOS; #else return IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_REPORTING_PRIVATE; diff --git a/www/iridium/files/patch-chrome_common_media_cdm__host__file__path.cc b/www/iridium/files/patch-chrome_common_media_cdm__host__file__path.cc index d8ecfc21bc3a..efa53ed31671 100644 --- a/www/iridium/files/patch-chrome_common_media_cdm__host__file__path.cc +++ b/www/iridium/files/patch-chrome_common_media_cdm__host__file__path.cc @@ -1,11 +1,11 @@ ---- chrome/common/media/cdm_host_file_path.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/common/media/cdm_host_file_path.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/common/media/cdm_host_file_path.cc @@ -91,7 +91,7 @@ void AddCdmHostFilePaths( cdm_host_file_paths->emplace_back(chrome_framework_path, chrome_framework_sig_path); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath chrome_exe_dir; if (!base::PathService::Get(base::DIR_EXE, &chrome_exe_dir)) { diff --git a/www/iridium/files/patch-chrome_common_media_cdm__registration.cc b/www/iridium/files/patch-chrome_common_media_cdm__registration.cc index 57d5fc432640..d8bb900aaacf 100644 --- a/www/iridium/files/patch-chrome_common_media_cdm__registration.cc +++ b/www/iridium/files/patch-chrome_common_media_cdm__registration.cc @@ -1,56 +1,56 @@ ---- chrome/common/media/cdm_registration.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/common/media/cdm_registration.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/common/media/cdm_registration.cc @@ -34,7 +34,7 @@ #if BUILDFLAG(ENABLE_WIDEVINE) #include "components/cdm/common/cdm_manifest.h" #include "third_party/widevine/cdm/widevine_cdm_common.h" // nogncheck -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/native_library.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/media/component_widevine_cdm_hint_file_linux.h" @@ -59,7 +59,7 @@ using Robustness = content::CdmInfo::Robustness; #if BUILDFLAG(ENABLE_WIDEVINE) #if (BUILDFLAG(BUNDLE_WIDEVINE_CDM) || \ BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // Create a CdmInfo for a Widevine CDM, using |version|, |cdm_library_path|, and // |capability|. std::unique_ptr CreateWidevineCdmInfo( @@ -101,7 +101,7 @@ std::unique_ptr CreateCdmInfoFromWid // BUILDFLAG(IS_CHROMEOS)) #if BUILDFLAG(BUNDLE_WIDEVINE_CDM) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // On Linux/ChromeOS we have to preload the CDM since it uses the zygote // sandbox. On Windows and Mac, CDM registration is handled by Component // Update (as the CDM can be loaded only when needed). @@ -125,7 +125,7 @@ std::unique_ptr GetBundledWidevine() // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) #if (BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))) // This code checks to see if Component Updater picked a version of the Widevine // CDM to be used last time it ran. (Component Updater may choose the bundled // CDM if there is not a new version available for download.) If there is one @@ -167,7 +167,7 @@ void AddSoftwareSecureWidevine(std::vector* cd } #if BUILDFLAG(ENABLE_WIDEVINE) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) std::vector GetSoftwareSecureWidevine() { std::vector cdms; AddSoftwareSecureWidevine(&cdms); diff --git a/www/iridium/files/patch-chrome_common_media_cdm__registration.h b/www/iridium/files/patch-chrome_common_media_cdm__registration.h index 81b97b13a3ba..22efb0776cba 100644 --- a/www/iridium/files/patch-chrome_common_media_cdm__registration.h +++ b/www/iridium/files/patch-chrome_common_media_cdm__registration.h @@ -1,11 +1,11 @@ ---- chrome/common/media/cdm_registration.h.orig 2025-05-07 06:48:23 UTC +--- chrome/common/media/cdm_registration.h.orig 2025-12-10 15:04:57 UTC +++ chrome/common/media/cdm_registration.h @@ -15,7 +15,7 @@ void RegisterCdmInfo(std::vector* cdms); #if BUILDFLAG(ENABLE_WIDEVINE) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // Returns the software secure Widevine CDM, if one exists. std::vector GetSoftwareSecureWidevine(); #endif diff --git a/www/iridium/files/patch-chrome_common_media_component__widevine__cdm__hint__file__linux.h b/www/iridium/files/patch-chrome_common_media_component__widevine__cdm__hint__file__linux.h index 2864a2a2cd06..3fc47e90f4e7 100644 --- a/www/iridium/files/patch-chrome_common_media_component__widevine__cdm__hint__file__linux.h +++ b/www/iridium/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 2025-05-07 06:48:23 UTC +--- chrome/common/media/component_widevine_cdm_hint_file_linux.h.orig 2025-12-10 15:04:57 UTC +++ chrome/common/media/component_widevine_cdm_hint_file_linux.h @@ -14,7 +14,7 @@ #error "This file only applies when Widevine used." #endif -#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/iridium/files/patch-chrome_common_pref__names.h b/www/iridium/files/patch-chrome_common_pref__names.h index 9b6f9da4db22..fa61d1018cdc 100644 --- a/www/iridium/files/patch-chrome_common_pref__names.h +++ b/www/iridium/files/patch-chrome_common_pref__names.h @@ -1,101 +1,101 @@ ---- chrome/common/pref_names.h.orig 2025-11-06 10:11:34 UTC +--- chrome/common/pref_names.h.orig 2025-12-10 15:04:57 UTC +++ chrome/common/pref_names.h @@ -1342,7 +1342,7 @@ inline constexpr char kGeminiSettings[] = "browser.gem inline constexpr char kAllowedDomainsForApps[] = "settings.allowed_domains_for_apps"; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Linux specific preference on whether we should match the system theme. inline constexpr char kSystemTheme[] = "extensions.theme.system_theme"; #endif @@ -1501,7 +1501,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"; @@ -2113,7 +2113,7 @@ inline constexpr char kPinInfoBarTimesShown[] = "browser.pin_infobar_times_shown"; #endif // BUILDFLAG(IS_WIN) || 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) // How many times the session restore infobar has been shown. inline constexpr char kSessionRestoreInfoBarTimesShown[] = @@ -2160,7 +2160,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 -@@ -2674,7 +2674,7 @@ inline constexpr char kMediaStorageIdSalt[] = "media.s +@@ -2685,7 +2685,7 @@ 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[] = -@@ -2688,7 +2688,7 @@ inline constexpr char kNetworkServiceSandboxEnabled[] +@@ -2699,7 +2699,7 @@ inline constexpr char kNetworkServiceSandboxEnabled[] inline constexpr char kNetworkServiceFailedLaunchMajorVersion[] = "net.network_service_failed_launch_major_version"; -#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"; -@@ -2780,7 +2780,7 @@ inline constexpr char kIsolatedWebAppInstallForceList[ +@@ -2791,7 +2791,7 @@ inline constexpr char kIsolatedWebAppInstallForceList[ inline constexpr char kIsolatedWebAppPendingInitializationCount[] = "profile.isolated_web_app.install.pending_initialization_count"; -#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[] = -@@ -3287,7 +3287,7 @@ inline constexpr char kKioskApplicationLogCollectionEn +@@ -3298,7 +3298,7 @@ inline constexpr char kKioskApplicationLogCollectionEn #endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Defines administrator-set availability of Chrome for Testing. inline constexpr char kChromeForTestingAllowed[] = "chrome_for_testing.allowed"; #endif -@@ -3801,7 +3801,7 @@ inline constexpr char kScreenCaptureWithoutGestureAllo +@@ -3812,7 +3812,7 @@ inline constexpr char kScreenCaptureWithoutGestureAllo 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[] = -@@ -3990,7 +3990,7 @@ inline constexpr char kLensDesktopNTPSearchEnabled[] = +@@ -4005,7 +4005,7 @@ inline constexpr char kLensDesktopNTPSearchEnabled[] = "policy.lens_desktop_ntp_search_enabled"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // A dict mapping the edition name with the major version it was shown. inline constexpr char kWhatsNewEditionUsed[] = "browser.whats_new.edition_used"; // A list containing the features of each module in order of when they -@@ -4087,7 +4087,7 @@ inline constexpr char kPrintingOAuth2AuthorizationServ +@@ -4102,7 +4102,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/iridium/files/patch-chrome_common_url__constants.h b/www/iridium/files/patch-chrome_common_url__constants.h index 4574e8e4bb09..449bb2d9b42e 100644 --- a/www/iridium/files/patch-chrome_common_url__constants.h +++ b/www/iridium/files/patch-chrome_common_url__constants.h @@ -1,11 +1,11 @@ ---- chrome/common/url_constants.h.orig 2025-11-06 10:11:34 UTC +--- chrome/common/url_constants.h.orig 2025-12-10 15:04:57 UTC +++ chrome/common/url_constants.h -@@ -1001,7 +1001,7 @@ inline constexpr char kOutdatedPluginLearnMoreURL[] = +@@ -1027,7 +1027,7 @@ inline constexpr char kOutdatedPluginLearnMoreURL[] = inline constexpr char kPhoneHubPermissionLearnMoreURL[] = "https://support.google.com/chromebook?p=multidevice"; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // "Learn more" URL for the chrome apps deprecation dialog. inline constexpr char kChromeAppsDeprecationLearnMoreURL[] = "https://support.google.com/chrome?p=chrome_app_deprecation"; diff --git a/www/iridium/files/patch-chrome_common_webui__url__constants.cc b/www/iridium/files/patch-chrome_common_webui__url__constants.cc index e32b1dc35a55..e86bfd593e77 100644 --- a/www/iridium/files/patch-chrome_common_webui__url__constants.cc +++ b/www/iridium/files/patch-chrome_common_webui__url__constants.cc @@ -1,23 +1,23 @@ ---- chrome/common/webui_url_constants.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/common/webui_url_constants.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/common/webui_url_constants.cc -@@ -199,17 +199,17 @@ base::span ChromeURLHosts() +@@ -202,17 +202,17 @@ base::span ChromeURLHosts() kChromeUIInternetDetailDialogHost, #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) || 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) diff --git a/www/iridium/files/patch-chrome_common_webui__url__constants.h b/www/iridium/files/patch-chrome_common_webui__url__constants.h index f655623f45bd..c8555f93ae2f 100644 --- a/www/iridium/files/patch-chrome_common_webui__url__constants.h +++ b/www/iridium/files/patch-chrome_common_webui__url__constants.h @@ -1,40 +1,40 @@ ---- chrome/common/webui_url_constants.h.orig 2025-11-06 10:11:34 UTC +--- chrome/common/webui_url_constants.h.orig 2025-12-10 15:04:57 UTC +++ chrome/common/webui_url_constants.h -@@ -556,12 +556,12 @@ inline constexpr char kChromeUIOsUrlAppURL[] = "chrome +@@ -563,12 +563,12 @@ inline constexpr char kChromeUIOsUrlAppURL[] = "chrome #endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) || BUILDFLAG(IS_BSD) inline constexpr char kChromeUIDiscardsHost[] = "discards"; inline constexpr char kChromeUIDiscardsURL[] = "chrome://discards/"; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) inline constexpr char kChromeUIWebAppSettingsHost[] = "app-settings"; inline constexpr char kChromeUIWebAppSettingsURL[] = "chrome://app-settings/"; inline constexpr char kChromeUIWhatsNewHost[] = "whats-new"; -@@ -573,11 +573,11 @@ inline constexpr char kChromeUILinuxProxyConfigHost[] +@@ -580,11 +580,11 @@ inline constexpr char kChromeUILinuxProxyConfigHost[] #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) inline constexpr char kChromeUISandboxHost[] = "sandbox"; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) inline constexpr char kChromeUIBrowserSwitchHost[] = "browser-switch"; inline constexpr char kChromeUIBrowserSwitchURL[] = "chrome://browser-switch/"; inline constexpr char kChromeUIIntroDefaultBrowserSubPage[] = "default-browser"; -@@ -602,7 +602,7 @@ inline constexpr char kChromeUIHistorySyncOptinURL[] = +@@ -609,7 +609,7 @@ inline constexpr char kChromeUIHistorySyncOptinURL[] = "chrome://history-sync-optin/"; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_CHROMEOS)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) inline constexpr char kChromeUITabModalConfirmDialogHost[] = diff --git a/www/iridium/files/patch-chrome_enterprise__companion_enterprise__companion__client.cc b/www/iridium/files/patch-chrome_enterprise__companion_enterprise__companion__client.cc index d2491471af7e..157dde6e517a 100644 --- a/www/iridium/files/patch-chrome_enterprise__companion_enterprise__companion__client.cc +++ b/www/iridium/files/patch-chrome_enterprise__companion_enterprise__companion__client.cc @@ -1,11 +1,11 @@ ---- chrome/enterprise_companion/enterprise_companion_client.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/enterprise_companion/enterprise_companion_client.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/enterprise_companion/enterprise_companion_client.cc @@ -35,7 +35,7 @@ namespace { #if BUILDFLAG(IS_MAC) constexpr char kServerName[] = MAC_BUNDLE_IDENTIFIER_STRING ".service"; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) constexpr char kServerName[] = "/run/" COMPANY_SHORTNAME_STRING "/" PRODUCT_FULLNAME_STRING "/service.sk"; #elif BUILDFLAG(IS_WIN) diff --git a/www/iridium/files/patch-chrome_enterprise__companion_event__logger.cc b/www/iridium/files/patch-chrome_enterprise__companion_event__logger.cc index 3ba30c5391af..e7bee79b9dcb 100644 --- a/www/iridium/files/patch-chrome_enterprise__companion_event__logger.cc +++ b/www/iridium/files/patch-chrome_enterprise__companion_event__logger.cc @@ -1,11 +1,11 @@ ---- chrome/enterprise_companion/event_logger.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/enterprise_companion/event_logger.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/enterprise_companion/event_logger.cc @@ -127,7 +127,7 @@ proto::EnterpriseCompanionMetadata GetMetadata() { metadata.set_application_arch(proto::ARM64); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) metadata.set_os_platform(proto::LINUX); #elif BUILDFLAG(IS_MAC) metadata.set_os_platform(proto::MAC); diff --git a/www/iridium/files/patch-chrome_enterprise__companion_lock.cc b/www/iridium/files/patch-chrome_enterprise__companion_lock.cc index 2087ced52d3d..6c8c7690ffe6 100644 --- a/www/iridium/files/patch-chrome_enterprise__companion_lock.cc +++ b/www/iridium/files/patch-chrome_enterprise__companion_lock.cc @@ -1,20 +1,20 @@ ---- chrome/enterprise_companion/lock.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/enterprise_companion/lock.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/enterprise_companion/lock.cc @@ -17,7 +17,7 @@ namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) constexpr char kLockName[] = "/" PRODUCT_FULLNAME_STRING ".lock"; #elif BUILDFLAG(IS_MAC) constexpr char kLockName[] = MAC_BUNDLE_IDENTIFIER_STRING ".lock"; @@ -42,7 +42,7 @@ CSecurityDesc GetAdminDaclSecurityDescriptor() { namespace enterprise_companion { std::unique_ptr CreateScopedLock(base::TimeDelta timeout) { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return named_system_lock::ScopedLock::Create(kLockName, timeout); #elif BUILDFLAG(IS_WIN) CSecurityAttributes sa = diff --git a/www/iridium/files/patch-chrome_renderer_chrome__content__renderer__client.cc b/www/iridium/files/patch-chrome_renderer_chrome__content__renderer__client.cc index 72e19f10c409..0dfaf4ca819e 100644 --- a/www/iridium/files/patch-chrome_renderer_chrome__content__renderer__client.cc +++ b/www/iridium/files/patch-chrome_renderer_chrome__content__renderer__client.cc @@ -1,29 +1,29 @@ ---- chrome/renderer/chrome_content_renderer_client.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/renderer/chrome_content_renderer_client.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/renderer/chrome_content_renderer_client.cc @@ -188,7 +188,7 @@ #include "v8/include/v8-isolate.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/webapps/isolated_web_apps/scheme.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) @@ -424,7 +424,7 @@ void ChromeContentRendererClient::RenderThreadStarted( WebSecurityPolicy::RegisterURLSchemeAsExtension( WebString::FromASCII(extensions::kExtensionScheme)); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) WebSecurityPolicy::RegisterURLSchemeAsIsolatedApp( WebString::FromASCII(webapps::kIsolatedAppScheme)); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || @@ -500,7 +500,7 @@ void ChromeContentRendererClient::RenderThreadStarted( WebString::FromASCII(chrome::kChromeSearchScheme)); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // IWAs can be enabled by either the feature flag or by enterprise // policy. In either case the kEnableIsolatedWebAppsInRenderer flag is passed // to the renderer process. diff --git a/www/iridium/files/patch-chrome_services_printing_print__backend__service__impl.cc b/www/iridium/files/patch-chrome_services_printing_print__backend__service__impl.cc index fb234a8b266d..aadfe84f7a1b 100644 --- a/www/iridium/files/patch-chrome_services_printing_print__backend__service__impl.cc +++ b/www/iridium/files/patch-chrome_services_printing_print__backend__service__impl.cc @@ -1,47 +1,47 @@ ---- chrome/services/printing/print_backend_service_impl.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/services/printing/print_backend_service_impl.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/services/printing/print_backend_service_impl.cc @@ -48,7 +48,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" @@ -75,7 +75,7 @@ namespace printing { namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void InstantiateLinuxUiDelegate() { // TODO(crbug.com/40561724) Until a real UI can be used in a utility process, // need to use the stub version. @@ -84,7 +84,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()); @@ -467,7 +467,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`. @@ -676,7 +676,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/iridium/files/patch-chrome_services_speech_audio__source__fetcher__impl.cc b/www/iridium/files/patch-chrome_services_speech_audio__source__fetcher__impl.cc index e28c2cea04e3..74a9beca75b0 100644 --- a/www/iridium/files/patch-chrome_services_speech_audio__source__fetcher__impl.cc +++ b/www/iridium/files/patch-chrome_services_speech_audio__source__fetcher__impl.cc @@ -1,11 +1,11 @@ ---- chrome/services/speech/audio_source_fetcher_impl.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/services/speech/audio_source_fetcher_impl.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/services/speech/audio_source_fetcher_impl.cc @@ -132,7 +132,7 @@ void AudioSourceFetcherImpl::Start( // 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/iridium/files/patch-chrome_test_base_scoped__channel__override__posix.cc b/www/iridium/files/patch-chrome_test_base_scoped__channel__override__posix.cc index 8f150f1f5749..d05beba47351 100644 --- a/www/iridium/files/patch-chrome_test_base_scoped__channel__override__posix.cc +++ b/www/iridium/files/patch-chrome_test_base_scoped__channel__override__posix.cc @@ -1,11 +1,11 @@ ---- chrome/test/base/scoped_channel_override_posix.cc.orig 2025-06-19 07:37:57 UTC +--- chrome/test/base/scoped_channel_override_posix.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/test/base/scoped_channel_override_posix.cc @@ -43,7 +43,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/iridium/files/patch-chrome_test_chromedriver_chrome__launcher.cc b/www/iridium/files/patch-chrome_test_chromedriver_chrome__launcher.cc index f07c6ae35c72..0ec270c0f665 100644 --- a/www/iridium/files/patch-chrome_test_chromedriver_chrome__launcher.cc +++ b/www/iridium/files/patch-chrome_test_chromedriver_chrome__launcher.cc @@ -1,10 +1,10 @@ ---- chrome/test/chromedriver/chrome_launcher.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/test/chromedriver/chrome_launcher.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/test/chromedriver/chrome_launcher.cc @@ -75,6 +75,7 @@ #include #include #include +#include #include #elif BUILDFLAG(IS_WIN) #include diff --git a/www/iridium/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc b/www/iridium/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc index ced9c72973fd..858282de1bf4 100644 --- a/www/iridium/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc +++ b/www/iridium/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc @@ -1,29 +1,29 @@ ---- chrome/test/chromedriver/chrome/chrome_finder.cc.orig 2025-06-19 07:37:57 UTC +--- chrome/test/chromedriver/chrome/chrome_finder.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/test/chromedriver/chrome/chrome_finder.cc @@ -59,7 +59,7 @@ void GetApplicationDirs(std::vector* l installation_locations[i].Append(L"Chromium\\Application")); } } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void GetApplicationDirs(std::vector* locations) { // TODO: Respect users' PATH variables. // Until then, we use an approximation of the most common defaults. @@ -126,7 +126,7 @@ std::vector GetChromeProgramNames() { chrome::kGoogleChromeForTestingBrowserProcessExecutablePath), base::FilePath(chrome::kGoogleChromeBrowserProcessExecutablePath), base::FilePath(chrome::kChromiumBrowserProcessExecutablePath), -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath(chrome::kBrowserProcessExecutablePath), base::FilePath("chrome"), // Chrome for Testing or Google Chrome base::FilePath("google-chrome"), base::FilePath("chromium"), @@ -142,7 +142,7 @@ std::vector GetHeadlessShellProgramNam return { #if BUILDFLAG(IS_WIN) base::FilePath(FILE_PATH_LITERAL("chrome-headless-shell.exe")), -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath("chrome-headless-shell"), #else // it will compile but won't work on other OSes diff --git a/www/iridium/files/patch-chrome_test_chromedriver_key__converter__unittest.cc b/www/iridium/files/patch-chrome_test_chromedriver_key__converter__unittest.cc index a7cd0293da51..b6e2768b4500 100644 --- a/www/iridium/files/patch-chrome_test_chromedriver_key__converter__unittest.cc +++ b/www/iridium/files/patch-chrome_test_chromedriver_key__converter__unittest.cc @@ -1,20 +1,20 @@ ---- chrome/test/chromedriver/key_converter_unittest.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/test/chromedriver/key_converter_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/test/chromedriver/key_converter_unittest.cc @@ -248,7 +248,7 @@ TEST(KeyConverter, ToggleModifiers) { CheckEventsReleaseModifiers(keys, key_events); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Fails on bots: crbug.com/174962 #define MAYBE_AllEnglishKeyboardSymbols DISABLED_AllEnglishKeyboardSymbols #else @@ -306,7 +306,7 @@ TEST(KeyConverter, AllEnglishKeyboardTextChars) { TEST(KeyConverter, AllSpecialWebDriverKeysOnEnglishKeyboard) { ui::ScopedKeyboardLayout keyboard_layout(ui::KEYBOARD_LAYOUT_ENGLISH_US); const auto kTextForKeys = std::to_array({ -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) 0, 0, 0, 0, '\t', 0, '\r', '\r', 0, 0, 0, 0, 0, #else 0, 0, 0, 0, 0, 0, '\r', '\r', 0, 0, 0, 0, 0, diff --git a/www/iridium/files/patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc b/www/iridium/files/patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc index 1df109a7d2d6..4b6ef29bd691 100644 --- a/www/iridium/files/patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc +++ b/www/iridium/files/patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc @@ -1,20 +1,20 @@ ---- chrome/test/chromedriver/keycode_text_conversion_unittest.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/test/chromedriver/keycode_text_conversion_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/test/chromedriver/keycode_text_conversion_unittest.cc @@ -64,7 +64,7 @@ std::string ConvertKeyCodeToTextNoError(ui::KeyboardCo } // namespace -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Fails on bots: crbug.com/174962 #define MAYBE_KeyCodeToText DISABLED_KeyCodeToText #else @@ -98,7 +98,7 @@ TEST(KeycodeTextConversionTest, MAYBE_KeyCodeToText) { ConvertKeyCodeToTextNoError(ui::VKEY_SHIFT, kShiftKeyModifierMask)); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Fails on bots: crbug.com/174962 #define MAYBE_CharToKeyCode DISABLED_CharToKeyCode #else diff --git a/www/iridium/files/patch-chrome_test_supervised__user_google__auth__state__waiter__mixin.cc b/www/iridium/files/patch-chrome_test_supervised__user_google__auth__state__waiter__mixin.cc index 9a4900cb366e..37ac01818955 100644 --- a/www/iridium/files/patch-chrome_test_supervised__user_google__auth__state__waiter__mixin.cc +++ b/www/iridium/files/patch-chrome_test_supervised__user_google__auth__state__waiter__mixin.cc @@ -1,11 +1,11 @@ ---- chrome/test/supervised_user/google_auth_state_waiter_mixin.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/test/supervised_user/google_auth_state_waiter_mixin.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/test/supervised_user/google_auth_state_waiter_mixin.cc @@ -24,7 +24,7 @@ GoogleAuthStateWaiterMixin::GoogleAuthStateWaiterMixin GoogleAuthStateWaiterMixin::~GoogleAuthStateWaiterMixin() = default; void GoogleAuthStateWaiterMixin::SetUpOnMainThread() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) ChildAccountService* child_account_service = ChildAccountServiceFactory::GetForProfile( test_base_->browser()->profile()); diff --git a/www/iridium/files/patch-chrome_updater_app_app__uninstall.cc b/www/iridium/files/patch-chrome_updater_app_app__uninstall.cc index 53bd494a5b72..2209cfac0452 100644 --- a/www/iridium/files/patch-chrome_updater_app_app__uninstall.cc +++ b/www/iridium/files/patch-chrome_updater_app_app__uninstall.cc @@ -1,11 +1,11 @@ ---- chrome/updater/app/app_uninstall.cc.orig 2025-09-11 13:19:19 UTC +--- chrome/updater/app/app_uninstall.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/updater/app/app_uninstall.cc @@ -181,7 +181,7 @@ void UninstallInThreadPool(UpdaterScope scope, } if (int result = UninstallOtherVersions(scope); result != kErrorOk) { -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // TODO(crbug.com/366249606): Ignores the errors when uninstalls // the other versions, because currently older Linux updater on // CIPD exits with error `kErrorFailedToDeleteFolder`. diff --git a/www/iridium/files/patch-chrome_updater_configurator.cc b/www/iridium/files/patch-chrome_updater_configurator.cc index d407422a27bc..40c60b05b2b9 100644 --- a/www/iridium/files/patch-chrome_updater_configurator.cc +++ b/www/iridium/files/patch-chrome_updater_configurator.cc @@ -1,11 +1,11 @@ ---- chrome/updater/configurator.cc.orig 2025-10-28 14:29:43 UTC +--- chrome/updater/configurator.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/updater/configurator.cc -@@ -91,7 +91,7 @@ Configurator::Configurator(scoped_refptr +@@ -90,7 +90,7 @@ Configurator::Configurator(scoped_refptr return std::nullopt; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) }()) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Linux creating the NetworkFetcherFactory requires performing blocking IO // to load an external library. This should be done when the configurator is // created. diff --git a/www/iridium/files/patch-chrome_updater_lock.cc b/www/iridium/files/patch-chrome_updater_lock.cc index eb205fe271cf..f2ceaef6ecee 100644 --- a/www/iridium/files/patch-chrome_updater_lock.cc +++ b/www/iridium/files/patch-chrome_updater_lock.cc @@ -1,11 +1,11 @@ ---- chrome/updater/lock.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/updater/lock.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/updater/lock.cc @@ -26,7 +26,7 @@ namespace updater { std::unique_ptr CreateScopedLock(const std::string& name, UpdaterScope scope, base::TimeDelta timeout) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return named_system_lock::ScopedLock::Create( base::StrCat({"/" PRODUCT_FULLNAME_STRING, name, UpdaterScopeToString(scope), ".lock"}), diff --git a/www/iridium/files/patch-chrome_updater_util_posix__util.cc b/www/iridium/files/patch-chrome_updater_util_posix__util.cc index fdeed110bbe3..8677fb5fba83 100644 --- a/www/iridium/files/patch-chrome_updater_util_posix__util.cc +++ b/www/iridium/files/patch-chrome_updater_util_posix__util.cc @@ -1,11 +1,11 @@ ---- chrome/updater/util/posix_util.cc.orig 2025-05-07 06:48:23 UTC +--- chrome/updater/util/posix_util.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/updater/util/posix_util.cc @@ -20,7 +20,7 @@ #include "chrome/updater/updater_branding.h" #include "chrome/updater/util/util.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/updater/util/linux_util.h" #endif diff --git a/www/iridium/files/patch-chrome_utility_services.cc b/www/iridium/files/patch-chrome_utility_services.cc index 4cfd12dd38c7..20a84d9c9033 100644 --- a/www/iridium/files/patch-chrome_utility_services.cc +++ b/www/iridium/files/patch-chrome_utility_services.cc @@ -1,29 +1,29 @@ ---- chrome/utility/services.cc.orig 2025-11-06 10:11:34 UTC +--- chrome/utility/services.cc.orig 2025-12-10 15:04:57 UTC +++ chrome/utility/services.cc @@ -50,7 +50,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) -@@ -213,7 +213,7 @@ auto RunMacNotificationService( +@@ -207,7 +207,7 @@ auto RunMacNotificationService( } #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto RunSystemSignalsService( mojo::PendingReceiver receiver) { -@@ -481,7 +481,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -459,7 +459,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& services.Add(RunWindowsIconReader); #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) services.Add(RunSystemSignalsService); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-components_BUILD.gn b/www/iridium/files/patch-components_BUILD.gn index 9382a7f8ea38..e74a36e90302 100644 --- a/www/iridium/files/patch-components_BUILD.gn +++ b/www/iridium/files/patch-components_BUILD.gn @@ -1,48 +1,48 @@ ---- components/BUILD.gn.orig 2025-11-06 10:11:34 UTC +--- components/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ components/BUILD.gn -@@ -217,7 +217,6 @@ test("components_unittests") { - "//components/content_settings/core/common:unit_tests", +@@ -220,7 +220,6 @@ test("components_unittests") { + "//components/contextual_search/internal:unit_tests", "//components/contextual_tasks:unit_tests", "//components/country_codes:unit_tests", - "//components/crash/core/common:unit_tests", "//components/cross_device/logging:unit_tests", "//components/crx_file:unit_tests", "//components/data_sharing:unit_tests", -@@ -634,7 +633,7 @@ test("components_unittests") { +@@ -637,7 +636,7 @@ test("components_unittests") { "//components/user_data_importer/content:unit_tests", ] - if (!is_fuchsia) { #!iOS and!Fuchsia + if (!is_fuchsia && !is_bsd) { #!iOS and!Fuchsia deps += [ "//components/crash/content/browser:unit_tests", "//components/crash/core/app:unit_tests", -@@ -800,7 +799,7 @@ test("components_unittests") { +@@ -804,7 +803,7 @@ test("components_unittests") { deps += [ "//components/constrained_window:unit_tests" ] } - if (is_win || is_linux || is_chromeos || is_mac) { + if (is_win || (is_linux && !is_bsd) || is_chromeos || is_mac) { deps += [ "//components/stability_report:unit_tests", "//components/webapps/isolated_web_apps:unit_tests", -@@ -961,8 +960,7 @@ test("components_unittests") { +@@ -965,8 +964,7 @@ test("components_unittests") { # No components should depend on Chrome. # Since //chrome depends on //extensions, we also only assert_no_deps on # extensions targets. - assert_no_deps = [ "//chrome/*" ] - assert_no_deps += disallowed_extension_deps_ + assert_no_deps = disallowed_extension_deps_ if (is_ios) { assert_no_deps += ios_assert_no_deps -@@ -1282,8 +1280,7 @@ if (use_blink) { +@@ -1286,8 +1284,7 @@ if (use_blink) { # No components should depend on Chrome. # Since //chrome depends on //extensions, we also only assert_no_deps on # extensions targets. - assert_no_deps = [ "//chrome/*" ] - assert_no_deps += disallowed_extension_deps_ + assert_no_deps = disallowed_extension_deps_ if (is_fuchsia) { additional_manifest_fragments = [ diff --git a/www/iridium/files/patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.cc b/www/iridium/files/patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.cc index f775169d9cfa..583d8969e189 100644 --- a/www/iridium/files/patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.cc +++ b/www/iridium/files/patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.cc @@ -1,47 +1,47 @@ ---- components/autofill/core/browser/data_manager/payments/payments_data_manager.cc.orig 2025-11-06 10:11:34 UTC +--- components/autofill/core/browser/data_manager/payments/payments_data_manager.cc.orig 2025-12-10 15:04:57 UTC +++ components/autofill/core/browser/data_manager/payments/payments_data_manager.cc -@@ -479,7 +479,7 @@ void PaymentsDataManager::OnWebDataServiceRequestDone( +@@ -480,7 +480,7 @@ void PaymentsDataManager::OnWebDataServiceRequestDone( bool PaymentsDataManager::ShouldShowBnplSettings() const { #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) // Check `kAutofillEnableBuyNowPayLater` only if the user has seen a BNPL // suggestion before, or there are already linked issuers present, to avoid // unnecessary feature flag checks. The linked issuer check is due to the fact -@@ -1014,7 +1014,7 @@ void PaymentsDataManager::SetPrefService(PrefService* +@@ -1015,7 +1015,7 @@ void PaymentsDataManager::SetPrefService(PrefService* &PaymentsDataManager::OnAutofillPaymentsCardBenefitsPrefChange, base::Unretained(this))); #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_registrar_.Add( prefs::kAutofillBnplEnabled, base::BindRepeating(&PaymentsDataManager::OnBnplEnabledPrefChange, -@@ -1088,7 +1088,7 @@ void PaymentsDataManager::SetAutofillHasSeenIban() { +@@ -1089,7 +1089,7 @@ void PaymentsDataManager::SetAutofillHasSeenIban() { } #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) bool PaymentsDataManager::IsAutofillHasSeenBnplPrefEnabled() const { return prefs::HasSeenBnpl(pref_service_); } -@@ -2125,7 +2125,7 @@ bool PaymentsDataManager::AreEwalletAccountsSupported( +@@ -2140,7 +2140,7 @@ bool PaymentsDataManager::AreEwalletAccountsSupported( bool PaymentsDataManager::AreBnplIssuersSupported() const { #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) return (app_locale_ == "en-US" || app_locale_ == "en-GB" || app_locale_ == "en-CA") && GetCountryCodeForExperimentGroup() == "US" && -@@ -2160,7 +2160,7 @@ void PaymentsDataManager::ClearAllCreditCardBenefits() +@@ -2175,7 +2175,7 @@ void PaymentsDataManager::ClearAllCreditCardBenefits() } #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 PaymentsDataManager::OnBnplEnabledPrefChange() { // On pref change to `false`, clearing BNPL issuers is implicitly handled by // `GetBnplIssuers()`, since it returns an empty vector when diff --git a/www/iridium/files/patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.h b/www/iridium/files/patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.h index 8d17c6f6439a..f8510af57559 100644 --- a/www/iridium/files/patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.h +++ b/www/iridium/files/patch-components_autofill_core_browser_data__manager_payments_payments__data__manager.h @@ -1,20 +1,20 @@ ---- components/autofill/core/browser/data_manager/payments/payments_data_manager.h.orig 2025-11-06 10:11:34 UTC +--- components/autofill/core/browser/data_manager/payments/payments_data_manager.h.orig 2025-12-10 15:04:57 UTC +++ components/autofill/core/browser/data_manager/payments/payments_data_manager.h -@@ -377,7 +377,7 @@ class PaymentsDataManager : public AutofillWebDataServ - void SetAutofillHasSeenIban(); +@@ -378,7 +378,7 @@ class PaymentsDataManager : public AutofillWebDataServ + // TODO(crbug.com/430575808): Remove build flags. #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) // Returns the value of the kAutofillHasSeenBnpl pref. - bool IsAutofillHasSeenBnplPrefEnabled() const; + virtual bool IsAutofillHasSeenBnplPrefEnabled() const; -@@ -716,7 +716,7 @@ class PaymentsDataManager : public AutofillWebDataServ +@@ -726,7 +726,7 @@ class PaymentsDataManager : public AutofillWebDataServ void ClearAllCreditCardBenefits(); #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) // Monitors the `kAutofillBnplEnabled` preference for changes and controls the // clearing/loading of payment instruments accordingly. Will also log the // `Autofill.SettingsPage.BnplToggled` metric. diff --git a/www/iridium/files/patch-components_autofill_core_browser_foundations_browser__autofill__manager.cc b/www/iridium/files/patch-components_autofill_core_browser_foundations_browser__autofill__manager.cc index 9398f7e9b9dd..471f3b019c7c 100644 --- a/www/iridium/files/patch-components_autofill_core_browser_foundations_browser__autofill__manager.cc +++ b/www/iridium/files/patch-components_autofill_core_browser_foundations_browser__autofill__manager.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/browser/foundations/browser_autofill_manager.cc.orig 2025-11-06 10:11:34 UTC +--- components/autofill/core/browser/foundations/browser_autofill_manager.cc.orig 2025-12-10 15:04:57 UTC +++ components/autofill/core/browser/foundations/browser_autofill_manager.cc -@@ -853,7 +853,7 @@ BrowserAutofillManager::GetAmountExtractionManager() { +@@ -854,7 +854,7 @@ BrowserAutofillManager::GetAmountExtractionManager() { payments::BnplManager* BrowserAutofillManager::GetPaymentsBnplManager() { #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) if (!bnpl_manager_) { bnpl_manager_ = std::make_unique(this); } diff --git a/www/iridium/files/patch-components_autofill_core_browser_integrators_optimization__guide_autofill__optimization__guide__decider.cc b/www/iridium/files/patch-components_autofill_core_browser_integrators_optimization__guide_autofill__optimization__guide__decider.cc index 89569e4eb93e..abe674eb262a 100644 --- a/www/iridium/files/patch-components_autofill_core_browser_integrators_optimization__guide_autofill__optimization__guide__decider.cc +++ b/www/iridium/files/patch-components_autofill_core_browser_integrators_optimization__guide_autofill__optimization__guide__decider.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/browser/integrators/optimization_guide/autofill_optimization_guide_decider.cc.orig 2025-11-06 10:11:34 UTC +--- components/autofill/core/browser/integrators/optimization_guide/autofill_optimization_guide_decider.cc.orig 2025-12-10 15:04:57 UTC +++ components/autofill/core/browser/integrators/optimization_guide/autofill_optimization_guide_decider.cc @@ -203,7 +203,7 @@ void AddOptimizationTypesForBnplIssuers( base::flat_set& optimization_types) { #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) auto bnpl_issuer_allowlist_can_be_loaded = [&bnpl_issuers](BnplIssuer::IssuerId issuer_id) { return base::Contains(bnpl_issuers, issuer_id, &BnplIssuer::issuer_id); diff --git a/www/iridium/files/patch-components_autofill_core_browser_payments_amount__extraction__manager.cc b/www/iridium/files/patch-components_autofill_core_browser_payments_amount__extraction__manager.cc index d61d40b11175..2ce4b0422949 100644 --- a/www/iridium/files/patch-components_autofill_core_browser_payments_amount__extraction__manager.cc +++ b/www/iridium/files/patch-components_autofill_core_browser_payments_amount__extraction__manager.cc @@ -1,29 +1,29 @@ ---- components/autofill/core/browser/payments/amount_extraction_manager.cc.orig 2025-11-06 10:11:34 UTC +--- components/autofill/core/browser/payments/amount_extraction_manager.cc.orig 2025-12-10 15:04:57 UTC +++ components/autofill/core/browser/payments/amount_extraction_manager.cc -@@ -185,7 +185,7 @@ void AmountExtractionManager::OnCheckoutAmountReceived - bnpl_manager->OnAmountExtractionReturned(parsed_extracted_amount); +@@ -249,7 +249,7 @@ void AmountExtractionManager::OnCheckoutAmountReceived + /*timeout_reached=*/false); } if constexpr (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)) { + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)) { if (base::FeatureList::IsEnabled( ::autofill::features::kAutofillEnableAmountExtractionTesting)) { VLOG(3) << "The result of amount extraction on domain " -@@ -216,7 +216,7 @@ void AmountExtractionManager::OnTimeoutReached() { +@@ -315,7 +315,7 @@ void AmountExtractionManager::OnTimeoutReached() { /*timeout_reached=*/true); } if constexpr (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)) { + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)) { if (base::FeatureList::IsEnabled( ::autofill::features::kAutofillEnableAmountExtractionTesting)) { VLOG(3) << "The amount extraction on domain " -@@ -234,7 +234,7 @@ AmountExtractionManager::CheckEligibilityForFeaturesRe +@@ -333,7 +333,7 @@ AmountExtractionManager::CheckEligibilityForFeaturesRe // Check eligibility of BNPL feature. if constexpr (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)) { + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)) { - if (BnplManager::IsEligibleForBnpl(autofill_manager_->client())) { + if (IsEligibleForBnpl(autofill_manager_->client())) { eligible_features.insert(EligibleFeature::kBnpl); } diff --git a/www/iridium/files/patch-components_autofill_core_browser_payments_bnpl__manager.cc b/www/iridium/files/patch-components_autofill_core_browser_payments_bnpl__manager.cc index 22bda89f64f9..616eb29a5820 100644 --- a/www/iridium/files/patch-components_autofill_core_browser_payments_bnpl__manager.cc +++ b/www/iridium/files/patch-components_autofill_core_browser_payments_bnpl__manager.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/browser/payments/bnpl_manager.cc.orig 2025-11-06 10:11:34 UTC +--- components/autofill/core/browser/payments/bnpl_manager.cc.orig 2025-12-10 15:04:57 UTC +++ components/autofill/core/browser/payments/bnpl_manager.cc -@@ -599,7 +599,7 @@ void BnplManager::MaybeUpdateDesktopSuggestionsWithBnp +@@ -607,7 +607,7 @@ void BnplManager::MaybeUpdateDesktopSuggestionsWithBnp .OnBnplSuggestionShown(); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) payments_autofill_client().GetPaymentsDataManager().SetAutofillHasSeenBnpl(); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) diff --git a/www/iridium/files/patch-components_autofill_core_browser_suggestions_payments_payments__suggestion__generator.cc b/www/iridium/files/patch-components_autofill_core_browser_suggestions_payments_payments__suggestion__generator.cc new file mode 100644 index 000000000000..b2c8cd7b4bf6 --- /dev/null +++ b/www/iridium/files/patch-components_autofill_core_browser_suggestions_payments_payments__suggestion__generator.cc @@ -0,0 +1,11 @@ +--- components/autofill/core/browser/suggestions/payments/payments_suggestion_generator.cc.orig 2025-12-10 15:04:57 UTC ++++ components/autofill/core/browser/suggestions/payments/payments_suggestion_generator.cc +@@ -1462,7 +1462,7 @@ std::vector GetCreditCardSuggestionsForTou + .GetBnplIssuers(), + /*extracted_amount_in_micros=*/std::nullopt)); + #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) + manager.client() + .GetPersonalDataManager() + .payments_data_manager() diff --git a/www/iridium/files/patch-components_autofill_core_browser_webdata_payments_payments__sync__bridge__util.cc b/www/iridium/files/patch-components_autofill_core_browser_webdata_payments_payments__sync__bridge__util.cc index d1fab6e148d8..9a8df922e0c7 100644 --- a/www/iridium/files/patch-components_autofill_core_browser_webdata_payments_payments__sync__bridge__util.cc +++ b/www/iridium/files/patch-components_autofill_core_browser_webdata_payments_payments__sync__bridge__util.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/browser/webdata/payments/payments_sync_bridge_util.cc.orig 2025-10-28 14:29:43 UTC +--- components/autofill/core/browser/webdata/payments/payments_sync_bridge_util.cc.orig 2025-12-10 15:04:57 UTC +++ components/autofill/core/browser/webdata/payments/payments_sync_bridge_util.cc @@ -1262,7 +1262,7 @@ bool AreMaskedBankAccountSupported() { bool IsBnplIssuerSupported() { #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) return base::FeatureList::IsEnabled( features::kAutofillEnableBuyNowPayLaterSyncing); #else diff --git a/www/iridium/files/patch-components_autofill_core_common_autofill__features.cc b/www/iridium/files/patch-components_autofill_core_common_autofill__features.cc index 0916987cfb14..abf0e14e224f 100644 --- a/www/iridium/files/patch-components_autofill_core_common_autofill__features.cc +++ b/www/iridium/files/patch-components_autofill_core_common_autofill__features.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/common/autofill_features.cc.orig 2025-10-28 14:29:43 UTC +--- components/autofill/core/common/autofill_features.cc.orig 2025-12-10 15:04:57 UTC +++ components/autofill/core/common/autofill_features.cc @@ -10,7 +10,7 @@ namespace autofill::features { namespace { constexpr bool IS_AUTOFILL_AI_PLATFORM = BUILDFLAG(IS_CHROMEOS) || - BUILDFLAG(IS_LINUX) || + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN); + constexpr bool IS_WALLET_PASSES_SUPPORTED_PLATFORM = !BUILDFLAG(IS_IOS); } - diff --git a/www/iridium/files/patch-components_autofill_core_common_autofill__payments__features.cc b/www/iridium/files/patch-components_autofill_core_common_autofill__payments__features.cc index c07ee0af2600..a9ddd4189855 100644 --- a/www/iridium/files/patch-components_autofill_core_common_autofill__payments__features.cc +++ b/www/iridium/files/patch-components_autofill_core_common_autofill__payments__features.cc @@ -1,56 +1,65 @@ ---- components/autofill/core/common/autofill_payments_features.cc.orig 2025-11-06 10:11:34 UTC +--- components/autofill/core/common/autofill_payments_features.cc.orig 2025-12-10 15:04:57 UTC +++ components/autofill/core/common/autofill_payments_features.cc @@ -26,7 +26,7 @@ BASE_FEATURE(kAutofillEnableAllowlistForBmoCardCategor // of the allowlisted merchant websites. BASE_FEATURE(kAutofillEnableAmountExtraction, #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); @@ -42,7 +42,7 @@ BASE_FEATURE(kAutofillEnableAmountExtractionTesting, // When enabled, buy now pay later (BNPL) in Autofill will be offered. BASE_FEATURE(kAutofillEnableBuyNowPayLater, #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); -@@ -62,7 +62,7 @@ BASE_FEATURE(kAutofillEnableBuyNowPayLaterForKlarna, +@@ -58,7 +58,7 @@ BASE_FEATURE(kAutofillEnableBuyNowPayLaterForExternall + // offered. + BASE_FEATURE(kAutofillEnableBuyNowPayLaterForKlarna, + #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); +@@ -67,7 +67,7 @@ BASE_FEATURE(kAutofillEnableBuyNowPayLaterForKlarna, // When enabled, buy now pay later (BNPL) data will be synced to Chrome clients. BASE_FEATURE(kAutofillEnableBuyNowPayLaterSyncing, #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); -@@ -86,7 +86,7 @@ BASE_FEATURE(kAutofillEnableCardBenefitsForAmericanExp +@@ -91,7 +91,7 @@ BASE_FEATURE(kAutofillEnableCardBenefitsForAmericanExp // UI. BASE_FEATURE(kAutofillEnableCardBenefitsForBmo, #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); -@@ -151,7 +151,7 @@ BASE_FEATURE(kAutofillEnableFlatRateCardBenefitsBlockl +@@ -156,7 +156,7 @@ BASE_FEATURE(kAutofillEnableFlatRateCardBenefitsBlockl // Payments Autofill UI. BASE_FEATURE(kAutofillEnableFlatRateCardBenefitsFromCurinos, #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); -@@ -301,7 +301,7 @@ BASE_FEATURE(kAutofillSyncEwalletAccounts, base::FEATU +@@ -306,7 +306,7 @@ BASE_FEATURE(kAutofillSyncEwalletAccounts, base::FEATU #endif // BUILDFLAG(IS_ANDROID) bool ShouldShowImprovedUserConsentForCreditCardSave() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // The new user consent UI is fully launched on MacOS, Windows and Linux. return true; #else diff --git a/www/iridium/files/patch-components_autofill_core_common_autofill__prefs.cc b/www/iridium/files/patch-components_autofill_core_common_autofill__prefs.cc index c16c236323c8..f9c324c3d4aa 100644 --- a/www/iridium/files/patch-components_autofill_core_common_autofill__prefs.cc +++ b/www/iridium/files/patch-components_autofill_core_common_autofill__prefs.cc @@ -1,38 +1,38 @@ ---- components/autofill/core/common/autofill_prefs.cc.orig 2025-11-06 10:11:34 UTC +--- components/autofill/core/common/autofill_prefs.cc.orig 2025-12-10 15:04:57 UTC +++ components/autofill/core/common/autofill_prefs.cc -@@ -131,7 +131,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -137,7 +137,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync #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) registry->RegisterBooleanPref( kAutofillBnplEnabled, true, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); -@@ -373,7 +373,7 @@ void SetFacilitatedPaymentsA2ATriggeredOnce(PrefServic +@@ -386,7 +386,7 @@ void SetFacilitatedPaymentsA2ATriggeredOnce(PrefServic } #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 SetAutofillBnplEnabled(PrefService* prefs, bool value) { prefs->SetBoolean(kAutofillBnplEnabled, value); } -@@ -382,7 +382,7 @@ void SetAutofillBnplEnabled(PrefService* prefs, bool v +@@ -395,7 +395,7 @@ void SetAutofillBnplEnabled(PrefService* prefs, bool v bool IsAutofillBnplEnabled(const PrefService* prefs) { #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) return prefs->GetBoolean(kAutofillBnplEnabled); #else return false; -@@ -391,7 +391,7 @@ bool IsAutofillBnplEnabled(const PrefService* prefs) { +@@ -404,7 +404,7 @@ bool IsAutofillBnplEnabled(const PrefService* prefs) { } #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) // If called, always sets the pref to true, and once true, it will follow the // user around forever. void SetAutofillHasSeenBnpl(PrefService* prefs) { diff --git a/www/iridium/files/patch-components_autofill_core_common_autofill__prefs.h b/www/iridium/files/patch-components_autofill_core_common_autofill__prefs.h index 3881bc224836..82edf8cfaa70 100644 --- a/www/iridium/files/patch-components_autofill_core_common_autofill__prefs.h +++ b/www/iridium/files/patch-components_autofill_core_common_autofill__prefs.h @@ -1,29 +1,29 @@ ---- components/autofill/core/common/autofill_prefs.h.orig 2025-11-06 10:11:34 UTC +--- components/autofill/core/common/autofill_prefs.h.orig 2025-12-10 15:04:57 UTC +++ components/autofill/core/common/autofill_prefs.h -@@ -36,7 +36,7 @@ inline constexpr char kAutofillAiOptInStatus[] = - inline constexpr char kAutofillAiLastVersionDeduped[] = - "autofill.ai_last_version_deduped"; +@@ -44,7 +44,7 @@ inline constexpr char kAutofillAiLastVersionDeduped[] + inline constexpr char kAutofillAiTravelEntitiesEnabled[] = + "autofill.autofill_ai.travel_entities_enabled"; #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) // Boolean that is true if BNPL on Autofill is enabled. inline constexpr char kAutofillBnplEnabled[] = "autofill.bnpl_enabled"; // Boolean that is true if the user has ever seen a BNPL suggestion. -@@ -265,7 +265,7 @@ bool IsFacilitatedPaymentsA2AEnabled(const PrefService +@@ -277,7 +277,7 @@ bool IsFacilitatedPaymentsA2AEnabled(const PrefService void SetFacilitatedPaymentsA2ATriggeredOnce(PrefService* prefs, bool value); #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 SetAutofillBnplEnabled(PrefService* prefs, bool value); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -@@ -273,7 +273,7 @@ void SetAutofillBnplEnabled(PrefService* prefs, bool v +@@ -285,7 +285,7 @@ void SetAutofillBnplEnabled(PrefService* prefs, bool v bool IsAutofillBnplEnabled(const PrefService* prefs); #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 SetAutofillHasSeenBnpl(PrefService* prefs); bool HasSeenBnpl(const PrefService* prefs); diff --git a/www/iridium/files/patch-components_collaboration_public_collaboration__controller__delegate.h b/www/iridium/files/patch-components_collaboration_public_collaboration__controller__delegate.h index 17ab9389e719..c1df68b8618e 100644 --- a/www/iridium/files/patch-components_collaboration_public_collaboration__controller__delegate.h +++ b/www/iridium/files/patch-components_collaboration_public_collaboration__controller__delegate.h @@ -1,11 +1,11 @@ ---- components/collaboration/public/collaboration_controller_delegate.h.orig 2025-11-06 10:11:34 UTC +--- components/collaboration/public/collaboration_controller_delegate.h.orig 2025-12-10 15:04:57 UTC +++ components/collaboration/public/collaboration_controller_delegate.h @@ -125,7 +125,7 @@ class CollaborationControllerDelegate { case Type::kSigninDisabledByPolicy: error_header = l10n_util::GetStringUTF8( IDS_COLLABORATION_ENTREPRISE_SIGNIN_DISABLED_HEADER); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) error_body = l10n_util::GetStringUTF8( base::FeatureList::IsEnabled( syncer::kReplaceSyncPromosWithSignInPromos) diff --git a/www/iridium/files/patch-components_commerce_core_commerce__feature__list.cc b/www/iridium/files/patch-components_commerce_core_commerce__feature__list.cc index 066ef1815daf..fb35a7d527e4 100644 --- a/www/iridium/files/patch-components_commerce_core_commerce__feature__list.cc +++ b/www/iridium/files/patch-components_commerce_core_commerce__feature__list.cc @@ -1,20 +1,20 @@ ---- components/commerce/core/commerce_feature_list.cc.orig 2025-11-06 10:11:34 UTC +--- components/commerce/core/commerce_feature_list.cc.orig 2025-12-10 15:04:57 UTC +++ components/commerce/core/commerce_feature_list.cc -@@ -178,7 +178,7 @@ BASE_FEATURE(kShoppingAlternateServer, base::FEATURE_D +@@ -175,7 +175,7 @@ BASE_FEATURE(kShoppingAlternateServer, base::FEATURE_D const char kDiscountOnShoppyPageParam[] = "discount-on-shoppy-page"; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) const base::FeatureParam kDiscountOnShoppyPage{ &kEnableDiscountInfoApi, kDiscountOnShoppyPageParam, true}; #else -@@ -191,7 +191,7 @@ const char kMerchantWideBehaviorParam[] = "merchant-wi +@@ -188,7 +188,7 @@ const char kMerchantWideBehaviorParam[] = "merchant-wi const char kNonMerchantWideBehaviorParam[] = "non-merchant-wide-behavior"; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kDiscountDialogAutoPopupBehaviorSetting, base::FEATURE_ENABLED_BY_DEFAULT); const base::FeatureParam kHistoryClustersBehavior{ diff --git a/www/iridium/files/patch-components_constrained__window_constrained__window__views.cc b/www/iridium/files/patch-components_constrained__window_constrained__window__views.cc index 4d3fbbc07a5f..21a75b68e795 100644 --- a/www/iridium/files/patch-components_constrained__window_constrained__window__views.cc +++ b/www/iridium/files/patch-components_constrained__window_constrained__window__views.cc @@ -1,11 +1,11 @@ ---- components/constrained_window/constrained_window_views.cc.orig 2025-09-11 13:19:19 UTC +--- components/constrained_window/constrained_window_views.cc.orig 2025-12-10 15:04:57 UTC +++ components/constrained_window/constrained_window_views.cc @@ -380,7 +380,7 @@ bool SupportsGlobalScreenCoordinates() { } bool PlatformClipsChildrenToViewport() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/iridium/files/patch-components_content__settings_core_browser_website__settings__registry.cc b/www/iridium/files/patch-components_content__settings_core_browser_website__settings__registry.cc index 448c69dc9a9e..2c243f2072fd 100644 --- a/www/iridium/files/patch-components_content__settings_core_browser_website__settings__registry.cc +++ b/www/iridium/files/patch-components_content__settings_core_browser_website__settings__registry.cc @@ -1,11 +1,11 @@ ---- components/content_settings/core/browser/website_settings_registry.cc.orig 2025-05-07 06:48:23 UTC +--- components/content_settings/core/browser/website_settings_registry.cc.orig 2025-12-10 15:04:57 UTC +++ components/content_settings/core/browser/website_settings_registry.cc @@ -66,7 +66,7 @@ const WebsiteSettingsInfo* WebsiteSettingsRegistry::Re #if BUILDFLAG(IS_WIN) if (!(platform & PLATFORM_WINDOWS)) return nullptr; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!(platform & PLATFORM_LINUX)) return nullptr; #elif BUILDFLAG(IS_MAC) diff --git a/www/iridium/files/patch-components_cookie__config_cookie__store__util.cc b/www/iridium/files/patch-components_cookie__config_cookie__store__util.cc index d0b22ede18d4..cbb740c855ce 100644 --- a/www/iridium/files/patch-components_cookie__config_cookie__store__util.cc +++ b/www/iridium/files/patch-components_cookie__config_cookie__store__util.cc @@ -1,11 +1,11 @@ ---- components/cookie_config/cookie_store_util.cc.orig 2025-05-07 06:48:23 UTC +--- components/cookie_config/cookie_store_util.cc.orig 2025-12-10 15:04:57 UTC +++ components/cookie_config/cookie_store_util.cc -@@ -12,7 +12,7 @@ +@@ -16,7 +16,7 @@ namespace cookie_config { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) namespace { - // Use the operating system's mechanisms to encrypt cookies before writing + void OnOsCryptReadyOnUi( diff --git a/www/iridium/files/patch-components_crash_core_app_BUILD.gn b/www/iridium/files/patch-components_crash_core_app_BUILD.gn index cd20793b2524..3b729fbaa958 100644 --- a/www/iridium/files/patch-components_crash_core_app_BUILD.gn +++ b/www/iridium/files/patch-components_crash_core_app_BUILD.gn @@ -1,43 +1,43 @@ ---- components/crash/core/app/BUILD.gn.orig 2025-09-11 13:19:19 UTC +--- components/crash/core/app/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ components/crash/core/app/BUILD.gn @@ -70,6 +70,10 @@ static_library("app") { ] } + if (is_bsd) { + sources -= [ "crashpad.cc" ] + } + defines = [ "CRASH_IMPLEMENTATION" ] public_deps = [ ":lib" ] @@ -83,7 +87,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" ] } @@ -105,7 +109,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", @@ -241,11 +245,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 || is_ubsan_any)) { ldflags = [ diff --git a/www/iridium/files/patch-components_crash_core_app_chrome__crashpad__handler.cc b/www/iridium/files/patch-components_crash_core_app_chrome__crashpad__handler.cc index 818226c9a081..ad5275935c2f 100644 --- a/www/iridium/files/patch-components_crash_core_app_chrome__crashpad__handler.cc +++ b/www/iridium/files/patch-components_crash_core_app_chrome__crashpad__handler.cc @@ -1,12 +1,12 @@ ---- components/crash/core/app/chrome_crashpad_handler.cc.orig 2025-05-07 06:48:23 UTC +--- components/crash/core/app/chrome_crashpad_handler.cc.orig 2025-12-10 15:04:57 UTC +++ components/crash/core/app/chrome_crashpad_handler.cc @@ -6,5 +6,9 @@ extern "C" int CrashpadHandlerMain(int argc, char* argv[]); int main(int argc, char* argv[]) { +#if defined(__OpenBSD__) || defined(__FreeBSD__) + return -1; +#else return CrashpadHandlerMain(argc, argv); +#endif } diff --git a/www/iridium/files/patch-components_crash_core_app_crashpad__handler__main.cc b/www/iridium/files/patch-components_crash_core_app_crashpad__handler__main.cc index 0d1c852922c3..04e578fc5e54 100644 --- a/www/iridium/files/patch-components_crash_core_app_crashpad__handler__main.cc +++ b/www/iridium/files/patch-components_crash_core_app_crashpad__handler__main.cc @@ -1,20 +1,20 @@ ---- components/crash/core/app/crashpad_handler_main.cc.orig 2025-05-07 06:48:23 UTC +--- components/crash/core/app/crashpad_handler_main.cc.orig 2025-12-10 15:04:57 UTC +++ components/crash/core/app/crashpad_handler_main.cc @@ -10,7 +10,7 @@ #include "third_party/crashpad/crashpad/handler/handler_main.h" #include "third_party/crashpad/crashpad/handler/user_stream_data_source.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "components/stability_report/user_stream_data_source_posix.h" #endif @@ -31,7 +31,7 @@ __attribute__((visibility("default"), used)) int Crash char* argv[]) { crashpad::UserStreamDataSources user_stream_data_sources; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) user_stream_data_sources.push_back( std::make_unique()); #endif diff --git a/www/iridium/files/patch-components_crash_core_browser_crash__upload__list__crashpad.cc b/www/iridium/files/patch-components_crash_core_browser_crash__upload__list__crashpad.cc index 2e6f587ecaa7..583cdc2a57c5 100644 --- a/www/iridium/files/patch-components_crash_core_browser_crash__upload__list__crashpad.cc +++ b/www/iridium/files/patch-components_crash_core_browser_crash__upload__list__crashpad.cc @@ -1,26 +1,26 @@ ---- components/crash/core/browser/crash_upload_list_crashpad.cc.orig 2025-05-07 06:48:23 UTC +--- components/crash/core/browser/crash_upload_list_crashpad.cc.orig 2025-12-10 15:04:57 UTC +++ components/crash/core/browser/crash_upload_list_crashpad.cc @@ -37,7 +37,9 @@ CrashUploadListCrashpad::~CrashUploadListCrashpad() = std::vector> CrashUploadListCrashpad::LoadUploadList() { std::vector reports; +#if !BUILDFLAG(IS_BSD) crash_reporter::GetReports(&reports); +#endif std::vector> uploads; for (const crash_reporter::Report& report : reports) { @@ -51,9 +53,13 @@ CrashUploadListCrashpad::LoadUploadList() { void CrashUploadListCrashpad::ClearUploadList(const base::Time& begin, const base::Time& end) { +#if !BUILDFLAG(IS_BSD) crash_reporter::ClearReportsBetween(begin, end); +#endif } void CrashUploadListCrashpad::RequestSingleUpload(const std::string& local_id) { +#if !BUILDFLAG(IS_BSD) crash_reporter::RequestSingleCrashUpload(local_id); +#endif } diff --git a/www/iridium/files/patch-components_crash_core_common_BUILD.gn b/www/iridium/files/patch-components_crash_core_common_BUILD.gn index fe568f50273e..4aac8562a32d 100644 --- a/www/iridium/files/patch-components_crash_core_common_BUILD.gn +++ b/www/iridium/files/patch-components_crash_core_common_BUILD.gn @@ -1,11 +1,11 @@ ---- components/crash/core/common/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- components/crash/core/common/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ components/crash/core/common/BUILD.gn -@@ -9,7 +9,7 @@ import("//components/gwp_asan/buildflags/buildflags.gn +@@ -8,7 +8,7 @@ import("//components/gwp_asan/buildflags/buildflags.gn declare_args() { # If set to true, this will stub out and disable the entire crash key system. - use_crash_key_stubs = is_fuchsia + use_crash_key_stubs = is_fuchsia || is_bsd } group("common") { diff --git a/www/iridium/files/patch-components_device__signals_core_browser_browser__utils.h b/www/iridium/files/patch-components_device__signals_core_browser_browser__utils.h index 782de664736b..9e07679b50a8 100644 --- a/www/iridium/files/patch-components_device__signals_core_browser_browser__utils.h +++ b/www/iridium/files/patch-components_device__signals_core_browser_browser__utils.h @@ -1,20 +1,20 @@ ---- components/device_signals/core/browser/browser_utils.h.orig 2025-09-11 13:19:19 UTC +--- components/device_signals/core/browser/browser_utils.h.orig 2025-12-10 15:04:57 UTC +++ components/device_signals/core/browser/browser_utils.h @@ -38,7 +38,7 @@ bool GetSiteIsolationEnabled(); std::string GetHostName(); #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Returns the hostname of the current machine. std::vector GetSystemDnsServers(); @@ -46,7 +46,7 @@ std::vector GetSystemDnsServers(); SettingValue GetOSFirewall(); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Returns the path to the ufw configuration file. const char** GetUfwConfigPath(); #endif // BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-components_device__signals_core_browser_desktop_desktop__os__signals__collector.cc b/www/iridium/files/patch-components_device__signals_core_browser_desktop_desktop__os__signals__collector.cc index 5ebf658267e3..c707c3c5d3b7 100644 --- a/www/iridium/files/patch-components_device__signals_core_browser_desktop_desktop__os__signals__collector.cc +++ b/www/iridium/files/patch-components_device__signals_core_browser_desktop_desktop__os__signals__collector.cc @@ -1,11 +1,11 @@ ---- components/device_signals/core/browser/desktop/desktop_os_signals_collector.cc.orig 2025-09-11 13:19:19 UTC +--- components/device_signals/core/browser/desktop/desktop_os_signals_collector.cc.orig 2025-12-10 15:04:57 UTC +++ components/device_signals/core/browser/desktop/desktop_os_signals_collector.cc @@ -43,7 +43,7 @@ std::unique_ptr AddAsyncOsSignals( os_signals_response->disk_encryption = device_signals::GetDiskEncrypted(); os_signals_response->os_firewall = device_signals::GetOSFirewall(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) os_signals_response->distribution_version = device_signals::GetDistributionVersion(); #endif // BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-components_device__signals_core_browser_mock__signals__aggregator.h b/www/iridium/files/patch-components_device__signals_core_browser_mock__signals__aggregator.h index 8b1fed7d1088..0ce8b253f0d8 100644 --- a/www/iridium/files/patch-components_device__signals_core_browser_mock__signals__aggregator.h +++ b/www/iridium/files/patch-components_device__signals_core_browser_mock__signals__aggregator.h @@ -1,11 +1,11 @@ ---- components/device_signals/core/browser/mock_signals_aggregator.h.orig 2025-05-07 06:48:23 UTC +--- components/device_signals/core/browser/mock_signals_aggregator.h.orig 2025-12-10 15:04:57 UTC +++ components/device_signals/core/browser/mock_signals_aggregator.h @@ -17,7 +17,7 @@ class MockSignalsAggregator : public SignalsAggregator MockSignalsAggregator(); ~MockSignalsAggregator() override; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MOCK_METHOD(void, GetSignalsForUser, (const UserContext&, diff --git a/www/iridium/files/patch-components_device__signals_core_browser_signals__aggregator.h b/www/iridium/files/patch-components_device__signals_core_browser_signals__aggregator.h index bd581e31a837..b88b7400f13b 100644 --- a/www/iridium/files/patch-components_device__signals_core_browser_signals__aggregator.h +++ b/www/iridium/files/patch-components_device__signals_core_browser_signals__aggregator.h @@ -1,11 +1,11 @@ ---- components/device_signals/core/browser/signals_aggregator.h.orig 2025-05-07 06:48:23 UTC +--- components/device_signals/core/browser/signals_aggregator.h.orig 2025-12-10 15:04:57 UTC +++ components/device_signals/core/browser/signals_aggregator.h @@ -22,7 +22,7 @@ class SignalsAggregator : public KeyedService { ~SignalsAggregator() override = default; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Will asynchronously collect signals whose names are specified in the // `request` object, and will also use a `user_context` to validate that the // user has permissions to the device's signals. Invokes `callback` with the diff --git a/www/iridium/files/patch-components_device__signals_core_browser_signals__aggregator__impl.cc b/www/iridium/files/patch-components_device__signals_core_browser_signals__aggregator__impl.cc index b27ca1b63cc1..47ac621d1c0b 100644 --- a/www/iridium/files/patch-components_device__signals_core_browser_signals__aggregator__impl.cc +++ b/www/iridium/files/patch-components_device__signals_core_browser_signals__aggregator__impl.cc @@ -1,11 +1,11 @@ ---- components/device_signals/core/browser/signals_aggregator_impl.cc.orig 2025-05-07 06:48:23 UTC +--- components/device_signals/core/browser/signals_aggregator_impl.cc.orig 2025-12-10 15:04:57 UTC +++ components/device_signals/core/browser/signals_aggregator_impl.cc @@ -64,7 +64,7 @@ SignalsAggregatorImpl::SignalsAggregatorImpl( SignalsAggregatorImpl::~SignalsAggregatorImpl() = default; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void SignalsAggregatorImpl::GetSignalsForUser( const UserContext& user_context, const SignalsAggregationRequest& request, diff --git a/www/iridium/files/patch-components_device__signals_core_browser_signals__aggregator__impl.h b/www/iridium/files/patch-components_device__signals_core_browser_signals__aggregator__impl.h index 7fba77cf66e1..c235266bd5c5 100644 --- a/www/iridium/files/patch-components_device__signals_core_browser_signals__aggregator__impl.h +++ b/www/iridium/files/patch-components_device__signals_core_browser_signals__aggregator__impl.h @@ -1,11 +1,11 @@ ---- components/device_signals/core/browser/signals_aggregator_impl.h.orig 2025-05-07 06:48:23 UTC +--- components/device_signals/core/browser/signals_aggregator_impl.h.orig 2025-12-10 15:04:57 UTC +++ components/device_signals/core/browser/signals_aggregator_impl.h @@ -30,7 +30,7 @@ class SignalsAggregatorImpl : public SignalsAggregator ~SignalsAggregatorImpl() override; // SignalsAggregator: -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void GetSignalsForUser(const UserContext& user_context, const SignalsAggregationRequest& request, GetSignalsCallback callback) override; diff --git a/www/iridium/files/patch-components_device__signals_core_browser_user__permission__service.h b/www/iridium/files/patch-components_device__signals_core_browser_user__permission__service.h index 5a96c37d1e8a..3b0d0930a5a2 100644 --- a/www/iridium/files/patch-components_device__signals_core_browser_user__permission__service.h +++ b/www/iridium/files/patch-components_device__signals_core_browser_user__permission__service.h @@ -1,11 +1,11 @@ ---- components/device_signals/core/browser/user_permission_service.h.orig 2025-05-07 06:48:23 UTC +--- components/device_signals/core/browser/user_permission_service.h.orig 2025-12-10 15:04:57 UTC +++ components/device_signals/core/browser/user_permission_service.h @@ -57,7 +57,7 @@ class UserPermissionService : public KeyedService { // missing. virtual bool ShouldCollectConsent() const = 0; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Will verify whether context-aware signals can be collected // on behalf of the user represented by `user_context`. Returns `kGranted` if // collection is allowed. diff --git a/www/iridium/files/patch-components_device__signals_core_browser_user__permission__service__impl.cc b/www/iridium/files/patch-components_device__signals_core_browser_user__permission__service__impl.cc index d9500aa2ac4f..6f44d3ee034c 100644 --- a/www/iridium/files/patch-components_device__signals_core_browser_user__permission__service__impl.cc +++ b/www/iridium/files/patch-components_device__signals_core_browser_user__permission__service__impl.cc @@ -1,11 +1,11 @@ ---- components/device_signals/core/browser/user_permission_service_impl.cc.orig 2025-05-07 06:48:23 UTC +--- components/device_signals/core/browser/user_permission_service_impl.cc.orig 2025-12-10 15:04:57 UTC +++ components/device_signals/core/browser/user_permission_service_impl.cc @@ -87,7 +87,7 @@ bool UserPermissionServiceImpl::ShouldCollectConsent() consent_required_by_dependent_policy; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) UserPermission UserPermissionServiceImpl::CanUserCollectSignals( const UserContext& user_context) const { // Return "unknown user" if no user ID was given. diff --git a/www/iridium/files/patch-components_device__signals_core_browser_user__permission__service__impl.h b/www/iridium/files/patch-components_device__signals_core_browser_user__permission__service__impl.h index 19d880ddee66..e1c962c2d6cd 100644 --- a/www/iridium/files/patch-components_device__signals_core_browser_user__permission__service__impl.h +++ b/www/iridium/files/patch-components_device__signals_core_browser_user__permission__service__impl.h @@ -1,11 +1,11 @@ ---- components/device_signals/core/browser/user_permission_service_impl.h.orig 2025-05-07 06:48:23 UTC +--- components/device_signals/core/browser/user_permission_service_impl.h.orig 2025-12-10 15:04:57 UTC +++ components/device_signals/core/browser/user_permission_service_impl.h @@ -38,7 +38,7 @@ class UserPermissionServiceImpl : public UserPermissio // UserPermissionService: bool ShouldCollectConsent() const override; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) UserPermission CanUserCollectSignals( const UserContext& user_context) const override; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX diff --git a/www/iridium/files/patch-components_device__signals_core_common_linux_platform__utils__linux.cc b/www/iridium/files/patch-components_device__signals_core_common_linux_platform__utils__linux.cc index c396daf9606b..07f1c204defa 100644 --- a/www/iridium/files/patch-components_device__signals_core_common_linux_platform__utils__linux.cc +++ b/www/iridium/files/patch-components_device__signals_core_common_linux_platform__utils__linux.cc @@ -1,78 +1,78 @@ ---- components/device_signals/core/common/linux/platform_utils_linux.cc.orig 2025-10-28 14:29:43 UTC +--- components/device_signals/core/common/linux/platform_utils_linux.cc.orig 2025-12-10 15:04:57 UTC +++ components/device_signals/core/common/linux/platform_utils_linux.cc @@ -4,12 +4,23 @@ #include "components/device_signals/core/common/platform_utils.h" +#include "build/build_config.h" + #if defined(USE_GIO) #include #endif // defined(USE_GIO) #include +#if !BUILDFLAG(IS_BSD) #include +#endif +#if BUILDFLAG(IS_BSD) +#include +#include +#include +#include +#endif + #include #include #include @@ -105,6 +116,7 @@ SettingValue GetScreenlockSecured() { // Implements the logic from the native host installation script. First find the // root device identifier, then locate its parent and get its type. SettingValue GetDiskEncrypted() { +#if !BUILDFLAG(IS_BSD) struct stat info; // First figure out the device identifier. Fail fast if this fails. if (stat("/", &info) != 0) { @@ -127,11 +139,35 @@ SettingValue GetDiskEncrypted() { } return SettingValue::UNKNOWN; } +#endif return SettingValue::DISABLED; } std::vector internal::GetMacAddressesImpl() { std::vector result; +#if BUILDFLAG(IS_BSD) + struct ifaddrs* ifa = nullptr; + + if (getifaddrs(&ifa) != 0) + return result; + + struct ifaddrs* interface = ifa; + for (; interface != nullptr; interface = interface->ifa_next) { + if (interface->ifa_addr == nullptr || + interface->ifa_addr->sa_family != AF_LINK) { + continue; + } + struct sockaddr_dl* sdl = + reinterpret_cast(interface->ifa_addr); + if (!sdl || sdl->sdl_alen != 6) + continue; + char* link_address = static_cast(LLADDR(sdl)); + result.push_back(base::StringPrintf( + "%02x:%02x:%02x:%02x:%02x:%02x", link_address[0] & 0xff, + link_address[1] & 0xff, link_address[2] & 0xff, link_address[3] & 0xff, + link_address[4] & 0xff, link_address[5] & 0xff)); + } +#else base::DirReaderPosix reader("/sys/class/net"); if (!reader.IsValid()) { return result; @@ -156,6 +192,7 @@ std::vector internal::GetMacAddressesImpl &address); result.push_back(address); } +#endif return result; } diff --git a/www/iridium/files/patch-components_device__signals_core_common_platform__utils.h b/www/iridium/files/patch-components_device__signals_core_common_platform__utils.h index eb22f0f51fb6..3446a25cac2a 100644 --- a/www/iridium/files/patch-components_device__signals_core_common_platform__utils.h +++ b/www/iridium/files/patch-components_device__signals_core_common_platform__utils.h @@ -1,11 +1,11 @@ ---- components/device_signals/core/common/platform_utils.h.orig 2025-10-28 14:29:43 UTC +--- components/device_signals/core/common/platform_utils.h.orig 2025-12-10 15:04:57 UTC +++ components/device_signals/core/common/platform_utils.h @@ -54,7 +54,7 @@ SettingValue GetSecureBootEnabled(); std::optional GetWindowsMachineDomain(); #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Return the distribution VERSION_ID contained in // /etc/os-release, if it exists. std::optional GetDistributionVersion(); diff --git a/www/iridium/files/patch-components_device__signals_core_common_signals__features.cc b/www/iridium/files/patch-components_device__signals_core_common_signals__features.cc index 6c52a8699a86..ba65885864db 100644 --- a/www/iridium/files/patch-components_device__signals_core_common_signals__features.cc +++ b/www/iridium/files/patch-components_device__signals_core_common_signals__features.cc @@ -1,11 +1,11 @@ ---- components/device_signals/core/common/signals_features.cc.orig 2025-11-06 10:11:34 UTC +--- components/device_signals/core/common/signals_features.cc.orig 2025-12-10 15:04:57 UTC +++ components/device_signals/core/common/signals_features.cc -@@ -51,7 +51,7 @@ bool IsDetectedAgentSignalCollectionEnabled() { +@@ -61,7 +61,7 @@ bool IsSystemSignalCollectionImprovementEnabled() { } #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Enables the triggering of device signals consent dialog when conditions met // This feature also requires UnmanagedDeviceSignalsConsentFlowEnabled policy to // be enabled diff --git a/www/iridium/files/patch-components_device__signals_core_common_signals__features.h b/www/iridium/files/patch-components_device__signals_core_common_signals__features.h index 51e18ba40f7a..8baa55cb8fc4 100644 --- a/www/iridium/files/patch-components_device__signals_core_common_signals__features.h +++ b/www/iridium/files/patch-components_device__signals_core_common_signals__features.h @@ -1,11 +1,11 @@ ---- components/device_signals/core/common/signals_features.h.orig 2025-09-11 13:19:19 UTC +--- components/device_signals/core/common/signals_features.h.orig 2025-12-10 15:04:57 UTC +++ components/device_signals/core/common/signals_features.h -@@ -33,7 +33,7 @@ bool IsBrowserSignalsReportingEnabled(); - bool IsDetectedAgentSignalCollectionEnabled(); +@@ -37,7 +37,7 @@ bool IsDetectedAgentSignalCollectionEnabled(); + bool IsSystemSignalCollectionImprovementEnabled(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kDeviceSignalsConsentDialog); // Returns true if device signals consent dialog has been enabled for diff --git a/www/iridium/files/patch-components_device__signals_core_system__signals_platform__delegate.cc b/www/iridium/files/patch-components_device__signals_core_system__signals_platform__delegate.cc index 74d4a4fdad1f..a9c2653d49f9 100644 --- a/www/iridium/files/patch-components_device__signals_core_system__signals_platform__delegate.cc +++ b/www/iridium/files/patch-components_device__signals_core_system__signals_platform__delegate.cc @@ -1,11 +1,11 @@ ---- components/device_signals/core/system_signals/platform_delegate.cc.orig 2025-05-07 06:48:23 UTC +--- components/device_signals/core/system_signals/platform_delegate.cc.orig 2025-12-10 15:04:57 UTC +++ components/device_signals/core/system_signals/platform_delegate.cc @@ -11,7 +11,7 @@ namespace device_signals { bool CustomFilePathComparator::operator()(const base::FilePath& a, const base::FilePath& b) const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Linux, the file system is case sensitive. return a < b; #else diff --git a/www/iridium/files/patch-components_device__signals_test_signals__contract.cc b/www/iridium/files/patch-components_device__signals_test_signals__contract.cc index b198197a2102..8393830c4363 100644 --- a/www/iridium/files/patch-components_device__signals_test_signals__contract.cc +++ b/www/iridium/files/patch-components_device__signals_test_signals__contract.cc @@ -1,11 +1,11 @@ ---- components/device_signals/test/signals_contract.cc.orig 2025-05-07 06:48:23 UTC +--- components/device_signals/test/signals_contract.cc.orig 2025-12-10 15:04:57 UTC +++ components/device_signals/test/signals_contract.cc @@ -221,7 +221,7 @@ GetSignalsContract(bool is_av_signal_enabled) { base::BindRepeating(VerifyUnset, names::kCrowdStrike); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) contract[names::kAllowScreenLock] = base::BindRepeating(VerifyUnset, names::kAllowScreenLock); contract[names::kImei] = base::BindRepeating(VerifyUnset, names::kImei); diff --git a/www/iridium/files/patch-components_discardable__memory_service_discardable__shared__memory__manager.cc b/www/iridium/files/patch-components_discardable__memory_service_discardable__shared__memory__manager.cc index e773484d930f..7a4bd862714e 100644 --- a/www/iridium/files/patch-components_discardable__memory_service_discardable__shared__memory__manager.cc +++ b/www/iridium/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 2025-05-07 06:48:23 UTC +--- components/discardable_memory/service/discardable_shared_memory_manager.cc.orig 2025-12-10 15:04:57 UTC +++ components/discardable_memory/service/discardable_shared_memory_manager.cc @@ -172,7 +172,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/iridium/files/patch-components_embedder__support_user__agent__utils.cc b/www/iridium/files/patch-components_embedder__support_user__agent__utils.cc index 18f4c21f757a..03650de3a9a0 100644 --- a/www/iridium/files/patch-components_embedder__support_user__agent__utils.cc +++ b/www/iridium/files/patch-components_embedder__support_user__agent__utils.cc @@ -1,65 +1,65 @@ ---- components/embedder_support/user_agent_utils.cc.orig 2025-09-11 13:19:19 UTC +--- components/embedder_support/user_agent_utils.cc.orig 2025-12-10 15:04:57 UTC +++ components/embedder_support/user_agent_utils.cc @@ -317,7 +317,7 @@ std::string GetUserAgentPlatform() { return ""; #elif BUILDFLAG(IS_MAC) return "Macintosh; "; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return "X11; "; // strange, but that's what Firefox uses #elif BUILDFLAG(IS_ANDROID) return "Linux; "; @@ -333,7 +333,7 @@ std::string GetUserAgentPlatform() { } std::string GetUnifiedPlatform() { -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // This constant is only used on Android (desktop) and Linux. constexpr char kUnifiedPlatformLinuxX64[] = "X11; Linux x86_64"; #endif @@ -353,7 +353,7 @@ std::string GetUnifiedPlatform() { return "Windows NT 10.0; Win64; x64"; #elif BUILDFLAG(IS_FUCHSIA) return "Fuchsia"; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kUnifiedPlatformLinuxX64; #elif BUILDFLAG(IS_IOS) if (ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET) { @@ -615,7 +615,7 @@ bool GetMobileBitForUAMetadata() { } std::string GetPlatformVersion() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(crbug.com/40245146): Remove this Blink feature if (base::FeatureList::IsEnabled( blink::features::kReduceUserAgentDataLinuxPlatformVersion)) { @@ -661,6 +661,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 -@@ -873,6 +876,16 @@ std::string BuildOSCpuInfoFromOSVersionAndCpuType(cons +@@ -868,6 +871,16 @@ std::string BuildOSCpuInfoFromOSVersionAndCpuType(cons "Android %s", os_version.c_str() #elif BUILDFLAG(IS_FUCHSIA) "Fuchsia" +#elif BUILDFLAG(IS_BSD) +#if defined(__x86_64__) + "Linux x86_64; %s %s", +#elif defined(__aarch64__) + "Linux aarch64; %s %s", +#else + "Linux i686; %s %s", +#endif + unixinfo.sysname, // e.g. Linux + cpu_type.c_str() // e.g. i686 #elif BUILDFLAG(IS_IOS) "CPU %s OS %s like Mac OS X", cpu_type.c_str(), os_version.c_str() diff --git a/www/iridium/files/patch-components_embedder__support_user__agent__utils__unittest.cc b/www/iridium/files/patch-components_embedder__support_user__agent__utils__unittest.cc index 44b188dd7fff..9e38ccbf0792 100644 --- a/www/iridium/files/patch-components_embedder__support_user__agent__utils__unittest.cc +++ b/www/iridium/files/patch-components_embedder__support_user__agent__utils__unittest.cc @@ -1,29 +1,29 @@ ---- components/embedder_support/user_agent_utils_unittest.cc.orig 2025-09-11 13:19:19 UTC +--- components/embedder_support/user_agent_utils_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ components/embedder_support/user_agent_utils_unittest.cc @@ -152,7 +152,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()); @@ -340,7 +340,7 @@ class UserAgentUtilsTest : public testing::Test, "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"; @@ -720,7 +720,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/iridium/files/patch-components_enterprise_browser_reporting_report__util.cc b/www/iridium/files/patch-components_enterprise_browser_reporting_report__util.cc index 01aa89a689f8..1d930df85c44 100644 --- a/www/iridium/files/patch-components_enterprise_browser_reporting_report__util.cc +++ b/www/iridium/files/patch-components_enterprise_browser_reporting_report__util.cc @@ -1,11 +1,11 @@ ---- components/enterprise/browser/reporting/report_util.cc.orig 2025-09-22 12:54:03 UTC +--- components/enterprise/browser/reporting/report_util.cc.orig 2025-12-10 15:04:57 UTC +++ components/enterprise/browser/reporting/report_util.cc -@@ -197,7 +197,7 @@ std::string GetSecuritySignalsInReport( +@@ -198,7 +198,7 @@ std::string GetSecuritySignalsInReport( signals_dict.Set("antivirus_info", std::move(anti_virus_list)); signals_dict.Set("hotfixes", RepeatedFieldptrToList(os_report.hotfixes())); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (os_report.has_distribution_version()) { signals_dict.Set("distribution_version", os_report.distribution_version()); diff --git a/www/iridium/files/patch-components_enterprise_connectors_core_connectors__prefs.cc b/www/iridium/files/patch-components_enterprise_connectors_core_connectors__prefs.cc deleted file mode 100644 index 8aef01891c96..000000000000 --- a/www/iridium/files/patch-components_enterprise_connectors_core_connectors__prefs.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- components/enterprise/connectors/core/connectors_prefs.cc.orig 2025-11-06 10:11:34 UTC -+++ components/enterprise/connectors/core/connectors_prefs.cc -@@ -22,7 +22,7 @@ - namespace enterprise_connectors { - - // Profile Prefs --#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 kCacheEncryptionEnabledPref[] = - "enterprise_connectors.cache_encryption_enabled"; - #endif -@@ -96,7 +96,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry - #if BUILDFLAG(ENTERPRISE_CLIENT_CERTIFICATES) - client_certificates::RegisterProfilePrefs(registry); - #endif // BUILDFLAG(ENTERPRISE_CLIENT_CERTIFICATES) --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - registry->RegisterBooleanPref(kCacheEncryptionEnabledPref, false); - #endif - } diff --git a/www/iridium/files/patch-components_enterprise_connectors_core_connectors__prefs.h b/www/iridium/files/patch-components_enterprise_connectors_core_connectors__prefs.h deleted file mode 100644 index 79957a8fe252..000000000000 --- a/www/iridium/files/patch-components_enterprise_connectors_core_connectors__prefs.h +++ /dev/null @@ -1,11 +0,0 @@ ---- components/enterprise/connectors/core/connectors_prefs.h.orig 2025-11-06 10:11:34 UTC -+++ components/enterprise/connectors/core/connectors_prefs.h -@@ -11,7 +11,7 @@ class PrefRegistrySimple; - - namespace enterprise_connectors { - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Pref that maps to the "CacheEncryptionEnabled" policy. - extern const char kCacheEncryptionEnabledPref[]; - #endif diff --git a/www/iridium/files/patch-components_enterprise_connectors_core_realtime__reporting__client__base.cc b/www/iridium/files/patch-components_enterprise_connectors_core_realtime__reporting__client__base.cc index 09fb3cf39ec2..94d4fd0df617 100644 --- a/www/iridium/files/patch-components_enterprise_connectors_core_realtime__reporting__client__base.cc +++ b/www/iridium/files/patch-components_enterprise_connectors_core_realtime__reporting__client__base.cc @@ -1,20 +1,20 @@ ---- components/enterprise/connectors/core/realtime_reporting_client_base.cc.orig 2025-09-11 13:19:19 UTC +--- components/enterprise/connectors/core/realtime_reporting_client_base.cc.orig 2025-12-10 15:04:57 UTC +++ components/enterprise/connectors/core/realtime_reporting_client_base.cc @@ -191,7 +191,7 @@ void RealtimeReportingClientBase::ReportEvent( *event.mutable_time() = ToProtoTimestamp(base::Time::Now()); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(notyet) MaybeCollectDeviceSignalsAndReportEvent(std::move(event), client, settings); #else // Regardless of collecting device signals or not, upload the security event @@ -240,7 +240,7 @@ void RealtimeReportingClientBase::ReportEventWithTimes if (include_profile_user_name) { event.Set(kKeyProfileUserName, GetProfileUserName()); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(notyet) MaybeCollectDeviceSignalsAndReportEventDeprecated(std::move(event), client, name, settings, time); #else diff --git a/www/iridium/files/patch-components_enterprise_data__controls_core_browser_rule.cc b/www/iridium/files/patch-components_enterprise_data__controls_core_browser_rule.cc index 36a9f66c45f5..23f354f32f1b 100644 --- a/www/iridium/files/patch-components_enterprise_data__controls_core_browser_rule.cc +++ b/www/iridium/files/patch-components_enterprise_data__controls_core_browser_rule.cc @@ -1,20 +1,20 @@ ---- components/enterprise/data_controls/core/browser/rule.cc.orig 2025-11-06 10:11:34 UTC +--- components/enterprise/data_controls/core/browser/rule.cc.orig 2025-12-10 15:04:57 UTC +++ components/enterprise/data_controls/core/browser/rule.cc @@ -531,7 +531,7 @@ bool Rule::AddUnsupportedAttributeErrors( }, }, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) { Restriction::kFileDownload, { @@ -610,7 +610,7 @@ bool Rule::AddUnsupportedRestrictionErrors( }, #endif // BUILDFLAG(ENTERPRISE_SCREENSHOT_PROTECTION) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) { Restriction::kFileDownload, { diff --git a/www/iridium/files/patch-components_enterprise_watermarking_watermark.cc b/www/iridium/files/patch-components_enterprise_watermarking_watermark.cc index 1710e23a3083..63b93d3590c4 100644 --- a/www/iridium/files/patch-components_enterprise_watermarking_watermark.cc +++ b/www/iridium/files/patch-components_enterprise_watermarking_watermark.cc @@ -1,20 +1,20 @@ ---- components/enterprise/watermarking/watermark.cc.orig 2025-09-11 13:19:19 UTC +--- components/enterprise/watermarking/watermark.cc.orig 2025-12-10 15:04:57 UTC +++ components/enterprise/watermarking/watermark.cc @@ -29,7 +29,7 @@ gfx::Font WatermarkFont(int font_size) { "Segoe UI", #elif BUILDFLAG(IS_MAC) "SF Pro Text", -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) "Ubuntu", #elif BUILDFLAG(IS_CHROMEOS) "Google Sans", @@ -40,7 +40,7 @@ gfx::Font WatermarkFont(int font_size) { } gfx::Font::Weight WatermarkFontWeight() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return gfx::Font::Weight::SEMIBOLD; #else return gfx::Font::Weight::MEDIUM; diff --git a/www/iridium/files/patch-components_error__page_common_localized__error.cc b/www/iridium/files/patch-components_error__page_common_localized__error.cc index d357b89a6153..ead9f2cdd643 100644 --- a/www/iridium/files/patch-components_error__page_common_localized__error.cc +++ b/www/iridium/files/patch-components_error__page_common_localized__error.cc @@ -1,11 +1,11 @@ ---- components/error_page/common/localized_error.cc.orig 2025-10-28 14:29:43 UTC +--- components/error_page/common/localized_error.cc.orig 2025-12-10 15:04:57 UTC +++ components/error_page/common/localized_error.cc -@@ -902,7 +902,7 @@ void AddSuggestionsDetails(int error_code, +@@ -896,7 +896,7 @@ void AddSuggestionsDetails(int error_code, if (suggestions & SUGGEST_PROXY_CONFIG) { // Custom body string. std::u16string inner = -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) l10n_util::GetStringFUTF16( IDS_ERRORPAGES_SUGGESTION_PROXY_DISABLE_PLATFORM, l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE), diff --git a/www/iridium/files/patch-components_eye__dropper_eye__dropper__view.cc b/www/iridium/files/patch-components_eye__dropper_eye__dropper__view.cc index 02af3c42ca0e..e435be9d5eea 100644 --- a/www/iridium/files/patch-components_eye__dropper_eye__dropper__view.cc +++ b/www/iridium/files/patch-components_eye__dropper_eye__dropper__view.cc @@ -1,11 +1,11 @@ ---- components/eye_dropper/eye_dropper_view.cc.orig 2025-11-06 10:11:34 UTC +--- components/eye_dropper/eye_dropper_view.cc.orig 2025-12-10 15:04:57 UTC +++ components/eye_dropper/eye_dropper_view.cc @@ -213,7 +213,7 @@ EyeDropperView::EyeDropperView(gfx::NativeView parent, // EyeDropper/WidgetDelegate. set_owned_by_client(OwnedByClientPassKey()); 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( diff --git a/www/iridium/files/patch-components_feature__engagement_public_event__constants.cc b/www/iridium/files/patch-components_feature__engagement_public_event__constants.cc index daa76ccafe32..04691e5340a5 100644 --- a/www/iridium/files/patch-components_feature__engagement_public_event__constants.cc +++ b/www/iridium/files/patch-components_feature__engagement_public_event__constants.cc @@ -1,11 +1,11 @@ ---- components/feature_engagement/public/event_constants.cc.orig 2025-05-07 06:48:23 UTC +--- components/feature_engagement/public/event_constants.cc.orig 2025-12-10 15:04:57 UTC +++ components/feature_engagement/public/event_constants.cc @@ -11,7 +11,7 @@ namespace feature_engagement { namespace events { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kNewTabOpened[] = "new_tab_opened"; const char kSixthTabOpened[] = "sixth_tab_opened"; const char kReadingListItemAdded[] = "reading_list_item_added"; diff --git a/www/iridium/files/patch-components_feature__engagement_public_event__constants.h b/www/iridium/files/patch-components_feature__engagement_public_event__constants.h index 88d25502de9a..c6c4200efb32 100644 --- a/www/iridium/files/patch-components_feature__engagement_public_event__constants.h +++ b/www/iridium/files/patch-components_feature__engagement_public_event__constants.h @@ -1,11 +1,11 @@ ---- components/feature_engagement/public/event_constants.h.orig 2025-05-07 06:48:23 UTC +--- components/feature_engagement/public/event_constants.h.orig 2025-12-10 15:04:57 UTC +++ components/feature_engagement/public/event_constants.h @@ -14,7 +14,7 @@ namespace events { // Desktop #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) // The user has explicitly opened a new tab via an entry point from inside of // Chrome. extern const char kNewTabOpened[]; diff --git a/www/iridium/files/patch-components_feature__engagement_public_feature__configurations.cc b/www/iridium/files/patch-components_feature__engagement_public_feature__configurations.cc index 0e0ccee26d3a..5fafb34eb91b 100644 --- a/www/iridium/files/patch-components_feature__engagement_public_feature__configurations.cc +++ b/www/iridium/files/patch-components_feature__engagement_public_feature__configurations.cc @@ -1,30 +1,30 @@ ---- components/feature_engagement/public/feature_configurations.cc.orig 2025-11-06 10:11:34 UTC +--- components/feature_engagement/public/feature_configurations.cc.orig 2025-12-10 15:04:57 UTC +++ components/feature_engagement/public/feature_configurations.cc @@ -95,7 +95,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 @@ -114,7 +114,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 (kIPHPasswordsManagementBubbleAfterSaveFeature.name == feature->name) { FeatureConfig config; config.valid = true; -@@ -2045,7 +2045,8 @@ std::optional GetClientSideFeatureConfi +@@ -2020,7 +2020,8 @@ std::optional GetClientSideFeatureConfi #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) if (kIPHAutofillCreditCardBenefitFeature.name == feature->name) { // The credit card benefit IPH appears up to three times over 10 years and diff --git a/www/iridium/files/patch-components_feature__engagement_public_feature__constants.cc b/www/iridium/files/patch-components_feature__engagement_public_feature__constants.cc index 70662a0bf9b5..22c10107e80e 100644 --- a/www/iridium/files/patch-components_feature__engagement_public_feature__constants.cc +++ b/www/iridium/files/patch-components_feature__engagement_public_feature__constants.cc @@ -1,29 +1,29 @@ ---- components/feature_engagement/public/feature_constants.cc.orig 2025-11-12 18:20:14 UTC +--- components/feature_engagement/public/feature_constants.cc.orig 2025-12-10 15:04:57 UTC +++ components/feature_engagement/public/feature_constants.cc @@ -32,7 +32,7 @@ bool IsOnDeviceStorageEnabled() { } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) BASE_FEATURE(kEsbDownloadRowPromoFeature, "EsbDownloadRowPromo", -@@ -846,7 +846,7 @@ BASE_FEATURE(kIPHiOSAIHubNewBadge, +@@ -847,7 +847,7 @@ BASE_FEATURE(kIPHiOSAIHubNewBadge, #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) BASE_FEATURE(kIPHAutofillBnplAffirmOrZipSuggestionFeature, "IPH_AutofillBnplAffirmOrZipSuggestion", -@@ -1002,7 +1002,7 @@ BASE_FEATURE(kIPHScalableIphGamingFeature, +@@ -1006,7 +1006,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/iridium/files/patch-components_feature__engagement_public_feature__constants.h b/www/iridium/files/patch-components_feature__engagement_public_feature__constants.h index 7413010c3728..96439e371c96 100644 --- a/www/iridium/files/patch-components_feature__engagement_public_feature__constants.h +++ b/www/iridium/files/patch-components_feature__engagement_public_feature__constants.h @@ -1,29 +1,29 @@ ---- components/feature_engagement/public/feature_constants.h.orig 2025-11-12 18:20:14 UTC +--- components/feature_engagement/public/feature_constants.h.orig 2025-12-10 15:04:57 UTC +++ components/feature_engagement/public/feature_constants.h @@ -31,7 +31,7 @@ FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHDemoMode); FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHDummyFeature); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) FEATURE_CONSTANTS_DECLARE_FEATURE(kEsbDownloadRowPromoFeature); #endif -@@ -380,7 +380,7 @@ FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHiOSAIHubNewBadge +@@ -385,7 +385,7 @@ FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHiOSAIHubNewBadge #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) FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHAutofillBnplAffirmOrZipSuggestionFeature); FEATURE_CONSTANTS_DECLARE_FEATURE( -@@ -444,7 +444,7 @@ FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHScalableIphHelpA +@@ -450,7 +450,7 @@ FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHScalableIphHelpA FEATURE_CONSTANTS_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) FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHDesktopPWAsLinkCapturingLaunch); FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHDesktopPWAsLinkCapturingLaunchAppInTab); FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHSignInBenefitsFeature); diff --git a/www/iridium/files/patch-components_feature__engagement_public_feature__list.cc b/www/iridium/files/patch-components_feature__engagement_public_feature__list.cc index a0413763b8c8..145a4ae73749 100644 --- a/www/iridium/files/patch-components_feature__engagement_public_feature__list.cc +++ b/www/iridium/files/patch-components_feature__engagement_public_feature__list.cc @@ -1,29 +1,29 @@ ---- components/feature_engagement/public/feature_list.cc.orig 2025-11-12 18:20:14 UTC +--- components/feature_engagement/public/feature_list.cc.orig 2025-12-10 15:04:57 UTC +++ components/feature_engagement/public/feature_list.cc -@@ -203,7 +203,7 @@ const base::Feature* const kAllFeatures[] = { +@@ -202,7 +202,7 @@ const base::Feature* const kAllFeatures[] = { &kIPHiOSReaderModeOptionsFeature, #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) &kEsbDownloadRowPromoFeature, #endif -@@ -278,7 +278,7 @@ const base::Feature* const kAllFeatures[] = { +@@ -277,7 +277,7 @@ const base::Feature* const kAllFeatures[] = { #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) &kIPHAutofillAiOptInFeature, - &kIPHAutofillBnplAffirmOrZipSuggestionFeature, + &kIPHAutofillAiValuablesFeature, @@ -336,7 +336,7 @@ const base::Feature* const kAllFeatures[] = { &kIPHScalableIphGamingFeature, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) &kIPHDesktopPWAsLinkCapturingLaunch, &kIPHDesktopPWAsLinkCapturingLaunchAppInTab, &kIPHSignInBenefitsFeature, diff --git a/www/iridium/files/patch-components_feature__engagement_public_feature__list.h b/www/iridium/files/patch-components_feature__engagement_public_feature__list.h index af9717230486..70a7b28fcac7 100644 --- a/www/iridium/files/patch-components_feature__engagement_public_feature__list.h +++ b/www/iridium/files/patch-components_feature__engagement_public_feature__list.h @@ -1,58 +1,58 @@ ---- components/feature_engagement/public/feature_list.h.orig 2025-11-12 18:20:14 UTC +--- components/feature_engagement/public/feature_list.h.orig 2025-12-10 15:04:57 UTC +++ components/feature_engagement/public/feature_list.h -@@ -357,7 +357,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSAIHubNewBadge, "IPH_iOSA +@@ -355,7 +355,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSAIHubNewBadge, "IPH_iOSA #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) DEFINE_VARIATION_PARAM(kEsbDownloadRowPromoFeature, "EsbDownloadRowPromo"); #endif -@@ -478,7 +478,8 @@ DEFINE_VARIATION_PARAM(kIPHTabGroupsSharedTabFeedbackF +@@ -476,7 +476,8 @@ DEFINE_VARIATION_PARAM(kIPHTabGroupsSharedTabFeedbackF // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) DEFINE_VARIATION_PARAM(kIPHAutofillAiOptInFeature, "IPH_AutofillAiOptIn"); - DEFINE_VARIATION_PARAM(kIPHAutofillBnplAffirmOrZipSuggestionFeature, - "IPH_AutofillBnplAffirmOrZipSuggestion"); + DEFINE_VARIATION_PARAM(kIPHAutofillAiValuablesFeature, + "IPH_AutofillAiValuables"); @@ -580,7 +581,7 @@ DEFINE_VARIATION_PARAM(kIPHScalableIphHelpAppBasedTenF DEFINE_VARIATION_PARAM(kIPHScalableIphGamingFeature, "IPH_ScalableIphGaming"); #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) DEFINE_VARIATION_PARAM(kIPHDesktopPWAsLinkCapturingLaunch, "IPH_DesktopPWAsLinkCapturingLaunch"); DEFINE_VARIATION_PARAM(kIPHDesktopPWAsLinkCapturingLaunchAppInTab, -@@ -782,7 +783,7 @@ inline constexpr flags_ui::FeatureEntry::FeatureVariat +@@ -781,7 +782,7 @@ inline constexpr flags_ui::FeatureEntry::FeatureVariat VARIATION_ENTRY(kIPHIOSPageActionMenu), VARIATION_ENTRY(kIPHiOSAIHubNewBadge), #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), -@@ -844,7 +845,8 @@ inline constexpr flags_ui::FeatureEntry::FeatureVariat +@@ -843,7 +844,8 @@ inline constexpr flags_ui::FeatureEntry::FeatureVariat // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) VARIATION_ENTRY(kIPHAutofillAiOptInFeature), + VARIATION_ENTRY(kIPHAutofillAiValuablesFeature), VARIATION_ENTRY(kIPHAutofillCreditCardBenefitFeature), - VARIATION_ENTRY(kIPHAutofillCardInfoRetrievalSuggestionFeature), @@ -899,7 +901,7 @@ inline constexpr flags_ui::FeatureEntry::FeatureVariat VARIATION_ENTRY(kIPHScalableIphGamingFeature), #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) VARIATION_ENTRY(kIPHDesktopPWAsLinkCapturingLaunch), VARIATION_ENTRY(kIPHDesktopPWAsLinkCapturingLaunchAppInTab), VARIATION_ENTRY(kIPHSignInBenefitsFeature), diff --git a/www/iridium/files/patch-components_feed_core_proto_v2_wire_version.proto b/www/iridium/files/patch-components_feed_core_proto_v2_wire_version.proto index b61a4e83a30e..696168e54b78 100644 --- a/www/iridium/files/patch-components_feed_core_proto_v2_wire_version.proto +++ b/www/iridium/files/patch-components_feed_core_proto_v2_wire_version.proto @@ -1,13 +1,13 @@ ---- components/feed/core/proto/v2/wire/version.proto.orig 2025-05-07 06:48:23 UTC +--- components/feed/core/proto/v2/wire/version.proto.orig 2025-12-10 15:04:57 UTC +++ components/feed/core/proto/v2/wire/version.proto @@ -25,8 +25,8 @@ message Version { BETA = 3; RELEASE = 4; } - optional int32 major = 1; - optional int32 minor = 2; + optional int32 gmajor = 1; + optional int32 gminor = 2; optional int32 build = 3; optional int32 revision = 4; optional Architecture architecture = 5; diff --git a/www/iridium/files/patch-components_feed_core_v2_feed__network__impl__unittest.cc b/www/iridium/files/patch-components_feed_core_v2_feed__network__impl__unittest.cc index e11c99951d9d..aff248524553 100644 --- a/www/iridium/files/patch-components_feed_core_v2_feed__network__impl__unittest.cc +++ b/www/iridium/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 2025-09-11 13:19:19 UTC +--- components/feed/core/v2/feed_network_impl_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ components/feed/core/v2/feed_network_impl_unittest.cc @@ -746,8 +746,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/iridium/files/patch-components_feed_core_v2_proto__util.cc b/www/iridium/files/patch-components_feed_core_v2_proto__util.cc index 9a5484b48ee9..7e47a3049357 100644 --- a/www/iridium/files/patch-components_feed_core_v2_proto__util.cc +++ b/www/iridium/files/patch-components_feed_core_v2_proto__util.cc @@ -1,24 +1,24 @@ ---- components/feed/core/v2/proto_util.cc.orig 2025-10-28 14:29:43 UTC +--- components/feed/core/v2/proto_util.cc.orig 2025-12-10 15:04:57 UTC +++ components/feed/core/v2/proto_util.cc @@ -92,8 +92,8 @@ feedwire::Version GetPlatformVersionMessage() { int32_t major, minor, revision; base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &revision); - result.set_major(major); - result.set_minor(minor); + result.set_gmajor(major); + result.set_gminor(minor); result.set_revision(revision); #if BUILDFLAG(IS_ANDROID) result.set_api_version(base::android::android_info::sdk_int()); @@ -108,8 +108,8 @@ feedwire::Version GetAppVersionMessage(const ChromeInf // Chrome's version is in the format: MAJOR,MINOR,BUILD,PATCH. const std::vector& numbers = chrome_info.version.components(); if (numbers.size() > 3) { - result.set_major(static_cast(numbers[0])); - result.set_minor(static_cast(numbers[1])); + result.set_gmajor(static_cast(numbers[0])); + result.set_gminor(static_cast(numbers[1])); result.set_build(static_cast(numbers[2])); result.set_revision(static_cast(numbers[3])); } diff --git a/www/iridium/files/patch-components_feed_core_v2_proto__util__unittest.cc b/www/iridium/files/patch-components_feed_core_v2_proto__util__unittest.cc index 85b25e7445be..a411ea966303 100644 --- a/www/iridium/files/patch-components_feed_core_v2_proto__util__unittest.cc +++ b/www/iridium/files/patch-components_feed_core_v2_proto__util__unittest.cc @@ -1,13 +1,13 @@ ---- components/feed/core/v2/proto_util_unittest.cc.orig 2025-09-11 13:19:19 UTC +--- components/feed/core/v2/proto_util_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ components/feed/core/v2/proto_util_unittest.cc @@ -42,8 +42,8 @@ TEST(ProtoUtilTest, CreateClientInfo) { feedwire::ClientInfo result = CreateClientInfo(request_metadata); EXPECT_EQ(feedwire::ClientInfo::CHROME_ANDROID, result.app_type()); EXPECT_EQ(feedwire::Version::RELEASE, result.app_version().build_type()); - EXPECT_EQ(1, result.app_version().major()); - EXPECT_EQ(2, result.app_version().minor()); + EXPECT_EQ(1, result.app_version().gmajor()); + EXPECT_EQ(2, result.app_version().gminor()); EXPECT_EQ(3, result.app_version().build()); EXPECT_EQ(4, result.app_version().revision()); diff --git a/www/iridium/files/patch-components_feed_core_v2_test_proto__printer.cc b/www/iridium/files/patch-components_feed_core_v2_test_proto__printer.cc index b59e148e147e..65cbd7b2719c 100644 --- a/www/iridium/files/patch-components_feed_core_v2_test_proto__printer.cc +++ b/www/iridium/files/patch-components_feed_core_v2_test_proto__printer.cc @@ -1,13 +1,13 @@ ---- components/feed/core/v2/test/proto_printer.cc.orig 2025-10-28 14:29:43 UTC +--- components/feed/core/v2/test/proto_printer.cc.orig 2025-12-10 15:04:57 UTC +++ components/feed/core/v2/test/proto_printer.cc @@ -159,8 +159,8 @@ class TextProtoPrinter { } TextProtoPrinter& operator<<(const feedwire::Version& v) { BeginMessage(); - PRINT_FIELD(major); - PRINT_FIELD(minor); + PRINT_FIELD(gmajor); + PRINT_FIELD(gminor); PRINT_FIELD(build); PRINT_FIELD(revision); PRINT_FIELD(architecture); diff --git a/www/iridium/files/patch-components_gcm__driver_gcm__desktop__utils.cc b/www/iridium/files/patch-components_gcm__driver_gcm__desktop__utils.cc index 3a6f51117ca6..9bb2755c80b0 100644 --- a/www/iridium/files/patch-components_gcm__driver_gcm__desktop__utils.cc +++ b/www/iridium/files/patch-components_gcm__driver_gcm__desktop__utils.cc @@ -1,11 +1,11 @@ ---- components/gcm_driver/gcm_desktop_utils.cc.orig 2025-05-07 06:48:23 UTC +--- components/gcm_driver/gcm_desktop_utils.cc.orig 2025-12-10 15:04:57 UTC +++ components/gcm_driver/gcm_desktop_utils.cc @@ -32,7 +32,7 @@ GCMClient::ChromePlatform GetPlatform() { return GCMClient::PLATFORM_ANDROID; #elif BUILDFLAG(IS_CHROMEOS) return GCMClient::PLATFORM_CROS; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return GCMClient::PLATFORM_LINUX; #else // For all other platforms, return as LINUX. diff --git a/www/iridium/files/patch-components_gwp__asan_BUILD.gn b/www/iridium/files/patch-components_gwp__asan_BUILD.gn index 5708bee18d8e..7a8a0008aff6 100644 --- a/www/iridium/files/patch-components_gwp__asan_BUILD.gn +++ b/www/iridium/files/patch-components_gwp__asan_BUILD.gn @@ -1,11 +1,11 @@ ---- components/gwp_asan/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- components/gwp_asan/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ components/gwp_asan/BUILD.gn @@ -15,7 +15,7 @@ test("gwp_asan_unittests") { "//testing/gtest", "//third_party/boringssl", ] - if (is_win || is_mac || is_linux || is_chromeos || is_android || is_ios) { + if ((is_win || is_mac || is_linux || is_chromeos || is_android || is_ios) && !is_bsd) { deps += [ "//components/gwp_asan/client:unit_tests", "//components/gwp_asan/crash_handler:unit_tests", diff --git a/www/iridium/files/patch-components_gwp__asan_buildflags_buildflags.gni b/www/iridium/files/patch-components_gwp__asan_buildflags_buildflags.gni index d8533c2d1fb9..737205ef719f 100644 --- a/www/iridium/files/patch-components_gwp__asan_buildflags_buildflags.gni +++ b/www/iridium/files/patch-components_gwp__asan_buildflags_buildflags.gni @@ -1,16 +1,16 @@ ---- components/gwp_asan/buildflags/buildflags.gni.orig 2025-11-06 10:11:34 UTC +--- components/gwp_asan/buildflags/buildflags.gni.orig 2025-12-10 15:04:57 UTC +++ components/gwp_asan/buildflags/buildflags.gni @@ -11,10 +11,10 @@ import("//build/config/compiler/compiler.gni") # Android requires frame pointers for unwinding, unwind tables aren't shipped in # official builds. # iOS is disabled when !use_partition_alloc due to https://crbug.com/446856826 -supported_platform = - is_linux || is_chromeos || is_mac || (is_ios && use_partition_alloc) || +supported_platform = !is_bsd && + (is_linux || is_chromeos || is_mac || (is_ios && use_partition_alloc) || (is_win && (current_cpu == "x64" || current_cpu == "arm64")) || - (is_android && !is_component_build && enable_frame_pointers) + (is_android && !is_component_build && enable_frame_pointers)) declare_args() { # Is GWP-ASan malloc/PartitionAlloc hooking enabled for chrome/ on a given diff --git a/www/iridium/files/patch-components_gwp__asan_client_guarded__page__allocator__posix.cc b/www/iridium/files/patch-components_gwp__asan_client_guarded__page__allocator__posix.cc index 70e96b569893..78b07fa5a80b 100644 --- a/www/iridium/files/patch-components_gwp__asan_client_guarded__page__allocator__posix.cc +++ b/www/iridium/files/patch-components_gwp__asan_client_guarded__page__allocator__posix.cc @@ -1,13 +1,13 @@ ---- components/gwp_asan/client/guarded_page_allocator_posix.cc.orig 2025-05-07 06:48:23 UTC +--- components/gwp_asan/client/guarded_page_allocator_posix.cc.orig 2025-12-10 15:04:57 UTC +++ components/gwp_asan/client/guarded_page_allocator_posix.cc @@ -35,8 +35,9 @@ void GuardedPageAllocator::MarkPageInaccessible(void* // mmap() a PROT_NONE page over the address to release it to the system, if // we used mprotect() here the system would count pages in the quarantine // against the RSS. + // MAP_ANONYMOUS requires the fd to be -1 on !linux void* err = mmap(ptr, state_.page_size, PROT_NONE, - MAP_FIXED | MAP_ANONYMOUS | MAP_PRIVATE, 0, 0); + MAP_FIXED | MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); PCHECK(err == ptr) << "mmap"; } diff --git a/www/iridium/files/patch-components_gwp__asan_client_gwp__asan.cc b/www/iridium/files/patch-components_gwp__asan_client_gwp__asan.cc index 830dd5f33e03..667a712dd297 100644 --- a/www/iridium/files/patch-components_gwp__asan_client_gwp__asan.cc +++ b/www/iridium/files/patch-components_gwp__asan_client_gwp__asan.cc @@ -1,11 +1,11 @@ ---- components/gwp_asan/client/gwp_asan.cc.orig 2025-09-11 13:19:19 UTC +--- components/gwp_asan/client/gwp_asan.cc.orig 2025-12-10 15:04:57 UTC +++ components/gwp_asan/client/gwp_asan.cc @@ -81,7 +81,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/iridium/files/patch-components_gwp__asan_client_gwp__asan__features.cc b/www/iridium/files/patch-components_gwp__asan_client_gwp__asan__features.cc index 34d97e4309ba..298327165f9c 100644 --- a/www/iridium/files/patch-components_gwp__asan_client_gwp__asan__features.cc +++ b/www/iridium/files/patch-components_gwp__asan_client_gwp__asan__features.cc @@ -1,20 +1,20 @@ ---- components/gwp_asan/client/gwp_asan_features.cc.orig 2025-09-11 13:19:19 UTC +--- components/gwp_asan/client/gwp_asan_features.cc.orig 2025-12-10 15:04:57 UTC +++ components/gwp_asan/client/gwp_asan_features.cc @@ -9,7 +9,7 @@ namespace gwp_asan::internal { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || \ + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS)) constexpr base::FeatureState kDefaultEnabled = base::FEATURE_ENABLED_BY_DEFAULT; #else @@ -72,7 +72,7 @@ GWP_ASAN_EXPORT extern const base::FeatureParam kGwpAsanMallocGpuAllocationSamplingRange{&kGwpAsanMalloc, "GpuAllocationSamplingRange", 16}; -#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Browser reservation params. GWP_ASAN_EXPORT extern const base::FeatureParam diff --git a/www/iridium/files/patch-components_gwp__asan_crash__handler_crash__analyzer.cc b/www/iridium/files/patch-components_gwp__asan_crash__handler_crash__analyzer.cc index 66055b4cfcaf..b8b18b054ba3 100644 --- a/www/iridium/files/patch-components_gwp__asan_crash__handler_crash__analyzer.cc +++ b/www/iridium/files/patch-components_gwp__asan_crash__handler_crash__analyzer.cc @@ -1,20 +1,20 @@ ---- components/gwp_asan/crash_handler/crash_analyzer.cc.orig 2025-05-07 06:48:23 UTC +--- components/gwp_asan/crash_handler/crash_analyzer.cc.orig 2025-12-10 15:04:57 UTC +++ components/gwp_asan/crash_handler/crash_analyzer.cc -@@ -35,7 +35,7 @@ +@@ -36,7 +36,7 @@ #include "third_party/crashpad/crashpad/snapshot/process_snapshot.h" #include "third_party/crashpad/crashpad/util/process/process_memory.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include #elif BUILDFLAG(IS_APPLE) #include -@@ -113,7 +113,7 @@ bool CrashAnalyzer::GetExceptionInfo( +@@ -114,7 +114,7 @@ bool CrashAnalyzer::GetExceptionInfo( crashpad::VMAddress CrashAnalyzer::GetAccessAddress( const crashpad::ExceptionSnapshot& exception) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) if (exception.Exception() == SIGSEGV || exception.Exception() == SIGBUS) return exception.ExceptionAddress(); #elif BUILDFLAG(IS_APPLE) diff --git a/www/iridium/files/patch-components_live__caption_caption__util.cc b/www/iridium/files/patch-components_live__caption_caption__util.cc index 2dea298ec855..3185676516a6 100644 --- a/www/iridium/files/patch-components_live__caption_caption__util.cc +++ b/www/iridium/files/patch-components_live__caption_caption__util.cc @@ -1,11 +1,11 @@ ---- components/live_caption/caption_util.cc.orig 2025-11-06 10:11:34 UTC +--- components/live_caption/caption_util.cc.orig 2025-12-10 15:04:57 UTC +++ components/live_caption/caption_util.cc @@ -139,7 +139,7 @@ bool IsHeadlessCaptionFeatureSupported() { std::string GetCaptionSettingsUrl() { #if BUILDFLAG(IS_CHROMEOS) return "chrome://os-settings/audioAndCaptions"; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return "chrome://settings/captions"; #elif BUILDFLAG(IS_WIN) return base::win::GetVersion() >= base::win::Version::WIN10 diff --git a/www/iridium/files/patch-components_live__caption_caption__util.h b/www/iridium/files/patch-components_live__caption_caption__util.h index 9e5d16635e4c..138793145848 100644 --- a/www/iridium/files/patch-components_live__caption_caption__util.h +++ b/www/iridium/files/patch-components_live__caption_caption__util.h @@ -1,11 +1,11 @@ ---- components/live_caption/caption_util.h.orig 2025-05-07 06:48:23 UTC +--- components/live_caption/caption_util.h.orig 2025-12-10 15:04:57 UTC +++ components/live_caption/caption_util.h @@ -15,7 +15,7 @@ class PrefService; namespace captions { #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kCaptionSettingsUrl[]; #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_MAC) diff --git a/www/iridium/files/patch-components_media__router_common_media__source.cc b/www/iridium/files/patch-components_media__router_common_media__source.cc index 8c74914627e6..a801144cbd12 100644 --- a/www/iridium/files/patch-components_media__router_common_media__source.cc +++ b/www/iridium/files/patch-components_media__router_common_media__source.cc @@ -1,11 +1,11 @@ ---- components/media_router/common/media_source.cc.orig 2025-09-11 13:19:19 UTC +--- components/media_router/common/media_source.cc.orig 2025-12-10 15:04:57 UTC +++ components/media_router/common/media_source.cc @@ -62,7 +62,7 @@ bool IsSystemAudioCaptureSupported() { #if BUILDFLAG(IS_MAC) return media::IsMacSckSystemLoopbackCaptureSupported() || base::FeatureList::IsEnabled(media::kMacCatapLoopbackAudioForCast); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled(media::kPulseaudioLoopbackForCast); #else return true; diff --git a/www/iridium/files/patch-components_media__router_common_providers_cast_channel_cast__message__util.cc b/www/iridium/files/patch-components_media__router_common_providers_cast_channel_cast__message__util.cc index 673144016b92..3b16ab27e966 100644 --- a/www/iridium/files/patch-components_media__router_common_providers_cast_channel_cast__message__util.cc +++ b/www/iridium/files/patch-components_media__router_common_providers_cast_channel_cast__message__util.cc @@ -1,11 +1,11 @@ ---- components/media_router/common/providers/cast/channel/cast_message_util.cc.orig 2025-05-07 06:48:23 UTC +--- components/media_router/common/providers/cast/channel/cast_message_util.cc.orig 2025-12-10 15:04:57 UTC +++ components/media_router/common/providers/cast/channel/cast_message_util.cc @@ -168,7 +168,7 @@ int GetVirtualConnectPlatformValue() { return 4; #elif BUILDFLAG(IS_CHROMEOS) return 5; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return 6; #else return 0; diff --git a/www/iridium/files/patch-components_media__router_common_providers_cast_channel_enum__table.h b/www/iridium/files/patch-components_media__router_common_providers_cast_channel_enum__table.h index 00cd65b88c55..bb800b9c5a55 100644 --- a/www/iridium/files/patch-components_media__router_common_providers_cast_channel_enum__table.h +++ b/www/iridium/files/patch-components_media__router_common_providers_cast_channel_enum__table.h @@ -1,15 +1,15 @@ ---- components/media_router/common/providers/cast/channel/enum_table.h.orig 2025-05-07 06:48:23 UTC +--- components/media_router/common/providers/cast/channel/enum_table.h.orig 2025-12-10 15:04:57 UTC +++ components/media_router/common/providers/cast/channel/enum_table.h @@ -368,7 +368,12 @@ class EnumTable { private: #ifdef ARCH_CPU_64_BITS +#ifdef __cpp_lib_hardware_interference_size alignas(std::hardware_destructive_interference_size) +#else + static constexpr std::size_t hardware_destructive_interference_size = 64; + alignas(hardware_destructive_interference_size) +#endif #endif std::initializer_list data_; bool is_sorted_; diff --git a/www/iridium/files/patch-components_metrics_drive__metrics__provider.cc b/www/iridium/files/patch-components_metrics_drive__metrics__provider.cc index f7960e91a398..a74b1ea1b88e 100644 --- a/www/iridium/files/patch-components_metrics_drive__metrics__provider.cc +++ b/www/iridium/files/patch-components_metrics_drive__metrics__provider.cc @@ -1,20 +1,20 @@ ---- components/metrics/drive_metrics_provider.cc.orig 2025-05-07 06:48:23 UTC +--- components/metrics/drive_metrics_provider.cc.orig 2025-12-10 15:04:57 UTC +++ components/metrics/drive_metrics_provider.cc @@ -21,7 +21,7 @@ namespace metrics { namespace { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void RecordTriStateMetric(const char* name, std::optional sample) { base::UmaHistogramEnumeration( name, !sample.has_value() @@ -106,7 +106,7 @@ void DriveMetricsProvider::FillDriveMetrics( drive->set_has_seek_penalty(*response.has_seek_penalty); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) RecordTriStateMetric("UMA.DriveIsRemovableResult", response.is_removable); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) diff --git a/www/iridium/files/patch-components_metrics_dwa_dwa__service.cc b/www/iridium/files/patch-components_metrics_dwa_dwa__service.cc index d1d96f8fd618..7b1e95ff5669 100644 --- a/www/iridium/files/patch-components_metrics_dwa_dwa__service.cc +++ b/www/iridium/files/patch-components_metrics_dwa_dwa__service.cc @@ -1,11 +1,11 @@ ---- components/metrics/dwa/dwa_service.cc.orig 2025-11-06 10:11:34 UTC +--- components/metrics/dwa/dwa_service.cc.orig 2025-12-10 15:04:57 UTC +++ components/metrics/dwa/dwa_service.cc -@@ -243,7 +243,7 @@ void DwaService::RecordCoarseSystemInformation( +@@ -244,7 +244,7 @@ void DwaService::RecordCoarseSystemInformation( coarse_system_info->set_platform(::dwa::CoarseSystemInfo::PLATFORM_WINDOWS); #elif BUILDFLAG(IS_MAC) coarse_system_info->set_platform(::dwa::CoarseSystemInfo::PLATFORM_MACOS); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) coarse_system_info->set_platform(::dwa::CoarseSystemInfo::PLATFORM_LINUX); #elif BUILDFLAG(IS_ANDROID) // TODO(b/366276323): Populate set_platform using more granular diff --git a/www/iridium/files/patch-components_metrics_metrics__log.cc b/www/iridium/files/patch-components_metrics_metrics__log.cc index d621c1539fa8..df38144733d9 100644 --- a/www/iridium/files/patch-components_metrics_metrics__log.cc +++ b/www/iridium/files/patch-components_metrics_metrics__log.cc @@ -1,38 +1,38 @@ ---- components/metrics/metrics_log.cc.orig 2025-10-28 14:29:43 UTC +--- components/metrics/metrics_log.cc.orig 2025-12-10 15:04:57 UTC +++ components/metrics/metrics_log.cc @@ -59,7 +59,7 @@ #include "base/win/current_module.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/environment.h" #include "base/nix/xdg_util.h" #endif @@ -155,7 +155,7 @@ void RecordCurrentTime( } } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) metrics::SystemProfileProto::OS::XdgSessionType ToProtoSessionType( base::nix::SessionType session_type) { switch (session_type) { @@ -447,7 +447,7 @@ void MetricsLog::RecordCoreSystemProfile( // OperatingSystemVersion refers to the ChromeOS release version. #if BUILDFLAG(IS_CHROMEOS) os->set_kernel_version(base::SysInfo::KernelVersion()); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Linux operating system version is copied over into kernel version to be // consistent. os->set_kernel_version(base::SysInfo::OperatingSystemVersion()); @@ -464,7 +464,7 @@ void MetricsLog::RecordCoreSystemProfile( os->set_build_number(base::SysInfo::GetIOSBuildNumber()); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr env = base::Environment::Create(); os->set_xdg_session_type(ToProtoSessionType(base::nix::GetSessionType(*env))); os->set_xdg_current_desktop( diff --git a/www/iridium/files/patch-components_metrics_motherboard.cc b/www/iridium/files/patch-components_metrics_motherboard.cc index 97d8e15344b7..9d4cc66feae4 100644 --- a/www/iridium/files/patch-components_metrics_motherboard.cc +++ b/www/iridium/files/patch-components_metrics_motherboard.cc @@ -1,10 +1,10 @@ ---- components/metrics/motherboard.cc.orig 2025-05-07 06:48:23 UTC +--- components/metrics/motherboard.cc.orig 2025-12-10 15:04:57 UTC +++ components/metrics/motherboard.cc @@ -1,6 +1,7 @@ // Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// CHECK #include "components/metrics/motherboard.h" diff --git a/www/iridium/files/patch-components_named__mojo__ipc__server_connection__info.h b/www/iridium/files/patch-components_named__mojo__ipc__server_connection__info.h index ccb7c2eaa7f2..9c508fd6da42 100644 --- a/www/iridium/files/patch-components_named__mojo__ipc__server_connection__info.h +++ b/www/iridium/files/patch-components_named__mojo__ipc__server_connection__info.h @@ -1,23 +1,23 @@ ---- components/named_mojo_ipc_server/connection_info.h.orig 2025-05-07 06:48:23 UTC +--- components/named_mojo_ipc_server/connection_info.h.orig 2025-12-10 15:04:57 UTC +++ components/named_mojo_ipc_server/connection_info.h @@ -12,7 +12,10 @@ #include "base/win/scoped_handle.h" #elif BUILDFLAG(IS_MAC) #include -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) +#if BUILDFLAG(IS_OPENBSD) +#include +#endif #include #endif @@ -29,7 +32,7 @@ struct ConnectionInfo { base::ProcessId pid{}; #if BUILDFLAG(IS_MAC) audit_token_t audit_token{}; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) ucred credentials{}; #endif }; diff --git a/www/iridium/files/patch-components_named__mojo__ipc__server_named__mojo__ipc__server__client__util.cc b/www/iridium/files/patch-components_named__mojo__ipc__server_named__mojo__ipc__server__client__util.cc index 0194cf3c429b..a04f8fd80769 100644 --- a/www/iridium/files/patch-components_named__mojo__ipc__server_named__mojo__ipc__server__client__util.cc +++ b/www/iridium/files/patch-components_named__mojo__ipc__server_named__mojo__ipc__server__client__util.cc @@ -1,11 +1,11 @@ ---- components/named_mojo_ipc_server/named_mojo_ipc_server_client_util.cc.orig 2025-05-07 06:48:23 UTC +--- components/named_mojo_ipc_server/named_mojo_ipc_server_client_util.cc.orig 2025-12-10 15:04:57 UTC +++ components/named_mojo_ipc_server/named_mojo_ipc_server_client_util.cc @@ -23,7 +23,7 @@ namespace named_mojo_ipc_server { // static mojo::PlatformChannelEndpoint ConnectToServer( const mojo::NamedPlatformChannel::ServerName& server_name) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return mojo::NamedPlatformChannel::ConnectToServer(server_name); #elif BUILDFLAG(IS_MAC) mojo::PlatformChannelEndpoint endpoint = diff --git a/www/iridium/files/patch-components_named__mojo__ipc__server_named__mojo__server__endpoint__connector__linux.cc b/www/iridium/files/patch-components_named__mojo__ipc__server_named__mojo__server__endpoint__connector__linux.cc index 9bb8fde27624..622486a71d93 100644 --- a/www/iridium/files/patch-components_named__mojo__ipc__server_named__mojo__server__endpoint__connector__linux.cc +++ b/www/iridium/files/patch-components_named__mojo__ipc__server_named__mojo__server__endpoint__connector__linux.cc @@ -1,12 +1,12 @@ ---- components/named_mojo_ipc_server/named_mojo_server_endpoint_connector_linux.cc.orig 2025-05-07 06:48:23 UTC +--- components/named_mojo_ipc_server/named_mojo_server_endpoint_connector_linux.cc.orig 2025-12-10 15:04:57 UTC +++ components/named_mojo_ipc_server/named_mojo_server_endpoint_connector_linux.cc @@ -89,7 +89,9 @@ void NamedMojoServerEndpointConnectorLinux::OnSocketRe PLOG(ERROR) << "getsockopt failed."; return; } +#if !BUILDFLAG(IS_OPENBSD) info->pid = info->credentials.pid; +#endif mojo::PlatformChannelEndpoint endpoint( mojo::PlatformHandle(std::move(connection_fd))); diff --git a/www/iridium/files/patch-components_named__system__lock_BUILD.gn b/www/iridium/files/patch-components_named__system__lock_BUILD.gn index d394c51afa9a..62aaacef0d77 100644 --- a/www/iridium/files/patch-components_named__system__lock_BUILD.gn +++ b/www/iridium/files/patch-components_named__system__lock_BUILD.gn @@ -1,20 +1,20 @@ ---- components/named_system_lock/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- components/named_system_lock/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ components/named_system_lock/BUILD.gn @@ -5,7 +5,7 @@ static_library("named_system_lock") { sources = [ "lock.h" ] deps = [ "//base" ] - if (is_linux) { + if (!is_bsd && is_linux) { sources += [ "lock_linux.cc" ] } else if (is_mac) { sources += [ "lock_mac.mm" ] @@ -20,7 +20,7 @@ source_set("unit_tests") { sources = [] # Disable NamedSystemLockTest on unsupported platforms. - if (is_linux || is_win || is_mac) { + if (!is_bsd && (is_linux || is_win || is_mac)) { sources += [ "lock_unittest.cc" ] } diff --git a/www/iridium/files/patch-components_named__system__lock_lock.h b/www/iridium/files/patch-components_named__system__lock_lock.h index 8af8064d58f4..e01b1d86efc6 100644 --- a/www/iridium/files/patch-components_named__system__lock_lock.h +++ b/www/iridium/files/patch-components_named__system__lock_lock.h @@ -1,11 +1,11 @@ ---- components/named_system_lock/lock.h.orig 2025-05-07 06:48:23 UTC +--- components/named_system_lock/lock.h.orig 2025-12-10 15:04:57 UTC +++ components/named_system_lock/lock.h @@ -38,7 +38,7 @@ class ScopedLock { // may acquire that lock. The lock name has different meanings per platform: // Linux: A shared memory object name starting with `/`. E.g. `/MyApp.lock`. // Mac: A bootstrap service name (see `man bootstrap_check_in`). -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) static std::unique_ptr Create(const std::string& name, base::TimeDelta timeout); #elif BUILDFLAG(IS_WIN) diff --git a/www/iridium/files/patch-components_named__system__lock_lock__unittest.cc b/www/iridium/files/patch-components_named__system__lock_lock__unittest.cc index 4f960d6e9c1b..f072f3002bb9 100644 --- a/www/iridium/files/patch-components_named__system__lock_lock__unittest.cc +++ b/www/iridium/files/patch-components_named__system__lock_lock__unittest.cc @@ -1,29 +1,29 @@ ---- components/named_system_lock/lock_unittest.cc.orig 2025-05-07 06:48:23 UTC +--- components/named_system_lock/lock_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ components/named_system_lock/lock_unittest.cc @@ -18,7 +18,7 @@ #include "build/build_config.h" #include "testing/gtest/include/gtest/gtest.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include #include @@ -45,7 +45,7 @@ class NamedSystemLockTest : public ::testing::Test { const std::string lock_name_ = base::UnguessableToken::Create().ToString(); std::unique_ptr CreateLock() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return ScopedLock::Create(lock_name_, base::Seconds(0)); #else CSecurityAttributes sa; @@ -95,7 +95,7 @@ TEST_F(NamedSystemLockTest, TryLockInThreadSuccess) { EXPECT_TRUE(CreateLock()); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) TEST_F(NamedSystemLockTest, SharedMemoryWrongPermissions) { // Create a shared memory region with overpermissive perms. int shm_fd = shm_open(lock_name_.c_str(), O_RDWR | O_CREAT | O_EXCL, diff --git a/www/iridium/files/patch-components_ntp__tiles_pref__names.h b/www/iridium/files/patch-components_ntp__tiles_pref__names.h index 2dfccb9fa967..6325be42002c 100644 --- a/www/iridium/files/patch-components_ntp__tiles_pref__names.h +++ b/www/iridium/files/patch-components_ntp__tiles_pref__names.h @@ -1,11 +1,11 @@ ---- components/ntp_tiles/pref_names.h.orig 2025-10-28 14:29:43 UTC +--- components/ntp_tiles/pref_names.h.orig 2025-12-10 15:04:57 UTC +++ components/ntp_tiles/pref_names.h -@@ -48,7 +48,7 @@ inline constexpr char kCustomLinksInitialized[] = "cus +@@ -49,7 +49,7 @@ inline constexpr char kCustomLinksInitialized[] = "cus // Prefs used to cache enterprise shortcuts. #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) inline constexpr char kEnterpriseShortcutsPolicyList[] = "enterprise_shortcuts.policy_list"; inline constexpr char kEnterpriseShortcutsUserList[] = diff --git a/www/iridium/files/patch-components_optimization__guide_core_feature__registry_feature__registration.cc b/www/iridium/files/patch-components_optimization__guide_core_feature__registry_feature__registration.cc index 36d01d168a8a..331fc4f384a2 100644 --- a/www/iridium/files/patch-components_optimization__guide_core_feature__registry_feature__registration.cc +++ b/www/iridium/files/patch-components_optimization__guide_core_feature__registry_feature__registration.cc @@ -1,11 +1,11 @@ ---- components/optimization_guide/core/feature_registry/feature_registration.cc.orig 2025-11-06 10:11:34 UTC +--- components/optimization_guide/core/feature_registry/feature_registration.cc.orig 2025-12-10 15:04:57 UTC +++ components/optimization_guide/core/feature_registry/feature_registration.cc -@@ -65,7 +65,7 @@ BASE_FEATURE(kProductSpecificationsMqlsLogging, +@@ -67,7 +67,7 @@ BASE_FEATURE(kProductSpecificationsMqlsLogging, BASE_FEATURE(kFormsClassificationsMqlsLogging, BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) ? base::FEATURE_ENABLED_BY_DEFAULT : base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/www/iridium/files/patch-components_optimization__guide_core_optimization__guide__features.cc b/www/iridium/files/patch-components_optimization__guide_core_optimization__guide__features.cc index 67a531eeb9bd..9f85a62351de 100644 --- a/www/iridium/files/patch-components_optimization__guide_core_optimization__guide__features.cc +++ b/www/iridium/files/patch-components_optimization__guide_core_optimization__guide__features.cc @@ -1,11 +1,11 @@ ---- components/optimization_guide/core/optimization_guide_features.cc.orig 2025-11-06 10:11:34 UTC +--- components/optimization_guide/core/optimization_guide_features.cc.orig 2025-12-10 15:04:57 UTC +++ components/optimization_guide/core/optimization_guide_features.cc -@@ -104,7 +104,7 @@ BASE_FEATURE(kOptimizationGuideModelExecution, +@@ -98,7 +98,7 @@ BASE_FEATURE(kOptimizationGuideModelExecution, // Whether to use the on device model service in optimization guide. BASE_FEATURE(kOptimizationGuideOnDeviceModel, #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); diff --git a/www/iridium/files/patch-components_optimization__guide_core_optimization__guide__util.cc b/www/iridium/files/patch-components_optimization__guide_core_optimization__guide__util.cc index ddc32d2bb38a..2d88b0b49340 100644 --- a/www/iridium/files/patch-components_optimization__guide_core_optimization__guide__util.cc +++ b/www/iridium/files/patch-components_optimization__guide_core_optimization__guide__util.cc @@ -1,11 +1,11 @@ ---- components/optimization_guide/core/optimization_guide_util.cc.orig 2025-05-07 06:48:23 UTC +--- components/optimization_guide/core/optimization_guide_util.cc.orig 2025-12-10 15:04:57 UTC +++ components/optimization_guide/core/optimization_guide_util.cc @@ -37,7 +37,7 @@ optimization_guide::proto::Platform GetPlatform() { return optimization_guide::proto::PLATFORM_CHROMEOS; #elif BUILDFLAG(IS_ANDROID) return optimization_guide::proto::PLATFORM_ANDROID; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return optimization_guide::proto::PLATFORM_LINUX; #else return optimization_guide::proto::PLATFORM_UNDEFINED; diff --git a/www/iridium/files/patch-components_os__crypt_async_browser_secret__portal__key__provider.cc b/www/iridium/files/patch-components_os__crypt_async_browser_secret__portal__key__provider.cc index 6b4fdec9eaba..c2a700bbc7d4 100644 --- a/www/iridium/files/patch-components_os__crypt_async_browser_secret__portal__key__provider.cc +++ b/www/iridium/files/patch-components_os__crypt_async_browser_secret__portal__key__provider.cc @@ -1,12 +1,12 @@ ---- components/os_crypt/async/browser/secret_portal_key_provider.cc.orig 2025-05-07 06:48:23 UTC +--- components/os_crypt/async/browser/secret_portal_key_provider.cc.orig 2025-12-10 15:04:57 UTC +++ components/os_crypt/async/browser/secret_portal_key_provider.cc @@ -5,7 +5,9 @@ #include "components/os_crypt/async/browser/secret_portal_key_provider.h" #include +#if BUILDFLAG(IS_LINUX) #include +#endif #include #include diff --git a/www/iridium/files/patch-components_os__crypt_sync_libsecret__util__linux.cc b/www/iridium/files/patch-components_os__crypt_sync_libsecret__util__linux.cc index 8e1f2be0c640..0e101037ec7d 100644 --- a/www/iridium/files/patch-components_os__crypt_sync_libsecret__util__linux.cc +++ b/www/iridium/files/patch-components_os__crypt_sync_libsecret__util__linux.cc @@ -1,27 +1,27 @@ ---- components/os_crypt/sync/libsecret_util_linux.cc.orig 2025-10-28 14:29:43 UTC +--- components/os_crypt/sync/libsecret_util_linux.cc.orig 2025-12-10 15:04:57 UTC +++ components/os_crypt/sync/libsecret_util_linux.cc -@@ -182,16 +182,22 @@ bool LibsecretLoader::EnsureLibsecretLoaded() { +@@ -184,16 +184,22 @@ bool LibsecretLoader::EnsureLibsecretLoaded() { // static bool LibsecretLoader::LoadLibsecret() { +#if BUILDFLAG(IS_BSD) + const char* kSecretLib = "libsecret-1.so"; +#else + const char* kSecretLib = "libsecret-1.so.0"; +#endif + if (libsecret_loaded_) return true; - static void* handle = dlopen("libsecret-1.so.0", RTLD_NOW | RTLD_GLOBAL); + static void* handle = dlopen(kSecretLib, RTLD_NOW | RTLD_GLOBAL); if (!handle) { // We wanted to use libsecret, but we couldn't load it. Warn, because // either the user asked for this, or we autodetected it incorrectly. (Or // the system has broken libraries, which is also good to warn about.) // TODO(crbug.com/40467093): Channel this message to the user-facing log - VLOG(1) << "Could not load libsecret-1.so.0: " << dlerror(); + VLOG(1) << "Could not load " << kSecretLib << ": " << dlerror(); return false; } diff --git a/www/iridium/files/patch-components_os__crypt_sync_os__crypt.h b/www/iridium/files/patch-components_os__crypt_sync_os__crypt.h index a2266b6e10fa..5e31f7837cb5 100644 --- a/www/iridium/files/patch-components_os__crypt_sync_os__crypt.h +++ b/www/iridium/files/patch-components_os__crypt_sync_os__crypt.h @@ -1,63 +1,63 @@ ---- components/os_crypt/sync/os_crypt.h.orig 2025-09-11 13:19:19 UTC +--- components/os_crypt/sync/os_crypt.h.orig 2025-12-10 15:04:57 UTC +++ components/os_crypt/sync/os_crypt.h -@@ -23,7 +23,7 @@ class Keychain; +@@ -28,7 +28,7 @@ class Keychain; } #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class KeyStorageLinux; #endif // BUILDFLAG(IS_LINUX) -@@ -39,7 +39,7 @@ struct Config; +@@ -44,7 +44,7 @@ struct Config; // Temporary interface due to OSCrypt refactor. See OSCryptImpl for descriptions // of what each function does. namespace OSCrypt { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(OS_CRYPT) void SetConfig(std::unique_ptr config); #endif // BUILDFLAG(IS_LINUX) -@@ -84,7 +84,7 @@ COMPONENT_EXPORT(OS_CRYPT) void UseMockKeyForTesting(b +@@ -91,7 +91,7 @@ COMPONENT_EXPORT(OS_CRYPT) void UseMockKeyForTesting(b COMPONENT_EXPORT(OS_CRYPT) void SetLegacyEncryptionForTesting(bool legacy); COMPONENT_EXPORT(OS_CRYPT) void ResetStateForTesting(); #endif // BUILDFLAG(IS_WIN) -#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(OS_CRYPT) void UseMockKeyStorageForTesting( base::OnceCallback()> -@@ -118,7 +118,7 @@ class COMPONENT_EXPORT(OS_CRYPT) OSCryptImpl { +@@ -125,7 +125,7 @@ class COMPONENT_EXPORT(OS_CRYPT) OSCryptImpl { // Returns singleton instance of OSCryptImpl. static OSCryptImpl* GetInstance(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Set the configuration of OSCryptImpl. // This method, or SetRawEncryptionKey(), must be called before using // EncryptString() and DecryptString(). -@@ -214,7 +214,7 @@ class COMPONENT_EXPORT(OS_CRYPT) OSCryptImpl { +@@ -217,7 +217,7 @@ class COMPONENT_EXPORT(OS_CRYPT) OSCryptImpl { void ResetStateForTesting(); #endif -#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD) // For unit testing purposes, inject methods to be used. // |storage_provider_factory| provides the desired |KeyStorage| // implementation. If the provider returns |nullptr|, a hardcoded password -@@ -241,13 +241,13 @@ class COMPONENT_EXPORT(OS_CRYPT) OSCryptImpl { +@@ -244,13 +244,13 @@ class COMPONENT_EXPORT(OS_CRYPT) OSCryptImpl { bool DeriveKey(); #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) // This lock is used to make the GetEncryptionKey and // GetRawEncryptionKey methods thread-safe. static base::Lock& GetLock(); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) static constexpr size_t kDerivedKeyBytes = 16; crypto::SubtlePassKey MakeCryptoPassKey(); diff --git a/www/iridium/files/patch-components_paint__preview_browser_paint__preview__client.cc b/www/iridium/files/patch-components_paint__preview_browser_paint__preview__client.cc index 63f858e1385e..e7d039c66b73 100644 --- a/www/iridium/files/patch-components_paint__preview_browser_paint__preview__client.cc +++ b/www/iridium/files/patch-components_paint__preview_browser_paint__preview__client.cc @@ -1,13 +1,13 @@ ---- components/paint_preview/browser/paint_preview_client.cc.orig 2025-11-06 10:11:34 UTC +--- components/paint_preview/browser/paint_preview_client.cc.orig 2025-12-10 15:04:57 UTC +++ components/paint_preview/browser/paint_preview_client.cc @@ -464,8 +464,8 @@ void PaintPreviewClient::CapturePaintPreview( metadata->set_version(kPaintPreviewVersion); auto* chromeVersion = metadata->mutable_chrome_version(); const auto& current_chrome_version = version_info::GetVersion(); - chromeVersion->set_major(current_chrome_version.components()[0]); - chromeVersion->set_minor(current_chrome_version.components()[1]); + chromeVersion->set_gmajor(current_chrome_version.components()[0]); + chromeVersion->set_gminor(current_chrome_version.components()[1]); chromeVersion->set_build(current_chrome_version.components()[2]); chromeVersion->set_patch(current_chrome_version.components()[3]); document_data.callback = base::BindOnce( diff --git a/www/iridium/files/patch-components_paint__preview_browser_paint__preview__client__unittest.cc b/www/iridium/files/patch-components_paint__preview_browser_paint__preview__client__unittest.cc index 790b8b8c81c1..1e504bc5e9ea 100644 --- a/www/iridium/files/patch-components_paint__preview_browser_paint__preview__client__unittest.cc +++ b/www/iridium/files/patch-components_paint__preview_browser_paint__preview__client__unittest.cc @@ -1,13 +1,13 @@ ---- components/paint_preview/browser/paint_preview_client_unittest.cc.orig 2025-10-28 14:29:43 UTC +--- components/paint_preview/browser/paint_preview_client_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ components/paint_preview/browser/paint_preview_client_unittest.cc @@ -228,8 +228,8 @@ TEST_P(PaintPreviewClientRenderViewHostTest, CaptureMa metadata->set_version(kPaintPreviewVersion); auto* chromeVersion = metadata->mutable_chrome_version(); const auto& current_chrome_version = version_info::GetVersion(); - chromeVersion->set_major(current_chrome_version.components()[0]); - chromeVersion->set_minor(current_chrome_version.components()[1]); + chromeVersion->set_gmajor(current_chrome_version.components()[0]); + chromeVersion->set_gminor(current_chrome_version.components()[1]); chromeVersion->set_build(current_chrome_version.components()[2]); chromeVersion->set_patch(current_chrome_version.components()[3]); PaintPreviewFrameProto* main_frame = expected_proto.mutable_root_frame(); diff --git a/www/iridium/files/patch-components_paint__preview_common_proto_paint__preview.proto b/www/iridium/files/patch-components_paint__preview_common_proto_paint__preview.proto index 9cccbbdaa630..9ffb724de4d0 100644 --- a/www/iridium/files/patch-components_paint__preview_common_proto_paint__preview.proto +++ b/www/iridium/files/patch-components_paint__preview_common_proto_paint__preview.proto @@ -1,13 +1,13 @@ ---- components/paint_preview/common/proto/paint_preview.proto.orig 2025-05-07 06:48:23 UTC +--- components/paint_preview/common/proto/paint_preview.proto.orig 2025-12-10 15:04:57 UTC +++ components/paint_preview/common/proto/paint_preview.proto @@ -82,8 +82,8 @@ message PaintPreviewFrameProto { // Stores Chrome version. // NEXT_TAG = 5 message ChromeVersionProto { - optional uint64 major = 1; - optional uint64 minor = 2; + optional uint64 gmajor = 1; + optional uint64 gminor = 2; optional uint64 build = 3; optional uint64 patch = 4; } diff --git a/www/iridium/files/patch-components_paint__preview_player_player__compositor__delegate.cc b/www/iridium/files/patch-components_paint__preview_player_player__compositor__delegate.cc index 83996cb585db..d2ba9c4c4454 100644 --- a/www/iridium/files/patch-components_paint__preview_player_player__compositor__delegate.cc +++ b/www/iridium/files/patch-components_paint__preview_player_player__compositor__delegate.cc @@ -1,13 +1,13 @@ ---- components/paint_preview/player/player_compositor_delegate.cc.orig 2025-10-28 14:29:43 UTC +--- components/paint_preview/player/player_compositor_delegate.cc.orig 2025-12-10 15:04:57 UTC +++ components/paint_preview/player/player_compositor_delegate.cc -@@ -435,8 +435,8 @@ void PlayerCompositorDelegate::ValidateProtoAndLoadAXT +@@ -432,8 +432,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/iridium/files/patch-components_password__manager_core_browser_features_password__features.cc b/www/iridium/files/patch-components_password__manager_core_browser_features_password__features.cc index 5e763752639d..02b4c6b67763 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_features_password__features.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- components/password_manager/core/browser/features/password_features.cc.orig 2025-12-10 15:04:57 UTC +++ components/password_manager/core/browser/features/password_features.cc -@@ -58,7 +58,7 @@ BASE_FEATURE(kClearUndecryptablePasswords, +@@ -71,7 +71,7 @@ BASE_FEATURE(kClearUndecryptablePasswords, BASE_FEATURE(kClearUndecryptablePasswordsOnSync, "ClearUndecryptablePasswordsInSync", #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -120,7 +120,7 @@ BASE_FEATURE(kPasswordManualFallbackAvailable, +@@ -139,7 +139,7 @@ BASE_FEATURE(kPasswordManualFallbackAvailable, BASE_FEATURE(kPasswordManagerLogToTerminal, 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, #if BUILDFLAG(IS_MAC) base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/iridium/files/patch-components_password__manager_core_browser_features_password__features.h b/www/iridium/files/patch-components_password__manager_core_browser_features_password__features.h index 3ee79e3b478b..5a8b04f8b6e3 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_features_password__features.h +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- components/password_manager/core/browser/features/password_features.h.orig 2025-12-10 15:04:57 UTC +++ components/password_manager/core/browser/features/password_features.h -@@ -147,7 +147,7 @@ BASE_DECLARE_FEATURE(kPasswordManualFallbackAvailable) +@@ -172,7 +172,7 @@ BASE_DECLARE_FEATURE(kPasswordManualFallbackAvailable) // terminal. BASE_DECLARE_FEATURE(kPasswordManagerLogToTerminal); -#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/iridium/files/patch-components_password__manager_core_browser_password__autofill__manager.cc b/www/iridium/files/patch-components_password__manager_core_browser_password__autofill__manager.cc index ded332da0770..20875eb0e49d 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_password__autofill__manager.cc +++ b/www/iridium/files/patch-components_password__manager_core_browser_password__autofill__manager.cc @@ -1,20 +1,20 @@ ---- components/password_manager/core/browser/password_autofill_manager.cc.orig 2025-11-06 10:11:34 UTC +--- components/password_manager/core/browser/password_autofill_manager.cc.orig 2025-12-10 15:04:57 UTC +++ components/password_manager/core/browser/password_autofill_manager.cc -@@ -387,7 +387,7 @@ void PasswordAutofillManager::DidAcceptSuggestion( +@@ -405,7 +405,7 @@ void PasswordAutofillManager::DidAcceptSuggestion( weak_ptr_factory_.GetWeakPtr(), *password_credential); if (password_credential->is_grouped_affiliation) { #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) cross_domain_confirmation_controller_ = password_client_->ShowCrossDomainConfirmationPopup( last_popup_open_args_.element_bounds, -@@ -629,7 +629,7 @@ void PasswordAutofillManager::DidNavigateMainFrame() { +@@ -653,7 +653,7 @@ void PasswordAutofillManager::DidNavigateMainFrame() { manual_fallback_metrics_recorder_ = std::make_unique(); #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) cross_domain_confirmation_controller_.reset(); #endif wait_for_passkeys_timer_.Stop(); diff --git a/www/iridium/files/patch-components_password__manager_core_browser_password__autofill__manager.h b/www/iridium/files/patch-components_password__manager_core_browser_password__autofill__manager.h index 7d92fda5a46d..39bfcfc0b3f6 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_password__autofill__manager.h +++ b/www/iridium/files/patch-components_password__manager_core_browser_password__autofill__manager.h @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/password_autofill_manager.h.orig 2025-11-06 10:11:34 UTC +--- components/password_manager/core/browser/password_autofill_manager.h.orig 2025-12-10 15:04:57 UTC +++ components/password_manager/core/browser/password_autofill_manager.h @@ -291,7 +291,7 @@ class PasswordAutofillManager : public autofill::Autof // Stores the controller of warning popup UI on cross domain filling. #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) std::unique_ptr cross_domain_confirmation_controller_; #endif diff --git a/www/iridium/files/patch-components_password__manager_core_browser_password__form__filling.cc b/www/iridium/files/patch-components_password__manager_core_browser_password__form__filling.cc index 9f666de4b98b..d96266cdbd71 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_password__form__filling.cc +++ b/www/iridium/files/patch-components_password__manager_core_browser_password__form__filling.cc @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/password_form_filling.cc.orig 2025-09-11 13:19:19 UTC +--- components/password_manager/core/browser/password_form_filling.cc.orig 2025-12-10 15:04:57 UTC +++ components/password_manager/core/browser/password_form_filling.cc -@@ -178,7 +178,7 @@ LikelyFormFilling SendFillInformationToRenderer( +@@ -197,7 +197,7 @@ LikelyFormFilling SendFillInformationToRenderer( #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!should_show_popup_without_passwords) { client->MaybeShowSavePasswordPrimingPromo(observed_form.url); } diff --git a/www/iridium/files/patch-components_password__manager_core_browser_password__form__manager.cc b/www/iridium/files/patch-components_password__manager_core_browser_password__form__manager.cc index de0fd19b8772..277284f30ef1 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_password__form__manager.cc +++ b/www/iridium/files/patch-components_password__manager_core_browser_password__form__manager.cc @@ -1,29 +1,20 @@ ---- components/password_manager/core/browser/password_form_manager.cc.orig 2025-11-06 10:11:34 UTC +--- components/password_manager/core/browser/password_form_manager.cc.orig 2025-12-10 15:04:57 UTC +++ components/password_manager/core/browser/password_form_manager.cc -@@ -67,7 +67,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 - -@@ -239,7 +239,7 @@ bool ShouldUploadCrowdsourcingVotes(const FormOrDigest +@@ -235,7 +235,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()) { -@@ -940,7 +940,7 @@ void PasswordFormManager::OnFetchCompleted() { +@@ -936,7 +936,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/iridium/files/patch-components_password__manager_core_browser_password__manager.cc b/www/iridium/files/patch-components_password__manager_core_browser_password__manager.cc index 7973fa2a91f0..d245884503d9 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_password__manager.cc +++ b/www/iridium/files/patch-components_password__manager_core_browser_password__manager.cc @@ -1,20 +1,20 @@ ---- components/password_manager/core/browser/password_manager.cc.orig 2025-11-06 10:11:34 UTC +--- components/password_manager/core/browser/password_manager.cc.orig 2025-12-10 15:04:57 UTC +++ components/password_manager/core/browser/password_manager.cc -@@ -590,7 +590,7 @@ void PasswordManager::RegisterProfilePrefs( +@@ -607,7 +607,7 @@ void PasswordManager::RegisterProfilePrefs( registry->RegisterListPref(prefs::kPasswordManagerPromoCardsList); #endif // BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) registry->RegisterBooleanPref(prefs::kPasswordSharingEnabled, true); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterIntegerPref(prefs::kRelaunchChromeBubbleDismissedCounter, 0); #endif -@@ -603,7 +603,7 @@ void PasswordManager::RegisterProfilePrefs( +@@ -620,7 +620,7 @@ void PasswordManager::RegisterProfilePrefs( #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_IOS) + BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kDeletingUndecryptablePasswordsEnabled, true); #endif diff --git a/www/iridium/files/patch-components_password__manager_core_browser_password__manager__client.h b/www/iridium/files/patch-components_password__manager_core_browser_password__manager__client.h index 15420ce8b22f..caff4d6996f4 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_password__manager__client.h +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- components/password_manager/core/browser/password_manager_client.h.orig 2025-12-10 15:04:57 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" -@@ -540,7 +540,7 @@ class PasswordManagerClient { +@@ -544,7 +544,7 @@ class PasswordManagerClient { virtual void TriggerSignIn(signin_metrics::AccessPoint access_point) const; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Shows the bubble with the details of the `form`. virtual void OpenPasswordDetailsBubble( const password_manager::PasswordForm& form) = 0; diff --git a/www/iridium/files/patch-components_password__manager_core_browser_password__manager__switches.cc b/www/iridium/files/patch-components_password__manager_core_browser_password__manager__switches.cc index 65f0b7d16fee..716a7d5de204 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_password__manager__switches.cc +++ b/www/iridium/files/patch-components_password__manager_core_browser_password__manager__switches.cc @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/password_manager_switches.cc.orig 2025-05-07 06:48:23 UTC +--- components/password_manager/core/browser/password_manager_switches.cc.orig 2025-12-10 15:04:57 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/iridium/files/patch-components_password__manager_core_browser_password__manager__switches.h b/www/iridium/files/patch-components_password__manager_core_browser_password__manager__switches.h index c45f941ed3bd..64bbb5933542 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_password__manager__switches.h +++ b/www/iridium/files/patch-components_password__manager_core_browser_password__manager__switches.h @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/password_manager_switches.h.orig 2025-05-07 06:48:23 UTC +--- components/password_manager/core/browser/password_manager_switches.h.orig 2025-12-10 15:04:57 UTC +++ components/password_manager/core/browser/password_manager_switches.h @@ -9,7 +9,7 @@ namespace password_manager { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kPasswordStore[]; extern const char kEnableEncryptionSelection[]; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-components_password__manager_core_browser_password__manual__fallback__flow.cc b/www/iridium/files/patch-components_password__manager_core_browser_password__manual__fallback__flow.cc index 2c5f7d005ad5..c8dc688f6dc4 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_password__manual__fallback__flow.cc +++ b/www/iridium/files/patch-components_password__manager_core_browser_password__manual__fallback__flow.cc @@ -1,29 +1,29 @@ ---- components/password_manager/core/browser/password_manual_fallback_flow.cc.orig 2025-10-28 14:29:43 UTC +--- components/password_manager/core/browser/password_manual_fallback_flow.cc.orig 2025-12-10 15:04:57 UTC +++ components/password_manager/core/browser/password_manual_fallback_flow.cc @@ -46,7 +46,7 @@ std::u16string GetUsernameFromLabel(const std::u16stri } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Returns the password form corresponding to the `payload` data. In most // cases there is only one such form stored, but having more than one or no // forms is also possible. If there is more than one form, showing any of them @@ -304,7 +304,7 @@ void PasswordManualFallbackFlow::DidAcceptSuggestion( } case autofill::SuggestionType::kViewPasswordDetails: { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::optional credentials = GetCorrespondingPasswordForm( suggestion.GetPayload(), @@ -440,7 +440,7 @@ void PasswordManualFallbackFlow::EnsureCrossDomainPass const Suggestion::PasswordSuggestionDetails& payload, base::OnceClosure on_allowed) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (payload.is_cross_domain) { CHECK(payload.display_signon_realm); cross_domain_confirmation_popup_controller_ = diff --git a/www/iridium/files/patch-components_password__manager_core_browser_password__manual__fallback__flow.h b/www/iridium/files/patch-components_password__manager_core_browser_password__manual__fallback__flow.h index 8651fa4fb75e..e9dc1e45fe4a 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_password__manual__fallback__flow.h +++ b/www/iridium/files/patch-components_password__manager_core_browser_password__manual__fallback__flow.h @@ -1,20 +1,20 @@ ---- components/password_manager/core/browser/password_manual_fallback_flow.h.orig 2025-09-11 13:19:19 UTC +--- components/password_manager/core/browser/password_manual_fallback_flow.h.orig 2025-12-10 15:04:57 UTC +++ components/password_manager/core/browser/password_manual_fallback_flow.h @@ -19,7 +19,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) @@ -183,7 +183,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/iridium/files/patch-components_password__manager_core_browser_password__store__factory__util.cc b/www/iridium/files/patch-components_password__manager_core_browser_password__store__factory__util.cc index 95dd6f038e29..48e0227482d4 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_password__store__factory__util.cc +++ b/www/iridium/files/patch-components_password__manager_core_browser_password__store__factory__util.cc @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/password_store_factory_util.cc.orig 2025-11-06 10:11:34 UTC +--- components/password_manager/core/browser/password_store_factory_util.cc.orig 2025-12-10 15:04:57 UTC +++ components/password_manager/core/browser/password_store_factory_util.cc @@ -33,7 +33,7 @@ namespace { LoginDatabase::DeletingUndecryptablePasswordsEnabled GetPolicyFromPrefs( PrefService* prefs) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_IOS) + BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) return LoginDatabase::DeletingUndecryptablePasswordsEnabled( prefs->GetBoolean(prefs::kDeletingUndecryptablePasswordsEnabled)); #else diff --git a/www/iridium/files/patch-components_password__manager_core_browser_password__store_login__database.cc b/www/iridium/files/patch-components_password__manager_core_browser_password__store_login__database.cc index ada2da3ea2a2..50fd1067b828 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_password__store_login__database.cc +++ b/www/iridium/files/patch-components_password__manager_core_browser_password__store_login__database.cc @@ -1,20 +1,20 @@ ---- components/password_manager/core/browser/password_store/login_database.cc.orig 2025-11-06 10:11:34 UTC +--- components/password_manager/core/browser/password_store/login_database.cc.orig 2025-12-10 15:04:57 UTC +++ components/password_manager/core/browser/password_store/login_database.cc @@ -1043,7 +1043,7 @@ bool ShouldDeleteUndecryptablePasswords( - bool is_user_data_dir_policy_set, bool is_enabled_by_policy, - IsAccountStore is_account_store) { + IsAccountStore is_account_store, + const os_crypt_async::Encryptor* encryptor) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr environment(base::Environment::Create()); // On Linux user data directory ca be specified using an env variable. If it // exists, passwords shouldn't be deleted. @@ -1061,7 +1061,7 @@ bool ShouldDeleteUndecryptablePasswords( return false; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (command_line->HasSwitch(password_manager::kPasswordStore)) { RecordShouldDeleteUndecryptablePasswordsMetric( ShouldDeleteUndecryptablePasswordsResult:: diff --git a/www/iridium/files/patch-components_password__manager_core_browser_password__store_login__database__async__helper.cc b/www/iridium/files/patch-components_password__manager_core_browser_password__store_login__database__async__helper.cc index aa79d2ef1956..08a06c6777d3 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_password__store_login__database__async__helper.cc +++ b/www/iridium/files/patch-components_password__manager_core_browser_password__store_login__database__async__helper.cc @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/password_store/login_database_async_helper.cc.orig 2025-11-06 10:11:34 UTC +--- components/password_manager/core/browser/password_store/login_database_async_helper.cc.orig 2025-12-10 15:04:57 UTC +++ components/password_manager/core/browser/password_store/login_database_async_helper.cc @@ -146,7 +146,7 @@ LoginsResultOrError LoginDatabaseAsyncHelper::FillMatc std::vector matched_forms; if (!login_db_ || !login_db_->GetLogins(form, include_psl, &matched_forms)) { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return PasswordStoreBackendError( - OSCrypt::IsEncryptionAvailable() + is_encryption_available_ ? PasswordStoreBackendErrorType::kUncategorized diff --git a/www/iridium/files/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc b/www/iridium/files/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc index 770a08f191c0..4fb31a5c8b56 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- components/password_manager/core/browser/password_store/login_database_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ components/password_manager/core/browser/password_store/login_database_unittest.cc -@@ -2278,7 +2278,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCurrent, - testing::Bool())); +@@ -2227,7 +2227,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCurrent, + testing::Values(1, 2, 3, 24)); #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) class LoginDatabaseUndecryptableLoginsTest : public testing::Test { protected: LoginDatabaseUndecryptableLoginsTest() = default; diff --git a/www/iridium/files/patch-components_password__manager_core_browser_stub__password__manager__client.cc b/www/iridium/files/patch-components_password__manager_core_browser_stub__password__manager__client.cc index 79c8c19bc5e7..e84b0d9db784 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_stub__password__manager__client.cc +++ b/www/iridium/files/patch-components_password__manager_core_browser_stub__password__manager__client.cc @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/stub_password_manager_client.cc.orig 2025-10-28 14:29:43 UTC +--- components/password_manager/core/browser/stub_password_manager_client.cc.orig 2025-12-10 15:04:57 UTC +++ components/password_manager/core/browser/stub_password_manager_client.cc -@@ -211,7 +211,7 @@ version_info::Channel StubPasswordManagerClient::GetCh +@@ -226,7 +226,7 @@ version_info::Channel StubPasswordManagerClient::GetCh } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void StubPasswordManagerClient::OpenPasswordDetailsBubble( const password_manager::PasswordForm& form) {} void StubPasswordManagerClient::MaybeShowSavePasswordPrimingPromo( diff --git a/www/iridium/files/patch-components_password__manager_core_browser_stub__password__manager__client.h b/www/iridium/files/patch-components_password__manager_core_browser_stub__password__manager__client.h index eebabb11e7e9..ba1948f595fa 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_stub__password__manager__client.h +++ b/www/iridium/files/patch-components_password__manager_core_browser_stub__password__manager__client.h @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/stub_password_manager_client.h.orig 2025-10-28 14:29:43 UTC +--- components/password_manager/core/browser/stub_password_manager_client.h.orig 2025-12-10 15:04:57 UTC +++ components/password_manager/core/browser/stub_password_manager_client.h -@@ -80,7 +80,7 @@ class StubPasswordManagerClient : public PasswordManag +@@ -84,7 +84,7 @@ class StubPasswordManagerClient : public PasswordManag MockPasswordFeatureManager* GetPasswordFeatureManager(); version_info::Channel GetChannel() const override; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void OpenPasswordDetailsBubble( const password_manager::PasswordForm& form) override; void MaybeShowSavePasswordPrimingPromo(const GURL& current_url) override; diff --git a/www/iridium/files/patch-components_password__manager_core_common_password__manager__pref__names.h b/www/iridium/files/patch-components_password__manager_core_common_password__manager__pref__names.h index 062bf8910f18..ece7cb7e0f98 100644 --- a/www/iridium/files/patch-components_password__manager_core_common_password__manager__pref__names.h +++ b/www/iridium/files/patch-components_password__manager_core_common_password__manager__pref__names.h @@ -1,20 +1,20 @@ ---- components/password_manager/core/common/password_manager_pref_names.h.orig 2025-11-06 10:11:34 UTC +--- components/password_manager/core/common/password_manager_pref_names.h.orig 2025-12-10 15:04:57 UTC +++ components/password_manager/core/common/password_manager_pref_names.h @@ -59,7 +59,7 @@ inline constexpr char kCredentialProviderEnabledOnStar #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_IOS) + BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) // Boolean pref controlled by the DeletingUndecryptablePasswordsEnabled policy. // If set to false it blocks deleting undecryptable passwords, otherwise the // deletion can happen. @@ -253,7 +253,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/iridium/files/patch-components_performance__manager_decorators_process__metrics__decorator.cc b/www/iridium/files/patch-components_performance__manager_decorators_process__metrics__decorator.cc index 9cf7694134d8..1ca3ce8b55d8 100644 --- a/www/iridium/files/patch-components_performance__manager_decorators_process__metrics__decorator.cc +++ b/www/iridium/files/patch-components_performance__manager_decorators_process__metrics__decorator.cc @@ -1,11 +1,11 @@ ---- components/performance_manager/decorators/process_metrics_decorator.cc.orig 2025-10-28 14:29:43 UTC +--- components/performance_manager/decorators/process_metrics_decorator.cc.orig 2025-12-10 15:04:57 UTC +++ components/performance_manager/decorators/process_metrics_decorator.cc -@@ -266,7 +266,7 @@ void ProcessMetricsDecorator::DidGetMemoryUsage( - base::ByteCount process_rss = - base::KiB(process_dump_iter.os_dump().resident_set_kb); - process_node->set_resident_set(process_rss); +@@ -54,7 +54,7 @@ class ProcessMetricsDecorator::NodeMetricsUpdater { + auto* process_node = ProcessNodeImpl::FromNode(context.GetProcessNode()); + process_node->set_private_footprint(memory_summary_->private_footprint); + process_node->set_resident_set(memory_summary_->resident_set_size); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - process_node->set_private_swap( - base::KiB(process_dump_iter.os_dump().private_footprint_swap_kb)); + process_node->set_private_swap(memory_summary_->private_swap); #endif + } diff --git a/www/iridium/files/patch-components_performance__manager_public_features.h b/www/iridium/files/patch-components_performance__manager_public_features.h index b1d968ce9ac4..6d8d45d29611 100644 --- a/www/iridium/files/patch-components_performance__manager_public_features.h +++ b/www/iridium/files/patch-components_performance__manager_public_features.h @@ -1,11 +1,11 @@ ---- components/performance_manager/public/features.h.orig 2025-05-07 06:48:23 UTC +--- components/performance_manager/public/features.h.orig 2025-12-10 15:04:57 UTC +++ components/performance_manager/public/features.h @@ -19,7 +19,7 @@ namespace performance_manager::features { #if !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define URGENT_DISCARDING_FROM_PERFORMANCE_MANAGER() false #else #define URGENT_DISCARDING_FROM_PERFORMANCE_MANAGER() true diff --git a/www/iridium/files/patch-components_performance__manager_resource__attribution_memory__measurement__delegate.cc b/www/iridium/files/patch-components_performance__manager_resource__attribution_memory__measurement__delegate.cc index 8e8b091e8f6c..bd5e62a80465 100644 --- a/www/iridium/files/patch-components_performance__manager_resource__attribution_memory__measurement__delegate.cc +++ b/www/iridium/files/patch-components_performance__manager_resource__attribution_memory__measurement__delegate.cc @@ -1,11 +1,11 @@ ---- components/performance_manager/resource_attribution/memory_measurement_delegate.cc.orig 2025-11-06 10:11:34 UTC +--- components/performance_manager/resource_attribution/memory_measurement_delegate.cc.orig 2025-12-10 15:04:57 UTC +++ components/performance_manager/resource_attribution/memory_measurement_delegate.cc @@ -100,7 +100,7 @@ void MemoryMeasurementDelegateImpl::OnMemorySummary( base::KiB(process_dump.os_dump().resident_set_kb), .private_footprint = base::KiB(process_dump.os_dump().private_footprint_kb), -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // `private_footprint_swap_kb` is only defined on these platforms .private_swap = base::KiB(process_dump.os_dump().private_footprint_swap_kb), diff --git a/www/iridium/files/patch-components_permissions_prediction__service_prediction__common.cc b/www/iridium/files/patch-components_permissions_prediction__service_prediction__common.cc index 21174c7f4e13..29649623b463 100644 --- a/www/iridium/files/patch-components_permissions_prediction__service_prediction__common.cc +++ b/www/iridium/files/patch-components_permissions_prediction__service_prediction__common.cc @@ -1,20 +1,20 @@ ---- components/permissions/prediction_service/prediction_common.cc.orig 2025-09-11 13:19:19 UTC +--- components/permissions/prediction_service/prediction_common.cc.orig 2025-12-10 15:04:57 UTC +++ components/permissions/prediction_service/prediction_common.cc @@ -36,7 +36,7 @@ int BucketizeValue(int count) { ClientFeatures_Platform GetCurrentPlatformProto() { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return permissions::ClientFeatures_Platform_PLATFORM_DESKTOP; #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) return permissions::ClientFeatures_Platform_PLATFORM_MOBILE; @@ -47,7 +47,7 @@ ClientFeatures_Platform GetCurrentPlatformProto() { ClientFeatures_PlatformEnum GetCurrentPlatformEnumProto() { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return permissions::ClientFeatures_PlatformEnum_PLATFORM_DESKTOP_V2; #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) return permissions::ClientFeatures_PlatformEnum_PLATFORM_MOBILE_V2; diff --git a/www/iridium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc b/www/iridium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc index 69f92ed0fcc8..cff949a22ac2 100644 --- a/www/iridium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc +++ b/www/iridium/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 2025-05-07 06:48:23 UTC +--- components/policy/core/browser/policy_pref_mapping_test.cc.orig 2025-12-10 15:04:57 UTC +++ components/policy/core/browser/policy_pref_mapping_test.cc @@ -432,7 +432,7 @@ class PolicyTestCase { const std::string os("chromeos"); #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/iridium/files/patch-components_policy_core_browser_url__blocklist__manager.cc b/www/iridium/files/patch-components_policy_core_browser_url__blocklist__manager.cc index a121cd9d07e2..67ac782e0474 100644 --- a/www/iridium/files/patch-components_policy_core_browser_url__blocklist__manager.cc +++ b/www/iridium/files/patch-components_policy_core_browser_url__blocklist__manager.cc @@ -1,11 +1,11 @@ ---- components/policy/core/browser/url_blocklist_manager.cc.orig 2025-09-11 13:19:19 UTC +--- components/policy/core/browser/url_blocklist_manager.cc.orig 2025-12-10 15:04:57 UTC +++ components/policy/core/browser/url_blocklist_manager.cc @@ -377,7 +377,7 @@ void URLBlocklistManager::RegisterProfilePrefs( policy_prefs::kSafeSitesFilterBehavior, static_cast(SafeSitesFilterBehavior::kSafeSitesFilterDisabled)); #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) registry->RegisterListPref(policy_prefs::kPasswordManagerBlocklist); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_MAC) diff --git a/www/iridium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc b/www/iridium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc index 9ff36970a7e0..46e676ff2975 100644 --- a/www/iridium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2025-12-10 15:04:57 UTC +++ components/policy/core/common/cloud/cloud_policy_client.cc @@ -767,7 +767,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/iridium/files/patch-components_policy_core_common_cloud_cloud__policy__refresh__scheduler.cc b/www/iridium/files/patch-components_policy_core_common_cloud_cloud__policy__refresh__scheduler.cc index 8cac6f632bee..b81bd8a9d32d 100644 --- a/www/iridium/files/patch-components_policy_core_common_cloud_cloud__policy__refresh__scheduler.cc +++ b/www/iridium/files/patch-components_policy_core_common_cloud_cloud__policy__refresh__scheduler.cc @@ -1,20 +1,20 @@ ---- components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc.orig 2025-11-06 10:11:34 UTC +--- components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc.orig 2025-12-10 15:04:57 UTC +++ components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc -@@ -25,7 +25,7 @@ namespace policy { +@@ -26,7 +26,7 @@ namespace policy { namespace { -#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(kRetryWithKeyReset, base::FEATURE_ENABLED_BY_DEFAULT); #endif -@@ -218,7 +218,7 @@ void CloudPolicyRefreshScheduler::OnStoreError(CloudPo +@@ -219,7 +219,7 @@ void CloudPolicyRefreshScheduler::OnStoreError(CloudPo // continue using the stale information. Thus, no specific response to a store // error is required. NB: Changes to is_managed fire OnStoreLoaded(). -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Client is registered means we have successfully get policy key once. However, // a following policy fetch request is failed because we can't verified // signature. Delete the policy key so that we can get it again with next diff --git a/www/iridium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc b/www/iridium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc index 5807a63c38f7..57ec6277e585 100644 --- a/www/iridium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc +++ b/www/iridium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc @@ -1,55 +1,55 @@ ---- components/policy/core/common/cloud/cloud_policy_util.cc.orig 2025-05-07 06:48:23 UTC +--- components/policy/core/common/cloud/cloud_policy_util.cc.orig 2025-12-10 15:04:57 UTC +++ components/policy/core/common/cloud/cloud_policy_util.cc @@ -21,7 +21,7 @@ #include "base/win/wincred_shim.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include #include #include @@ -36,10 +36,15 @@ #import #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include // For HOST_NAME_MAX #endif +#if BUILDFLAG(IS_FREEBSD) +#include +#define HOST_NAME_MAX MAXHOSTNAMELEN +#endif + #include #include @@ -84,7 +89,7 @@ namespace policy { namespace em = enterprise_management; std::string GetMachineName() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) char hostname[HOST_NAME_MAX]; if (gethostname(hostname, HOST_NAME_MAX) == 0) // Success. return hostname; @@ -140,7 +145,7 @@ std::string GetMachineName() { std::string GetOSVersion() { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) return base::SysInfo::OperatingSystemVersion(); #elif BUILDFLAG(IS_WIN) base::win::OSInfo::VersionNumber version_number = @@ -162,7 +167,7 @@ std::string GetOSArchitecture() { } std::string GetOSUsername() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) struct passwd* creds = getpwuid(getuid()); if (!creds || !creds->pw_name) return std::string(); diff --git a/www/iridium/files/patch-components_policy_core_common_policy__paths.cc b/www/iridium/files/patch-components_policy_core_common_policy__paths.cc index b062f7ce75c1..764726e9d42e 100644 --- a/www/iridium/files/patch-components_policy_core_common_policy__paths.cc +++ b/www/iridium/files/patch-components_policy_core_common_policy__paths.cc @@ -1,11 +1,11 @@ ---- components/policy/core/common/policy_paths.cc.orig 2025-05-07 06:48:23 UTC +--- components/policy/core/common/policy_paths.cc.orig 2025-12-10 15:04:57 UTC +++ components/policy/core/common/policy_paths.cc @@ -17,6 +17,8 @@ namespace policy { const char kPolicyPath[] = "/etc/iridium-browser/policies"; #elif BUILDFLAG(GOOGLE_CHROME_FOR_TESTING_BRANDING) const char kPolicyPath[] = "/etc/iridium-browser/policies"; +#elif BUILDFLAG(IS_FREEBSD) +const char kPolicyPath[] = "/usr/local/etc/iridium-browser/policies"; #else const char kPolicyPath[] = "/etc/iridium-browser/policies"; #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) diff --git a/www/iridium/files/patch-components_policy_core_common_policy__pref__names.cc b/www/iridium/files/patch-components_policy_core_common_policy__pref__names.cc index f597d442d1ec..b9dca7d4d10f 100644 --- a/www/iridium/files/patch-components_policy_core_common_policy__pref__names.cc +++ b/www/iridium/files/patch-components_policy_core_common_policy__pref__names.cc @@ -1,11 +1,11 @@ ---- components/policy/core/common/policy_pref_names.cc.orig 2025-09-11 13:19:19 UTC +--- components/policy/core/common/policy_pref_names.cc.orig 2025-12-10 15:04:57 UTC +++ components/policy/core/common/policy_pref_names.cc @@ -199,7 +199,7 @@ const char kFloatingWorkspaceEnabled[] = "ash.floating // A boolean value indicating whether the built-in AI APIs are enabled. const char kBuiltInAIAPIsEnabled[] = "policy.built_in_ai_apis_enabled"; #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // List of urls for which password manager is disabled/blocked. const char kPasswordManagerBlocklist[] = "policy.password_manager_blocklist"; #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || diff --git a/www/iridium/files/patch-components_policy_core_common_policy__pref__names.h b/www/iridium/files/patch-components_policy_core_common_policy__pref__names.h index a1fa66d9a268..7357e0b260fd 100644 --- a/www/iridium/files/patch-components_policy_core_common_policy__pref__names.h +++ b/www/iridium/files/patch-components_policy_core_common_policy__pref__names.h @@ -1,11 +1,11 @@ ---- components/policy/core/common/policy_pref_names.h.orig 2025-11-06 10:11:34 UTC +--- components/policy/core/common/policy_pref_names.h.orig 2025-12-10 15:04:57 UTC +++ components/policy/core/common/policy_pref_names.h @@ -96,7 +96,7 @@ extern const char kFloatingWorkspaceEnabled[]; #endif extern const char kBuiltInAIAPIsEnabled[]; #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kPasswordManagerBlocklist[]; #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) diff --git a/www/iridium/files/patch-components_policy_tools_generate__policy__source.py b/www/iridium/files/patch-components_policy_tools_generate__policy__source.py index b0ff155bc024..8193a32c887b 100644 --- a/www/iridium/files/patch-components_policy_tools_generate__policy__source.py +++ b/www/iridium/files/patch-components_policy_tools_generate__policy__source.py @@ -1,14 +1,14 @@ ---- components/policy/tools/generate_policy_source.py.orig 2025-05-07 06:48:23 UTC +--- components/policy/tools/generate_policy_source.py.orig 2025-12-10 15:04:57 UTC +++ components/policy/tools/generate_policy_source.py @@ -38,9 +38,9 @@ PLATFORM_STRINGS = { 'ios': ['ios'], 'fuchsia': ['fuchsia'], 'chrome.win': ['win'], - 'chrome.linux': ['linux'], + 'chrome.linux': ['linux', 'openbsd', 'freebsd'], 'chrome.mac': ['mac'], - 'chrome.*': ['win', 'mac', 'linux'], + 'chrome.*': ['win', 'mac', 'linux', 'openbsd', 'freebsd'], 'chrome.win7': ['win'], } diff --git a/www/iridium/files/patch-components_policy_tools_template__writers_writer__configuration.py b/www/iridium/files/patch-components_policy_tools_template__writers_writer__configuration.py index 5d3a8c360af7..30733d93a8c5 100644 --- a/www/iridium/files/patch-components_policy_tools_template__writers_writer__configuration.py +++ b/www/iridium/files/patch-components_policy_tools_template__writers_writer__configuration.py @@ -1,11 +1,11 @@ ---- components/policy/tools/template_writers/writer_configuration.py.orig 2025-05-07 06:48:23 UTC +--- components/policy/tools/template_writers/writer_configuration.py.orig 2025-12-10 15:04:57 UTC +++ components/policy/tools/template_writers/writer_configuration.py @@ -59,7 +59,7 @@ def GetConfigurationForBuild(defines): }, }, 'admx_prefix': 'chromium', - 'linux_policy_path': '/etc/iridium-browser/policies/', + 'linux_policy_path': '/etc/iridium/policies/', 'bundle_id': 'org.chromium', } elif '_google_chrome' in defines or '_is_chrome_for_testing_branded' in defines: diff --git a/www/iridium/files/patch-components_power__metrics_BUILD.gn b/www/iridium/files/patch-components_power__metrics_BUILD.gn index 65d1f7041158..0152f951ff12 100644 --- a/www/iridium/files/patch-components_power__metrics_BUILD.gn +++ b/www/iridium/files/patch-components_power__metrics_BUILD.gn @@ -1,11 +1,11 @@ ---- components/power_metrics/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- components/power_metrics/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ components/power_metrics/BUILD.gn @@ -41,7 +41,7 @@ static_library("power_metrics") { ldflags = [ "/DELAYLOAD:setupapi.dll" ] } - if (is_linux || is_chromeos) { + if ((is_linux && !is_bsd) || is_chromeos) { sources += [ "energy_metrics_provider_linux.cc", "energy_metrics_provider_linux.h", diff --git a/www/iridium/files/patch-components_power__metrics_energy__metrics__provider.cc b/www/iridium/files/patch-components_power__metrics_energy__metrics__provider.cc index d3e69a9ff93f..911b00bcf250 100644 --- a/www/iridium/files/patch-components_power__metrics_energy__metrics__provider.cc +++ b/www/iridium/files/patch-components_power__metrics_energy__metrics__provider.cc @@ -1,21 +1,21 @@ ---- components/power_metrics/energy_metrics_provider.cc.orig 2025-09-11 13:19:19 UTC +--- components/power_metrics/energy_metrics_provider.cc.orig 2025-12-10 15:04:57 UTC +++ components/power_metrics/energy_metrics_provider.cc @@ -9,6 +9,8 @@ #include "components/power_metrics/energy_metrics_provider_win.h" #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #include "components/power_metrics/energy_metrics_provider_linux.h" +#elif BUILDFLAG(IS_BSD) +#include "base/notimplemented.h" #endif // BUILDFLAG(IS_WIN) namespace power_metrics { @@ -22,6 +24,9 @@ std::unique_ptr EnergyMetricsPr return EnergyMetricsProviderWin::Create(); #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) return EnergyMetricsProviderLinux::Create(); +#elif BUILDFLAG(IS_BSD) + NOTIMPLEMENTED(); + return nullptr; #else return nullptr; #endif // BUILDFLAG(IS_WIN) diff --git a/www/iridium/files/patch-components_regional__capabilities_regional__capabilities__switches.cc b/www/iridium/files/patch-components_regional__capabilities_regional__capabilities__switches.cc index 78216db73b43..8fb99a10d36e 100644 --- a/www/iridium/files/patch-components_regional__capabilities_regional__capabilities__switches.cc +++ b/www/iridium/files/patch-components_regional__capabilities_regional__capabilities__switches.cc @@ -1,11 +1,11 @@ ---- components/regional_capabilities/regional_capabilities_switches.cc.orig 2025-11-06 10:11:34 UTC +--- components/regional_capabilities/regional_capabilities_switches.cc.orig 2025-12-10 15:04:57 UTC +++ components/regional_capabilities/regional_capabilities_switches.cc @@ -23,7 +23,7 @@ BASE_FEATURE(kResolveRegionalCapabilitiesFromDevice, base::FEATURE_ENABLED_BY_DEFAULT); #endif -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_FEATURE(kUseFinchPermanentCountryForFetchCountryId, "UseFinchPermanentCountyForFetchCountryId", - base::FEATURE_DISABLED_BY_DEFAULT); + base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/iridium/files/patch-components_regional__capabilities_regional__capabilities__switches.h b/www/iridium/files/patch-components_regional__capabilities_regional__capabilities__switches.h index 0aec7067fe37..305813f8e587 100644 --- a/www/iridium/files/patch-components_regional__capabilities_regional__capabilities__switches.h +++ b/www/iridium/files/patch-components_regional__capabilities_regional__capabilities__switches.h @@ -1,11 +1,11 @@ ---- components/regional_capabilities/regional_capabilities_switches.h.orig 2025-11-06 10:11:34 UTC +--- components/regional_capabilities/regional_capabilities_switches.h.orig 2025-12-10 15:04:57 UTC +++ components/regional_capabilities/regional_capabilities_switches.h @@ -53,7 +53,7 @@ BASE_DECLARE_FEATURE(kRestrictLegacySearchEnginePromoO BASE_DECLARE_FEATURE(kResolveRegionalCapabilitiesFromDevice); #endif -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Use finch permanent country instead of finch latest country for fetching // country ID. BASE_DECLARE_FEATURE(kUseFinchPermanentCountryForFetchCountryId); diff --git a/www/iridium/files/patch-components_safe__browsing_content_common_file__type__policies__unittest.cc b/www/iridium/files/patch-components_safe__browsing_content_common_file__type__policies__unittest.cc index d05a26d6e381..da75b1bf7824 100644 --- a/www/iridium/files/patch-components_safe__browsing_content_common_file__type__policies__unittest.cc +++ b/www/iridium/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 2025-05-07 06:48:23 UTC +--- components/safe_browsing/content/common/file_type_policies_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ components/safe_browsing/content/common/file_type_policies_unittest.cc @@ -146,7 +146,7 @@ TEST_F(FileTypePoliciesTest, UnpackResourceBundle) { EXPECT_EQ(142, file_type.uma_value()); EXPECT_FALSE(file_type.is_archive()); EXPECT_EQ(DownloadFileType::FULL_PING, file_type.ping_setting()); -#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/iridium/files/patch-components_safe__browsing_content_resources_gen__file__type__proto.py b/www/iridium/files/patch-components_safe__browsing_content_resources_gen__file__type__proto.py index eaee81a37be7..bf78fb243094 100644 --- a/www/iridium/files/patch-components_safe__browsing_content_resources_gen__file__type__proto.py +++ b/www/iridium/files/patch-components_safe__browsing_content_resources_gen__file__type__proto.py @@ -1,20 +1,20 @@ ---- components/safe_browsing/content/resources/gen_file_type_proto.py.orig 2025-05-07 06:48:23 UTC +--- components/safe_browsing/content/resources/gen_file_type_proto.py.orig 2025-12-10 15:04:57 UTC +++ components/safe_browsing/content/resources/gen_file_type_proto.py @@ -37,6 +37,8 @@ def PlatformTypes(): "chromeos": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_CHROME_OS, "linux": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_LINUX, + "openbsd": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_LINUX, + "freebsd": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_LINUX, "mac": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_MAC, "win": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_WINDOWS, # LINT.ThenChange(BUILD.gn:PlatformTypes) @@ -179,7 +181,7 @@ class DownloadFileTypeProtoGenerator(BinaryProtoGenera '-t', '--type', help='The platform type. One of android, chromeos, ' + - 'linux, mac, win') + 'linux, mac, win, openbsd, freebsd') def AddExtraCommandLineArgsForVirtualEnvRun(self, opts, command): if opts.type is not None: diff --git a/www/iridium/files/patch-components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc b/www/iridium/files/patch-components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc index a75b25091e2b..e66d48a58817 100644 --- a/www/iridium/files/patch-components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc +++ b/www/iridium/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 2025-05-07 06:48:23 UTC +--- components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc.orig 2025-12-10 15:04:57 UTC +++ components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc @@ -119,7 +119,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/iridium/files/patch-components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc b/www/iridium/files/patch-components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc index 861b7265f3b7..6c97f4772e8e 100644 --- a/www/iridium/files/patch-components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc +++ b/www/iridium/files/patch-components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc @@ -1,11 +1,11 @@ ---- components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc.orig 2025-09-11 13:19:19 UTC +--- components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc.orig 2025-12-10 15:04:57 UTC +++ components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc @@ -112,7 +112,7 @@ RTLookupRequest::OSType GetRTLookupRequestOSType() { return RTLookupRequest::OS_TYPE_CHROME_OS; #elif BUILDFLAG(IS_IOS) return RTLookupRequest::OS_TYPE_IOS; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return RTLookupRequest::OS_TYPE_LINUX; #elif BUILDFLAG(IS_MAC) return RTLookupRequest::OS_TYPE_MAC; diff --git a/www/iridium/files/patch-components_search__engines_template__url__service.cc b/www/iridium/files/patch-components_search__engines_template__url__service.cc index f23c97d37061..5b8722b207ba 100644 --- a/www/iridium/files/patch-components_search__engines_template__url__service.cc +++ b/www/iridium/files/patch-components_search__engines_template__url__service.cc @@ -1,11 +1,11 @@ ---- components/search_engines/template_url_service.cc.orig 2025-10-28 14:29:43 UTC +--- components/search_engines/template_url_service.cc.orig 2025-12-10 15:04:57 UTC +++ components/search_engines/template_url_service.cc -@@ -3587,7 +3587,7 @@ bool TemplateURLService::MatchesDefaultSearchProvider( +@@ -3590,7 +3590,7 @@ bool TemplateURLService::MatchesDefaultSearchProvider( std::unique_ptr TemplateURLService::GetEnterpriseSearchManager(PrefService* prefs) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return std::make_unique( prefs, base::BindRepeating(&TemplateURLService::EnterpriseSearchChanged, base::Unretained(this))); diff --git a/www/iridium/files/patch-components_security__interstitials_content_utils.cc b/www/iridium/files/patch-components_security__interstitials_content_utils.cc index 821de2929e3a..318b8feef93e 100644 --- a/www/iridium/files/patch-components_security__interstitials_content_utils.cc +++ b/www/iridium/files/patch-components_security__interstitials_content_utils.cc @@ -1,11 +1,11 @@ ---- components/security_interstitials/content/utils.cc.orig 2025-05-07 06:48:23 UTC +--- components/security_interstitials/content/utils.cc.orig 2025-12-10 15:04:57 UTC +++ components/security_interstitials/content/utils.cc @@ -37,7 +37,7 @@ void LaunchDateAndTimeSettings() { #if BUILDFLAG(IS_ANDROID) JNIEnv* env = base::android::AttachCurrentThread(); Java_DateAndTimeSettingsHelper_openDateAndTimeSettings(env); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) struct ClockCommand { const char* const pathname; const char* const argument; diff --git a/www/iridium/files/patch-components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc b/www/iridium/files/patch-components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc index 0c6ab10dd12f..ff7a700a900a 100644 --- a/www/iridium/files/patch-components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc +++ b/www/iridium/files/patch-components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc @@ -1,11 +1,11 @@ ---- components/segmentation_platform/embedder/default_model/cross_device_user_segment.cc.orig 2025-05-07 06:48:23 UTC +--- components/segmentation_platform/embedder/default_model/cross_device_user_segment.cc.orig 2025-12-10 15:04:57 UTC +++ components/segmentation_platform/embedder/default_model/cross_device_user_segment.cc -@@ -147,7 +147,7 @@ void CrossDeviceUserSegment::ExecuteModelWithInput( +@@ -122,7 +122,7 @@ void CrossDeviceUserSegment::ExecuteModelWithInput( // Check for current device type and subtract it from the device count // calculation. #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) desktop_count -= 1; #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) if (ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET) { diff --git a/www/iridium/files/patch-components_services_on__device__translation_sandbox__hook.cc b/www/iridium/files/patch-components_services_on__device__translation_sandbox__hook.cc index 658485452ada..ee46a49e9479 100644 --- a/www/iridium/files/patch-components_services_on__device__translation_sandbox__hook.cc +++ b/www/iridium/files/patch-components_services_on__device__translation_sandbox__hook.cc @@ -1,43 +1,43 @@ ---- components/services/on_device_translation/sandbox_hook.cc.orig 2025-05-07 06:48:23 UTC +--- components/services/on_device_translation/sandbox_hook.cc.orig 2025-12-10 15:04:57 UTC +++ components/services/on_device_translation/sandbox_hook.cc @@ -7,12 +7,15 @@ #include "components/services/on_device_translation/translate_kit_client.h" #include "sandbox/linux/syscall_broker/broker_command.h" +#if !BUILDFLAG(IS_BSD) using sandbox::syscall_broker::BrokerFilePermission; using sandbox::syscall_broker::MakeBrokerCommandSet; +#endif namespace on_device_translation { namespace { +#if !BUILDFLAG(IS_BSD) // Gets the file permissions required by the TranslateKit std::vector GetOnDeviceTranslationFilePermissions() { std::vector permissions{ @@ -21,6 +24,7 @@ std::vector GetOnDeviceTranslati }; return permissions; } +#endif } // namespace @@ -29,6 +33,7 @@ bool OnDeviceTranslationSandboxHook( // Call `TranslateKitClient::Get()` to load libtranslatekit.so TranslateKitClient::Get(); +#if !BUILDFLAG(IS_BSD) auto* instance = sandbox::policy::SandboxLinux::GetInstance(); instance->StartBrokerProcess(MakeBrokerCommandSet({ sandbox::syscall_broker::COMMAND_OPEN, @@ -36,7 +41,7 @@ bool OnDeviceTranslationSandboxHook( GetOnDeviceTranslationFilePermissions(), options); instance->EngageNamespaceSandboxIfPossible(); - +#endif return true; } diff --git a/www/iridium/files/patch-components_services_on__device__translation_sandbox__hook.h b/www/iridium/files/patch-components_services_on__device__translation_sandbox__hook.h index 82eb226321fe..fe563f853513 100644 --- a/www/iridium/files/patch-components_services_on__device__translation_sandbox__hook.h +++ b/www/iridium/files/patch-components_services_on__device__translation_sandbox__hook.h @@ -1,16 +1,16 @@ ---- components/services/on_device_translation/sandbox_hook.h.orig 2025-05-07 06:48:23 UTC +--- components/services/on_device_translation/sandbox_hook.h.orig 2025-12-10 15:04:57 UTC +++ components/services/on_device_translation/sandbox_hook.h @@ -5,7 +5,13 @@ #ifndef COMPONENTS_SERVICES_ON_DEVICE_TRANSLATION_SANDBOX_HOOK_H_ #define COMPONENTS_SERVICES_ON_DEVICE_TRANSLATION_SANDBOX_HOOK_H_ +#include "build/build_config.h" + +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif namespace on_device_translation { diff --git a/www/iridium/files/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc b/www/iridium/files/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc index dfc83f8be92c..729455c7372f 100644 --- a/www/iridium/files/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc +++ b/www/iridium/files/patch-components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc @@ -1,29 +1,29 @@ ---- components/services/paint_preview_compositor/paint_preview_compositor_collection_impl.cc.orig 2025-05-07 06:48:23 UTC +--- components/services/paint_preview_compositor/paint_preview_compositor_collection_impl.cc.orig 2025-12-10 15:04:57 UTC +++ components/services/paint_preview_compositor/paint_preview_compositor_collection_impl.cc @@ -22,7 +22,7 @@ #if BUILDFLAG(IS_WIN) #include "content/public/child/dwrite_font_proxy_init_win.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/services/font/public/cpp/font_loader.h" #endif @@ -79,7 +79,7 @@ PaintPreviewCompositorCollectionImpl::PaintPreviewComp // Initialize font access for Skia. #if BUILDFLAG(IS_WIN) content::InitializeDWriteFontProxy(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::PendingRemote font_service; content::UtilityThread::Get()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); @@ -102,7 +102,7 @@ PaintPreviewCompositorCollectionImpl::PaintPreviewComp base::BindOnce([] { skia::DefaultFontMgr(); })); // Sanity check that fonts are working. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // No WebSandbox is provided on Linux so the local fonts aren't accessible. // This is fine since since the subsetted fonts are provided in the SkPicture. // However, we still need to check that the SkFontMgr starts as it is used by diff --git a/www/iridium/files/patch-components_signin_public_base_signin__switches.cc b/www/iridium/files/patch-components_signin_public_base_signin__switches.cc index 93b30b6792b2..9e27ded10a95 100644 --- a/www/iridium/files/patch-components_signin_public_base_signin__switches.cc +++ b/www/iridium/files/patch-components_signin_public_base_signin__switches.cc @@ -1,29 +1,44 @@ ---- components/signin/public/base/signin_switches.cc.orig 2025-11-06 10:11:34 UTC +--- components/signin/public/base/signin_switches.cc.orig 2025-12-10 15:04:57 UTC +++ components/signin/public/base/signin_switches.cc -@@ -96,7 +96,7 @@ BASE_FEATURE(kBrowserSigninInSyncHeaderOnGaiaIntegrati - BASE_FEATURE(kCctSignInPrompt, base::FEATURE_ENABLED_BY_DEFAULT); +@@ -107,7 +107,7 @@ BASE_FEATURE(kChromeAndroidIdentitySurveyBookmarkPromo + base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_FEATURE(kChromeIdentitySurveyAddressBubbleSignin, base::FEATURE_DISABLED_BY_DEFAULT); BASE_FEATURE(kChromeIdentitySurveyDiceWebSigninAccepted, -@@ -123,7 +123,7 @@ BASE_FEATURE(kChromeIdentitySurveySwitchProfileFromPro +@@ -134,7 +134,7 @@ BASE_FEATURE(kChromeIdentitySurveySwitchProfileFromPro base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_FEATURE(kChromeIdentitySurveyLaunchWithDelay, base::FEATURE_ENABLED_BY_DEFAULT); BASE_FEATURE_PARAM(base::TimeDelta, -@@ -325,7 +325,7 @@ BASE_FEATURE(kRetryInterceptionBubbleOnDiceSyncHeaderT +@@ -343,7 +343,7 @@ BASE_FEATURE_PARAM(base::TimeDelta, + base::Days(7)); + #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) + +-#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(kProfileCreationDeclineSigninCTAExperiment, + base::FEATURE_DISABLED_BY_DEFAULT); + +@@ -372,12 +372,12 @@ BASE_FEATURE(kProfilesReordering, base::FEATURE_DISABL BASE_FEATURE(kRollbackDiceMigration, base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) +-#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(kShowProfilePickerToAllUsersExperiment, + base::FEATURE_DISABLED_BY_DEFAULT); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_FEATURE(kSignInPromoMaterialNextUI, base::FEATURE_ENABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-components_signin_public_base_signin__switches.h b/www/iridium/files/patch-components_signin_public_base_signin__switches.h index 8873288e27ff..69a14da9099c 100644 --- a/www/iridium/files/patch-components_signin_public_base_signin__switches.h +++ b/www/iridium/files/patch-components_signin_public_base_signin__switches.h @@ -1,29 +1,46 @@ ---- components/signin/public/base/signin_switches.h.orig 2025-11-06 10:11:34 UTC +--- components/signin/public/base/signin_switches.h.orig 2025-12-10 15:04:57 UTC +++ components/signin/public/base/signin_switches.h -@@ -77,7 +77,7 @@ COMPONENT_EXPORT(SIGNIN_SWITCHES) - BASE_DECLARE_FEATURE(kCctSignInPrompt); +@@ -95,7 +95,7 @@ COMPONENT_EXPORT(SIGNIN_SWITCHES) + BASE_DECLARE_FEATURE(kChromeAndroidIdentitySurveyBookmarkPromo); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables surveys to measure the effectiveness of the identity model. // These surveys would be displayed after interactions such as signin, profile // switching, etc. Please keep sorted alphabetically. -@@ -109,7 +109,7 @@ BASE_DECLARE_FEATURE(kChromeIdentitySurveySwitchProfil +@@ -127,7 +127,7 @@ BASE_DECLARE_FEATURE(kChromeIdentitySurveySwitchProfil // LINT.ThenChange(//chrome/browser/signin/signin_hats_util.cc) #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Controls the duration for which the launch of an identity survey is delayed. COMPONENT_EXPORT(SIGNIN_SWITCHES) BASE_DECLARE_FEATURE(kChromeIdentitySurveyLaunchWithDelay); -@@ -277,7 +277,7 @@ COMPONENT_EXPORT(SIGNIN_SWITCHES) +@@ -287,7 +287,7 @@ BASE_DECLARE_FEATURE_PARAM(base::TimeDelta, + kOfferMigrationToDiceUsersMinTimeBetweenDialogs); + #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Experimenting with changing the secondary CTA for FRE and new profile + // creation. + COMPONENT_EXPORT(SIGNIN_SWITCHES) +@@ -318,14 +318,14 @@ COMPONENT_EXPORT(SIGNIN_SWITCHES) BASE_DECLARE_FEATURE(kRollbackDiceMigration); #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Experimenting with showing the profile picker to all users (not only the + // users with multiple profiles). + COMPONENT_EXPORT(SIGNIN_SWITCHES) + BASE_DECLARE_FEATURE(kShowProfilePickerToAllUsersExperiment); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Uses the Material Next theme for the signin promo. COMPONENT_EXPORT(SIGNIN_SWITCHES) BASE_DECLARE_FEATURE(kSignInPromoMaterialNextUI); diff --git a/www/iridium/files/patch-components_soda_soda__util.cc b/www/iridium/files/patch-components_soda_soda__util.cc index f1d39557198a..8e5668a14b97 100644 --- a/www/iridium/files/patch-components_soda_soda__util.cc +++ b/www/iridium/files/patch-components_soda_soda__util.cc @@ -1,29 +1,29 @@ ---- components/soda/soda_util.cc.orig 2025-05-07 06:48:23 UTC +--- components/soda/soda_util.cc.orig 2025-12-10 15:04:57 UTC +++ components/soda/soda_util.cc @@ -23,7 +23,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 @@ -39,7 +39,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 -@@ -70,7 +70,7 @@ bool IsSupportedWin() { - bool IsOnDeviceSpeechRecognitionSupported() { +@@ -73,7 +73,7 @@ bool IsOnDeviceSpeechRecognitionSupported() { + // support Gemini Nano. #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/iridium/files/patch-components_startup__metric__utils_common_startup__metric__utils.cc b/www/iridium/files/patch-components_startup__metric__utils_common_startup__metric__utils.cc index 01eaf8cd5e9f..a19aceb56efb 100644 --- a/www/iridium/files/patch-components_startup__metric__utils_common_startup__metric__utils.cc +++ b/www/iridium/files/patch-components_startup__metric__utils_common_startup__metric__utils.cc @@ -1,11 +1,11 @@ ---- components/startup_metric_utils/common/startup_metric_utils.cc.orig 2025-09-11 13:19:19 UTC +--- components/startup_metric_utils/common/startup_metric_utils.cc.orig 2025-12-10 15:04:57 UTC +++ components/startup_metric_utils/common/startup_metric_utils.cc @@ -95,7 +95,7 @@ base::TimeTicks CommonStartupMetricRecorder::StartupTi // Enabling this logic on OS X causes a significant performance regression. // TODO(crbug.com/40464036): Remove IS_APPLE ifdef once utility processes // set their desired main thread priority. -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) static bool statics_initialized = false; if (!statics_initialized) { statics_initialized = true; diff --git a/www/iridium/files/patch-components_storage__monitor_BUILD.gn b/www/iridium/files/patch-components_storage__monitor_BUILD.gn index 63438e72eaa3..96cecbfe2753 100644 --- a/www/iridium/files/patch-components_storage__monitor_BUILD.gn +++ b/www/iridium/files/patch-components_storage__monitor_BUILD.gn @@ -1,20 +1,20 @@ ---- components/storage_monitor/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- components/storage_monitor/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ components/storage_monitor/BUILD.gn @@ -73,7 +73,7 @@ component("storage_monitor") { deps += [ "//services/device/public/mojom" ] } } else if (is_linux) { - if (use_udev) { + if (use_udev && !is_bsd) { sources += [ "mtab_watcher_linux.cc", "mtab_watcher_linux.h", @@ -182,7 +182,7 @@ source_set("unit_tests") { "storage_monitor_chromeos_unittest.cc", ] } - } else if (is_linux) { + } else if (is_linux && !is_bsd) { if (use_udev) { sources += [ "storage_monitor_linux_unittest.cc" ] } diff --git a/www/iridium/files/patch-components_storage__monitor_removable__device__constants.cc b/www/iridium/files/patch-components_storage__monitor_removable__device__constants.cc index ea0204d7bff3..1d59bf6f3293 100644 --- a/www/iridium/files/patch-components_storage__monitor_removable__device__constants.cc +++ b/www/iridium/files/patch-components_storage__monitor_removable__device__constants.cc @@ -1,11 +1,11 @@ ---- components/storage_monitor/removable_device_constants.cc.orig 2025-05-07 06:48:23 UTC +--- components/storage_monitor/removable_device_constants.cc.orig 2025-12-10 15:04:57 UTC +++ components/storage_monitor/removable_device_constants.cc @@ -10,7 +10,7 @@ namespace storage_monitor { const char kFSUniqueIdPrefix[] = "UUID:"; const char kVendorModelSerialPrefix[] = "VendorModelSerial:"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kVendorModelVolumeStoragePrefix[] = "VendorModelVolumeStorage:"; #endif diff --git a/www/iridium/files/patch-components_storage__monitor_removable__device__constants.h b/www/iridium/files/patch-components_storage__monitor_removable__device__constants.h index 5f2003c7d9da..c84994848606 100644 --- a/www/iridium/files/patch-components_storage__monitor_removable__device__constants.h +++ b/www/iridium/files/patch-components_storage__monitor_removable__device__constants.h @@ -1,11 +1,11 @@ ---- components/storage_monitor/removable_device_constants.h.orig 2025-05-07 06:48:23 UTC +--- components/storage_monitor/removable_device_constants.h.orig 2025-12-10 15:04:57 UTC +++ components/storage_monitor/removable_device_constants.h @@ -15,7 +15,7 @@ namespace storage_monitor { extern COMPONENT_EXPORT(STORAGE_MONITOR) const char kFSUniqueIdPrefix[]; extern COMPONENT_EXPORT(STORAGE_MONITOR) const char kVendorModelSerialPrefix[]; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern COMPONENT_EXPORT(STORAGE_MONITOR) const char kVendorModelVolumeStoragePrefix[]; #endif diff --git a/www/iridium/files/patch-components_supervised__user_core_browser_child__account__service.cc b/www/iridium/files/patch-components_supervised__user_core_browser_child__account__service.cc index 7f2ec240d37b..ac77167f68bb 100644 --- a/www/iridium/files/patch-components_supervised__user_core_browser_child__account__service.cc +++ b/www/iridium/files/patch-components_supervised__user_core_browser_child__account__service.cc @@ -1,11 +1,11 @@ ---- components/supervised_user/core/browser/child_account_service.cc.orig 2025-09-11 13:19:19 UTC +--- components/supervised_user/core/browser/child_account_service.cc.orig 2025-12-10 15:04:57 UTC +++ components/supervised_user/core/browser/child_account_service.cc @@ -170,7 +170,7 @@ void ChildAccountService::OnPrimaryAccountChanged( void ChildAccountService::UpdateForceGoogleSafeSearch() { // On platforms without web sign-out (where the primary account is always // authenticated), there's no need to force SafeSearch. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) bool is_subject_to_parental_controls = IsPrimaryAccountSubjectToParentalControls(identity_manager_) == signin::Tribool::kTrue; diff --git a/www/iridium/files/patch-components_supervised__user_core_browser_kids__chrome__management__url__checker__client.cc b/www/iridium/files/patch-components_supervised__user_core_browser_kids__chrome__management__url__checker__client.cc index 0194c35bc0ba..0b1b1ad9193e 100644 --- a/www/iridium/files/patch-components_supervised__user_core_browser_kids__chrome__management__url__checker__client.cc +++ b/www/iridium/files/patch-components_supervised__user_core_browser_kids__chrome__management__url__checker__client.cc @@ -1,11 +1,11 @@ ---- components/supervised_user/core/browser/kids_chrome_management_url_checker_client.cc.orig 2025-09-11 13:19:19 UTC +--- components/supervised_user/core/browser/kids_chrome_management_url_checker_client.cc.orig 2025-12-10 15:04:57 UTC +++ components/supervised_user/core/browser/kids_chrome_management_url_checker_client.cc @@ -66,7 +66,7 @@ void OnResponse( } FetcherConfig GetFetcherConfig(bool is_subject_to_parental_controls) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Supervised users on these platforms might get into a state where their // credentials are not available, so best-effort access mode is a graceful // fallback here. diff --git a/www/iridium/files/patch-components_supervised__user_core_browser_list__family__members__service.h b/www/iridium/files/patch-components_supervised__user_core_browser_list__family__members__service.h index 2cde2330af4f..d08aff003e9b 100644 --- a/www/iridium/files/patch-components_supervised__user_core_browser_list__family__members__service.h +++ b/www/iridium/files/patch-components_supervised__user_core_browser_list__family__members__service.h @@ -1,11 +1,11 @@ ---- components/supervised_user/core/browser/list_family_members_service.h.orig 2025-05-07 06:48:23 UTC +--- components/supervised_user/core/browser/list_family_members_service.h.orig 2025-12-10 15:04:57 UTC +++ components/supervised_user/core/browser/list_family_members_service.h @@ -33,7 +33,7 @@ namespace supervised_user { // If true, this fetcher is active for all users with CanFetchFamilyMemberInfo // capability. Otherwise, it is only used by supervised users. constexpr bool FetchListFamilyMembersWithCapability() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/iridium/files/patch-components_supervised__user_core_browser_supervised__user__metrics__service.cc b/www/iridium/files/patch-components_supervised__user_core_browser_supervised__user__metrics__service.cc index e2951c168e91..736b7e76a942 100644 --- a/www/iridium/files/patch-components_supervised__user_core_browser_supervised__user__metrics__service.cc +++ b/www/iridium/files/patch-components_supervised__user_core_browser_supervised__user__metrics__service.cc @@ -1,11 +1,11 @@ ---- components/supervised_user/core/browser/supervised_user_metrics_service.cc.orig 2025-09-11 13:19:19 UTC +--- components/supervised_user/core/browser/supervised_user_metrics_service.cc.orig 2025-12-10 15:04:57 UTC +++ components/supervised_user/core/browser/supervised_user_metrics_service.cc @@ -103,7 +103,7 @@ SupervisedUserMetricsService::SupervisedUserMetricsSer std::move(metrics_service_accessor_delegate)) { DCHECK(pref_service_); supervised_user_service_observation_.Observe(&supervised_user_service); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) CHECK(extensions_metrics_delegate_) << "Extensions metrics delegate must exist on Win/Linux/Mac"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-components_supervised__user_core_browser_supervised__user__preferences.cc b/www/iridium/files/patch-components_supervised__user_core_browser_supervised__user__preferences.cc index d494d06ce4de..02ef92211ac7 100644 --- a/www/iridium/files/patch-components_supervised__user_core_browser_supervised__user__preferences.cc +++ b/www/iridium/files/patch-components_supervised__user_core_browser_supervised__user__preferences.cc @@ -1,11 +1,11 @@ ---- components/supervised_user/core/browser/supervised_user_preferences.cc.orig 2025-10-28 14:29:43 UTC +--- components/supervised_user/core/browser/supervised_user_preferences.cc.orig 2025-12-10 15:04:57 UTC +++ components/supervised_user/core/browser/supervised_user_preferences.cc @@ -149,7 +149,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry registry->RegisterBooleanPref(prefs::kChildAccountStatusKnown, false); registry->RegisterStringPref(prefs::kFamilyLinkUserMemberRole, std::string()); #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/iridium/files/patch-components_supervised__user_core_common_features.cc b/www/iridium/files/patch-components_supervised__user_core_common_features.cc index e994f4d4f42b..b6e4492f42e7 100644 --- a/www/iridium/files/patch-components_supervised__user_core_common_features.cc +++ b/www/iridium/files/patch-components_supervised__user_core_common_features.cc @@ -1,38 +1,38 @@ ---- components/supervised_user/core/common/features.cc.orig 2025-11-06 10:11:34 UTC +--- components/supervised_user/core/common/features.cc.orig 2025-12-10 15:04:57 UTC +++ components/supervised_user/core/common/features.cc @@ -32,7 +32,7 @@ BASE_FEATURE(kAllowSubframeLocalWebApprovals, #endif #if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const int kLocalWebApprovalBottomSheetLoadTimeoutDefaultValueMs = 5000; const base::FeatureParam kLocalWebApprovalBottomSheetLoadTimeoutMs{ @@ -41,7 +41,7 @@ const base::FeatureParam kLocalWebApprovalBottomS #endif // BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_WIN) -#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(kEnableLocalWebApprovalErrorDialog, base::FEATURE_ENABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) @@ -53,7 +53,7 @@ BASE_FEATURE(kLocalWebApprovalsWidgetSupportsUrlPayloa // TODO(crbug.com/435635774): Release the interstitial v3 in all platforms. BASE_FEATURE(kSupervisedUserBlockInterstitialV3, #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_IOS) + BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT); #else base::FEATURE_DISABLED_BY_DEFAULT); @@ -89,7 +89,7 @@ bool IsLocalWebApprovalsEnabledForSubframes() { return base::FeatureList::IsEnabled(kAllowSubframeLocalWebApprovals); } -#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(kEnableSupervisedUserVersionSignOutDialog, base::FEATURE_ENABLED_BY_DEFAULT); #endif diff --git a/www/iridium/files/patch-components_supervised__user_core_common_features.h b/www/iridium/files/patch-components_supervised__user_core_common_features.h index d34cd4493c22..45bc392590af 100644 --- a/www/iridium/files/patch-components_supervised__user_core_common_features.h +++ b/www/iridium/files/patch-components_supervised__user_core_common_features.h @@ -1,26 +1,26 @@ ---- components/supervised_user/core/common/features.h.orig 2025-09-11 13:19:19 UTC +--- components/supervised_user/core/common/features.h.orig 2025-12-10 15:04:57 UTC +++ components/supervised_user/core/common/features.h @@ -20,12 +20,12 @@ BASE_DECLARE_FEATURE(kLocalWebApprovals); BASE_DECLARE_FEATURE(kAllowSubframeLocalWebApprovals); #if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extern const base::FeatureParam kLocalWebApprovalBottomSheetLoadTimeoutMs; #endif // BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Whether we show an error screen in case of failure of a local web approval. BASE_DECLARE_FEATURE(kEnableLocalWebApprovalErrorDialog); #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) @@ -37,7 +37,7 @@ BASE_DECLARE_FEATURE(kLocalWebApprovalsWidgetSupportsU // Whether supervised users see an updated URL filter interstitial. BASE_DECLARE_FEATURE(kSupervisedUserBlockInterstitialV3); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Uses supervised user strings on the signout dialog. BASE_DECLARE_FEATURE(kEnableSupervisedUserVersionSignOutDialog); #endif diff --git a/www/iridium/files/patch-components_supervised__user_core_common_pref__names.h b/www/iridium/files/patch-components_supervised__user_core_common_pref__names.h index 465766c01bce..658e855fbd8d 100644 --- a/www/iridium/files/patch-components_supervised__user_core_common_pref__names.h +++ b/www/iridium/files/patch-components_supervised__user_core_common_pref__names.h @@ -1,11 +1,11 @@ ---- components/supervised_user/core/common/pref_names.h.orig 2025-06-19 07:37:57 UTC +--- components/supervised_user/core/common/pref_names.h.orig 2025-12-10 15:04:57 UTC +++ components/supervised_user/core/common/pref_names.h @@ -129,7 +129,7 @@ inline constexpr char kDefaultSupervisedUserFilteringB "profile.managed.default_filtering_behavior"; #if BUILDFLAG(ENABLE_EXTENSIONS_CORE) -#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/iridium/files/patch-components_sync__bookmarks_bookmark__model__view.cc b/www/iridium/files/patch-components_sync__bookmarks_bookmark__model__view.cc index 601c193bafa0..f8b82784212b 100644 --- a/www/iridium/files/patch-components_sync__bookmarks_bookmark__model__view.cc +++ b/www/iridium/files/patch-components_sync__bookmarks_bookmark__model__view.cc @@ -1,20 +1,20 @@ ---- components/sync_bookmarks/bookmark_model_view.cc.orig 2025-11-06 10:11:34 UTC +--- components/sync_bookmarks/bookmark_model_view.cc.orig 2025-12-10 15:04:57 UTC +++ components/sync_bookmarks/bookmark_model_view.cc @@ -9,7 +9,7 @@ #include "components/bookmarks/browser/bookmark_model.h" #include "components/bookmarks/browser/bookmark_node.h" #include "components/bookmarks/common/bookmark_metrics.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 "components/sync_bookmarks/initial_account_bookmark_deduplicator.h" - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - -@@ -250,7 +250,7 @@ void BookmarkModelViewUsingAccountNodes::RemoveAllSync + #include "base/metrics/histogram_base.h" + #include "base/metrics/histogram_functions.h" + #include "base/time/time.h" +@@ -253,7 +253,7 @@ void BookmarkModelViewUsingAccountNodes::RemoveAllSync void BookmarkModelViewUsingAccountNodes:: MaybeRemoveUnderlyingModelDuplicatesUponInitialSync() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - InitialAccountBookmarkDeduplicator initial_account_bookmark_deduplicator( - underlying_model()); - initial_account_bookmark_deduplicator.Deduplicate(); + BeginExtensiveChanges(); + + const base::Time deduplication_start_time = base::Time::Now(); diff --git a/www/iridium/files/patch-components_sync__device__info_local__device__info__util.cc b/www/iridium/files/patch-components_sync__device__info_local__device__info__util.cc index a5fb7c146cdf..d52dc27b1cd7 100644 --- a/www/iridium/files/patch-components_sync__device__info_local__device__info__util.cc +++ b/www/iridium/files/patch-components_sync__device__info_local__device__info__util.cc @@ -1,20 +1,20 @@ ---- components/sync_device_info/local_device_info_util.cc.orig 2025-11-06 10:11:34 UTC +--- components/sync_device_info/local_device_info_util.cc.orig 2025-12-10 15:04:57 UTC +++ components/sync_device_info/local_device_info_util.cc @@ -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 @@ sync_pb::SyncEnums::DeviceType GetLocalDeviceType() { DeviceInfo::OsType GetLocalDeviceOSType() { #if BUILDFLAG(IS_CHROMEOS) return DeviceInfo::OsType::kChromeOsAsh; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return DeviceInfo::OsType::kLinux; #elif BUILDFLAG(IS_ANDROID) return DeviceInfo::OsType::kAndroid; diff --git a/www/iridium/files/patch-components_sync__device__info_local__device__info__util__linux.cc b/www/iridium/files/patch-components_sync__device__info_local__device__info__util__linux.cc index 76d483a3c5ee..3c641c6825fd 100644 --- a/www/iridium/files/patch-components_sync__device__info_local__device__info__util__linux.cc +++ b/www/iridium/files/patch-components_sync__device__info_local__device__info__util__linux.cc @@ -1,14 +1,14 @@ ---- components/sync_device_info/local_device_info_util_linux.cc.orig 2025-05-07 06:48:23 UTC +--- components/sync_device_info/local_device_info_util_linux.cc.orig 2025-12-10 15:04:57 UTC +++ components/sync_device_info/local_device_info_util_linux.cc @@ -9,6 +9,11 @@ #include "base/linux_util.h" +#if defined(__FreeBSD__) +#include +#define HOST_NAME_MAX MAXHOSTNAMELEN +#endif + namespace syncer { std::string GetPersonalizableDeviceNameInternal() { diff --git a/www/iridium/files/patch-components_sync__preferences_common__syncable__prefs__database.cc b/www/iridium/files/patch-components_sync__preferences_common__syncable__prefs__database.cc index f0c1f5dcdbc8..901ba1588633 100644 --- a/www/iridium/files/patch-components_sync__preferences_common__syncable__prefs__database.cc +++ b/www/iridium/files/patch-components_sync__preferences_common__syncable__prefs__database.cc @@ -1,11 +1,11 @@ ---- components/sync_preferences/common_syncable_prefs_database.cc.orig 2025-11-06 10:11:34 UTC +--- components/sync_preferences/common_syncable_prefs_database.cc.orig 2025-12-10 15:04:57 UTC +++ components/sync_preferences/common_syncable_prefs_database.cc -@@ -365,7 +365,7 @@ constexpr auto kCommonSyncablePrefsAllowlist = +@@ -410,7 +410,7 @@ constexpr auto kCommonSyncablePrefsAllowlist = syncer::PREFERENCES, PrefSensitivity::kNone, MergeBehavior::kNone}}, #endif // 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) {autofill::prefs::kAutofillBnplEnabled, {syncable_prefs_ids::kAutofillBnplEnabled, syncer::PREFERENCES, PrefSensitivity::kNone, MergeBehavior::kNone}}, diff --git a/www/iridium/files/patch-components_sync_service_sync__prefs.cc b/www/iridium/files/patch-components_sync_service_sync__prefs.cc index 9fc4f63c20e5..717c76500109 100644 --- a/www/iridium/files/patch-components_sync_service_sync__prefs.cc +++ b/www/iridium/files/patch-components_sync_service_sync__prefs.cc @@ -1,11 +1,11 @@ ---- components/sync/service/sync_prefs.cc.orig 2025-10-28 14:29:43 UTC +--- components/sync/service/sync_prefs.cc.orig 2025-12-10 15:04:57 UTC +++ components/sync/service/sync_prefs.cc @@ -840,7 +840,7 @@ bool SyncPrefs::MaybeMigratePrefsForSyncToSigninPart1( update_selected_types_dict->EnsureDict( signin::GaiaIdHash::FromGaiaId(gaia_id).ToBase64()); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Preserve the user's existing enabled state for Bookmarks, Reading List, // and Preferences. Otherwise, use the default value, which will be true // after `kReplaceSyncPromosWithSignInPromos`. diff --git a/www/iridium/files/patch-components_sync_service_sync__service__impl.cc b/www/iridium/files/patch-components_sync_service_sync__service__impl.cc index ad316fb3e424..557175843d3d 100644 --- a/www/iridium/files/patch-components_sync_service_sync__service__impl.cc +++ b/www/iridium/files/patch-components_sync_service_sync__service__impl.cc @@ -1,11 +1,11 @@ ---- components/sync/service/sync_service_impl.cc.orig 2025-11-06 10:11:34 UTC +--- components/sync/service/sync_service_impl.cc.orig 2025-12-10 15:04:57 UTC +++ components/sync/service/sync_service_impl.cc -@@ -1376,7 +1376,7 @@ void SyncServiceImpl::ReconfigureDataTypesDueToCrypto( +@@ -1384,7 +1384,7 @@ void SyncServiceImpl::ReconfigureDataTypesDueToCrypto( void SyncServiceImpl::PassphraseTypeChanged(PassphraseType passphrase_type) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); -#if !(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)) +#if !(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) // If kReplaceSyncPromosWithSignInPromos is enabled, new users with custom // passphrase should have kAutofill disabled upon the initial sign-in. This is // done to prevent confusion, as addresses are NOT encrypted by the custom diff --git a/www/iridium/files/patch-components_system__cpu_cpu__probe.cc b/www/iridium/files/patch-components_system__cpu_cpu__probe.cc index 7ef01fa814f8..dfbfb705f447 100644 --- a/www/iridium/files/patch-components_system__cpu_cpu__probe.cc +++ b/www/iridium/files/patch-components_system__cpu_cpu__probe.cc @@ -1,23 +1,23 @@ ---- components/system_cpu/cpu_probe.cc.orig 2025-09-11 13:19:19 UTC +--- components/system_cpu/cpu_probe.cc.orig 2025-12-10 15:04:57 UTC +++ components/system_cpu/cpu_probe.cc @@ -20,6 +20,10 @@ #include "components/system_cpu/cpu_probe_mac.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_BSD) +#include "base/notimplemented.h" +#endif + namespace system_cpu { // static @@ -30,6 +34,9 @@ std::unique_ptr CpuProbe::Create() { return CpuProbeWin::Create(); #elif BUILDFLAG(IS_MAC) return CpuProbeMac::Create(); +#elif BUILDFLAG(IS_BSD) + NOTIMPLEMENTED(); + return nullptr; #else return nullptr; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/iridium/files/patch-components_translate_core_common_translate__util.cc b/www/iridium/files/patch-components_translate_core_common_translate__util.cc index 7beeaa6ad3c9..b807f9f71c19 100644 --- a/www/iridium/files/patch-components_translate_core_common_translate__util.cc +++ b/www/iridium/files/patch-components_translate_core_common_translate__util.cc @@ -1,11 +1,11 @@ ---- components/translate/core/common/translate_util.cc.orig 2025-11-06 10:11:34 UTC +--- components/translate/core/common/translate_util.cc.orig 2025-12-10 15:04:57 UTC +++ components/translate/core/common/translate_util.cc @@ -19,7 +19,7 @@ const char kSecurityOrigin[] = "trk:220:https://transl // TODO(crbug.com/40819484): Enable the feature on WebView. BASE_FEATURE(kTFLiteLanguageDetectionEnabled, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/iridium/files/patch-components_trusted__vault_trusted__vault__connection__impl.cc b/www/iridium/files/patch-components_trusted__vault_trusted__vault__connection__impl.cc index 4405aac2c2c4..c7cb752c4a25 100644 --- a/www/iridium/files/patch-components_trusted__vault_trusted__vault__connection__impl.cc +++ b/www/iridium/files/patch-components_trusted__vault_trusted__vault__connection__impl.cc @@ -1,11 +1,11 @@ ---- components/trusted_vault/trusted_vault_connection_impl.cc.orig 2025-09-11 13:19:19 UTC +--- components/trusted_vault/trusted_vault_connection_impl.cc.orig 2025-12-10 15:04:57 UTC +++ components/trusted_vault/trusted_vault_connection_impl.cc @@ -105,7 +105,7 @@ GetLocalPhysicalDeviceType() { // currently used or even built on all platforms. #if BUILDFLAG(IS_CHROMEOS) return trusted_vault_pb::PhysicalDeviceMetadata::DEVICE_TYPE_CHROMEOS; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return trusted_vault_pb::PhysicalDeviceMetadata::DEVICE_TYPE_LINUX; #elif BUILDFLAG(IS_ANDROID) return trusted_vault_pb::PhysicalDeviceMetadata::DEVICE_TYPE_ANDROID; diff --git a/www/iridium/files/patch-components_update__client_update__query__params.cc b/www/iridium/files/patch-components_update__client_update__query__params.cc index 340fbed23c13..b86215d8e3db 100644 --- a/www/iridium/files/patch-components_update__client_update__query__params.cc +++ b/www/iridium/files/patch-components_update__client_update__query__params.cc @@ -1,11 +1,11 @@ ---- components/update_client/update_query_params.cc.orig 2025-11-06 10:11:34 UTC +--- components/update_client/update_query_params.cc.orig 2025-12-10 15:04:57 UTC +++ components/update_client/update_query_params.cc @@ -39,6 +39,8 @@ constexpr std::string_view kOs = "fuchsia"; #elif BUILDFLAG(IS_OPENBSD) "openbsd"; +#elif defined(OS_FREEBSD) + "freebsd"; #else #error "unknown os" #endif diff --git a/www/iridium/files/patch-components_url__formatter_spoof__checks_idn__spoof__checker.cc b/www/iridium/files/patch-components_url__formatter_spoof__checks_idn__spoof__checker.cc index d01ae012f1eb..e345d1b7b200 100644 --- a/www/iridium/files/patch-components_url__formatter_spoof__checks_idn__spoof__checker.cc +++ b/www/iridium/files/patch-components_url__formatter_spoof__checks_idn__spoof__checker.cc @@ -1,11 +1,11 @@ ---- components/url_formatter/spoof_checks/idn_spoof_checker.cc.orig 2025-10-28 14:29:43 UTC +--- components/url_formatter/spoof_checks/idn_spoof_checker.cc.orig 2025-12-10 15:04:57 UTC +++ components/url_formatter/spoof_checks/idn_spoof_checker.cc -@@ -299,7 +299,7 @@ IDNSpoofChecker::IDNSpoofChecker() { +@@ -305,7 +305,7 @@ IDNSpoofChecker::IDNSpoofChecker() { // The ideal fix would be to change the omnibox font used for Thai. In // that case, the Linux-only list should be revisited and potentially // removed. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) "[ทนบพรหเแ๐ดลปฟม]", #else "[บพเแ๐]", diff --git a/www/iridium/files/patch-components_user__education_views_help__bubble__view.cc b/www/iridium/files/patch-components_user__education_views_help__bubble__view.cc index 1c6ee84435ac..708c4f30cb0f 100644 --- a/www/iridium/files/patch-components_user__education_views_help__bubble__view.cc +++ b/www/iridium/files/patch-components_user__education_views_help__bubble__view.cc @@ -1,29 +1,29 @@ ---- components/user_education/views/help_bubble_view.cc.orig 2025-09-11 13:19:19 UTC +--- components/user_education/views/help_bubble_view.cc.orig 2025-12-10 15:04:57 UTC +++ components/user_education/views/help_bubble_view.cc @@ -269,7 +269,7 @@ DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(HelpBubbleView, // TODO(https://crbug.com/382611284): Temporarily handle the case when the // primary window is minimized by closing the help bubble. Remove this code when // the issue is solved at the Views framework level. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) class HelpBubbleView::PrimaryWidgetObserver : public views::WidgetObserver { public: explicit PrimaryWidgetObserver(HelpBubbleView& help_bubble) @@ -733,7 +733,7 @@ HelpBubbleView::HelpBubbleView( event_relay_->Init(this); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) primary_widget_observer_ = std::make_unique(*this); #endif @@ -845,7 +845,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) || 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. This also applies to bubbles anchored to diff --git a/www/iridium/files/patch-components_user__education_views_help__bubble__view.h b/www/iridium/files/patch-components_user__education_views_help__bubble__view.h index 6f37f0a7bb79..b151392c2026 100644 --- a/www/iridium/files/patch-components_user__education_views_help__bubble__view.h +++ b/www/iridium/files/patch-components_user__education_views_help__bubble__view.h @@ -1,11 +1,11 @@ ---- components/user_education/views/help_bubble_view.h.orig 2025-05-07 06:48:23 UTC +--- components/user_education/views/help_bubble_view.h.orig 2025-12-10 15:04:57 UTC +++ components/user_education/views/help_bubble_view.h @@ -160,7 +160,7 @@ class HelpBubbleView : public views::BubbleDialogDeleg // work around this problem by closing the bubble if the widget is minimized. // When the underlying issue is fixed at the framework level, this can be // removed. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) class PrimaryWidgetObserver; std::unique_ptr primary_widget_observer_; #endif diff --git a/www/iridium/files/patch-components_variations_service_variations__service.cc b/www/iridium/files/patch-components_variations_service_variations__service.cc index 6399a4970e18..4abc22cf4b04 100644 --- a/www/iridium/files/patch-components_variations_service_variations__service.cc +++ b/www/iridium/files/patch-components_variations_service_variations__service.cc @@ -1,11 +1,11 @@ ---- components/variations/service/variations_service.cc.orig 2025-10-28 14:29:43 UTC +--- components/variations/service/variations_service.cc.orig 2025-12-10 15:04:57 UTC +++ components/variations/service/variations_service.cc -@@ -100,7 +100,7 @@ std::string GetPlatformString() { +@@ -99,7 +99,7 @@ std::string GetPlatformString() { return "android"; #elif BUILDFLAG(IS_FUCHSIA) return "fuchsia"; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_SOLARIS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_BSD) // Default BSD and SOLARIS to Linux to not break those builds, although these // platforms are not officially supported by Chrome. return "linux"; diff --git a/www/iridium/files/patch-components_visited__url__ranking_public_url__visit__util.cc b/www/iridium/files/patch-components_visited__url__ranking_public_url__visit__util.cc index 0deadd4498b5..168a0315d871 100644 --- a/www/iridium/files/patch-components_visited__url__ranking_public_url__visit__util.cc +++ b/www/iridium/files/patch-components_visited__url__ranking_public_url__visit__util.cc @@ -1,11 +1,11 @@ ---- components/visited_url_ranking/public/url_visit_util.cc.orig 2025-06-19 07:37:57 UTC +--- components/visited_url_ranking/public/url_visit_util.cc.orig 2025-12-10 15:04:57 UTC +++ components/visited_url_ranking/public/url_visit_util.cc @@ -68,7 +68,7 @@ PlatformType GetPlatformInput() { return PlatformType::kWindows; #elif BUILDFLAG(IS_MAC) return PlatformType::kMac; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return PlatformType::kLinux; #elif BUILDFLAG(IS_IOS) return PlatformType::kIos; diff --git a/www/iridium/files/patch-components_viz_host_gpu__host__impl.cc b/www/iridium/files/patch-components_viz_host_gpu__host__impl.cc index 9d4311fc21ba..bf7b5a205938 100644 --- a/www/iridium/files/patch-components_viz_host_gpu__host__impl.cc +++ b/www/iridium/files/patch-components_viz_host_gpu__host__impl.cc @@ -1,11 +1,11 @@ ---- components/viz/host/gpu_host_impl.cc.orig 2025-11-06 10:11:34 UTC +--- components/viz/host/gpu_host_impl.cc.orig 2025-12-10 15:04:57 UTC +++ components/viz/host/gpu_host_impl.cc -@@ -156,7 +156,7 @@ GpuHostImpl::GpuHostImpl(Delegate* delegate, +@@ -157,7 +157,7 @@ GpuHostImpl::GpuHostImpl(Delegate* delegate, mojom::GpuServiceCreationParams::New(); #if BUILDFLAG(IS_OZONE) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Linux has an issue when running in single-process mode wherein // GetPlatformRuntimeProperties() browser-side calls can have a data race with // in-process GPU service initialization. The call to diff --git a/www/iridium/files/patch-components_viz_host_host__display__client.cc b/www/iridium/files/patch-components_viz_host_host__display__client.cc index a25809db851a..553a7a54721d 100644 --- a/www/iridium/files/patch-components_viz_host_host__display__client.cc +++ b/www/iridium/files/patch-components_viz_host_host__display__client.cc @@ -1,14 +1,14 @@ ---- components/viz/host/host_display_client.cc.orig 2025-09-11 13:19:19 UTC +--- components/viz/host/host_display_client.cc.orig 2025-12-10 15:04:57 UTC +++ components/viz/host/host_display_client.cc @@ -66,9 +66,9 @@ void HostDisplayClient::AddChildWindowToBrowser( } #endif -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) void HostDisplayClient::DidCompleteSwapWithNewSize(const gfx::Size& size) { - NOTIMPLEMENTED(); + NOTREACHED(); } #endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) diff --git a/www/iridium/files/patch-components_viz_host_host__display__client.h b/www/iridium/files/patch-components_viz_host_host__display__client.h index cbade4578c85..dd2071e0e6d8 100644 --- a/www/iridium/files/patch-components_viz_host_host__display__client.h +++ b/www/iridium/files/patch-components_viz_host_host__display__client.h @@ -1,11 +1,11 @@ ---- components/viz/host/host_display_client.h.orig 2025-05-07 06:48:23 UTC +--- components/viz/host/host_display_client.h.orig 2025-12-10 15:04:57 UTC +++ components/viz/host/host_display_client.h @@ -52,7 +52,7 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom void AddChildWindowToBrowser(gpu::SurfaceHandle child_window) override; #endif -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) void DidCompleteSwapWithNewSize(const gfx::Size& size) override; #endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) diff --git a/www/iridium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc b/www/iridium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc index 2e4a0de42203..fa15baa9f88a 100644 --- a/www/iridium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2025-12-10 15:04:57 UTC +++ components/viz/service/display_embedder/skia_output_surface_impl.cc -@@ -1557,7 +1557,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor +@@ -1556,7 +1556,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/iridium/files/patch-components_viz_service_display__embedder_software__output__surface.cc b/www/iridium/files/patch-components_viz_service_display__embedder_software__output__surface.cc index c6b0898d9c76..0c799f5bd89e 100644 --- a/www/iridium/files/patch-components_viz_service_display__embedder_software__output__surface.cc +++ b/www/iridium/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 2025-05-07 06:48:23 UTC +--- components/viz/service/display_embedder/software_output_surface.cc.orig 2025-12-10 15:04:57 UTC +++ components/viz/service/display_embedder/software_output_surface.cc @@ -115,7 +115,7 @@ void SoftwareOutputSurface::SwapBuffersCallback(base:: base::TimeTicks now = base::TimeTicks::Now(); base::TimeDelta interval_to_next_refresh = now.SnappedToNextTick(refresh_timebase_, refresh_interval_) - now; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (needs_swap_size_notifications_) client_->DidSwapWithSize(pixel_size); #endif @@ -142,7 +142,7 @@ gfx::OverlayTransform SoftwareOutputSurface::GetDispla return gfx::OVERLAY_TRANSFORM_NONE; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void SoftwareOutputSurface::SetNeedsSwapSizeNotifications( bool needs_swap_size_notifications) { needs_swap_size_notifications_ = needs_swap_size_notifications; diff --git a/www/iridium/files/patch-components_viz_service_display__embedder_software__output__surface.h b/www/iridium/files/patch-components_viz_service_display__embedder_software__output__surface.h index 282d9dbbee13..3a3c05b0163d 100644 --- a/www/iridium/files/patch-components_viz_service_display__embedder_software__output__surface.h +++ b/www/iridium/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 2025-09-11 13:19:19 UTC +--- components/viz/service/display_embedder/software_output_surface.h.orig 2025-12-10 15:04:57 UTC +++ components/viz/service/display_embedder/software_output_surface.h @@ -40,7 +40,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputSurface : publi UpdateVSyncParametersCallback callback) override; void SetDisplayTransformHint(gfx::OverlayTransform transform) override {} gfx::OverlayTransform GetDisplayTransform() override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void SetNeedsSwapSizeNotifications( bool needs_swap_size_notifications) override; #endif @@ -58,7 +58,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputSurface : publi base::TimeTicks refresh_timebase_; base::TimeDelta refresh_interval_ = BeginFrameArgs::DefaultInterval(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool needs_swap_size_notifications_ = false; #endif diff --git a/www/iridium/files/patch-components_viz_service_display_skia__renderer.cc b/www/iridium/files/patch-components_viz_service_display_skia__renderer.cc index bc9f271b6f5d..b30db19df48b 100644 --- a/www/iridium/files/patch-components_viz_service_display_skia__renderer.cc +++ b/www/iridium/files/patch-components_viz_service_display_skia__renderer.cc @@ -1,11 +1,11 @@ ---- components/viz/service/display/skia_renderer.cc.orig 2025-11-06 10:11:34 UTC +--- components/viz/service/display/skia_renderer.cc.orig 2025-12-10 15:04:57 UTC +++ components/viz/service/display/skia_renderer.cc -@@ -1379,7 +1379,7 @@ void SkiaRenderer::ClearFramebuffer() { +@@ -1299,7 +1299,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/iridium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc b/www/iridium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc index 6faed36ef380..d943a2e42cca 100644 --- a/www/iridium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2025-12-10 15:04:57 UTC +++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc -@@ -141,7 +141,7 @@ RootCompositorFrameSinkImpl::Create( +@@ -142,7 +142,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); -@@ -903,7 +903,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw +@@ -904,7 +904,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/iridium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h b/www/iridium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h index 3504eed85412..ee19dfc1d0b6 100644 --- a/www/iridium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h +++ b/www/iridium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h @@ -1,11 +1,11 @@ ---- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h.orig 2025-10-28 14:29:43 UTC +--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h.orig 2025-12-10 15:04:57 UTC +++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h @@ -222,7 +222,7 @@ class VIZ_SERVICE_EXPORT RootCompositorFrameSinkImpl base::TimeDelta display_frame_interval_ = BeginFrameArgs::DefaultInterval(); base::TimeDelta preferred_frame_interval_; -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) gfx::Size last_swap_pixel_size_; #endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) diff --git a/www/iridium/files/patch-components_viz_service_gl_gpu__service__impl.cc b/www/iridium/files/patch-components_viz_service_gl_gpu__service__impl.cc index 50c2fce8d216..530868eb782c 100644 --- a/www/iridium/files/patch-components_viz_service_gl_gpu__service__impl.cc +++ b/www/iridium/files/patch-components_viz_service_gl_gpu__service__impl.cc @@ -1,20 +1,20 @@ ---- components/viz/service/gl/gpu_service_impl.cc.orig 2025-11-06 10:11:34 UTC +--- components/viz/service/gl/gpu_service_impl.cc.orig 2025-12-10 15:04:57 UTC +++ components/viz/service/gl/gpu_service_impl.cc -@@ -481,7 +481,7 @@ void GpuServiceImpl::InitializeWithHostInternal( +@@ -460,7 +460,7 @@ void GpuServiceImpl::InitializeWithHostInternal( mojo::Remote gpu_host(std::move(pending_gpu_host)); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gpu_extra_info_.is_gmb_nv12_supported = IsGMBNV12Supported(); #endif -@@ -1246,7 +1246,7 @@ bool GpuServiceImpl::OnBeginFrameDerivedImpl(const Beg +@@ -1223,7 +1223,7 @@ bool GpuServiceImpl::OnBeginFrameDerivedImpl(const Beg return true; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool GpuServiceImpl::IsGMBNV12Supported() { CHECK(main_runner_->BelongsToCurrentThread()); diff --git a/www/iridium/files/patch-components_viz_service_gl_gpu__service__impl.h b/www/iridium/files/patch-components_viz_service_gl_gpu__service__impl.h index 085c44273fee..88dfabb7d8d4 100644 --- a/www/iridium/files/patch-components_viz_service_gl_gpu__service__impl.h +++ b/www/iridium/files/patch-components_viz_service_gl_gpu__service__impl.h @@ -1,11 +1,11 @@ ---- components/viz/service/gl/gpu_service_impl.h.orig 2025-11-06 10:11:34 UTC +--- components/viz/service/gl/gpu_service_impl.h.orig 2025-12-10 15:04:57 UTC +++ components/viz/service/gl/gpu_service_impl.h -@@ -448,7 +448,7 @@ class VIZ_SERVICE_EXPORT GpuServiceImpl +@@ -442,7 +442,7 @@ class VIZ_SERVICE_EXPORT GpuServiceImpl void OnBeginFrameOnIO(const BeginFrameArgs& args); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool IsGMBNV12Supported(); #endif diff --git a/www/iridium/files/patch-components_viz_test_fake__display__client.cc b/www/iridium/files/patch-components_viz_test_fake__display__client.cc index 9e674dbc9254..6d691dd2ba31 100644 --- a/www/iridium/files/patch-components_viz_test_fake__display__client.cc +++ b/www/iridium/files/patch-components_viz_test_fake__display__client.cc @@ -1,11 +1,11 @@ ---- components/viz/test/fake_display_client.cc.orig 2025-05-07 06:48:23 UTC +--- components/viz/test/fake_display_client.cc.orig 2025-12-10 15:04:57 UTC +++ components/viz/test/fake_display_client.cc @@ -27,7 +27,7 @@ void FakeDisplayClient::AddChildWindowToBrowser( gpu::SurfaceHandle child_window) {} #endif -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) void FakeDisplayClient::DidCompleteSwapWithNewSize(const gfx::Size& size) {} #endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) diff --git a/www/iridium/files/patch-components_viz_test_fake__display__client.h b/www/iridium/files/patch-components_viz_test_fake__display__client.h index 066bcf30a3ce..e694d9c101a2 100644 --- a/www/iridium/files/patch-components_viz_test_fake__display__client.h +++ b/www/iridium/files/patch-components_viz_test_fake__display__client.h @@ -1,11 +1,11 @@ ---- components/viz/test/fake_display_client.h.orig 2025-05-07 06:48:23 UTC +--- components/viz/test/fake_display_client.h.orig 2025-12-10 15:04:57 UTC +++ components/viz/test/fake_display_client.h @@ -36,7 +36,7 @@ class FakeDisplayClient : public mojom::DisplayClient void AddChildWindowToBrowser(gpu::SurfaceHandle child_window) override; #endif -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) void DidCompleteSwapWithNewSize(const gfx::Size& size) override; #endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) diff --git a/www/iridium/files/patch-components_viz_test_mock__display__client.h b/www/iridium/files/patch-components_viz_test_mock__display__client.h index d6bb24d68054..84f8bc3bce7b 100644 --- a/www/iridium/files/patch-components_viz_test_mock__display__client.h +++ b/www/iridium/files/patch-components_viz_test_mock__display__client.h @@ -1,11 +1,11 @@ ---- components/viz/test/mock_display_client.h.orig 2025-05-07 06:48:23 UTC +--- components/viz/test/mock_display_client.h.orig 2025-12-10 15:04:57 UTC +++ components/viz/test/mock_display_client.h @@ -45,7 +45,7 @@ class MockDisplayClient : public mojom::DisplayClient #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) MOCK_METHOD1(SetPreferredRefreshRate, void(float refresh_rate)); #endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) MOCK_METHOD1(DidCompleteSwapWithNewSize, void(const gfx::Size&)); #endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) diff --git a/www/iridium/files/patch-components_webui_flags_flags__state.cc b/www/iridium/files/patch-components_webui_flags_flags__state.cc index be83c95f74e0..582b4317f0ae 100644 --- a/www/iridium/files/patch-components_webui_flags_flags__state.cc +++ b/www/iridium/files/patch-components_webui_flags_flags__state.cc @@ -1,11 +1,11 @@ ---- components/webui/flags/flags_state.cc.orig 2025-05-07 06:48:23 UTC +--- components/webui/flags/flags_state.cc.orig 2025-12-10 15:04:57 UTC +++ components/webui/flags/flags_state.cc @@ -782,7 +782,7 @@ unsigned short FlagsState::GetCurrentPlatform() { return kOsWin; #elif BUILDFLAG(IS_CHROMEOS) return kOsCrOS; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kOsLinux; #elif BUILDFLAG(IS_ANDROID) return kOsAndroid; diff --git a/www/iridium/files/patch-content_app_BUILD.gn b/www/iridium/files/patch-content_app_BUILD.gn index 830ef3ea0d99..38766808766d 100644 --- a/www/iridium/files/patch-content_app_BUILD.gn +++ b/www/iridium/files/patch-content_app_BUILD.gn @@ -1,14 +1,14 @@ ---- content/app/BUILD.gn.orig 2025-10-28 14:29:43 UTC +--- content/app/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ content/app/BUILD.gn -@@ -91,7 +91,10 @@ source_set("content_main_runner_app") { +@@ -90,7 +90,10 @@ source_set("content_main_runner_app") { "//third_party/tflite:buildflags", "//tools/v8_context_snapshot:buildflags", ] - if (build_tflite_with_xnnpack) { + if (is_bsd) { + deps += [ "//skia" ] + } + if (!is_bsd && build_tflite_with_xnnpack) { deps += [ "//third_party/cpuinfo" ] } } diff --git a/www/iridium/files/patch-content_app_content__main.cc b/www/iridium/files/patch-content_app_content__main.cc index a440bffb7ee8..56fbf934f57b 100644 --- a/www/iridium/files/patch-content_app_content__main.cc +++ b/www/iridium/files/patch-content_app_content__main.cc @@ -1,20 +1,20 @@ ---- content/app/content_main.cc.orig 2025-10-28 14:29:43 UTC +--- content/app/content_main.cc.orig 2025-12-10 15:04:57 UTC +++ content/app/content_main.cc @@ -217,7 +217,7 @@ NO_STACK_PROTECTOR int RunContentProcess( base::EnableTerminationOnOutOfMemory(); logging::RegisterAbslAbortHook(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The various desktop environments set this environment variable that // allows the dbus client library to connect directly to the bus. When this // variable is not set (test environments like xvfb-run), the dbus client @@ -311,7 +311,7 @@ NO_STACK_PROTECTOR int RunContentProcess( #endif #endif -#if (BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)) && !defined(COMPONENT_BUILD) +#if (BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)) && !defined(COMPONENT_BUILD) && defined(notyet) base::subtle::EnableFDOwnershipEnforcement(true); #endif diff --git a/www/iridium/files/patch-content_app_content__main__runner__impl.cc b/www/iridium/files/patch-content_app_content__main__runner__impl.cc index 6bf58fbe6b0e..a6e4ea1f8928 100644 --- a/www/iridium/files/patch-content_app_content__main__runner__impl.cc +++ b/www/iridium/files/patch-content_app_content__main__runner__impl.cc @@ -1,150 +1,150 @@ ---- content/app/content_main_runner_impl.cc.orig 2025-11-06 10:11:34 UTC +--- content/app/content_main_runner_impl.cc.orig 2025-12-10 15:04:57 UTC +++ content/app/content_main_runner_impl.cc @@ -151,18 +151,21 @@ #include "content/browser/posix_file_descriptor_info_impl.h" #include "content/public/common/content_descriptors.h" -#if !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) #include "content/public/common/zygote/zygote_fork_delegate_linux.h" #endif #endif // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/files/file_path_watcher_inotify.h" #include "base/native_library.h" #include "base/rand_util.h" #include "content/public/common/zygote/sandbox_support_linux.h" +#if !BUILDFLAG(IS_BSD) #include "sandbox/policy/linux/sandbox_linux.h" +#endif +#include "third_party/skia/rust/png/FFI.rs.h" #include "third_party/boringssl/src/include/openssl/crypto.h" #include "third_party/webrtc_overrides/init_webrtc.h" // nogncheck @@ -186,6 +189,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" @@ -382,7 +389,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_LIBRARY_CDMS) // Loads registered library CDMs but does not initialize them. This is needed by @@ -401,7 +408,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. @@ -413,9 +423,16 @@ void PreSandboxInit() { // https://boringssl.googlesource.com/boringssl/+/HEAD/SANDBOXING.md CRYPTO_pre_sandbox_init(); +#if BUILDFLAG(IS_BSD) + // rust_png calls into sysctl so cache the cpu features before pledge(2) + rust_png::initialize_cpudetect(); +#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_LIBRARY_CDMS) // Ensure access to the library CDMs before the sandbox is turned on. @@ -635,7 +652,7 @@ NO_STACK_PROTECTOR int RunZygote(ContentMainDelegate* // Once Zygote forks and feature list initializes we can start a thread to // begin tracing immediately. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (process_type == switches::kGpuProcess) { tracing::InitTracingPostFeatureList(/*enable_consumer=*/false, /*will_trace_thread_restart=*/true); @@ -734,7 +751,7 @@ NO_STACK_PROTECTOR int RunOtherNamedProcessTypeMain( base::HangWatcher::CreateHangWatcherInstance(); unregister_thread_closure = base::HangWatcher::RegisterThread( base::HangWatcher::ThreadType::kMainThread); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux/ChromeOS, the HangWatcher can't start until after the sandbox is // initialized, because the sandbox can't be started with multiple threads. // TODO(mpdenton): start the HangWatcher after the sandbox is initialized. @@ -852,11 +869,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) @@ -1008,7 +1024,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam // SeatbeltExecServer. CHECK(sandbox::Seatbelt::IsSandboxed()); } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // In sandboxed processes and zygotes, certain resource should be pre-warmed // as they cannot be initialized under a sandbox. In addition, loading these // resources in zygotes (including the unsandboxed zygote) allows them to be @@ -1018,10 +1034,22 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam process_type == switches::kZygoteProcess) { PreSandboxInit(); } +#elif BUILDFLAG(IS_BSD) + PreSandboxInit(); #elif BUILDFLAG(IS_IOS) && !BUILDFLAG(IS_IOS_TVOS) ChildProcessEnterSandbox(); #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) @@ -1123,6 +1151,11 @@ NO_STACK_PROTECTOR int 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/iridium/files/patch-content_browser_BUILD.gn b/www/iridium/files/patch-content_browser_BUILD.gn index 496a4f35615d..d9d13f3234e4 100644 --- a/www/iridium/files/patch-content_browser_BUILD.gn +++ b/www/iridium/files/patch-content_browser_BUILD.gn @@ -1,57 +1,57 @@ ---- content/browser/BUILD.gn.orig 2025-11-06 10:11:34 UTC +--- content/browser/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ content/browser/BUILD.gn -@@ -90,6 +90,7 @@ source_set("browser") { +@@ -89,6 +89,7 @@ source_set("browser") { frameworks = [] ldflags = [] + # Iridium / node dep fixes deps = [ "//base", "//base:base_static", -@@ -103,6 +104,7 @@ source_set("browser") { +@@ -102,6 +103,7 @@ source_set("browser") { "//cc/animation", "//cc/mojo_embedder", "//cc/paint", + "//chrome/common:buildflags", "//components/attribution_reporting:data_host_mojom", "//components/attribution_reporting:mojom", "//components/back_forward_cache:enum", -@@ -133,6 +135,7 @@ source_set("browser") { +@@ -132,6 +134,7 @@ source_set("browser") { + "//components/optimization_guide/core", "//components/optimization_guide/core:features", "//components/optimization_guide/public/mojom", - "//components/os_crypt/sync", + "//components/paint_preview/buildflags:buildflags", "//components/payments/content/icon", "//components/payments/mojom", "//components/performance_manager/scenario_api", @@ -2612,6 +2615,14 @@ source_set("browser") { ] } + if (is_bsd) { + sources += [ + "file_system_access/file_path_watcher/file_path_watcher_bsd.cc", + "file_system_access/file_path_watcher/file_path_watcher_kqueue.cc", + "file_system_access/file_path_watcher/file_path_watcher_kqueue.h", + ] + } + if (is_linux || is_chromeos) { sources -= [ "file_system_access/file_path_watcher/file_path_watcher_stub.cc" ] @@ -2660,6 +2671,15 @@ source_set("browser") { if (allow_oop_video_decoder) { sources += [ "media/oop_video_decoder_factory.cc" ] deps += [ "//media/mojo/mojom" ] + } + + if (is_bsd) { + sources -= [ + "file_system_access/file_path_watcher/file_path_watcher_inotify.cc", + "file_system_access/file_path_watcher/file_path_watcher_inotify.h", + "sandbox_ipc_linux.cc", + "sandbox_ipc_linux.h", + ] } if (is_chromeos) { diff --git a/www/iridium/files/patch-content_browser_accessibility_browser__accessibility__state__impl.cc b/www/iridium/files/patch-content_browser_accessibility_browser__accessibility__state__impl.cc index 42f5a2bafcd1..11d9731e4258 100644 --- a/www/iridium/files/patch-content_browser_accessibility_browser__accessibility__state__impl.cc +++ b/www/iridium/files/patch-content_browser_accessibility_browser__accessibility__state__impl.cc @@ -1,11 +1,11 @@ ---- content/browser/accessibility/browser_accessibility_state_impl.cc.orig 2025-09-11 13:19:19 UTC +--- content/browser/accessibility/browser_accessibility_state_impl.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/accessibility/browser_accessibility_state_impl.cc @@ -296,7 +296,7 @@ BrowserAccessibilityStateImpl* BrowserAccessibilitySta // On Android, Mac, Windows and Linux there are platform-specific subclasses. #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_MAC) && \ - !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) + !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // static std::unique_ptr BrowserAccessibilityStateImpl::Create() { diff --git a/www/iridium/files/patch-content_browser_accessibility_browser__accessibility__state__impl__auralinux.cc b/www/iridium/files/patch-content_browser_accessibility_browser__accessibility__state__impl__auralinux.cc index f4a139ebe6bf..ca1df7fa49fb 100644 --- a/www/iridium/files/patch-content_browser_accessibility_browser__accessibility__state__impl__auralinux.cc +++ b/www/iridium/files/patch-content_browser_accessibility_browser__accessibility__state__impl__auralinux.cc @@ -1,29 +1,29 @@ ---- content/browser/accessibility/browser_accessibility_state_impl_auralinux.cc.orig 2025-09-11 13:19:19 UTC +--- content/browser/accessibility/browser_accessibility_state_impl_auralinux.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/accessibility/browser_accessibility_state_impl_auralinux.cc @@ -12,6 +12,7 @@ #include #include +#include "base/notimplemented.h" #include "base/debug/crash_logging.h" #include "base/metrics/histogram_macros.h" #include "base/task/thread_pool.h" @@ -43,6 +44,10 @@ bool CheckCmdlineForOrca(const std::string& cmdline_al // Returns true if Orca is active. bool DiscoverOrca() { +#if BUILDFLAG(IS_BSD) + NOTIMPLEMENTED(); + return false; +#else // NOTE: this method is run from another thread to reduce jank, since // there's no guarantee these system calls will return quickly. std::unique_ptr proc_dir(opendir("/proc"), @@ -80,6 +85,7 @@ bool DiscoverOrca() { } return is_orca_active; +#endif } } // namespace diff --git a/www/iridium/files/patch-content_browser_audio_audio__service.cc b/www/iridium/files/patch-content_browser_audio_audio__service.cc index 96df806c7fae..d7af0dada203 100644 --- a/www/iridium/files/patch-content_browser_audio_audio__service.cc +++ b/www/iridium/files/patch-content_browser_audio_audio__service.cc @@ -1,20 +1,20 @@ ---- content/browser/audio/audio_service.cc.orig 2025-05-07 06:48:23 UTC +--- content/browser/audio/audio_service.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/audio/audio_service.cc @@ -33,7 +33,7 @@ #if BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS) #include "ui/display/util/edid_parser.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/display/display_util.h" #endif // BUILDFLAG(IS_LINUX) @@ -201,7 +201,7 @@ audio::mojom::AudioService& GetAudioService() { ->PostTaskAndReplyWithResult( FROM_HERE, base::BindOnce(&ScanEdidBitstreams), base::BindOnce(&LaunchAudioService, std::move(receiver))); -#elif BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS) && BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) LaunchAudioService( std::move(receiver), ConvertEdidBitstreams(display::DisplayUtil::GetAudioFormats())); diff --git a/www/iridium/files/patch-content_browser_browser__child__process__host__impl.cc b/www/iridium/files/patch-content_browser_browser__child__process__host__impl.cc index 33f31665bfc8..e0e6ffc60454 100644 --- a/www/iridium/files/patch-content_browser_browser__child__process__host__impl.cc +++ b/www/iridium/files/patch-content_browser_browser__child__process__host__impl.cc @@ -1,20 +1,20 @@ ---- content/browser/browser_child_process_host_impl.cc.orig 2025-11-06 10:11:34 UTC +--- content/browser/browser_child_process_host_impl.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/browser_child_process_host_impl.cc -@@ -296,6 +296,8 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo +@@ -291,6 +291,8 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo switches::kIPCConnectionTimeout, switches::kLogBestEffortTasks, switches::kPerfettoDisableInterning, + switches::kDisableUnveil, + switches::kTrk, }; cmd_line->CopySwitchesFrom(browser_command_line, kForwardSwitches); -@@ -660,7 +662,7 @@ void BrowserChildProcessHostImpl::OnProcessLaunched() +@@ -648,7 +650,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/iridium/files/patch-content_browser_browser__child__process__host__impl.h b/www/iridium/files/patch-content_browser_browser__child__process__host__impl.h index 0c47ae5306af..a033b021ce90 100644 --- a/www/iridium/files/patch-content_browser_browser__child__process__host__impl.h +++ b/www/iridium/files/patch-content_browser_browser__child__process__host__impl.h @@ -1,20 +1,20 @@ ---- content/browser/browser_child_process_host_impl.h.orig 2025-09-11 13:19:19 UTC +--- content/browser/browser_child_process_host_impl.h.orig 2025-12-10 15:04:57 UTC +++ content/browser/browser_child_process_host_impl.h @@ -36,7 +36,7 @@ #include "base/win/object_watcher.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/browser/child_thread_type_switcher_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -276,7 +276,7 @@ class BrowserChildProcessHostImpl +@@ -273,7 +273,7 @@ class BrowserChildProcessHostImpl std::unique_ptr system_tracing_service_; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ChildThreadTypeSwitcher child_thread_type_switcher_; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/iridium/files/patch-content_browser_browser__child__process__host__impl__receiver__bindings.cc b/www/iridium/files/patch-content_browser_browser__child__process__host__impl__receiver__bindings.cc index ca25238a67a7..c0521aafcd70 100644 --- a/www/iridium/files/patch-content_browser_browser__child__process__host__impl__receiver__bindings.cc +++ b/www/iridium/files/patch-content_browser_browser__child__process__host__impl__receiver__bindings.cc @@ -1,11 +1,11 @@ ---- content/browser/browser_child_process_host_impl_receiver_bindings.cc.orig 2025-05-07 06:48:23 UTC +--- content/browser/browser_child_process_host_impl_receiver_bindings.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/browser_child_process_host_impl_receiver_bindings.cc @@ -64,7 +64,7 @@ void BrowserChildProcessHostImpl::BindHostReceiver( } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (auto r = receiver.As()) { child_thread_type_switcher_.Bind(std::move(r)); return; diff --git a/www/iridium/files/patch-content_browser_browser__main__loop.cc b/www/iridium/files/patch-content_browser_browser__main__loop.cc index 5105f34b362b..84fbcd0b32dd 100644 --- a/www/iridium/files/patch-content_browser_browser__main__loop.cc +++ b/www/iridium/files/patch-content_browser_browser__main__loop.cc @@ -1,37 +1,37 @@ ---- content/browser/browser_main_loop.cc.orig 2025-11-06 10:11:34 UTC +--- content/browser/browser_main_loop.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/browser_main_loop.cc -@@ -253,6 +253,12 @@ +@@ -255,6 +255,12 @@ #include "mojo/public/cpp/bindings/lib/test_random_mojo_delays.h" #endif +#if BUILDFLAG(IS_BSD) +#include "content/browser/sandbox_host_linux.h" +#include "content/public/common/zygote/sandbox_support_linux.h" +#include "sandbox/policy/sandbox.h" +#endif + // One of the linux specific headers defines this as a macro. #ifdef DestroyAll #undef DestroyAll -@@ -543,6 +549,12 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -545,6 +551,12 @@ int BrowserMainLoop::EarlyInitialization() { // by now since a thread to start the ServiceManager has been created // before the browser main loop starts. DCHECK(SandboxHostLinux::GetInstance()->IsInitialized()); +#elif BUILDFLAG(IS_BSD) + base::FileHandleMappingVector additional_remapped_fds; + base::LaunchOptions options; + SandboxHostLinux::GetInstance()->Init(); + const int sfd = SandboxHostLinux::GetInstance()->GetChildSocket(); + options.fds_to_remap.push_back(std::make_pair(sfd, GetSandboxFD())); #endif // GLib's spawning of new processes is buggy, so it's important that at this -@@ -575,7 +587,7 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -577,7 +589,7 @@ int BrowserMainLoop::EarlyInitialization() { base::ThreadType::kDisplayCritical); #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // We use quite a few file descriptors for our IPC as well as disk the disk // cache, and the default limit on Apple is low (256), so bump it up. diff --git a/www/iridium/files/patch-content_browser_browser__url__handler__impl.cc b/www/iridium/files/patch-content_browser_browser__url__handler__impl.cc index 43efd37fcb75..61c838b9ff16 100644 --- a/www/iridium/files/patch-content_browser_browser__url__handler__impl.cc +++ b/www/iridium/files/patch-content_browser_browser__url__handler__impl.cc @@ -1,21 +1,21 @@ ---- content/browser/browser_url_handler_impl.cc.orig 2025-09-11 13:19:19 UTC +--- content/browser/browser_url_handler_impl.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/browser_url_handler_impl.cc @@ -13,6 +13,7 @@ #include "content/browser/webui/web_ui_impl.h" #include "content/public/browser/content_browser_client.h" #include "content/public/common/content_client.h" +#include "content/public/common/content_switches.h" #include "content/public/common/url_constants.h" #include "content/public/common/url_utils.h" #include "third_party/blink/public/common/chrome_debug_urls.h" @@ -270,6 +271,10 @@ namespace iridium { static void gfxlog_request2(const std::string &caller, const GURL &url) { + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + if (!command_line->HasSwitch(switches::kTrk)) + return; + auto browser = chrome::FindLastActive(); if (browser == nullptr) return; diff --git a/www/iridium/files/patch-content_browser_child__process__launcher__helper__linux.cc b/www/iridium/files/patch-content_browser_child__process__launcher__helper__linux.cc index 58c7a57efcd4..af1b6a10b02c 100644 --- a/www/iridium/files/patch-content_browser_child__process__launcher__helper__linux.cc +++ b/www/iridium/files/patch-content_browser_child__process__launcher__helper__linux.cc @@ -1,125 +1,125 @@ ---- content/browser/child_process_launcher_helper_linux.cc.orig 2025-09-11 13:19:19 UTC +--- content/browser/child_process_launcher_helper_linux.cc.orig 2025-12-10 15:04:57 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/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( @@ -181,11 +201,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/iridium/files/patch-content_browser_child__thread__type__switcher__linux.cc b/www/iridium/files/patch-content_browser_child__thread__type__switcher__linux.cc index ae0b92354f23..adab2ef43af9 100644 --- a/www/iridium/files/patch-content_browser_child__thread__type__switcher__linux.cc +++ b/www/iridium/files/patch-content_browser_child__thread__type__switcher__linux.cc @@ -1,37 +1,37 @@ ---- content/browser/child_thread_type_switcher_linux.cc.orig 2025-09-11 13:19:19 UTC +--- content/browser/child_thread_type_switcher_linux.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/child_thread_type_switcher_linux.cc @@ -6,6 +6,7 @@ #include "base/linux_util.h" #include "base/logging.h" +#include "base/notimplemented.h" #include "base/process/process_handle.h" #include "base/task/single_thread_task_runner.h" #include "base/threading/platform_thread.h" @@ -20,6 +21,9 @@ void SetThreadTypeOnLauncherThread(base::ProcessId pee base::ThreadType thread_type) { DCHECK(CurrentlyOnProcessLauncherTaskRunner()); +#if BUILDFLAG(IS_BSD) + NOTIMPLEMENTED(); +#else bool ns_pid_supported = false; pid_t peer_tid = base::FindThreadID(peer_pid, ns_tid.raw(), &ns_pid_supported); @@ -42,6 +46,7 @@ void SetThreadTypeOnLauncherThread(base::ProcessId pee base::PlatformThread::SetThreadType(peer_pid, base::PlatformThreadId(peer_tid), thread_type, base::IsViaIPC(true)); +#endif } } // namespace @@ -70,7 +75,7 @@ void ChildThreadTypeSwitcher::SetPid(base::ProcessId c } } -void ChildThreadTypeSwitcher::SetThreadType(int32_t ns_tid, +void ChildThreadTypeSwitcher::SetThreadType(uint64_t ns_tid, base::ThreadType thread_type) { // This function is only used on platforms with 32-bit thread ids. static_assert(sizeof(ns_tid) == sizeof(base::PlatformThreadId)); diff --git a/www/iridium/files/patch-content_browser_child__thread__type__switcher__linux.h b/www/iridium/files/patch-content_browser_child__thread__type__switcher__linux.h index 36873a9c7bdb..5385e60bf0ae 100644 --- a/www/iridium/files/patch-content_browser_child__thread__type__switcher__linux.h +++ b/www/iridium/files/patch-content_browser_child__thread__type__switcher__linux.h @@ -1,11 +1,11 @@ ---- content/browser/child_thread_type_switcher_linux.h.orig 2025-05-07 06:48:23 UTC +--- content/browser/child_thread_type_switcher_linux.h.orig 2025-12-10 15:04:57 UTC +++ content/browser/child_thread_type_switcher_linux.h @@ -36,7 +36,7 @@ class ChildThreadTypeSwitcher : public mojom::ThreadTy void SetPid(base::ProcessId child_pid); // mojom::ThreadTypeSwitcher: - void SetThreadType(int32_t ns_tid, base::ThreadType thread_type) override; + void SetThreadType(uint64_t ns_tid, base::ThreadType thread_type) override; private: base::ProcessId child_pid_ = base::kNullProcessHandle; diff --git a/www/iridium/files/patch-content_browser_compositor_viz__process__transport__factory.cc b/www/iridium/files/patch-content_browser_compositor_viz__process__transport__factory.cc index eb636135f189..240253cc29b3 100644 --- a/www/iridium/files/patch-content_browser_compositor_viz__process__transport__factory.cc +++ b/www/iridium/files/patch-content_browser_compositor_viz__process__transport__factory.cc @@ -1,11 +1,11 @@ ---- content/browser/compositor/viz_process_transport_factory.cc.orig 2025-11-06 10:11:34 UTC +--- content/browser/compositor/viz_process_transport_factory.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/compositor/viz_process_transport_factory.cc @@ -98,7 +98,7 @@ class HostDisplayClient : public viz::HostDisplayClien HostDisplayClient& operator=(const HostDisplayClient&) = delete; // viz::HostDisplayClient: -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) void DidCompleteSwapWithNewSize(const gfx::Size& size) override { compositor_->OnCompleteSwapWithNewSize(size); } diff --git a/www/iridium/files/patch-content_browser_devtools_devtools__frontend__host__impl.cc b/www/iridium/files/patch-content_browser_devtools_devtools__frontend__host__impl.cc index d17b7590db67..991183427888 100644 --- a/www/iridium/files/patch-content_browser_devtools_devtools__frontend__host__impl.cc +++ b/www/iridium/files/patch-content_browser_devtools_devtools__frontend__host__impl.cc @@ -1,29 +1,29 @@ ---- content/browser/devtools/devtools_frontend_host_impl.cc.orig 2025-10-28 14:29:43 UTC +--- content/browser/devtools/devtools_frontend_host_impl.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/devtools/devtools_frontend_host_impl.cc @@ -25,7 +25,7 @@ #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" #include "ui/base/webui/resource_path.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/crash/content/browser/error_reporting/javascript_error_report.h" // nogncheck #include "components/crash/content/browser/error_reporting/js_error_report_processor.h" // nogncheck #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -37,7 +37,7 @@ const char kCompatibilityScriptSourceURL[] = "\n//# " "sourceURL=devtools://devtools/bundled/devtools_compatibility.js"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Remove the pieces of the URL we don't want to send back with the error // reports. In particular, do not send query or fragments as those can have // privacy-sensitive information in them. @@ -133,7 +133,7 @@ void DevToolsFrontendHostImpl::DispatchEmbedderMessage handle_message_callback_.Run(std::move(message)); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void DevToolsFrontendHostImpl::OnDidAddMessageToConsole( RenderFrameHost* source_frame, blink::mojom::ConsoleMessageLevel log_level, diff --git a/www/iridium/files/patch-content_browser_devtools_devtools__frontend__host__impl.h b/www/iridium/files/patch-content_browser_devtools_devtools__frontend__host__impl.h index 45e36cd47100..ef9322cf6a5a 100644 --- a/www/iridium/files/patch-content_browser_devtools_devtools__frontend__host__impl.h +++ b/www/iridium/files/patch-content_browser_devtools_devtools__frontend__host__impl.h @@ -1,11 +1,11 @@ ---- content/browser/devtools/devtools_frontend_host_impl.h.orig 2025-10-28 14:29:43 UTC +--- content/browser/devtools/devtools_frontend_host_impl.h.orig 2025-12-10 15:04:57 UTC +++ content/browser/devtools/devtools_frontend_host_impl.h @@ -33,7 +33,7 @@ class DevToolsFrontendHostImpl : public DevToolsFronte void BadMessageReceived() override; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void OnDidAddMessageToConsole( RenderFrameHost* source_frame, blink::mojom::ConsoleMessageLevel log_level, diff --git a/www/iridium/files/patch-content_browser_devtools_protocol_system__info__handler.cc b/www/iridium/files/patch-content_browser_devtools_protocol_system__info__handler.cc index 8bbac07b2d25..178d643faeed 100644 --- a/www/iridium/files/patch-content_browser_devtools_protocol_system__info__handler.cc +++ b/www/iridium/files/patch-content_browser_devtools_protocol_system__info__handler.cc @@ -1,11 +1,11 @@ ---- content/browser/devtools/protocol/system_info_handler.cc.orig 2025-05-07 06:48:23 UTC +--- content/browser/devtools/protocol/system_info_handler.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/devtools/protocol/system_info_handler.cc @@ -52,7 +52,7 @@ std::unique_ptr GfxSizeToSystemInfoS // 1046598, and 1153667. // Windows builds need more time -- see Issue 873112 and 1004472. // Mac builds need more time - see Issue angleproject:6182. -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !defined(NDEBUG)) || \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && !defined(NDEBUG)) || \ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_OZONE) static constexpr int kGPUInfoWatchdogTimeoutMultiplierOS = 3; #else diff --git a/www/iridium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher.h b/www/iridium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher.h index 4aca86f76163..09153a9640a6 100644 --- a/www/iridium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher.h +++ b/www/iridium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher.h @@ -1,11 +1,11 @@ ---- content/browser/file_system_access/file_path_watcher/file_path_watcher.h.orig 2025-05-07 06:48:23 UTC +--- content/browser/file_system_access/file_path_watcher/file_path_watcher.h.orig 2025-12-10 15:04:57 UTC +++ content/browser/file_system_access/file_path_watcher/file_path_watcher.h @@ -126,7 +126,7 @@ class CONTENT_EXPORT FilePathWatcher { Type type = Type::kNonRecursive; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // The callback will return the full path to a changed file instead of // the watched path supplied as |path| when Watch is called. // So the full path can be different from the watched path when a folder is diff --git a/www/iridium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__bsd.cc b/www/iridium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__bsd.cc index 9e1ea4315f9c..e9bdd6a23985 100644 --- a/www/iridium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__bsd.cc +++ b/www/iridium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__bsd.cc @@ -1,63 +1,63 @@ ---- content/browser/file_system_access/file_path_watcher/file_path_watcher_bsd.cc.orig 2025-05-07 06:48:23 UTC +--- content/browser/file_system_access/file_path_watcher/file_path_watcher_bsd.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/file_system_access/file_path_watcher/file_path_watcher_bsd.cc @@ -0,0 +1,60 @@ +// Copyright 2024 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "content/browser/file_system_access/file_path_watcher/file_path_watcher.h" + +#include + +#include "base/memory/ptr_util.h" +#include "build/build_config.h" +#include "content/browser/file_system_access/file_path_watcher/file_path_watcher_kqueue.h" + +namespace content { + +namespace { + +class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate { + public: + FilePathWatcherImpl() = default; + FilePathWatcherImpl(const FilePathWatcherImpl&) = delete; + FilePathWatcherImpl& operator=(const FilePathWatcherImpl&) = delete; + ~FilePathWatcherImpl() override = default; + + bool Watch(const base::FilePath& path, + Type type, + const FilePathWatcher::Callback& callback) override { + DCHECK(!impl_.get()); + if (type == Type::kRecursive) { + if (!FilePathWatcher::RecursiveWatchAvailable()) { + return false; + } + } else { + impl_ = std::make_unique(); + } + DCHECK(impl_.get()); + return impl_->Watch(path, type, callback); + } + + void Cancel() override { + if (impl_.get()) { + impl_->Cancel(); + } + set_cancelled(); + } + + private: + std::unique_ptr impl_; +}; + +} // namespace + +FilePathWatcher::FilePathWatcher() + : FilePathWatcher(std::make_unique()) {} + +// static +size_t FilePathWatcher::GetQuotaLimitImpl() { + return std::numeric_limits::max(); +} + +} // namespace content diff --git a/www/iridium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__kqueue.h b/www/iridium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__kqueue.h index 71039ce1470a..6181379f43b9 100644 --- a/www/iridium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__kqueue.h +++ b/www/iridium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__kqueue.h @@ -1,10 +1,10 @@ ---- content/browser/file_system_access/file_path_watcher/file_path_watcher_kqueue.h.orig 2025-05-07 06:48:23 UTC +--- content/browser/file_system_access/file_path_watcher/file_path_watcher_kqueue.h.orig 2025-12-10 15:04:57 UTC +++ content/browser/file_system_access/file_path_watcher/file_path_watcher_kqueue.h @@ -5,6 +5,7 @@ #ifndef CONTENT_BROWSER_FILE_SYSTEM_ACCESS_FILE_PATH_WATCHER_FILE_PATH_WATCHER_KQUEUE_H_ #define CONTENT_BROWSER_FILE_SYSTEM_ACCESS_FILE_PATH_WATCHER_FILE_PATH_WATCHER_KQUEUE_H_ +#include #include #include diff --git a/www/iridium/files/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc b/www/iridium/files/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc index cf02f7ffe85c..c67f3960547a 100644 --- a/www/iridium/files/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc +++ b/www/iridium/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 2025-05-07 06:48:23 UTC +--- content/browser/file_system_access/file_system_access_local_path_watcher.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/file_system_access/file_system_access_local_path_watcher.cc @@ -67,7 +67,7 @@ void FileSystemAccessLocalPathWatcher::Initialize( .type = scope().IsRecursive() ? FilePathWatcher::Type::kRecursive : FilePathWatcher::Type::kNonRecursive, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Note: `report_modified_path` is also present on Android // and Fuchsia. Update this switch if support for watching // the local file system is added on those platforms. diff --git a/www/iridium/files/patch-content_browser_font__access_font__enumeration__data__source.cc b/www/iridium/files/patch-content_browser_font__access_font__enumeration__data__source.cc index 120b2565661a..1a250de0dd14 100644 --- a/www/iridium/files/patch-content_browser_font__access_font__enumeration__data__source.cc +++ b/www/iridium/files/patch-content_browser_font__access_font__enumeration__data__source.cc @@ -1,29 +1,29 @@ ---- content/browser/font_access/font_enumeration_data_source.cc.orig 2025-05-07 06:48:23 UTC +--- content/browser/font_access/font_enumeration_data_source.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/font_access/font_enumeration_data_source.cc @@ -16,7 +16,7 @@ #include "content/browser/font_access/font_enumeration_data_source_win.h" #elif BUILDFLAG(IS_APPLE) #include "content/browser/font_access/font_enumeration_data_source_mac.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/browser/font_access/font_enumeration_data_source_linux.h" #endif // BUILDFLAG(IS_WIN) @@ -61,7 +61,7 @@ std::unique_ptr FontEnumera return std::make_unique(); #elif BUILDFLAG(IS_APPLE) return std::make_unique(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return std::make_unique(); #else return std::make_unique(); @@ -76,7 +76,7 @@ bool FontEnumerationDataSource::IsOsSupported() { return true; #elif BUILDFLAG(IS_APPLE) return true; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/iridium/files/patch-content_browser_gpu_compositor__util.cc b/www/iridium/files/patch-content_browser_gpu_compositor__util.cc index 1f50e38452f4..c1f91b8971dd 100644 --- a/www/iridium/files/patch-content_browser_gpu_compositor__util.cc +++ b/www/iridium/files/patch-content_browser_gpu_compositor__util.cc @@ -1,20 +1,20 @@ ---- content/browser/gpu/compositor_util.cc.orig 2025-09-11 13:19:19 UTC +--- content/browser/gpu/compositor_util.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/gpu/compositor_util.cc @@ -143,7 +143,7 @@ std::vector GetGpuFeatureData( "video_decode", SafeGetFeatureStatus( gpu_feature_info, gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) !base::FeatureList::IsEnabled(media::kAcceleratedVideoDecodeLinux) || #endif // BUILDFLAG(IS_LINUX) command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode)), @@ -155,7 +155,7 @@ std::vector GetGpuFeatureData( "video_encode", SafeGetFeatureStatus( gpu_feature_info, gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) !base::FeatureList::IsEnabled(media::kAcceleratedVideoEncodeLinux)), #else command_line.HasSwitch(switches::kDisableAcceleratedVideoEncode)), diff --git a/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl.cc b/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl.cc index a6120ee2f63d..3b2ca2242f04 100644 --- a/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl.cc +++ b/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl.cc @@ -1,11 +1,11 @@ ---- content/browser/gpu/gpu_data_manager_impl.cc.orig 2025-05-07 06:48:23 UTC +--- content/browser/gpu/gpu_data_manager_impl.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/gpu/gpu_data_manager_impl.cc @@ -412,7 +412,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/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl.h b/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl.h index 3cd84de550fa..f3c6ede6b291 100644 --- a/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl.h +++ b/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl.h @@ -1,11 +1,11 @@ ---- content/browser/gpu/gpu_data_manager_impl.h.orig 2025-09-11 13:19:19 UTC +--- content/browser/gpu/gpu_data_manager_impl.h.orig 2025-12-10 15:04:57 UTC +++ content/browser/gpu/gpu_data_manager_impl.h @@ -224,7 +224,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDa void OnDisplayMetricsChanged(const display::Display& display, uint32_t changed_metrics) override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool IsGpuMemoryBufferNV12Supported(); #endif // BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc b/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc index 99da4cfd81e9..d4aad36cb143 100644 --- a/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/gpu/gpu_data_manager_impl_private.cc @@ -1703,7 +1703,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 gpu_extra_info_.is_gmb_nv12_supported; } diff --git a/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.h b/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.h index 3199a6c66b6c..2ed37cc27086 100644 --- a/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.h +++ b/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.h @@ -1,20 +1,20 @@ ---- content/browser/gpu/gpu_data_manager_impl_private.h.orig 2025-11-06 10:11:34 UTC +--- content/browser/gpu/gpu_data_manager_impl_private.h.orig 2025-12-10 15:04:57 UTC +++ content/browser/gpu/gpu_data_manager_impl_private.h @@ -149,7 +149,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { void OnDisplayMetricsChanged(const display::Display& display, uint32_t changed_metrics); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool IsGpuMemoryBufferNV12Supported(); #endif // BUILDFLAG(IS_LINUX) @@ -311,7 +311,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { bool application_is_visible_ = true; bool disable_gpu_compositing_ = false; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool is_gpu_memory_buffer_NV12_supported_ = false; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-content_browser_gpu_gpu__process__host.cc b/www/iridium/files/patch-content_browser_gpu_gpu__process__host.cc index c6693c2bff4a..b3a5ed0fc010 100644 --- a/www/iridium/files/patch-content_browser_gpu_gpu__process__host.cc +++ b/www/iridium/files/patch-content_browser_gpu_gpu__process__host.cc @@ -1,19 +1,19 @@ ---- content/browser/gpu/gpu_process_host.cc.orig 2025-11-06 10:11:34 UTC +--- content/browser/gpu/gpu_process_host.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/gpu/gpu_process_host.cc -@@ -280,6 +280,7 @@ static const char* const kSwitchNames[] = { +@@ -282,6 +282,7 @@ static const char* const kSwitchNames[] = { switches::kDisableSkiaGraphite, switches::kDisableSkiaGraphitePrecompilation, switches::kDisableLowEndDeviceMode, + switches::kDisableUnveil, switches::kProfilingAtStart, switches::kProfilingFile, switches::kProfilingFlush, -@@ -305,7 +306,7 @@ static const char* const kSwitchNames[] = { +@@ -307,7 +308,7 @@ static const char* const kSwitchNames[] = { switches::kEnableNativeGpuMemoryBuffers, switches::kRenderNodeOverride, #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) switches::kX11Display, switches::kNoXshm, #endif diff --git a/www/iridium/files/patch-content_browser_media_frameless__media__interface__proxy.h b/www/iridium/files/patch-content_browser_media_frameless__media__interface__proxy.h index 5251c6068bbd..f5cf1521657b 100644 --- a/www/iridium/files/patch-content_browser_media_frameless__media__interface__proxy.h +++ b/www/iridium/files/patch-content_browser_media_frameless__media__interface__proxy.h @@ -1,20 +1,20 @@ ---- content/browser/media/frameless_media_interface_proxy.h.orig 2025-06-19 07:37:57 UTC +--- content/browser/media/frameless_media_interface_proxy.h.orig 2025-12-10 15:04:57 UTC +++ content/browser/media/frameless_media_interface_proxy.h @@ -19,7 +19,7 @@ #include "mojo/public/cpp/bindings/receiver_set.h" #include "mojo/public/cpp/bindings/remote.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "media/mojo/mojom/video_decoder.mojom.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -98,7 +98,7 @@ class FramelessMediaInterfaceProxy final +@@ -96,7 +96,7 @@ class FramelessMediaInterfaceProxy final // Connections to the renderer. mojo::ReceiverSet receivers_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Connection to the InterfaceFactory that lives in a utility process. // This is only used for out-of-process video decoding and only when the // FramelessMediaInterfaceProxy is created without a RenderProcessHost diff --git a/www/iridium/files/patch-content_browser_media_media__keys__listener__manager__impl.cc b/www/iridium/files/patch-content_browser_media_media__keys__listener__manager__impl.cc index 11d9ab2ef799..b6cd433d0c6d 100644 --- a/www/iridium/files/patch-content_browser_media_media__keys__listener__manager__impl.cc +++ b/www/iridium/files/patch-content_browser_media_media__keys__listener__manager__impl.cc @@ -1,11 +1,11 @@ ---- content/browser/media/media_keys_listener_manager_impl.cc.orig 2025-05-07 06:48:23 UTC +--- content/browser/media/media_keys_listener_manager_impl.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/media/media_keys_listener_manager_impl.cc @@ -332,7 +332,7 @@ void MediaKeysListenerManagerImpl::StartListeningForMe return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Create SystemMediaControls with the SingletonHwnd. browser_system_media_controls_ = system_media_controls::SystemMediaControls::Create( diff --git a/www/iridium/files/patch-content_browser_network__service__instance__impl.cc b/www/iridium/files/patch-content_browser_network__service__instance__impl.cc index ad5cfb26bd86..b364c541ccd5 100644 --- a/www/iridium/files/patch-content_browser_network__service__instance__impl.cc +++ b/www/iridium/files/patch-content_browser_network__service__instance__impl.cc @@ -1,29 +1,29 @@ ---- content/browser/network_service_instance_impl.cc.orig 2025-11-06 10:11:34 UTC +--- content/browser/network_service_instance_impl.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/network_service_instance_impl.cc @@ -90,7 +90,7 @@ #include "content/browser/network/network_service_process_tracker_win.h" #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/browser/system_dns_resolution/system_dns_resolver.h" #include "services/network/public/mojom/system_dns_resolution.mojom-forward.h" #endif @@ -347,7 +347,7 @@ void CreateInProcessNetworkService( std::move(receiver))); } -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Runs a self-owned SystemDnsResolverMojoImpl. This is meant to run on a // high-priority thread pool. void RunSystemDnsResolverOnThreadPool( @@ -414,7 +414,7 @@ network::mojom::NetworkServiceParamsPtr CreateNetworkS } #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (GetContentClient() ->browser() ->ShouldRunOutOfProcessSystemDnsResolution() && diff --git a/www/iridium/files/patch-content_browser_renderer__host_delegated__frame__host.cc b/www/iridium/files/patch-content_browser_renderer__host_delegated__frame__host.cc index ee6e79acc322..aa57d2cf296d 100644 --- a/www/iridium/files/patch-content_browser_renderer__host_delegated__frame__host.cc +++ b/www/iridium/files/patch-content_browser_renderer__host_delegated__frame__host.cc @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/delegated_frame_host.cc.orig 2025-09-11 13:19:19 UTC +--- content/browser/renderer_host/delegated_frame_host.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/renderer_host/delegated_frame_host.cc -@@ -334,7 +334,7 @@ void DelegatedFrameHost::EmbedSurface( +@@ -338,7 +338,7 @@ void DelegatedFrameHost::EmbedSurface( if (!primary_surface_id || primary_surface_id->local_surface_id() != local_surface_id_) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Windows and Linux, we would like to produce new content as soon as // possible or the OS will create an additional black gutter. Until we can // block resize on surface synchronization on these platforms, we will not diff --git a/www/iridium/files/patch-content_browser_renderer__host_media_service__video__capture__device__launcher.cc b/www/iridium/files/patch-content_browser_renderer__host_media_service__video__capture__device__launcher.cc index 432d67eebe71..2ec2566a7c79 100644 --- a/www/iridium/files/patch-content_browser_renderer__host_media_service__video__capture__device__launcher.cc +++ b/www/iridium/files/patch-content_browser_renderer__host_media_service__video__capture__device__launcher.cc @@ -1,20 +1,20 @@ ---- content/browser/renderer_host/media/service_video_capture_device_launcher.cc.orig 2025-11-06 10:11:34 UTC +--- content/browser/renderer_host/media/service_video_capture_device_launcher.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/renderer_host/media/service_video_capture_device_launcher.cc @@ -24,7 +24,7 @@ #include "media/base/media_switches.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "content/browser/gpu/gpu_data_manager_impl.h" #endif @@ -166,7 +166,7 @@ void ServiceVideoCaptureDeviceLauncher::LaunchDeviceAs } #else if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Linux, additionally check whether the NV12 GPU memory buffer is // supported. if (GpuDataManagerImpl::GetInstance()->IsGpuMemoryBufferNV12Supported()) diff --git a/www/iridium/files/patch-content_browser_renderer__host_navigation__transitions_navigation__entry__screenshot.cc b/www/iridium/files/patch-content_browser_renderer__host_navigation__transitions_navigation__entry__screenshot.cc index 4e66d944dfb4..472cd02e0ea3 100644 --- a/www/iridium/files/patch-content_browser_renderer__host_navigation__transitions_navigation__entry__screenshot.cc +++ b/www/iridium/files/patch-content_browser_renderer__host_navigation__transitions_navigation__entry__screenshot.cc @@ -1,20 +1,20 @@ ---- content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot.cc.orig 2025-11-06 10:11:34 UTC +--- content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot.cc -@@ -26,7 +26,7 @@ +@@ -28,7 +28,7 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/skia_span_util.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #ifndef MADV_POPULATE_WRITE -@@ -77,7 +77,7 @@ void CompressNavigationScreenshotOnWorkerThread( +@@ -73,7 +73,7 @@ void CompressNavigationScreenshotOnWorkerThread( #endif // BUILDFLAG(IS_ANDROID) void AdviseBitmap(SkBitmap& bitmap) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) size_t size = bitmap.info().computeByteSize(bitmap.info().minRowBytes()); if (madvise(bitmap.getPixels(), size, MADV_POPULATE_WRITE) == 0) { return; diff --git a/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.cc b/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.cc index 97d2bad4c3e7..1e7f4b3c30b9 100644 --- a/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.cc +++ b/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.cc @@ -1,56 +1,56 @@ ---- content/browser/renderer_host/render_process_host_impl.cc.orig 2025-11-06 10:11:34 UTC +--- content/browser/renderer_host/render_process_host_impl.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/renderer_host/render_process_host_impl.cc @@ -228,7 +228,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 -@@ -1127,7 +1127,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = +@@ -1142,7 +1142,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = // to indicate failure and std::numeric_limits::max() to indicate // unlimited. size_t GetPlatformProcessLimit() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) struct rlimit limit; if (getrlimit(RLIMIT_NPROC, &limit) != 0) return kUnknownPlatformProcessLimit; -@@ -1363,7 +1363,7 @@ RenderProcessHostImpl::IOThreadHostImpl::~IOThreadHost +@@ -1385,7 +1385,7 @@ RenderProcessHostImpl::IOThreadHostImpl::~IOThreadHost void RenderProcessHostImpl::IOThreadHostImpl::SetPid( base::ProcessId child_pid) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) child_thread_type_switcher_.SetPid(child_pid); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) } -@@ -3509,7 +3509,7 @@ void RenderProcessHostImpl::AppendRendererCommandLine( +@@ -3616,7 +3616,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() && -@@ -3565,6 +3565,8 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin +@@ -3672,6 +3672,8 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin switches::kDisableSkiaRuntimeOpts, switches::kDisableSpeechAPI, switches::kDisableThreadedCompositing, + switches::kDisableUnveil, + switches::kTrk, switches::kDisableV8IdleTasks, switches::kDisableVideoCaptureUseGpuMemoryBuffer, switches::kDisableWebGLImageChromium, -@@ -5487,7 +5489,7 @@ uint64_t RenderProcessHostImpl::GetPrivateMemoryFootpr +@@ -5550,7 +5552,7 @@ uint64_t RenderProcessHostImpl::GetPrivateMemoryFootpr // - Win: https://crbug.com/707022 . uint64_t total_size = 0; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) total_size = dump->platform_private_footprint->rss_anon_bytes + dump->platform_private_footprint->vm_swap_bytes; #elif BUILDFLAG(IS_APPLE) diff --git a/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.h b/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.h index e9f4de49acf9..85d07bc11f8c 100644 --- a/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.h +++ b/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.h @@ -1,29 +1,29 @@ ---- content/browser/renderer_host/render_process_host_impl.h.orig 2025-11-06 10:11:34 UTC +--- content/browser/renderer_host/render_process_host_impl.h.orig 2025-12-10 15:04:57 UTC +++ content/browser/renderer_host/render_process_host_impl.h @@ -103,7 +103,7 @@ #include "media/fuchsia_media_codec_provider_impl.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/browser/child_thread_type_switcher_linux.h" #include "media/mojo/mojom/video_encode_accelerator.mojom.h" #endif -@@ -1014,7 +1014,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -1021,7 +1021,7 @@ class CONTENT_EXPORT RenderProcessHostImpl mojo::Remote video_encode_accelerator_factory_remote_; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ChildThreadTypeSwitcher child_thread_type_switcher_; #endif }; -@@ -1268,7 +1268,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -1275,7 +1275,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // if the request isn't handled on the IO thread. void OnBindHostReceiver(mojo::GenericPendingReceiver receiver); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Provides /proc/{renderer pid}/status and statm files for the renderer, // because the files are required to calculate the renderer's private // footprint on Chromium Linux. Regarding MacOS X and Windows, we have diff --git a/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl__receiver__bindings.cc b/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl__receiver__bindings.cc index f2e4de8beca2..aaca7468c90d 100644 --- a/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl__receiver__bindings.cc +++ b/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl__receiver__bindings.cc @@ -1,29 +1,29 @@ ---- content/browser/renderer_host/render_process_host_impl_receiver_bindings.cc.orig 2025-09-11 13:19:19 UTC +--- content/browser/renderer_host/render_process_host_impl_receiver_bindings.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/renderer_host/render_process_host_impl_receiver_bindings.cc @@ -52,7 +52,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 "components/services/font/public/mojom/font_service.mojom.h" // nogncheck #include "content/browser/font_service.h" // nogncheck #endif @@ -348,7 +348,7 @@ void RenderProcessHostImpl::IOThreadHostImpl::BindHost } #endif -#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; @@ -376,7 +376,7 @@ void RenderProcessHostImpl::IOThreadHostImpl::BindHost } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (auto r = receiver.As()) { child_thread_type_switcher_.Bind(std::move(r)); return; diff --git a/www/iridium/files/patch-content_browser_renderer__host_render__view__host__impl.cc b/www/iridium/files/patch-content_browser_renderer__host_render__view__host__impl.cc index fbcf868f6a69..ccb46ceaa1b4 100644 --- a/www/iridium/files/patch-content_browser_renderer__host_render__view__host__impl.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- content/browser/renderer_host/render_view_host_impl.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/renderer_host/render_view_host_impl.cc @@ -276,7 +276,7 @@ void RenderViewHostImpl::GetPlatformSpecificPrefs( display::win::GetScreenWin()->GetSystemMetricsInDIP(SM_CYVSCROLL); prefs->arrow_bitmap_width_horizontal_scroll_bar_in_dips = display::win::GetScreenWin()->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/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc b/www/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc index a9445bdca5fd..030a6deeb1e0 100644 --- a/www/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -122,7 +122,7 @@ - #include "ui/gfx/gdi_util.h" +@@ -127,7 +127,7 @@ + #include "ui/gfx/win/gdi_util.h" #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/accessibility/platform/browser_accessibility_auralinux.h" #include "ui/base/ime/linux/text_edit_command_auralinux.h" #include "ui/base/ime/text_input_flags.h" -@@ -477,7 +477,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge +@@ -531,7 +531,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge return ToBrowserAccessibilityWin(manager->GetBrowserAccessibilityRoot()) ->GetCOM(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ui::BrowserAccessibilityManager* manager = host()->GetOrCreateRootBrowserAccessibilityManager(); if (manager && manager->GetBrowserAccessibilityRoot()) -@@ -1880,7 +1880,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { +@@ -1958,7 +1958,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) { -@@ -2861,7 +2861,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { +@@ -2946,7 +2946,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { } bool RenderWidgetHostViewAura::NeedsMouseCapture() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return NeedsInputGrab(); #else return false; -@@ -3045,7 +3045,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit +@@ -3132,7 +3132,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(); if (!event.skip_if_unhandled && linux_ui && event.os_event) { const auto command = linux_ui->GetTextEditCommandForEvent( diff --git a/www/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h b/www/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h index ee0c52130017..88453c60fc34 100644 --- a/www/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h +++ b/www/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/render_widget_host_view_aura.h.orig 2025-05-07 06:48:23 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.h.orig 2025-12-10 15:04:57 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.h -@@ -276,7 +276,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura +@@ -288,7 +288,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura ukm::SourceId GetClientSourceForMetrics() const override; bool ShouldDoLearning() override; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool SetCompositionFromExistingText( const gfx::Range& range, const std::vector& ui_ime_text_spans) override; diff --git a/www/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__event__handler.cc b/www/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__event__handler.cc index 8f38e569fe81..cfe9a26c3451 100644 --- a/www/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__event__handler.cc +++ b/www/iridium/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 2025-09-11 13:19:19 UTC +--- content/browser/renderer_host/render_widget_host_view_event_handler.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/renderer_host/render_widget_host_view_event_handler.cc @@ -618,7 +618,7 @@ bool RenderWidgetHostViewEventHandler::CanRendererHand if (event->type() == ui::EventType::kMouseExited) { 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/iridium/files/patch-content_browser_sandbox__host__linux.cc b/www/iridium/files/patch-content_browser_sandbox__host__linux.cc index 3dc718e5b4af..421be331ec05 100644 --- a/www/iridium/files/patch-content_browser_sandbox__host__linux.cc +++ b/www/iridium/files/patch-content_browser_sandbox__host__linux.cc @@ -1,18 +1,18 @@ ---- content/browser/sandbox_host_linux.cc.orig 2025-05-07 06:48:23 UTC +--- content/browser/sandbox_host_linux.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/sandbox_host_linux.cc @@ -45,6 +45,7 @@ void SandboxHostLinux::Init() { // Instead, it replies on a temporary socket provided by the caller. PCHECK(0 == shutdown(browser_socket, SHUT_WR)) << "shutdown"; +#if !BUILDFLAG(IS_BSD) int pipefds[2]; CHECK(0 == pipe(pipefds)); const int child_lifeline_fd = pipefds[0]; @@ -55,6 +56,7 @@ void SandboxHostLinux::Init() { ipc_thread_ = std::make_unique( ipc_handler_.get(), "sandbox_ipc_thread"); ipc_thread_->Start(); +#endif } } // namespace content diff --git a/www/iridium/files/patch-content_browser_scheduler_responsiveness_jank__monitor__impl.cc b/www/iridium/files/patch-content_browser_scheduler_responsiveness_jank__monitor__impl.cc index 02302b811a1a..6570ab76a35c 100644 --- a/www/iridium/files/patch-content_browser_scheduler_responsiveness_jank__monitor__impl.cc +++ b/www/iridium/files/patch-content_browser_scheduler_responsiveness_jank__monitor__impl.cc @@ -1,11 +1,11 @@ ---- content/browser/scheduler/responsiveness/jank_monitor_impl.cc.orig 2025-05-07 06:48:23 UTC +--- content/browser/scheduler/responsiveness/jank_monitor_impl.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/scheduler/responsiveness/jank_monitor_impl.cc @@ -337,7 +337,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_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE) task_execution_metadata_.clear(); #endif return; diff --git a/www/iridium/files/patch-content_browser_scheduler_responsiveness_native__event__observer.cc b/www/iridium/files/patch-content_browser_scheduler_responsiveness_native__event__observer.cc index 6ebdbcd515ce..4eebd965308b 100644 --- a/www/iridium/files/patch-content_browser_scheduler_responsiveness_native__event__observer.cc +++ b/www/iridium/files/patch-content_browser_scheduler_responsiveness_native__event__observer.cc @@ -1,20 +1,20 @@ ---- content/browser/scheduler/responsiveness/native_event_observer.cc.orig 2025-05-07 06:48:23 UTC +--- content/browser/scheduler/responsiveness/native_event_observer.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/scheduler/responsiveness/native_event_observer.cc @@ -15,7 +15,7 @@ #include "ui/events/platform/platform_event_source.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "ui/aura/env.h" #include "ui/events/event.h" #endif @@ -39,7 +39,7 @@ NativeEventObserver::~NativeEventObserver() { DeregisterObserver(); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void NativeEventObserver::RegisterObserver() { aura::Env::GetInstance()->AddWindowEventDispatcherObserver(this); } diff --git a/www/iridium/files/patch-content_browser_scheduler_responsiveness_native__event__observer.h b/www/iridium/files/patch-content_browser_scheduler_responsiveness_native__event__observer.h index 781ad6b18be6..e3ac32737812 100644 --- a/www/iridium/files/patch-content_browser_scheduler_responsiveness_native__event__observer.h +++ b/www/iridium/files/patch-content_browser_scheduler_responsiveness_native__event__observer.h @@ -1,47 +1,47 @@ ---- content/browser/scheduler/responsiveness/native_event_observer.h.orig 2025-05-07 06:48:23 UTC +--- content/browser/scheduler/responsiveness/native_event_observer.h.orig 2025-12-10 15:04:57 UTC +++ content/browser/scheduler/responsiveness/native_event_observer.h @@ -16,7 +16,7 @@ #include "content/public/browser/native_event_processor_observer_mac.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "ui/aura/window_event_dispatcher_observer.h" #endif @@ -41,7 +41,7 @@ namespace responsiveness { class CONTENT_EXPORT NativeEventObserver #if BUILDFLAG(IS_MAC) : public NativeEventProcessorObserver -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) : public aura::WindowEventDispatcherObserver #elif BUILDFLAG(IS_WIN) : public base::MessagePumpForUI::Observer @@ -58,7 +58,7 @@ class CONTENT_EXPORT NativeEventObserver NativeEventObserver(WillRunEventCallback will_run_event_callback, DidRunEventCallback did_run_event_callback); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) NativeEventObserver(const NativeEventObserver&) = delete; NativeEventObserver& operator=(const NativeEventObserver&) = delete; @@ -74,7 +74,7 @@ class CONTENT_EXPORT NativeEventObserver // Exposed for tests. void WillRunNativeEvent(const void* opaque_identifier) override; void DidRunNativeEvent(const void* opaque_identifier) override; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // aura::WindowEventDispatcherObserver overrides: void OnWindowEventDispatcherStartedProcessing( aura::WindowEventDispatcher* dispatcher, @@ -91,7 +91,7 @@ class CONTENT_EXPORT NativeEventObserver void RegisterObserver(); void DeregisterObserver(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) struct EventInfo { raw_ptr unique_id; }; diff --git a/www/iridium/files/patch-content_browser_service__host_utility__process__host.cc b/www/iridium/files/patch-content_browser_service__host_utility__process__host.cc index a5ca672bb772..4cefc34d85e5 100644 --- a/www/iridium/files/patch-content_browser_service__host_utility__process__host.cc +++ b/www/iridium/files/patch-content_browser_service__host_utility__process__host.cc @@ -1,38 +1,38 @@ ---- content/browser/service_host/utility_process_host.cc.orig 2025-10-28 14:29:43 UTC +--- content/browser/service_host/utility_process_host.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/service_host/utility_process_host.cc -@@ -68,7 +68,7 @@ +@@ -64,7 +64,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" -@@ -97,7 +97,7 @@ namespace content { +@@ -93,7 +93,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; -@@ -495,7 +495,7 @@ bool UtilityProcessHost::StartProcess() { +@@ -491,7 +491,7 @@ bool UtilityProcessHost::StartProcess() { 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 (options_.sandbox_type_ == sandbox::mojom::Sandbox::kNetwork) { -@@ -513,7 +513,7 @@ bool UtilityProcessHost::StartProcess() { +@@ -509,7 +509,7 @@ bool UtilityProcessHost::StartProcess() { 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/iridium/files/patch-content_browser_service__host_utility__process__host__receiver__bindings.cc b/www/iridium/files/patch-content_browser_service__host_utility__process__host__receiver__bindings.cc index c2276b5e893a..f2586dbd56a7 100644 --- a/www/iridium/files/patch-content_browser_service__host_utility__process__host__receiver__bindings.cc +++ b/www/iridium/files/patch-content_browser_service__host_utility__process__host__receiver__bindings.cc @@ -1,20 +1,20 @@ ---- content/browser/service_host/utility_process_host_receiver_bindings.cc.orig 2025-05-07 06:48:23 UTC +--- content/browser/service_host/utility_process_host_receiver_bindings.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/service_host/utility_process_host_receiver_bindings.cc @@ -10,7 +10,7 @@ #include "content/public/common/content_client.h" #include "media/media_buildflags.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/services/font/public/mojom/font_service.mojom.h" // nogncheck #include "content/browser/font_service.h" // nogncheck #endif @@ -24,7 +24,7 @@ namespace content { void UtilityProcessHost::BindHostReceiver( mojo::GenericPendingReceiver receiver) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (auto font_receiver = receiver.As()) { ConnectToFontService(std::move(font_receiver)); return; diff --git a/www/iridium/files/patch-content_browser_service__host_utility__sandbox__delegate.cc b/www/iridium/files/patch-content_browser_service__host_utility__sandbox__delegate.cc index 29537c7db857..c525ebe048fd 100644 --- a/www/iridium/files/patch-content_browser_service__host_utility__sandbox__delegate.cc +++ b/www/iridium/files/patch-content_browser_service__host_utility__sandbox__delegate.cc @@ -1,57 +1,57 @@ ---- content/browser/service_host/utility_sandbox_delegate.cc.orig 2025-09-11 13:19:19 UTC +--- content/browser/service_host/utility_sandbox_delegate.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/service_host/utility_sandbox_delegate.cc -@@ -28,7 +28,7 @@ - #include "chromeos/ash/components/assistant/buildflags.h" - #endif // BUILDFLAG(IS_CHROMEOS) +@@ -24,7 +24,7 @@ + #include "sandbox/policy/sandbox_type.h" + #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "media/gpu/buildflags.h" #include "media/media_buildflags.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -79,7 +79,7 @@ UtilitySandboxedProcessLauncherDelegate:: - #if BUILDFLAG(IS_FUCHSIA) +@@ -72,10 +72,10 @@ UtilitySandboxedProcessLauncherDelegate:: + sandbox_type_ == sandbox::mojom::Sandbox::kOnDeviceModelExecution || + sandbox_type_ == sandbox::mojom::Sandbox::kCdm || + sandbox_type_ == sandbox::mojom::Sandbox::kPrintCompositor || +-#if BUILDFLAG(IS_FUCHSIA) ++#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kVideoCapture || #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kShapeDetection || #if BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoDecoding || -@@ -97,14 +97,14 @@ UtilitySandboxedProcessLauncherDelegate:: - #endif // BUILDFLAG(ENABLE_CROS_LIBASSISTANT) +@@ -90,11 +90,11 @@ UtilitySandboxedProcessLauncherDelegate:: + sandbox_type_ == sandbox::mojom::Sandbox::kNearby || #endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kScreenAI || sandbox_type_ == sandbox::mojom::Sandbox::kPrintBackend || #endif --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - sandbox_type_ == sandbox::mojom::Sandbox::kVideoEffects || - #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kOnDeviceTranslation || #endif sandbox_type_ == sandbox::mojom::Sandbox::kAudio || -@@ -164,15 +164,15 @@ ZygoteCommunication* UtilitySandboxedProcessLauncherDe - #endif // BUILDFLAG(ENABLE_CROS_LIBASSISTANT) +@@ -151,15 +151,15 @@ ZygoteCommunication* UtilitySandboxedProcessLauncherDe + sandbox_type_ == sandbox::mojom::Sandbox::kNearby || #endif // BUILDFLAG(IS_CHROMEOS) sandbox_type_ == sandbox::mojom::Sandbox::kAudio || -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kShapeDetection || #endif #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kPrintBackend || sandbox_type_ == sandbox::mojom::Sandbox::kScreenAI || #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - sandbox_type_ == sandbox::mojom::Sandbox::kVideoEffects || sandbox_type_ == sandbox::mojom::Sandbox::kOnDeviceTranslation || #endif // BUILDFLAG(IS_LINUX) + sandbox_type_ == sandbox::mojom::Sandbox::kSpeechRecognition) { diff --git a/www/iridium/files/patch-content_browser_shape__detection_shape__detection__service__host.cc b/www/iridium/files/patch-content_browser_shape__detection_shape__detection__service.cc similarity index 84% rename from www/iridium/files/patch-content_browser_shape__detection_shape__detection__service__host.cc rename to www/iridium/files/patch-content_browser_shape__detection_shape__detection__service.cc index 45e88fa66ba4..f88f5f365864 100644 --- a/www/iridium/files/patch-content_browser_shape__detection_shape__detection__service__host.cc +++ b/www/iridium/files/patch-content_browser_shape__detection_shape__detection__service.cc @@ -1,20 +1,20 @@ ---- content/browser/shape_detection/shape_detection_service_host.cc.orig 2025-10-28 14:29:43 UTC -+++ content/browser/shape_detection/shape_detection_service_host.cc +--- content/browser/shape_detection/shape_detection_service.cc.orig 2025-12-10 15:04:57 UTC ++++ content/browser/shape_detection/shape_detection_service.cc @@ -15,7 +15,7 @@ #endif #if BUILDFLAG(IS_WIN) || (BUILDFLAG(GOOGLE_CHROME_BRANDING) && \ - (BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX))) + (BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))) #include "content/public/browser/service_process_host.h" #else #include "content/browser/gpu/gpu_process_host.h" @@ -29,7 +29,7 @@ shape_detection::mojom::ShapeDetectionService* GetShap remote; if (!*remote) { #if BUILDFLAG(IS_WIN) || (BUILDFLAG(GOOGLE_CHROME_BRANDING) && \ - (BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX))) + (BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))) ServiceProcessHost::Launch( remote->BindNewPipeAndPassReceiver(), ServiceProcessHost::Options() diff --git a/www/iridium/files/patch-content_browser_theme__helper.cc b/www/iridium/files/patch-content_browser_theme__helper.cc index a1162ee17d6d..9df22d9615f4 100644 --- a/www/iridium/files/patch-content_browser_theme__helper.cc +++ b/www/iridium/files/patch-content_browser_theme__helper.cc @@ -1,11 +1,11 @@ ---- content/browser/theme_helper.cc.orig 2025-10-28 14:29:43 UTC +--- content/browser/theme_helper.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/theme_helper.cc @@ -27,7 +27,7 @@ mojom::UpdateSystemColorInfoParamsPtr MakeUpdateSystem ui::NativeTheme* native_theme) { mojom::UpdateSystemColorInfoParamsPtr params = mojom::UpdateSystemColorInfoParams::New(); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) params->accent_color = native_theme->user_color(); #endif diff --git a/www/iridium/files/patch-content_browser_v8__snapshot__files.cc b/www/iridium/files/patch-content_browser_v8__snapshot__files.cc index c339a86d3fa8..3ae72040abc4 100644 --- a/www/iridium/files/patch-content_browser_v8__snapshot__files.cc +++ b/www/iridium/files/patch-content_browser_v8__snapshot__files.cc @@ -1,11 +1,11 @@ ---- content/browser/v8_snapshot_files.cc.orig 2025-11-06 10:11:34 UTC +--- content/browser/v8_snapshot_files.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/v8_snapshot_files.cc @@ -36,7 +36,7 @@ void registerContextSnapshotAndroid( std::map> 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/iridium/files/patch-content_browser_web__contents_slow__web__preference__cache.cc b/www/iridium/files/patch-content_browser_web__contents_slow__web__preference__cache.cc index 301f18aba461..bb25ab324e6b 100644 --- a/www/iridium/files/patch-content_browser_web__contents_slow__web__preference__cache.cc +++ b/www/iridium/files/patch-content_browser_web__contents_slow__web__preference__cache.cc @@ -1,29 +1,29 @@ ---- content/browser/web_contents/slow_web_preference_cache.cc.orig 2025-05-07 06:48:23 UTC +--- content/browser/web_contents/slow_web_preference_cache.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/web_contents/slow_web_preference_cache.cc @@ -17,7 +17,7 @@ #if BUILDFLAG(IS_WIN) #include "ui/events/devices/input_device_observer_win.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "ui/events/devices/device_data_manager.h" #elif BUILDFLAG(IS_ANDROID) #include "ui/base/device_form_factor.h" @@ -57,7 +57,7 @@ SlowWebPreferenceCache::SlowWebPreferenceCache() { #if BUILDFLAG(IS_WIN) ui::InputDeviceObserverWin::GetInstance()->AddObserver(this); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ui::DeviceDataManager::GetInstance()->AddObserver(this); #elif BUILDFLAG(IS_ANDROID) ui::InputDeviceObserverAndroid::GetInstance()->AddObserver(this); @@ -69,7 +69,7 @@ SlowWebPreferenceCache::SlowWebPreferenceCache() { SlowWebPreferenceCache::~SlowWebPreferenceCache() { #if BUILDFLAG(IS_WIN) ui::InputDeviceObserverWin::GetInstance()->RemoveObserver(this); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ui::DeviceDataManager::GetInstance()->RemoveObserver(this); #elif BUILDFLAG(IS_ANDROID) ui::InputDeviceObserverAndroid::GetInstance()->RemoveObserver(this); diff --git a/www/iridium/files/patch-content_browser_web__contents_web__contents__view__aura.cc b/www/iridium/files/patch-content_browser_web__contents_web__contents__view__aura.cc index e28e7e756d5e..144aea9b26f8 100644 --- a/www/iridium/files/patch-content_browser_web__contents_web__contents__view__aura.cc +++ b/www/iridium/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 2025-09-11 13:19:19 UTC +--- content/browser/web_contents/web_contents_view_aura.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/web_contents/web_contents_view_aura.cc -@@ -175,7 +175,7 @@ class WebDragSourceAura : public content::WebContentsO +@@ -176,7 +176,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, -@@ -260,7 +260,7 @@ void PrepareDragData(const DropData& drop_data, +@@ -261,7 +261,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. -@@ -1326,7 +1326,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* +@@ -1344,7 +1344,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/iridium/files/patch-content_browser_web__contents_web__contents__view__aura__unittest.cc b/www/iridium/files/patch-content_browser_web__contents_web__contents__view__aura__unittest.cc index 2f32b569aae7..b082e22c77d4 100644 --- a/www/iridium/files/patch-content_browser_web__contents_web__contents__view__aura__unittest.cc +++ b/www/iridium/files/patch-content_browser_web__contents_web__contents__view__aura__unittest.cc @@ -1,74 +1,74 @@ ---- content/browser/web_contents/web_contents_view_aura_unittest.cc.orig 2025-11-06 10:11:34 UTC +--- content/browser/web_contents/web_contents_view_aura_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/web_contents/web_contents_view_aura_unittest.cc @@ -42,7 +42,7 @@ #include "ui/base/dragdrop/os_exchange_data_provider_win.h" #endif -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) #include "ui/base/x/selection_utils.h" #include "ui/base/x/x11_os_exchange_data_provider.h" #include "ui/gfx/x/atom_cache.h" @@ -98,7 +98,7 @@ class TestDragDropClient : public aura::client::DragDr drag_drop_data_ = std::move(data); return DragOperation::kCopy; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void UpdateDragImage(const gfx::ImageSkia& image, const gfx::Vector2d& offset) override {} #endif -@@ -235,7 +235,7 @@ TEST_F(WebContentsViewAuraTest, WebContentsDestroyedDu +@@ -236,7 +236,7 @@ TEST_F(WebContentsViewAuraTest, WebContentsDestroyedDu ui::EF_LEFT_MOUSE_BUTTON, 0); ui::EventHandler* event_handler = GetView(); event_handler->OnMouseEvent(&mouse_event); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The web-content is not activated during mouse-press on Linux. // See comment in WebContentsViewAura::OnMouseEvent() for more details. EXPECT_NE(web_contents(), nullptr); -@@ -301,7 +301,7 @@ TEST_F(WebContentsViewAuraTest, MAYBE_DragDropFiles) { +@@ -302,7 +302,7 @@ TEST_F(WebContentsViewAuraTest, MAYBE_DragDropFiles) { view->OnDragEntered(event); ASSERT_NE(nullptr, view->current_drag_data_); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // By design, Linux implementations return an empty string if file data // is also present. EXPECT_TRUE(!view->current_drag_data_->text || -@@ -341,7 +341,7 @@ TEST_F(WebContentsViewAuraTest, MAYBE_DragDropFiles) { +@@ -342,7 +342,7 @@ TEST_F(WebContentsViewAuraTest, MAYBE_DragDropFiles) { CheckDropData(view); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // By design, Linux implementations returns an empty string if file data // is also present. EXPECT_TRUE(!drop_complete_data_->drop_data.text || -@@ -399,7 +399,7 @@ TEST_F(WebContentsViewAuraTest, MAYBE_DragDropFilesOri +@@ -400,7 +400,7 @@ TEST_F(WebContentsViewAuraTest, MAYBE_DragDropFilesOri view->OnDragEntered(event); ASSERT_NE(nullptr, view->current_drag_data_); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // By design, Linux implementations return an empty string if file data // is also present. EXPECT_TRUE(!view->current_drag_data_->text || -@@ -431,7 +431,7 @@ TEST_F(WebContentsViewAuraTest, MAYBE_DragDropFilesOri +@@ -432,7 +432,7 @@ TEST_F(WebContentsViewAuraTest, MAYBE_DragDropFilesOri CheckDropData(view); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // By design, Linux implementations returns an empty string if file data is // also present. EXPECT_TRUE(!drop_complete_data_->drop_data.text || -@@ -462,7 +462,7 @@ TEST_F(WebContentsViewAuraTest, MAYBE_DragDropImageFro +@@ -463,7 +463,7 @@ TEST_F(WebContentsViewAuraTest, MAYBE_DragDropImageFro auto data = std::make_unique(); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) // FileContents drag-drop in X relies on XDragDropClient::InitDrag() setting // window property 'XdndDirectSave0' to filename. Since XDragDropClient is not // created in this unittest, we will set this property manually to allow diff --git a/www/iridium/files/patch-content_browser_webui_web__ui__main__frame__observer.cc b/www/iridium/files/patch-content_browser_webui_web__ui__main__frame__observer.cc index 675a870953b3..9b0e40f35788 100644 --- a/www/iridium/files/patch-content_browser_webui_web__ui__main__frame__observer.cc +++ b/www/iridium/files/patch-content_browser_webui_web__ui__main__frame__observer.cc @@ -1,11 +1,11 @@ ---- content/browser/webui/web_ui_main_frame_observer.cc.orig 2025-05-07 06:48:23 UTC +--- content/browser/webui/web_ui_main_frame_observer.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/webui/web_ui_main_frame_observer.cc @@ -47,7 +47,7 @@ std::string RedactURL(const GURL& url) { bool IsWebUIJavaScriptErrorReportingSupported() { #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) return false; -#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return true; #else return base::FeatureList::IsEnabled(features::kWebUIJSErrorReportingExtended); diff --git a/www/iridium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.cc b/www/iridium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.cc index 8ec19fc3b0f7..a921a31e7d31 100644 --- a/www/iridium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.cc +++ b/www/iridium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.cc @@ -1,81 +1,81 @@ ---- content/browser/zygote_host/zygote_host_impl_linux.cc.orig 2025-10-28 14:29:43 UTC +--- content/browser/zygote_host/zygote_host_impl_linux.cc.orig 2025-12-10 15:04:57 UTC +++ content/browser/zygote_host/zygote_host_impl_linux.cc @@ -19,8 +19,10 @@ #include "build/build_config.h" #include "content/common/zygote/zygote_commands_linux.h" #include "content/common/zygote/zygote_communication_linux.h" +#if !BUILDFLAG(IS_BSD) #include "content/common/zygote/zygote_handle_impl_linux.h" #include "content/public/common/zygote/zygote_handle.h" +#endif #include "sandbox/linux/services/credentials.h" #include "sandbox/linux/services/namespace_sandbox.h" #include "sandbox/linux/suid/client/setuid_sandbox_host.h" @@ -38,6 +40,7 @@ namespace content { namespace { +#if !BUILDFLAG(IS_BSD) // Receive a fixed message on fd and return the sender's PID. // Returns true if the message received matches the expected message. bool ReceiveFixedMessage(int fd, @@ -60,6 +63,7 @@ bool ReceiveFixedMessage(int fd, return false; return true; } +#endif } // namespace @@ -69,9 +73,13 @@ ZygoteHost* ZygoteHost::GetInstance() { } ZygoteHostImpl::ZygoteHostImpl() +#if !BUILDFLAG(IS_BSD) : use_namespace_sandbox_(false), use_suid_sandbox_(false), use_suid_sandbox_for_adj_oom_score_(false), +#else + : +#endif sandbox_binary_(), zygote_pids_lock_(), zygote_pids_() {} @@ -84,6 +92,7 @@ ZygoteHostImpl* ZygoteHostImpl::GetInstance() { } void ZygoteHostImpl::Init(const base::CommandLine& command_line) { +#if !BUILDFLAG(IS_BSD) if (command_line.HasSwitch(sandbox::policy::switches::kNoSandbox)) { return; } @@ -138,6 +147,7 @@ void ZygoteHostImpl::Init(const base::CommandLine& com "you can try using --" << sandbox::policy::switches::kNoSandbox << "."; } +#endif } void ZygoteHostImpl::AddZygotePid(pid_t pid) { @@ -162,6 +172,7 @@ pid_t ZygoteHostImpl::LaunchZygote( base::CommandLine* cmd_line, base::ScopedFD* control_fd, base::FileHandleMappingVector additional_remapped_fds) { +#if !BUILDFLAG(IS_BSD) int fds[2]; CHECK_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC, 0, fds)); CHECK(base::UnixDomainSocket::EnableReceiveProcessId(fds[0])); @@ -230,9 +241,12 @@ pid_t ZygoteHostImpl::LaunchZygote( AddZygotePid(pid); return pid; +#else + return 0; +#endif } -#if !BUILDFLAG(IS_OPENBSD) +#if !BUILDFLAG(IS_BSD) void ZygoteHostImpl::AdjustRendererOOMScore(base::ProcessHandle pid, int score) { // 1) You can't change the oom_score_adj of a non-dumpable process diff --git a/www/iridium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.h b/www/iridium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.h index 05a1644789b0..ccb72668d486 100644 --- a/www/iridium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.h +++ b/www/iridium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.h @@ -1,29 +1,29 @@ ---- content/browser/zygote_host/zygote_host_impl_linux.h.orig 2025-05-07 06:48:23 UTC +--- content/browser/zygote_host/zygote_host_impl_linux.h.orig 2025-12-10 15:04:57 UTC +++ content/browser/zygote_host/zygote_host_impl_linux.h @@ -46,12 +46,14 @@ class CONTENT_EXPORT ZygoteHostImpl : public ZygoteHos base::ScopedFD* control_fd, base::FileHandleMappingVector additional_remapped_fds); +#if !BUILDFLAG(IS_BSD) void AdjustRendererOOMScore(base::ProcessHandle process_handle, int score) override; #if BUILDFLAG(IS_CHROMEOS) void ReinitializeLogging(uint32_t logging_dest, base::PlatformFile log_file_fd) override; #endif // BUILDFLAG(IS_CHROMEOS) +#endif bool HasZygote() { return !zygote_pids_.empty(); } @@ -66,9 +68,11 @@ class CONTENT_EXPORT ZygoteHostImpl : public ZygoteHos int renderer_sandbox_status_; +#if !BUILDFLAG(IS_BSD) bool use_namespace_sandbox_; bool use_suid_sandbox_; bool use_suid_sandbox_for_adj_oom_score_; +#endif std::string sandbox_binary_; // This lock protects the |zygote_pids_| set. diff --git a/www/iridium/files/patch-content_child_BUILD.gn b/www/iridium/files/patch-content_child_BUILD.gn index e19535d03f05..69158b63dd63 100644 --- a/www/iridium/files/patch-content_child_BUILD.gn +++ b/www/iridium/files/patch-content_child_BUILD.gn @@ -1,16 +1,16 @@ ---- content/child/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- content/child/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ content/child/BUILD.gn -@@ -135,6 +135,13 @@ target(link_target_type, "child") { +@@ -134,6 +134,13 @@ target(link_target_type, "child") { ] } + if (is_bsd) { + sources -= [ + "sandboxed_process_thread_type_handler.cc", + "sandboxed_process_thread_type_handler.h", + ] + } + if (is_win) { sources += [ "child_process_sandbox_support_impl_win.cc", diff --git a/www/iridium/files/patch-content_child_child__process.cc b/www/iridium/files/patch-content_child_child__process.cc index d827eaf5dedd..c8c6cd7b1424 100644 --- a/www/iridium/files/patch-content_child_child__process.cc +++ b/www/iridium/files/patch-content_child_child__process.cc @@ -1,20 +1,20 @@ ---- content/child/child_process.cc.orig 2025-11-06 10:11:34 UTC +--- content/child/child_process.cc.orig 2025-12-10 15:04:57 UTC +++ content/child/child_process.cc @@ -37,7 +37,7 @@ #include "content/common/android/cpu_time_metrics.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/child/sandboxed_process_thread_type_handler.h" #endif @@ -215,7 +215,7 @@ void ChildProcess::set_main_thread(ChildThreadImpl* th main_thread_.reset(thread); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void ChildProcess::SetIOThreadType(base::ThreadType thread_type) { if (!io_thread_) { return; diff --git a/www/iridium/files/patch-content_child_child__process.h b/www/iridium/files/patch-content_child_child__process.h index 1a8768608010..bef0dcdf2f5b 100644 --- a/www/iridium/files/patch-content_child_child__process.h +++ b/www/iridium/files/patch-content_child_child__process.h @@ -1,11 +1,11 @@ ---- content/child/child_process.h.orig 2025-11-06 10:11:34 UTC +--- content/child/child_process.h.orig 2025-12-10 15:04:57 UTC +++ content/child/child_process.h @@ -81,7 +81,7 @@ class CONTENT_EXPORT ChildProcess { return io_thread_runner_.get(); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Changes the thread type of the child process IO thread. void SetIOThreadType(base::ThreadType thread_type); #endif diff --git a/www/iridium/files/patch-content_common_BUILD.gn b/www/iridium/files/patch-content_common_BUILD.gn index 0fede09589b5..3767b96ef9bd 100644 --- a/www/iridium/files/patch-content_common_BUILD.gn +++ b/www/iridium/files/patch-content_common_BUILD.gn @@ -1,36 +1,36 @@ ---- content/common/BUILD.gn.orig 2025-09-11 13:19:19 UTC +--- content/common/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ content/common/BUILD.gn -@@ -367,19 +367,28 @@ source_set("common") { +@@ -365,19 +365,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/iridium/files/patch-content_common_features.cc b/www/iridium/files/patch-content_common_features.cc index 167e54c4f076..fd67069a7458 100644 --- a/www/iridium/files/patch-content_common_features.cc +++ b/www/iridium/files/patch-content_common_features.cc @@ -1,11 +1,11 @@ ---- content/common/features.cc.orig 2025-11-06 10:11:34 UTC +--- content/common/features.cc.orig 2025-12-10 15:04:57 UTC +++ content/common/features.cc -@@ -144,7 +144,7 @@ BASE_FEATURE(kDocumentPolicyNegotiation, base::FEATURE +@@ -171,7 +171,7 @@ BASE_FEATURE(kDocumentPolicyNegotiation, base::FEATURE BASE_FEATURE(kEmbeddingRequiresOptIn, base::FEATURE_DISABLED_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, base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/iridium/files/patch-content_common_features.h b/www/iridium/files/patch-content_common_features.h index 9ccdfdecf2c1..b202fe018d08 100644 --- a/www/iridium/files/patch-content_common_features.h +++ b/www/iridium/files/patch-content_common_features.h @@ -1,11 +1,11 @@ ---- content/common/features.h.orig 2025-09-11 13:19:19 UTC +--- content/common/features.h.orig 2025-12-10 15:04:57 UTC +++ content/common/features.h -@@ -60,7 +60,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kCommittedOriginEn - CONTENT_EXPORT BASE_DECLARE_FEATURE(kCommittedOriginTracking); +@@ -65,7 +65,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kCopyFromSurfaceAl CONTENT_EXPORT BASE_DECLARE_FEATURE(kCriticalClientHint); + CONTENT_EXPORT BASE_DECLARE_FEATURE(kDelayRfhDestructionsOnUnloadAndDetach); CONTENT_EXPORT BASE_DECLARE_FEATURE(kDocumentPolicyNegotiation); -#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(kEnforceSameDocumentOriginInvariants); diff --git a/www/iridium/files/patch-content_common_font__list__unittest.cc b/www/iridium/files/patch-content_common_font__list__unittest.cc index 0b0d4f43dc58..002c94a46be1 100644 --- a/www/iridium/files/patch-content_common_font__list__unittest.cc +++ b/www/iridium/files/patch-content_common_font__list__unittest.cc @@ -1,11 +1,11 @@ ---- content/common/font_list_unittest.cc.orig 2025-05-07 06:48:23 UTC +--- content/common/font_list_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ content/common/font_list_unittest.cc @@ -48,7 +48,7 @@ TEST(FontList, GetFontList) { EXPECT_TRUE(HasFontWithName(fonts, "MS Gothic", "MS Gothic")); EXPECT_TRUE(HasFontWithName(fonts, "Segoe UI", "Segoe UI")); EXPECT_TRUE(HasFontWithName(fonts, "Verdana", "Verdana")); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) EXPECT_TRUE(HasFontWithName(fonts, "Arimo", "Arimo")); #else EXPECT_TRUE(HasFontWithName(fonts, "Arial", "Arial")); diff --git a/www/iridium/files/patch-content_common_gpu__pre__sandbox__hook__bsd.cc b/www/iridium/files/patch-content_common_gpu__pre__sandbox__hook__bsd.cc index da073e63776b..62f6468d6861 100644 --- a/www/iridium/files/patch-content_common_gpu__pre__sandbox__hook__bsd.cc +++ b/www/iridium/files/patch-content_common_gpu__pre__sandbox__hook__bsd.cc @@ -1,71 +1,71 @@ ---- content/common/gpu_pre_sandbox_hook_bsd.cc.orig 2025-09-11 13:19:19 UTC +--- content/common/gpu_pre_sandbox_hook_bsd.cc.orig 2025-12-10 15:04:57 UTC +++ content/common/gpu_pre_sandbox_hook_bsd.cc @@ -0,0 +1,68 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "content/common/gpu_pre_sandbox_hook_bsd.h" + +#include +#include +#include + +#include +#include +#include +#include + +#include "base/base_paths.h" +#include "base/files/file_enumerator.h" +#include "base/files/file_path.h" +#include "base/files/scoped_file.h" +#include "base/functional/bind.h" +#include "base/logging.h" +#include "base/path_service.h" +#include "base/strings/stringprintf.h" +#include "build/build_config.h" +#include "build/buildflag.h" +#include "build/chromeos_buildflags.h" +#include "content/public/common/content_switches.h" +#include "media/gpu/buildflags.h" + +namespace content { +namespace { + +constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE; + +void LoadVulkanLibraries() { + // Try to preload Vulkan libraries. Failure is not an error as not all may be + // present. + const char* kLibraries[] = { + "libvulkan.so", + "libvulkan_intel.so", + "libvulkan_intel_hasvk.so", + "libvulkan_radeon.so", + }; + for (const auto* library : kLibraries) { + dlopen(library, dlopen_flag); + } +} + +} // namespace + +bool LoadLibrariesForGpu( + const sandbox::policy::SandboxSeccompBPF::Options& options) { + LoadVulkanLibraries(); + + return true; +} + +bool GpuPreSandboxHook(sandbox::policy::SandboxLinux::Options options) { + if (!LoadLibrariesForGpu(options)) + return false; + + // TODO(tsepez): enable namspace sandbox here once crashes are understood. + + errno = 0; + return true; +} + +} // namespace content diff --git a/www/iridium/files/patch-content_common_gpu__pre__sandbox__hook__bsd.h b/www/iridium/files/patch-content_common_gpu__pre__sandbox__hook__bsd.h index 3b4dc6ac5427..986f09cd73e0 100644 --- a/www/iridium/files/patch-content_common_gpu__pre__sandbox__hook__bsd.h +++ b/www/iridium/files/patch-content_common_gpu__pre__sandbox__hook__bsd.h @@ -1,23 +1,23 @@ ---- content/common/gpu_pre_sandbox_hook_bsd.h.orig 2025-05-07 06:48:23 UTC +--- content/common/gpu_pre_sandbox_hook_bsd.h.orig 2025-12-10 15:04:57 UTC +++ content/common/gpu_pre_sandbox_hook_bsd.h @@ -0,0 +1,20 @@ +// Copyright 2017 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_BSD_H_ +#define CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_BSD_H_ + +#include "base/component_export.h" +#include "sandbox/policy/sandbox.h" + +namespace content { + +// A pre-sandbox hook to use on Linux-based systems in sandboxed processes that +// require general GPU usage. +COMPONENT_EXPORT(GPU_PRE_SANDBOX_HOOK) +bool GpuPreSandboxHook(sandbox::policy::SandboxLinux::Options options); + +} // namespace content + +#endif // CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_BSD_H_ diff --git a/www/iridium/files/patch-content_common_gpu__pre__sandbox__hook__linux.h b/www/iridium/files/patch-content_common_gpu__pre__sandbox__hook__linux.h index c055a7f23b25..420eda8e9faa 100644 --- a/www/iridium/files/patch-content_common_gpu__pre__sandbox__hook__linux.h +++ b/www/iridium/files/patch-content_common_gpu__pre__sandbox__hook__linux.h @@ -1,18 +1,18 @@ ---- content/common/gpu_pre_sandbox_hook_linux.h.orig 2025-09-11 13:19:19 UTC +--- content/common/gpu_pre_sandbox_hook_linux.h.orig 2025-12-10 15:04:57 UTC +++ content/common/gpu_pre_sandbox_hook_linux.h @@ -7,7 +7,15 @@ #include +#include "build/build_config.h" + +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#include "sandbox/linux/syscall_broker/broker_command.h" +#include "sandbox/linux/syscall_broker/broker_file_permission.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif namespace sandbox::syscall_broker { class BrokerFilePermission; diff --git a/www/iridium/files/patch-content_common_thread__type__switcher.mojom b/www/iridium/files/patch-content_common_thread__type__switcher.mojom index 1b5cb6e116b8..1594e9942da0 100644 --- a/www/iridium/files/patch-content_common_thread__type__switcher.mojom +++ b/www/iridium/files/patch-content_common_thread__type__switcher.mojom @@ -1,10 +1,10 @@ ---- content/common/thread_type_switcher.mojom.orig 2025-05-07 06:48:23 UTC +--- content/common/thread_type_switcher.mojom.orig 2025-12-10 15:04:57 UTC +++ content/common/thread_type_switcher.mojom @@ -10,6 +10,6 @@ import "mojo/public/mojom/base/thread_type.mojom"; // occur in a child process due to its sandbox, e.g. on Linux and ChromeOS. interface ThreadTypeSwitcher { // Asks the browser to change the type of thread. - SetThreadType(int32 platform_thread_id, + SetThreadType(uint64 platform_thread_id, mojo_base.mojom.ThreadType thread_type); }; diff --git a/www/iridium/files/patch-content_gpu_gpu__child__thread.cc b/www/iridium/files/patch-content_gpu_gpu__child__thread.cc index 8ed2c5b62679..0510d1c70757 100644 --- a/www/iridium/files/patch-content_gpu_gpu__child__thread.cc +++ b/www/iridium/files/patch-content_gpu_gpu__child__thread.cc @@ -1,21 +1,21 @@ ---- content/gpu/gpu_child_thread.cc.orig 2025-11-06 10:11:34 UTC +--- content/gpu/gpu_child_thread.cc.orig 2025-12-10 15:04:57 UTC +++ content/gpu/gpu_child_thread.cc @@ -58,7 +58,7 @@ #include "third_party/skia/include/ports/SkFontConfigInterface.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/child/sandboxed_process_thread_type_handler.h" #endif @@ -150,7 +150,8 @@ void GpuChildThread::Init( viz_main_.gpu_service()->set_start_time(process_start_time); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +// XXX BSD +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) SandboxedProcessThreadTypeHandler::NotifyMainChildThreadCreated(); #endif diff --git a/www/iridium/files/patch-content_gpu_gpu__main.cc b/www/iridium/files/patch-content_gpu_gpu__main.cc index 677fad880a4e..15214180235d 100644 --- a/www/iridium/files/patch-content_gpu_gpu__main.cc +++ b/www/iridium/files/patch-content_gpu_gpu__main.cc @@ -1,73 +1,73 @@ ---- content/gpu/gpu_main.cc.orig 2025-10-28 14:29:43 UTC +--- content/gpu/gpu_main.cc.orig 2025-12-10 15:04:57 UTC +++ content/gpu/gpu_main.cc @@ -108,10 +108,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 @@ -129,7 +133,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&); @@ -191,7 +195,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel const gpu::GPUInfo* gpu_info, const gpu::GpuPreferences& gpu_prefs) override { TRACE_EVENT("gpu,startup", "gpu_main::EnsureSandboxInitialized"); -#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_); @@ -307,7 +311,7 @@ int GpuMain(MainFunctionParams parameters) { std::make_unique( gpu_preferences.message_pump_type, /*is_main_thread=*/true); } -#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 @@ -332,7 +336,8 @@ int GpuMain(MainFunctionParams parameters) { base::PlatformThread::SetName("CrGpuMain"); mojo::InterfaceEndpointClient::SetThreadNameSuffixForMetrics("GpuMain"); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +// XXX BSD +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) // Thread type delegate of the process should be registered before // thread type change below for the main thread and for thread pool in // ChildProcess constructor. @@ -485,7 +490,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) { @@ -533,7 +538,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. // See https://crbug.com/1417237 diff --git a/www/iridium/files/patch-content_public_browser_content__browser__client.cc b/www/iridium/files/patch-content_public_browser_content__browser__client.cc index 2bfb1a530a7e..9d5cad1ad4c3 100644 --- a/www/iridium/files/patch-content_public_browser_content__browser__client.cc +++ b/www/iridium/files/patch-content_public_browser_content__browser__client.cc @@ -1,11 +1,11 @@ ---- content/public/browser/content_browser_client.cc.orig 2025-11-06 10:11:34 UTC +--- content/public/browser/content_browser_client.cc.orig 2025-12-10 15:04:57 UTC +++ content/public/browser/content_browser_client.cc -@@ -1410,7 +1410,7 @@ bool ContentBrowserClient::ShouldRunOutOfProcessSystem +@@ -1434,7 +1434,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/iridium/files/patch-content_public_browser_zygote__host_zygote__host__linux.h b/www/iridium/files/patch-content_public_browser_zygote__host_zygote__host__linux.h index bc2d5be0abaa..7144bac75735 100644 --- a/www/iridium/files/patch-content_public_browser_zygote__host_zygote__host__linux.h +++ b/www/iridium/files/patch-content_public_browser_zygote__host_zygote__host__linux.h @@ -1,16 +1,16 @@ ---- content/public/browser/zygote_host/zygote_host_linux.h.orig 2025-05-07 06:48:23 UTC +--- content/public/browser/zygote_host/zygote_host_linux.h.orig 2025-12-10 15:04:57 UTC +++ content/public/browser/zygote_host/zygote_host_linux.h @@ -34,11 +34,13 @@ class ZygoteHost { // after the first render has been forked. virtual int GetRendererSandboxStatus() = 0; +#if !BUILDFLAG(IS_BSD) // Adjust the OOM score of the given renderer's PID. The allowed // range for the score is [0, 1000], where higher values are more // likely to be killed by the OOM killer. virtual void AdjustRendererOOMScore(base::ProcessHandle process_handle, int score) = 0; +#endif #if BUILDFLAG(IS_CHROMEOS) // Reinitialize logging for the Zygote processes. Needed on ChromeOS, which diff --git a/www/iridium/files/patch-content_public_common_content__features.cc b/www/iridium/files/patch-content_public_common_content__features.cc index 0c8bcab3f36f..d1fca3654190 100644 --- a/www/iridium/files/patch-content_public_common_content__features.cc +++ b/www/iridium/files/patch-content_public_common_content__features.cc @@ -1,36 +1,36 @@ ---- content/public/common/content_features.cc.orig 2025-11-06 10:11:34 UTC +--- content/public/common/content_features.cc.orig 2025-12-10 15:04:57 UTC +++ content/public/common/content_features.cc -@@ -95,7 +95,7 @@ BASE_FEATURE(kAudioServiceLaunchOnStartup, base::FEATU +@@ -106,7 +106,7 @@ BASE_FEATURE(kAudioServiceLaunchOnStartup, base::FEATU // Runs the audio service in a separate process. BASE_FEATURE(kAudioServiceOutOfProcess, -#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 -@@ -1152,10 +1152,10 @@ BASE_FEATURE(kWebAssemblyTiering, base::FEATURE_ENABLE +@@ -1165,10 +1165,10 @@ BASE_FEATURE(kWebAssemblyTiering, base::FEATURE_ENABLE // Enable WebAssembly trap handler. BASE_FEATURE(kWebAssemblyTrapHandler, -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ BUILDFLAG(IS_MAC)) && \ defined(ARCH_CPU_X86_64)) || \ - ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)) && \ + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)) && \ defined(ARCH_CPU_ARM64)) base::FEATURE_ENABLED_BY_DEFAULT #else -@@ -1203,7 +1203,11 @@ BASE_FEATURE(kWebUIJSErrorReportingExtended, base::FEA +@@ -1216,7 +1216,11 @@ BASE_FEATURE(kWebUIJSErrorReportingExtended, base::FEA // 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 // Apply `PrefetchPriority::kHighest` for Webview Prefetch API. BASE_FEATURE(kWebViewPrefetchHighestPrefetchPriority, diff --git a/www/iridium/files/patch-content_public_common_content__switches.cc b/www/iridium/files/patch-content_public_common_content__switches.cc index f032f4b06dee..4064cc06fc6c 100644 --- a/www/iridium/files/patch-content_public_common_content__switches.cc +++ b/www/iridium/files/patch-content_public_common_content__switches.cc @@ -1,22 +1,22 @@ ---- content/public/common/content_switches.cc.orig 2025-10-28 14:29:43 UTC +--- content/public/common/content_switches.cc.orig 2025-12-10 15:04:57 UTC +++ content/public/common/content_switches.cc @@ -347,6 +347,10 @@ const char kEnableIsolatedWebAppsInRenderer[] = // builds. const char kEnableLogging[] = "enable-logging"; +const char kDisableUnveil[] = "disable-unveil"; + +const char kTrk[] = "trk"; + // 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. -@@ -940,7 +944,7 @@ const char kPreventResizingContentsForTesting[] = +@@ -946,7 +950,7 @@ const char kPreventResizingContentsForTesting[] = "prevent-resizing-contents-for-testing"; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || 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/iridium/files/patch-content_public_common_content__switches.h b/www/iridium/files/patch-content_public_common_content__switches.h index f14d45d04074..2c770793dcc7 100644 --- a/www/iridium/files/patch-content_public_common_content__switches.h +++ b/www/iridium/files/patch-content_public_common_content__switches.h @@ -1,20 +1,20 @@ ---- content/public/common/content_switches.h.orig 2025-10-28 14:29:43 UTC +--- content/public/common/content_switches.h.orig 2025-12-10 15:04:57 UTC +++ content/public/common/content_switches.h @@ -108,6 +108,8 @@ 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 kTrk[]; CONTENT_EXPORT extern const char kEnableNetworkInformationDownlinkMax[]; CONTENT_EXPORT extern const char kEnableCanvas2DLayers[]; CONTENT_EXPORT extern const char kEnablePluginPlaceholderTesting[]; -@@ -256,7 +258,7 @@ CONTENT_EXPORT extern const char kRendererWaitForJavaD +@@ -259,7 +261,7 @@ CONTENT_EXPORT extern const char kRendererWaitForJavaD CONTENT_EXPORT extern const char kPreventResizingContentsForTesting[]; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) CONTENT_EXPORT extern const char kEnableSpeechDispatcher[]; #endif diff --git a/www/iridium/files/patch-content_public_common_zygote_features.gni b/www/iridium/files/patch-content_public_common_zygote_features.gni index e9f4aa2b43a9..733b3b64977c 100644 --- a/www/iridium/files/patch-content_public_common_zygote_features.gni +++ b/www/iridium/files/patch-content_public_common_zygote_features.gni @@ -1,8 +1,8 @@ ---- content/public/common/zygote/features.gni.orig 2025-05-07 06:48:23 UTC +--- content/public/common/zygote/features.gni.orig 2025-12-10 15:04:57 UTC +++ content/public/common/zygote/features.gni @@ -2,4 +2,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -use_zygote = is_posix && !is_android && !is_apple +use_zygote = is_posix && !is_android && !is_mac && !is_bsd diff --git a/www/iridium/files/patch-content_renderer_render__thread__impl.cc b/www/iridium/files/patch-content_renderer_render__thread__impl.cc index 5594d351c6ab..baacac0c82fb 100644 --- a/www/iridium/files/patch-content_renderer_render__thread__impl.cc +++ b/www/iridium/files/patch-content_renderer_render__thread__impl.cc @@ -1,38 +1,38 @@ ---- content/renderer/render_thread_impl.cc.orig 2025-11-06 10:11:34 UTC +--- content/renderer/render_thread_impl.cc.orig 2025-12-10 15:04:57 UTC +++ content/renderer/render_thread_impl.cc -@@ -204,6 +204,8 @@ +@@ -205,6 +205,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_BSD) +#include #else #include #endif -@@ -989,7 +991,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -981,7 +983,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: /*lose_context_when_out_of_memory=*/true); const bool enable_video_decode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled(media::kAcceleratedVideoDecodeLinux) && #endif // BUILDFLAG(IS_LINUX) !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) && -@@ -998,7 +1000,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -990,7 +992,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::kAcceleratedVideoEncodeLinux) && #else !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoEncode) && -@@ -1760,7 +1762,7 @@ RenderThreadImpl::CreateMediaMojoCodecFactory( +@@ -1750,7 +1752,7 @@ RenderThreadImpl::CreateMediaMojoCodecFactory( 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/iridium/files/patch-content_renderer_renderer__blink__platform__impl.cc b/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.cc index 55213934e1f5..555644a4c422 100644 --- a/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.cc +++ b/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.cc @@ -1,45 +1,45 @@ ---- content/renderer/renderer_blink_platform_impl.cc.orig 2025-11-06 10:11:34 UTC +--- content/renderer/renderer_blink_platform_impl.cc.orig 2025-12-10 15:04:57 UTC +++ content/renderer/renderer_blink_platform_impl.cc -@@ -124,7 +124,7 @@ +@@ -125,7 +125,7 @@ #if BUILDFLAG(IS_MAC) #include "content/child/child_process_sandbox_support_impl_mac.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/child/child_process_sandbox_support_impl_linux.h" #include "content/child/sandboxed_process_thread_type_handler.h" #endif -@@ -200,13 +200,13 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -201,13 +201,13 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( is_locked_to_site_(false), main_thread_scheduler_(main_thread_scheduler), next_frame_sink_id_(uint32_t{std::numeric_limits::max()} + 1) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sk_sp font_loader; #endif // RenderThread may not exist in some tests. if (RenderThreadImpl::current()) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::PendingRemote font_service; RenderThreadImpl::current()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); -@@ -230,7 +230,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -231,7 +231,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( } #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (sandboxEnabled()) { #if BUILDFLAG(IS_MAC) sandbox_support_ = std::make_unique(); -@@ -303,7 +303,7 @@ RendererBlinkPlatformImpl::GetWebUIBundledCodeCacheRes +@@ -304,7 +304,7 @@ RendererBlinkPlatformImpl::GetWebUIBundledCodeCacheRes blink::WebSandboxSupport* RendererBlinkPlatformImpl::GetSandboxSupport() { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return sandbox_support_.get(); #else // These platforms do not require sandbox support. diff --git a/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.h b/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.h index 1c1c10739f9e..ba4f92878be9 100644 --- a/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.h +++ b/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.h @@ -1,11 +1,11 @@ ---- content/renderer/renderer_blink_platform_impl.h.orig 2025-11-06 10:11:34 UTC +--- content/renderer/renderer_blink_platform_impl.h.orig 2025-12-10 15:04:57 UTC +++ content/renderer/renderer_blink_platform_impl.h -@@ -279,7 +279,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi +@@ -280,7 +280,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi const gpu::GPUInfo& gpu_info) const; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) std::unique_ptr sandbox_support_; #endif diff --git a/www/iridium/files/patch-content_renderer_renderer__main__platform__delegate__linux.cc b/www/iridium/files/patch-content_renderer_renderer__main__platform__delegate__linux.cc index 9f00112eec8b..795faeff3a6d 100644 --- a/www/iridium/files/patch-content_renderer_renderer__main__platform__delegate__linux.cc +++ b/www/iridium/files/patch-content_renderer_renderer__main__platform__delegate__linux.cc @@ -1,18 +1,18 @@ ---- content/renderer/renderer_main_platform_delegate_linux.cc.orig 2025-05-07 06:48:23 UTC +--- content/renderer/renderer_main_platform_delegate_linux.cc.orig 2025-12-10 15:04:57 UTC +++ content/renderer/renderer_main_platform_delegate_linux.cc @@ -44,6 +44,7 @@ bool RendererMainPlatformDelegate::EnableSandbox() { // any renderer has been started. // Here, we test that the status of SeccompBpf in the renderer is consistent // with what SandboxLinux::GetStatus() said we would do. +#if !BUILDFLAG(IS_BSD) auto* linux_sandbox = sandbox::policy::SandboxLinux::GetInstance(); if (linux_sandbox->GetStatus() & sandbox::policy::SandboxLinux::kSeccompBPF) { CHECK(linux_sandbox->seccomp_bpf_started()); @@ -65,6 +66,7 @@ bool RendererMainPlatformDelegate::EnableSandbox() { CHECK_EQ(errno, EPERM); } #endif // __x86_64__ +#endif return true; } diff --git a/www/iridium/files/patch-content_shell_BUILD.gn b/www/iridium/files/patch-content_shell_BUILD.gn index 87c6d6e9c560..288141fe3d1e 100644 --- a/www/iridium/files/patch-content_shell_BUILD.gn +++ b/www/iridium/files/patch-content_shell_BUILD.gn @@ -1,11 +1,11 @@ ---- content/shell/BUILD.gn.orig 2025-11-06 10:11:34 UTC +--- content/shell/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ content/shell/BUILD.gn -@@ -1098,7 +1098,7 @@ group("content_shell_crash_test") { +@@ -1103,7 +1103,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/iridium/files/patch-content_shell_app_shell__main__delegate.cc b/www/iridium/files/patch-content_shell_app_shell__main__delegate.cc index 9130e75d32f8..cd8ca8427d7a 100644 --- a/www/iridium/files/patch-content_shell_app_shell__main__delegate.cc +++ b/www/iridium/files/patch-content_shell_app_shell__main__delegate.cc @@ -1,11 +1,11 @@ ---- content/shell/app/shell_main_delegate.cc.orig 2025-11-06 10:11:34 UTC +--- content/shell/app/shell_main_delegate.cc.orig 2025-12-10 15:04:57 UTC +++ content/shell/app/shell_main_delegate.cc -@@ -297,7 +297,7 @@ void ShellMainDelegate::PreSandboxStartup() { +@@ -299,7 +299,7 @@ void ShellMainDelegate::PreSandboxStartup() { // Reporting for sub-processes will be initialized in ZygoteForked. if (process_type != switches::kZygoteProcess) { crash_reporter::InitializeCrashpad(process_type.empty(), process_type); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) crash_reporter::SetFirstChanceExceptionHandler( v8::TryHandleWebAssemblyTrapPosix); #endif diff --git a/www/iridium/files/patch-content_shell_browser_shell__browser__main__parts.cc b/www/iridium/files/patch-content_shell_browser_shell__browser__main__parts.cc index 26053d01ee8e..8853867b3ca9 100644 --- a/www/iridium/files/patch-content_shell_browser_shell__browser__main__parts.cc +++ b/www/iridium/files/patch-content_shell_browser_shell__browser__main__parts.cc @@ -1,47 +1,47 @@ ---- content/shell/browser/shell_browser_main_parts.cc.orig 2025-05-07 06:48:23 UTC +--- content/shell/browser/shell_browser_main_parts.cc.orig 2025-12-10 15:04:57 UTC +++ content/shell/browser/shell_browser_main_parts.cc @@ -50,7 +50,7 @@ #include "net/base/network_change_notifier.h" #endif -#if BUILDFLAG(IS_LINUX) && defined(USE_AURA) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(USE_AURA) #include "ui/base/ime/init/input_method_initializer.h" #endif @@ -61,7 +61,7 @@ #include "device/bluetooth/floss/floss_features.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "device/bluetooth/dbus/dbus_bluez_manager_wrapper_linux.h" #include "ui/linux/linux_ui.h" // nogncheck #include "ui/linux/linux_ui_factory.h" // nogncheck @@ -128,7 +128,7 @@ void ShellBrowserMainParts::PostCreateMainMessageLoop( } int ShellBrowserMainParts::PreEarlyInitialization() { -#if BUILDFLAG(IS_LINUX) && defined(USE_AURA) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(USE_AURA) ui::InitializeInputMethodForTesting(); #elif BUILDFLAG(IS_ANDROID) net::NetworkChangeNotifier::SetFactory( @@ -156,7 +156,7 @@ void ShellBrowserMainParts::ToolkitInitialized() { if (switches::IsRunWebTestsSwitchPresent()) return; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ui::LinuxUi::SetInstance(ui::GetDefaultLinuxUi()); #endif } @@ -203,7 +203,7 @@ void ShellBrowserMainParts::PostMainMessageLoopRun() { ShellDevToolsManagerDelegate::StopHttpHandler(); browser_context_.reset(); off_the_record_browser_context_.reset(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ui::LinuxUi::SetInstance(nullptr); #endif performance_manager_lifetime_.reset(); diff --git a/www/iridium/files/patch-content_shell_browser_shell__platform__delegate__views.cc b/www/iridium/files/patch-content_shell_browser_shell__platform__delegate__views.cc index 2b2d3799bd07..df51d5ccf65d 100644 --- a/www/iridium/files/patch-content_shell_browser_shell__platform__delegate__views.cc +++ b/www/iridium/files/patch-content_shell_browser_shell__platform__delegate__views.cc @@ -1,11 +1,11 @@ ---- content/shell/browser/shell_platform_delegate_views.cc.orig 2025-05-07 06:48:23 UTC +--- content/shell/browser/shell_platform_delegate_views.cc.orig 2025-12-10 15:04:57 UTC +++ content/shell/browser/shell_platform_delegate_views.cc @@ -373,7 +373,7 @@ void ShellPlatformDelegate::CreatePlatformWindow( views::Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET); params.bounds = gfx::Rect(initial_size); params.delegate = delegate.release(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) params.wm_class_class = "chromium-content_shell"; params.wm_class_name = params.wm_class_class; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-content_shell_renderer_shell__content__renderer__client.cc b/www/iridium/files/patch-content_shell_renderer_shell__content__renderer__client.cc index e6fd0bf0bc61..e33c62d555dd 100644 --- a/www/iridium/files/patch-content_shell_renderer_shell__content__renderer__client.cc +++ b/www/iridium/files/patch-content_shell_renderer_shell__content__renderer__client.cc @@ -1,11 +1,11 @@ ---- content/shell/renderer/shell_content_renderer_client.cc.orig 2025-09-11 13:19:19 UTC +--- content/shell/renderer/shell_content_renderer_client.cc.orig 2025-12-10 15:04:57 UTC +++ content/shell/renderer/shell_content_renderer_client.cc @@ -50,7 +50,7 @@ #include "media/base/media_switches.h" #endif -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM64)) #define ENABLE_WEB_ASSEMBLY_TRAP_HANDLER_LINUX #include "base/debug/stack_trace.h" diff --git a/www/iridium/files/patch-content_shell_utility_shell__content__utility__client.cc b/www/iridium/files/patch-content_shell_utility_shell__content__utility__client.cc index 8c238d6065b5..efebe99fe27a 100644 --- a/www/iridium/files/patch-content_shell_utility_shell__content__utility__client.cc +++ b/www/iridium/files/patch-content_shell_utility_shell__content__utility__client.cc @@ -1,20 +1,20 @@ ---- content/shell/utility/shell_content_utility_client.cc.orig 2025-10-28 14:29:43 UTC +--- content/shell/utility/shell_content_utility_client.cc.orig 2025-12-10 15:04:57 UTC +++ content/shell/utility/shell_content_utility_client.cc @@ -39,7 +39,7 @@ #include "sandbox/policy/sandbox.h" #include "services/test/echo/echo_service.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/test/sandbox_status_service.h" #endif @@ -189,7 +189,7 @@ void ShellContentUtilityClient::ExposeInterfacesToBrow binders->Add( &PowerMonitorTestImpl::MakeSelfOwnedReceiver, base::SingleThreadTaskRunner::GetCurrentDefault()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (register_sandbox_status_helper_) { binders->Add( base::BindRepeating( diff --git a/www/iridium/files/patch-content_utility_on__device__model_on__device__model__sandbox__init.cc b/www/iridium/files/patch-content_utility_on__device__model_on__device__model__sandbox__init.cc index 4dc5f219a5e2..5ec81604620c 100644 --- a/www/iridium/files/patch-content_utility_on__device__model_on__device__model__sandbox__init.cc +++ b/www/iridium/files/patch-content_utility_on__device__model_on__device__model__sandbox__init.cc @@ -1,92 +1,92 @@ ---- content/utility/on_device_model/on_device_model_sandbox_init.cc.orig 2025-11-06 10:11:34 UTC +--- content/utility/on_device_model/on_device_model_sandbox_init.cc.orig 2025-12-10 15:04:57 UTC +++ content/utility/on_device_model/on_device_model_sandbox_init.cc @@ -17,16 +17,20 @@ #include "services/on_device_model/ml/gpu_blocklist.h" // nogncheck #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include "content/common/gpu_pre_sandbox_hook_linux.h" #include "gpu/config/gpu_info_collector.h" // nogncheck +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" #endif +#endif #if !BUILDFLAG(IS_FUCHSIA) && \ - !(BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_CAST_RECEIVER)) + !((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(ENABLE_CAST_RECEIVER)) #include "base/feature_list.h" #include "third_party/dawn/include/dawn/dawn_proc.h" // nogncheck #include "third_party/dawn/include/dawn/native/DawnNative.h" // nogncheck @@ -37,7 +41,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; @@ -66,12 +70,12 @@ void UpdateSandboxOptionsForGpu( #endif #if !BUILDFLAG(IS_FUCHSIA) && \ - !(BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_CAST_RECEIVER)) + !((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(ENABLE_CAST_RECEIVER)) // If this feature is enabled, a WebGPU device is created for each valid // adapter. This makes sure any relevant drivers or other libs are loaded before // enabling the sandbox. BASE_FEATURE(kOnDeviceModelWarmDrivers, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT @@ -81,7 +85,7 @@ BASE_FEATURE(kOnDeviceModelWarmDrivers, bool ShouldWarmDrivers() { #if BUILDFLAG(IS_FUCHSIA) || \ - (BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_CAST_RECEIVER)) + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(ENABLE_CAST_RECEIVER)) return false; #else bool is_gpu_not_blocklisted = true; @@ -121,7 +125,7 @@ bool PreSandboxInit() { // good measure we initialize a device instance for any adapter with an // appropriate backend on top of any integrated or discrete GPU. #if !BUILDFLAG(IS_FUCHSIA) && \ - !(BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_CAST_RECEIVER)) + !((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(ENABLE_CAST_RECEIVER)) dawnProcSetProcs(&dawn::native::GetProcs()); auto instance = std::make_unique(); const wgpu::RequestAdapterOptions adapter_options{ @@ -153,7 +157,7 @@ bool PreSandboxInit() { return true; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void AddSandboxLinuxOptions(sandbox::policy::SandboxLinux::Options& options) { // Make sure any necessary vendor-specific options are set. gpu::GPUInfo info; @@ -165,6 +169,7 @@ void AddSandboxLinuxOptions(sandbox::policy::SandboxLi } bool PreSandboxHook(sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) std::vector file_permissions = content::FilePermissionsForGpu(options); file_permissions.push_back( @@ -173,6 +178,7 @@ bool PreSandboxHook(sandbox::policy::SandboxLinux::Opt sandbox::policy::SandboxLinux::GetInstance()->StartBrokerProcess( content::CommandSetForGPU(options), file_permissions, options); +#endif if (!content::LoadLibrariesForGpu(options)) { return false; diff --git a/www/iridium/files/patch-content_utility_on__device__model_on__device__model__sandbox__init.h b/www/iridium/files/patch-content_utility_on__device__model_on__device__model__sandbox__init.h index 18a259853e82..0898c72afd12 100644 --- a/www/iridium/files/patch-content_utility_on__device__model_on__device__model__sandbox__init.h +++ b/www/iridium/files/patch-content_utility_on__device__model_on__device__model__sandbox__init.h @@ -1,22 +1,22 @@ ---- content/utility/on_device_model/on_device_model_sandbox_init.h.orig 2025-09-11 13:19:19 UTC +--- content/utility/on_device_model/on_device_model_sandbox_init.h.orig 2025-12-10 15:04:57 UTC +++ content/utility/on_device_model/on_device_model_sandbox_init.h @@ -11,6 +11,10 @@ #include "sandbox/policy/linux/sandbox_linux.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + namespace on_device_model { // Must be called in the service's process before sandbox initialization. @@ -21,7 +25,7 @@ namespace on_device_model { // Must be called in the service's process after the run loop finished. [[nodiscard]] bool Shutdown(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void AddSandboxLinuxOptions(sandbox::policy::SandboxLinux::Options& options); [[nodiscard]] bool PreSandboxHook( diff --git a/www/iridium/files/patch-content_utility_services.cc b/www/iridium/files/patch-content_utility_services.cc index 6da5ff07ae0c..ea7e39db058a 100644 --- a/www/iridium/files/patch-content_utility_services.cc +++ b/www/iridium/files/patch-content_utility_services.cc @@ -1,46 +1,46 @@ ---- content/utility/services.cc.orig 2025-10-28 14:29:43 UTC +--- content/utility/services.cc.orig 2025-12-10 15:04:57 UTC +++ content/utility/services.cc -@@ -74,14 +74,14 @@ +@@ -68,14 +68,14 @@ extern sandbox::TargetServices* g_utility_target_services; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "sandbox/linux/services/libc_interceptor.h" #include "sandbox/policy/mojom/sandbox.mojom.h" #include "sandbox/policy/sandbox_type.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) || (BUILDFLAG(GOOGLE_CHROME_BRANDING) && \ - (BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX))) + (BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))) #include "services/shape_detection/public/mojom/shape_detection_service.mojom.h" // nogncheck #include "services/shape_detection/shape_detection_service.h" // nogncheck #endif // BUILDFLAG(IS_WIN) || (BUILDFLAG(GOOGLE_CHROME_BRANDING) && -@@ -237,7 +237,7 @@ auto RunAudio(mojo::PendingReceiver receiver) { -@@ -436,7 +436,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -406,7 +406,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& } #if BUILDFLAG(IS_WIN) || (BUILDFLAG(GOOGLE_CHROME_BRANDING) && \ - (BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX))) + (BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))) services.Add(RunShapeDetectionService); #endif diff --git a/www/iridium/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc b/www/iridium/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc index d40101838471..2787ba454cd4 100644 --- a/www/iridium/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc +++ b/www/iridium/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.cc @@ -1,37 +1,37 @@ ---- content/utility/speech/speech_recognition_sandbox_hook_linux.cc.orig 2025-05-07 06:48:23 UTC +--- content/utility/speech/speech_recognition_sandbox_hook_linux.cc.orig 2025-12-10 15:04:57 UTC +++ content/utility/speech/speech_recognition_sandbox_hook_linux.cc @@ -12,11 +12,14 @@ #include "sandbox/linux/syscall_broker/broker_command.h" #include "sandbox/linux/syscall_broker/broker_file_permission.h" +#if !BUILDFLAG(IS_BSD) using sandbox::syscall_broker::BrokerFilePermission; using sandbox::syscall_broker::MakeBrokerCommandSet; +#endif namespace speech { +#if !BUILDFLAG(IS_BSD) namespace { // Gets the file permissions required by the Speech On-Device API (SODA). @@ -50,9 +53,11 @@ std::vector GetSodaFilePermissio } } // namespace +#endif bool SpeechRecognitionPreSandboxHook( sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) #if BUILDFLAG(ENABLE_SODA_INTEGRATION_TESTS) base::FilePath test_binary_path = GetSodaTestBinaryPath(); DVLOG(0) << "SODA test binary path: " << test_binary_path.value().c_str(); @@ -75,6 +80,7 @@ bool SpeechRecognitionPreSandboxHook( }), GetSodaFilePermissions(), options); instance->EngageNamespaceSandboxIfPossible(); +#endif return true; } diff --git a/www/iridium/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.h b/www/iridium/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.h index a15b8e429727..865ce677c5a9 100644 --- a/www/iridium/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.h +++ b/www/iridium/files/patch-content_utility_speech_speech__recognition__sandbox__hook__linux.h @@ -1,16 +1,16 @@ ---- content/utility/speech/speech_recognition_sandbox_hook_linux.h.orig 2025-05-07 06:48:23 UTC +--- content/utility/speech/speech_recognition_sandbox_hook_linux.h.orig 2025-12-10 15:04:57 UTC +++ content/utility/speech/speech_recognition_sandbox_hook_linux.h @@ -5,7 +5,13 @@ #ifndef CONTENT_UTILITY_SPEECH_SPEECH_RECOGNITION_SANDBOX_HOOK_LINUX_H_ #define CONTENT_UTILITY_SPEECH_SPEECH_RECOGNITION_SANDBOX_HOOK_LINUX_H_ +#include "build/build_config.h" + +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif namespace speech { diff --git a/www/iridium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.cc b/www/iridium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.cc index c4c845f9befb..5c128ef4bfa2 100644 --- a/www/iridium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.cc +++ b/www/iridium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.cc @@ -1,29 +1,29 @@ ---- content/utility/utility_blink_platform_with_sandbox_support_impl.cc.orig 2025-05-07 06:48:23 UTC +--- content/utility/utility_blink_platform_with_sandbox_support_impl.cc.orig 2025-12-10 15:04:57 UTC +++ content/utility/utility_blink_platform_with_sandbox_support_impl.cc @@ -9,7 +9,7 @@ #if BUILDFLAG(IS_MAC) #include "content/child/child_process_sandbox_support_impl_mac.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/child/child_process_sandbox_support_impl_linux.h" #elif BUILDFLAG(IS_WIN) #include "content/child/child_process_sandbox_support_impl_win.h" @@ -19,7 +19,7 @@ namespace content { UtilityBlinkPlatformWithSandboxSupportImpl:: UtilityBlinkPlatformWithSandboxSupportImpl() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::PendingRemote font_service; UtilityThread::Get()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); @@ -40,7 +40,7 @@ UtilityBlinkPlatformWithSandboxSupportImpl:: blink::WebSandboxSupport* UtilityBlinkPlatformWithSandboxSupportImpl::GetSandboxSupport() { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return sandbox_support_.get(); #else return nullptr; diff --git a/www/iridium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.h b/www/iridium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.h index 0b8c42edba7e..bf7040bd75c9 100644 --- a/www/iridium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.h +++ b/www/iridium/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.h @@ -1,11 +1,11 @@ ---- content/utility/utility_blink_platform_with_sandbox_support_impl.h.orig 2025-05-07 06:48:23 UTC +--- content/utility/utility_blink_platform_with_sandbox_support_impl.h.orig 2025-12-10 15:04:57 UTC +++ content/utility/utility_blink_platform_with_sandbox_support_impl.h @@ -34,7 +34,7 @@ class UtilityBlinkPlatformWithSandboxSupportImpl : pub private: #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) std::unique_ptr sandbox_support_; #endif }; diff --git a/www/iridium/files/patch-content_utility_utility__main.cc b/www/iridium/files/patch-content_utility_utility__main.cc index 4185a5f3a325..38b00f422ed0 100644 --- a/www/iridium/files/patch-content_utility_utility__main.cc +++ b/www/iridium/files/patch-content_utility_utility__main.cc @@ -1,124 +1,111 @@ ---- content/utility/utility_main.cc.orig 2025-10-28 14:29:43 UTC +--- content/utility/utility_main.cc.orig 2025-12-10 15:04:57 UTC +++ content/utility/utility_main.cc -@@ -39,17 +39,21 @@ +@@ -38,22 +38,31 @@ + #include "services/on_device_model/public/mojom/on_device_model_service.mojom.h" #include "services/tracing/public/cpp/trace_startup.h" - #include "services/video_effects/public/cpp/buildflags.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/file_descriptor_store.h" #include "base/files/file_util.h" #include "base/pickle.h" #include "content/child/sandboxed_process_thread_type_handler.h" +#if !BUILDFLAG(IS_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 "media/gpu/buildflags.h" #include "media/media_buildflags.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" #include "services/screen_ai/buildflags/buildflags.h" -@@ -84,7 +88,12 @@ + #include "services/shape_detection/shape_detection_sandbox_hook.h" - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) - --#if BUILDFLAG(ENABLE_VIDEO_EFFECTS) && BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#include "content/common/gpu_pre_sandbox_hook_bsd.h" +#endif + -+#if BUILDFLAG(ENABLE_VIDEO_EFFECTS) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) - #include "services/video_effects/video_effects_sandbox_hook_linux.h" // nogncheck - #endif // BUILDFLAG(IS_LINUX) - -@@ -121,7 +130,7 @@ + #if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) + #include "gpu/config/gpu_info_collector.h" + #include "media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h" +@@ -111,7 +120,7 @@ sandbox::TargetServices* g_utility_target_services = nullptr; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(ENABLE_ON_DEVICE_TRANSLATION) && BUILDFLAG(IS_LINUX) +#if BUILDFLAG(ENABLE_ON_DEVICE_TRANSLATION) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) #include "components/services/on_device_translation/sandbox_hook.h" #endif // BUILDFLAG(ENABLE_ON_DEVICE_TRANSLATION) && BUILDFLAG(IS_LINUX) -@@ -129,7 +138,7 @@ namespace content { +@@ -119,7 +128,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( -@@ -285,7 +294,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -275,7 +284,7 @@ int UtilityMain(MainFunctionParams parameters) { CHECK(on_device_model::PreSandboxInit()); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) && BUILDFLAG(USE_VAAPI) // Regardless of the sandbox status, the VaapiWrapper needs to be initialized -@@ -300,7 +309,10 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -290,7 +299,10 @@ int UtilityMain(MainFunctionParams parameters) { // thread type change in ChildProcess constructor. It also needs to be // registered before the process has multiple threads, which may race with // application of the sandbox. +// XXX BSD +#if !BUILDFLAG(IS_BSD) SandboxedProcessThreadTypeHandler::Create(); +#endif // Initializes the sandbox before any threads are created. // TODO(jorgelo): move this after GTK initialization when we enable a strict -@@ -332,7 +344,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -322,7 +334,7 @@ int UtilityMain(MainFunctionParams parameters) { pre_sandbox_hook = base::BindOnce(&speech::SpeechRecognitionPreSandboxHook); break; -#if BUILDFLAG(ENABLE_ON_DEVICE_TRANSLATION) && BUILDFLAG(IS_LINUX) +#if BUILDFLAG(ENABLE_ON_DEVICE_TRANSLATION) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) case sandbox::mojom::Sandbox::kOnDeviceTranslation: pre_sandbox_hook = base::BindOnce( &on_device_translation::OnDeviceTranslationSandboxHook); -@@ -348,7 +360,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -338,7 +350,7 @@ int UtilityMain(MainFunctionParams parameters) { #else NOTREACHED(); #endif --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - case sandbox::mojom::Sandbox::kVideoEffects: - #if BUILDFLAG(ENABLE_VIDEO_EFFECTS) - pre_sandbox_hook = -@@ -356,7 +368,7 @@ int UtilityMain(MainFunctionParams parameters) { - #endif - break; - #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case sandbox::mojom::Sandbox::kShapeDetection: pre_sandbox_hook = base::BindOnce(&shape_detection::ShapeDetectionPreSandboxHook); -@@ -391,6 +403,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -367,6 +379,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 = -@@ -398,6 +411,11 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -374,6 +387,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 // Startup tracing creates a tracing thread, which is incompatible on // platforms that require single-threaded sandbox initialization. In these diff --git a/www/iridium/files/patch-content_utility_utility__thread__impl.cc b/www/iridium/files/patch-content_utility_utility__thread__impl.cc index 375e5c2b0247..63469eb32c8d 100644 --- a/www/iridium/files/patch-content_utility_utility__thread__impl.cc +++ b/www/iridium/files/patch-content_utility_utility__thread__impl.cc @@ -1,21 +1,21 @@ ---- content/utility/utility_thread_impl.cc.orig 2025-05-07 06:48:23 UTC +--- content/utility/utility_thread_impl.cc.orig 2025-12-10 15:04:57 UTC +++ content/utility/utility_thread_impl.cc @@ -31,7 +31,7 @@ #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/service_factory.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/child/sandboxed_process_thread_type_handler.h" #endif @@ -251,7 +251,8 @@ void UtilityThreadImpl::Init() { GetContentClient()->utility()->UtilityThreadStarted(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +// XXX BSD +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) SandboxedProcessThreadTypeHandler::NotifyMainChildThreadCreated(); #endif diff --git a/www/iridium/files/patch-content_zygote_BUILD.gn b/www/iridium/files/patch-content_zygote_BUILD.gn index 9c86983dcdca..bac3945b8862 100644 --- a/www/iridium/files/patch-content_zygote_BUILD.gn +++ b/www/iridium/files/patch-content_zygote_BUILD.gn @@ -1,11 +1,11 @@ ---- content/zygote/BUILD.gn.orig 2025-09-11 13:19:19 UTC +--- content/zygote/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ content/zygote/BUILD.gn @@ -4,7 +4,7 @@ import("//content/public/common/zygote/features.gni") -if (is_linux || is_chromeos) { +if ((is_linux || is_chromeos) && !is_bsd) { source_set("zygote") { sources = [ "zygote_linux.cc", diff --git a/www/iridium/files/patch-content_zygote_zygote__linux.cc b/www/iridium/files/patch-content_zygote_zygote__linux.cc index bc8f2b8b002d..e2b29237f711 100644 --- a/www/iridium/files/patch-content_zygote_zygote__linux.cc +++ b/www/iridium/files/patch-content_zygote_zygote__linux.cc @@ -1,15 +1,15 @@ ---- content/zygote/zygote_linux.cc.orig 2025-10-28 14:29:43 UTC +--- content/zygote/zygote_linux.cc.orig 2025-12-10 15:04:57 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" @@ -717,3 +718,4 @@ void Zygote::HandleReinitializeLoggingRequest(base::Pi } } // namespace content +#endif diff --git a/www/iridium/files/patch-content_zygote_zygote__main__linux.cc b/www/iridium/files/patch-content_zygote_zygote__main__linux.cc index d1f4b96c6051..3c3f564995af 100644 --- a/www/iridium/files/patch-content_zygote_zygote__main__linux.cc +++ b/www/iridium/files/patch-content_zygote_zygote__main__linux.cc @@ -1,58 +1,58 @@ ---- content/zygote/zygote_main_linux.cc.orig 2025-05-07 06:48:23 UTC +--- content/zygote/zygote_main_linux.cc.orig 2025-12-10 15:04:57 UTC +++ content/zygote/zygote_main_linux.cc @@ -11,7 +11,9 @@ #include #include #include +#if !BUILDFLAG(IS_BSD) #include +#endif #include #include #include @@ -41,7 +43,9 @@ #include "sandbox/linux/services/thread_helpers.h" #include "sandbox/linux/suid/client/setuid_sandbox_client.h" #include "sandbox/policy/linux/sandbox_debug_handling_linux.h" +#if !BUILDFLAG(IS_BSD) #include "sandbox/policy/linux/sandbox_linux.h" +#endif #include "sandbox/policy/sandbox.h" #include "sandbox/policy/switches.h" #include "third_party/icu/source/i18n/unicode/timezone.h" @@ -50,11 +54,13 @@ namespace content { namespace { +#if !BUILDFLAG(IS_BSD) void CloseFds(const std::vector& fds) { for (const auto& it : fds) { PCHECK(0 == IGNORE_EINTR(close(it))); } } +#endif base::OnceClosure ClosureFromTwoClosures(base::OnceClosure one, base::OnceClosure two) { @@ -157,9 +163,11 @@ static void EnterLayerOneSandbox(sandbox::policy::Sand CHECK(!using_layer1_sandbox); } } +#endif bool ZygoteMain( std::vector> fork_delegates) { +#if !BUILDFLAG(IS_BSD) sandbox::SetAmZygoteOrRenderer(true, GetSandboxFD()); auto* linux_sandbox = sandbox::policy::SandboxLinux::GetInstance(); @@ -224,6 +232,9 @@ bool ZygoteMain( // This function call can return multiple times, once per fork(). return zygote.ProcessRequests(); +#else + return false; +#endif } } // namespace content diff --git a/www/iridium/files/patch-device_bluetooth_bluetooth__adapter.cc b/www/iridium/files/patch-device_bluetooth_bluetooth__adapter.cc index 93bc3d5fba8f..e03da2cd2a34 100644 --- a/www/iridium/files/patch-device_bluetooth_bluetooth__adapter.cc +++ b/www/iridium/files/patch-device_bluetooth_bluetooth__adapter.cc @@ -1,11 +1,11 @@ ---- device/bluetooth/bluetooth_adapter.cc.orig 2025-09-11 13:19:19 UTC +--- device/bluetooth/bluetooth_adapter.cc.orig 2025-12-10 15:04:57 UTC +++ device/bluetooth/bluetooth_adapter.cc @@ -33,7 +33,7 @@ namespace device { BluetoothAdapter::ServiceOptions::ServiceOptions() = default; BluetoothAdapter::ServiceOptions::~ServiceOptions() = default; -#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) && \ +#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) && \ !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) // static scoped_refptr BluetoothAdapter::CreateAdapter() { diff --git a/www/iridium/files/patch-device_bluetooth_cast__bluetooth.gni b/www/iridium/files/patch-device_bluetooth_cast__bluetooth.gni index a9766edee297..b9f71012af6f 100644 --- a/www/iridium/files/patch-device_bluetooth_cast__bluetooth.gni +++ b/www/iridium/files/patch-device_bluetooth_cast__bluetooth.gni @@ -1,9 +1,9 @@ ---- device/bluetooth/cast_bluetooth.gni.orig 2025-09-11 13:19:19 UTC +--- device/bluetooth/cast_bluetooth.gni.orig 2025-12-10 15:04:57 UTC +++ device/bluetooth/cast_bluetooth.gni @@ -6,5 +6,5 @@ import("//build/config/features.gni") declare_args() { force_cast_bluetooth = false - use_bluez = (is_linux && !is_castos && use_dbus) || is_chromeos + use_bluez = use_dbus && !is_bsd } diff --git a/www/iridium/files/patch-device_fido_features.cc b/www/iridium/files/patch-device_fido_features.cc new file mode 100644 index 000000000000..e7c97b9da0c4 --- /dev/null +++ b/www/iridium/files/patch-device_fido_features.cc @@ -0,0 +1,11 @@ +--- device/fido/features.cc.orig 2025-12-10 15:04:57 UTC ++++ device/fido/features.cc +@@ -37,7 +37,7 @@ namespace device { + // comment. + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Not yet enabled by default. + BASE_FEATURE(kPasskeyUnlockErrorUi, base::FEATURE_DISABLED_BY_DEFAULT); + #endif diff --git a/www/iridium/files/patch-device_fido_features.h b/www/iridium/files/patch-device_fido_features.h new file mode 100644 index 000000000000..90e7ce3d5a1d --- /dev/null +++ b/www/iridium/files/patch-device_fido_features.h @@ -0,0 +1,11 @@ +--- device/fido/features.h.orig 2025-12-10 15:04:57 UTC ++++ device/fido/features.h +@@ -13,7 +13,7 @@ + namespace device { + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Allows the passkey unlock error UI to be shown. + COMPONENT_EXPORT(DEVICE_FIDO) + BASE_DECLARE_FEATURE(kPasskeyUnlockErrorUi); diff --git a/www/iridium/files/patch-device_gamepad_BUILD.gn b/www/iridium/files/patch-device_gamepad_BUILD.gn index d5a2a8a2c932..bbb46b7fb085 100644 --- a/www/iridium/files/patch-device_gamepad_BUILD.gn +++ b/www/iridium/files/patch-device_gamepad_BUILD.gn @@ -1,11 +1,11 @@ ---- device/gamepad/BUILD.gn.orig 2025-11-06 10:11:34 UTC +--- device/gamepad/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ device/gamepad/BUILD.gn @@ -105,7 +105,7 @@ component("gamepad") { "hid_writer_linux.cc", "hid_writer_linux.h", ] - if (use_udev) { + if (use_udev && !is_bsd) { sources += [ "gamepad_device_linux.cc", "gamepad_device_linux.h", diff --git a/www/iridium/files/patch-device_gamepad_gamepad__provider.cc b/www/iridium/files/patch-device_gamepad_gamepad__provider.cc index f3adf70976bb..bbbb541ed903 100644 --- a/www/iridium/files/patch-device_gamepad_gamepad__provider.cc +++ b/www/iridium/files/patch-device_gamepad_gamepad__provider.cc @@ -1,11 +1,11 @@ ---- device/gamepad/gamepad_provider.cc.orig 2025-11-06 10:11:34 UTC +--- device/gamepad/gamepad_provider.cc.orig 2025-12-10 15:04:57 UTC +++ device/gamepad/gamepad_provider.cc -@@ -160,7 +160,7 @@ void GamepadProvider::Initialize(std::unique_ptr("Gamepad polling thread"); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux, the data fetcher needs to watch file descriptors, so the message // loop needs to be a libevent loop. const base::MessagePumpType kMessageLoopType = base::MessagePumpType::IO; diff --git a/www/iridium/files/patch-device_gamepad_hid__writer__linux.cc b/www/iridium/files/patch-device_gamepad_hid__writer__linux.cc index 9d64d3480e8f..d6779735aa73 100644 --- a/www/iridium/files/patch-device_gamepad_hid__writer__linux.cc +++ b/www/iridium/files/patch-device_gamepad_hid__writer__linux.cc @@ -1,11 +1,11 @@ ---- device/gamepad/hid_writer_linux.cc.orig 2025-05-07 06:48:23 UTC +--- device/gamepad/hid_writer_linux.cc.orig 2025-12-10 15:04:57 UTC +++ device/gamepad/hid_writer_linux.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + #include "device/gamepad/hid_writer_linux.h" #include diff --git a/www/iridium/files/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc b/www/iridium/files/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc index 06da164ec72d..cc00cd4e2100 100644 --- a/www/iridium/files/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc +++ b/www/iridium/files/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc @@ -1,11 +1,11 @@ ---- extensions/browser/api/api_browser_context_keyed_service_factories.cc.orig 2025-11-06 10:11:34 UTC +--- extensions/browser/api/api_browser_context_keyed_service_factories.cc.orig 2025-12-10 15:04:57 UTC +++ extensions/browser/api/api_browser_context_keyed_service_factories.cc @@ -123,7 +123,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt MediaPerceptionAPIManager::GetFactoryInstance(); #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) NetworkingPrivateEventRouterFactory::GetInstance(); #endif PrinterProviderAPIFactory::GetInstance(); diff --git a/www/iridium/files/patch-extensions_browser_api_management_management__api.cc b/www/iridium/files/patch-extensions_browser_api_management_management__api.cc index 6f6f27b09fb7..eaa7ef4c3e67 100644 --- a/www/iridium/files/patch-extensions_browser_api_management_management__api.cc +++ b/www/iridium/files/patch-extensions_browser_api_management_management__api.cc @@ -1,11 +1,11 @@ ---- extensions/browser/api/management/management_api.cc.orig 2025-11-06 10:11:34 UTC +--- extensions/browser/api/management/management_api.cc.orig 2025-12-10 15:04:57 UTC +++ extensions/browser/api/management/management_api.cc @@ -296,7 +296,7 @@ void AddExtensionInfo(const Extension* source_extensio bool PlatformSupportsApprovalFlowForExtensions() { #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/iridium/files/patch-extensions_browser_api_messaging_message__service.cc b/www/iridium/files/patch-extensions_browser_api_messaging_message__service.cc index 3edcd96c8c89..d7dd7368f849 100644 --- a/www/iridium/files/patch-extensions_browser_api_messaging_message__service.cc +++ b/www/iridium/files/patch-extensions_browser_api_messaging_message__service.cc @@ -1,20 +1,20 @@ ---- extensions/browser/api/messaging/message_service.cc.orig 2025-10-28 14:29:43 UTC +--- extensions/browser/api/messaging/message_service.cc.orig 2025-12-10 15:04:57 UTC +++ extensions/browser/api/messaging/message_service.cc @@ -83,7 +83,7 @@ namespace { const char kReceivingEndDoesntExistError[] = "Could not establish connection. Receiving end does not exist."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) const char kMissingPermissionError[] = "Access to native messaging requires nativeMessaging permission."; const char kProhibitedByPoliciesError[] = @@ -676,7 +676,7 @@ void MessageService::OpenChannelToNativeAppImpl( return; #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) bool has_permission = extension->permissions_data()->HasAPIPermission( mojom::APIPermissionID::kNativeMessaging); if (!has_permission) { diff --git a/www/iridium/files/patch-extensions_browser_api_networking__private_networking__private__delegate__factory.cc b/www/iridium/files/patch-extensions_browser_api_networking__private_networking__private__delegate__factory.cc index 46cb6b5eebea..9218fd4a7ebe 100644 --- a/www/iridium/files/patch-extensions_browser_api_networking__private_networking__private__delegate__factory.cc +++ b/www/iridium/files/patch-extensions_browser_api_networking__private_networking__private__delegate__factory.cc @@ -1,29 +1,29 @@ ---- extensions/browser/api/networking_private/networking_private_delegate_factory.cc.orig 2025-05-07 06:48:23 UTC +--- extensions/browser/api/networking_private/networking_private_delegate_factory.cc.orig 2025-12-10 15:04:57 UTC +++ extensions/browser/api/networking_private/networking_private_delegate_factory.cc @@ -12,7 +12,7 @@ #if BUILDFLAG(IS_CHROMEOS) #include "extensions/browser/api/networking_private/networking_private_chromeos.h" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "extensions/browser/api/networking_private/networking_private_linux.h" #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) #include "components/wifi/wifi_service.h" @@ -63,7 +63,7 @@ NetworkingPrivateDelegateFactory::BuildServiceInstance std::unique_ptr delegate; #if BUILDFLAG(IS_CHROMEOS) delegate = std::make_unique(browser_context); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) delegate = std::make_unique(); #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) std::unique_ptr wifi_service(wifi::WiFiService::Create()); @@ -74,7 +74,7 @@ NetworkingPrivateDelegateFactory::BuildServiceInstance #endif #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (ui_factory_) { delegate->set_ui_delegate(ui_factory_->CreateDelegate()); } diff --git a/www/iridium/files/patch-extensions_common_api___permission__features.json b/www/iridium/files/patch-extensions_common_api___permission__features.json index 9bf808c165de..2d0983f5484d 100644 --- a/www/iridium/files/patch-extensions_common_api___permission__features.json +++ b/www/iridium/files/patch-extensions_common_api___permission__features.json @@ -1,187 +1,187 @@ ---- extensions/common/api/_permission_features.json.orig 2025-11-06 10:11:34 UTC +--- extensions/common/api/_permission_features.json.orig 2025-12-10 15:04:57 UTC +++ extensions/common/api/_permission_features.json @@ -61,7 +61,7 @@ "channel": "stable", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"] }, "app.window.ime": { "channel": "stable", @@ -77,7 +77,7 @@ "channel": "stable", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"] }, "audio": [ { @@ -98,13 +98,13 @@ "channel": "dev", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"] }, { "channel": "stable", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"], "allowlist": [ "8C3741E3AF0B93B6E8E0DDD499BB0B74839EA578", "E703483CEF33DEC18B4B6DD84B5C776FB9182BDB", @@ -142,7 +142,7 @@ { "channel": "stable", "extension_types": ["platform_app"], - "platforms": ["chromeos", "win", "mac", "linux"], + "platforms": ["chromeos", "win", "mac", "linux", "openbsd", "freebsd"], "allowlist": [ "1C93BD3CF875F4A73C0B2A163BB8FBDA8B8B3D80", // http://crbug.com/387169 "A3BC37E2148AC4E99BE4B16AF9D42DD1E592BBBE", // http://crbug.com/387169 @@ -217,7 +217,7 @@ "extension_types": ["extension", "legacy_packaged_app"], "max_manifest_version": 2, // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"] }, "devtools": { "channel": "stable", @@ -266,7 +266,7 @@ "channel": "stable", "extension_types": ["extension", "platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"], "allowlist": [ "7910EAFDAF64B947E1CB31B333A9BD14CA556B6C", // Feedback UI. "1C93BD3CF875F4A73C0B2A163BB8FBDA8B8B3D80", // http://crbug.com/293683 @@ -288,12 +288,12 @@ "extension_types": ["platform_app"], "default_parent": true, // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"] },{ "channel": "stable", "extension_types": ["extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"], "allowlist": [ "2FC374607C2DF285634B67C64A2E356C607091C3", // Quickoffice "3727DD3E564B6055387425027AD74C58784ACC15", // Quickoffice internal @@ -330,13 +330,13 @@ "channel": "stable", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"] }, { "channel": "stable", "extension_types": ["extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"], "allowlist": [ "D7CD4B3956B1F6E970E4AFCBCD4094B1EF4D07B9", // http://crbug.com/710541 "D4EFCCC0CC612380762758BB96C7997224BD6395", // http://crbug.com/710541 @@ -445,7 +445,7 @@ "channel": "stable", "extension_types": ["extension", "legacy_packaged_app", "platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "mac", "win", "linux"], + "platforms": ["chromeos", "mac", "win", "linux", "openbsd", "freebsd"], "allowlist": [ "0DE0F05680A4A056BCEC864ED8DDA84296F82B40", // http://crbug.com/434651 "1C93BD3CF875F4A73C0B2A163BB8FBDA8B8B3D80", // http://crbug.com/293683 -@@ -490,7 +490,7 @@ +@@ -484,7 +484,7 @@ "channel": "stable", "extension_types": ["extension", "legacy_packaged_app", "platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "mac", "win", "linux"], + "platforms": ["chromeos", "mac", "win", "linux", "openbsd", "freebsd"], "allowlist": [ // DO NOT ADD ANY MORE ENTRIES HERE. // networkingPrivate is being migrated to networking.onc. -@@ -570,7 +570,7 @@ +@@ -564,7 +564,7 @@ "channel": "stable", "extension_types": ["extension", "platform_app" ], // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"] }, // Note: runtime is not actually a permission, but some systems check these // values to verify restrictions. -@@ -582,13 +582,13 @@ +@@ -576,13 +576,13 @@ "channel": "stable", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"] }, "socket": { "channel": "stable", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"] }, "storage": [ { -@@ -678,13 +678,13 @@ +@@ -672,13 +672,13 @@ "channel": "stable", "extension_types": ["extension", "legacy_packaged_app", "platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"] }, { "channel": "stable", "extension_types": ["hosted_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"], "allowlist": ["B44D08FD98F1523ED5837D78D0A606EA9D6206E5"] // Web Store } ], -@@ -693,13 +693,13 @@ +@@ -687,13 +687,13 @@ "channel": "stable", "extension_types": ["extension", "legacy_packaged_app", "platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"] }, { "channel": "stable", "extension_types": ["hosted_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"], "allowlist": ["B44D08FD98F1523ED5837D78D0A606EA9D6206E5"] // Web Store } ], -@@ -727,7 +727,7 @@ - "channel": "stable", - "extension_types": ["platform_app"], - // "desktop_android" is not supported. -- "platforms": ["chromeos", "linux", "mac", "win"] -+ "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"] - }, +@@ -720,7 +720,7 @@ + "channel": "stable", + "extension_types": ["platform_app"], + // "desktop_android" is not supported. +- "platforms": ["chromeos", "linux", "mac", "win"] ++ "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"] + }, + "usbDevices": [ { - "channel": "dev", -@@ -813,7 +813,7 @@ +@@ -788,7 +788,7 @@ "channel": "stable", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win", "openbsd", "freebsd"] }, "webRequest": [ { diff --git a/www/iridium/files/patch-extensions_common_api_runtime.json b/www/iridium/files/patch-extensions_common_api_runtime.json index 8cebb1d85842..ee874a2ec9bb 100644 --- a/www/iridium/files/patch-extensions_common_api_runtime.json +++ b/www/iridium/files/patch-extensions_common_api_runtime.json @@ -1,12 +1,12 @@ ---- extensions/common/api/runtime.json.orig 2025-10-28 14:29:43 UTC +--- extensions/common/api/runtime.json.orig 2025-12-10 15:04:57 UTC +++ extensions/common/api/runtime.json @@ -85,7 +85,8 @@ {"name": "android", "description": "Specifies the Android operating system."}, {"name": "cros", "description": "Specifies the Chrome operating system."}, {"name": "linux", "description": "Specifies the Linux operating system."}, - {"name": "openbsd", "description": "Specifies the OpenBSD operating system."} + {"name": "openbsd", "description": "Specifies the OpenBSD operating system."}, + {"name": "freebsd", "description": "Specifies the FreeBSD operating system."} ] }, { diff --git a/www/iridium/files/patch-extensions_common_command.cc b/www/iridium/files/patch-extensions_common_command.cc index 067153a1e175..162d1426833b 100644 --- a/www/iridium/files/patch-extensions_common_command.cc +++ b/www/iridium/files/patch-extensions_common_command.cc @@ -1,11 +1,11 @@ ---- extensions/common/command.cc.orig 2025-09-11 13:19:19 UTC +--- extensions/common/command.cc.orig 2025-12-10 15:04:57 UTC +++ extensions/common/command.cc @@ -117,7 +117,7 @@ std::string Command::CommandPlatform() { return ui::kKeybindingPlatformMac; #elif BUILDFLAG(IS_CHROMEOS) return ui::kKeybindingPlatformChromeOs; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return ui::kKeybindingPlatformLinux; #elif BUILDFLAG(IS_DESKTOP_ANDROID) // For now, we use linux keybindings on desktop android. diff --git a/www/iridium/files/patch-extensions_common_features_feature.cc b/www/iridium/files/patch-extensions_common_features_feature.cc index e1f405906ce2..ba3c9542933d 100644 --- a/www/iridium/files/patch-extensions_common_features_feature.cc +++ b/www/iridium/files/patch-extensions_common_features_feature.cc @@ -1,11 +1,11 @@ ---- extensions/common/features/feature.cc.orig 2025-09-11 13:19:19 UTC +--- extensions/common/features/feature.cc.orig 2025-12-10 15:04:57 UTC +++ extensions/common/features/feature.cc @@ -30,6 +30,8 @@ Feature::Platform Feature::GetCurrentPlatform() { return WIN_PLATFORM; #elif BUILDFLAG(ENABLE_DESKTOP_ANDROID_EXTENSIONS) return DESKTOP_ANDROID_PLATFORM; +#elif BUILDFLAG(IS_BSD) + return LINUX_PLATFORM; #else return UNSPECIFIED_PLATFORM; #endif diff --git a/www/iridium/files/patch-extensions_renderer_bindings_api__binding__util.cc b/www/iridium/files/patch-extensions_renderer_bindings_api__binding__util.cc index 25e2e0afd071..aa60a2b0f442 100644 --- a/www/iridium/files/patch-extensions_renderer_bindings_api__binding__util.cc +++ b/www/iridium/files/patch-extensions_renderer_bindings_api__binding__util.cc @@ -1,11 +1,11 @@ ---- extensions/renderer/bindings/api_binding_util.cc.orig 2025-11-06 10:11:34 UTC +--- extensions/renderer/bindings/api_binding_util.cc.orig 2025-12-10 15:04:57 UTC +++ extensions/renderer/bindings/api_binding_util.cc @@ -128,7 +128,7 @@ void InvalidateContext(v8::Local context) std::string GetPlatformString() { #if BUILDFLAG(IS_CHROMEOS) return "chromeos"; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return "linux"; #elif BUILDFLAG(IS_MAC) return "mac"; diff --git a/www/iridium/files/patch-extensions_renderer_bindings_argument__spec.cc b/www/iridium/files/patch-extensions_renderer_bindings_argument__spec.cc index eefaa8afe20b..c4047372f812 100644 --- a/www/iridium/files/patch-extensions_renderer_bindings_argument__spec.cc +++ b/www/iridium/files/patch-extensions_renderer_bindings_argument__spec.cc @@ -1,11 +1,11 @@ ---- extensions/renderer/bindings/argument_spec.cc.orig 2025-05-07 06:48:23 UTC +--- extensions/renderer/bindings/argument_spec.cc.orig 2025-12-10 15:04:57 UTC +++ extensions/renderer/bindings/argument_spec.cc @@ -18,6 +18,8 @@ #include "gin/data_object_builder.h" #include "gin/dictionary.h" +#include + namespace extensions { namespace { diff --git a/www/iridium/files/patch-extensions_shell_app_shell__main__delegate.cc b/www/iridium/files/patch-extensions_shell_app_shell__main__delegate.cc index 53272465c357..f9fbf785c447 100644 --- a/www/iridium/files/patch-extensions_shell_app_shell__main__delegate.cc +++ b/www/iridium/files/patch-extensions_shell_app_shell__main__delegate.cc @@ -1,20 +1,20 @@ ---- extensions/shell/app/shell_main_delegate.cc.orig 2025-09-11 13:19:19 UTC +--- extensions/shell/app/shell_main_delegate.cc.orig 2025-12-10 15:04:57 UTC +++ extensions/shell/app/shell_main_delegate.cc @@ -31,7 +31,7 @@ #if BUILDFLAG(IS_WIN) #include "base/base_paths_win.h" #include "base/process/process_info.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/nix/xdg_util.h" #elif BUILDFLAG(IS_MAC) #include "base/base_paths_mac.h" @@ -51,7 +51,7 @@ base::FilePath GetDataPath() { } base::FilePath data_dir; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::unique_ptr env(base::Environment::Create()); data_dir = base::nix::GetXDGDirectory( env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir); diff --git a/www/iridium/files/patch-extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc b/www/iridium/files/patch-extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc index 4fce27b6112f..2b7f7272d343 100644 --- a/www/iridium/files/patch-extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc +++ b/www/iridium/files/patch-extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc @@ -1,11 +1,11 @@ ---- extensions/shell/browser/api/runtime/shell_runtime_api_delegate.cc.orig 2025-05-07 06:48:23 UTC +--- extensions/shell/browser/api/runtime/shell_runtime_api_delegate.cc.orig 2025-12-10 15:04:57 UTC +++ extensions/shell/browser/api/runtime/shell_runtime_api_delegate.cc @@ -45,7 +45,7 @@ void ShellRuntimeAPIDelegate::OpenURL(const GURL& unin bool ShellRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) { #if BUILDFLAG(IS_CHROMEOS) info->os = api::runtime::PlatformOs::kCros; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) info->os = api::runtime::PlatformOs::kLinux; #endif return true; diff --git a/www/iridium/files/patch-extensions_shell_browser_shell__browser__main__parts.cc b/www/iridium/files/patch-extensions_shell_browser_shell__browser__main__parts.cc index 85ea048429ec..7f5eb00f8366 100644 --- a/www/iridium/files/patch-extensions_shell_browser_shell__browser__main__parts.cc +++ b/www/iridium/files/patch-extensions_shell_browser_shell__browser__main__parts.cc @@ -1,11 +1,11 @@ ---- extensions/shell/browser/shell_browser_main_parts.cc.orig 2025-09-11 13:19:19 UTC +--- extensions/shell/browser/shell_browser_main_parts.cc.orig 2025-12-10 15:04:57 UTC +++ extensions/shell/browser/shell_browser_main_parts.cc @@ -126,7 +126,7 @@ void ShellBrowserMainParts::PostCreateMainMessageLoop( switches::kAppShellAllowRoaming)) { network_controller_->SetCellularAllowRoaming(true); } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // app_shell doesn't need GTK, so the fake input method context can work. // See crbug.com/381852 and revision fb69f142. // TODO(michaelpg): Verify this works for target environments. diff --git a/www/iridium/files/patch-extensions_shell_browser_shell__extensions__api__client.cc b/www/iridium/files/patch-extensions_shell_browser_shell__extensions__api__client.cc index 5f32ee023741..7f3a1421d133 100644 --- a/www/iridium/files/patch-extensions_shell_browser_shell__extensions__api__client.cc +++ b/www/iridium/files/patch-extensions_shell_browser_shell__extensions__api__client.cc @@ -1,20 +1,20 @@ ---- extensions/shell/browser/shell_extensions_api_client.cc.orig 2025-06-19 07:37:57 UTC +--- extensions/shell/browser/shell_extensions_api_client.cc.orig 2025-12-10 15:04:57 UTC +++ extensions/shell/browser/shell_extensions_api_client.cc @@ -18,7 +18,7 @@ #include "extensions/shell/browser/shell_extension_web_contents_observer.h" #include "extensions/shell/browser/shell_virtual_keyboard_delegate.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "extensions/shell/browser/api/file_system/shell_file_system_delegate.h" #endif @@ -76,7 +76,7 @@ ShellExtensionsAPIClient::CreateDisplayInfoProvider() return std::make_unique(); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) FileSystemDelegate* ShellExtensionsAPIClient::GetFileSystemDelegate() { if (!file_system_delegate_) file_system_delegate_ = std::make_unique(); diff --git a/www/iridium/files/patch-extensions_shell_browser_shell__extensions__api__client.h b/www/iridium/files/patch-extensions_shell_browser_shell__extensions__api__client.h index fe52887737f0..2f107f09c75a 100644 --- a/www/iridium/files/patch-extensions_shell_browser_shell__extensions__api__client.h +++ b/www/iridium/files/patch-extensions_shell_browser_shell__extensions__api__client.h @@ -1,19 +1,19 @@ ---- extensions/shell/browser/shell_extensions_api_client.h.orig 2025-06-19 07:37:57 UTC +--- extensions/shell/browser/shell_extensions_api_client.h.orig 2025-12-10 15:04:57 UTC +++ extensions/shell/browser/shell_extensions_api_client.h @@ -42,14 +42,14 @@ class ShellExtensionsAPIClient : public ExtensionsAPIC content::BrowserContext* browser_context) const override; std::unique_ptr CreateDisplayInfoProvider() const override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) FileSystemDelegate* GetFileSystemDelegate() override; #endif MessagingDelegate* GetMessagingDelegate() override; FeedbackPrivateDelegate* GetFeedbackPrivateDelegate() override; private: -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr file_system_delegate_; #endif std::unique_ptr messaging_delegate_; diff --git a/www/iridium/files/patch-google__apis_gcm_engine_heartbeat__manager.cc b/www/iridium/files/patch-google__apis_gcm_engine_heartbeat__manager.cc index 310d78df907c..cd3086917405 100644 --- a/www/iridium/files/patch-google__apis_gcm_engine_heartbeat__manager.cc +++ b/www/iridium/files/patch-google__apis_gcm_engine_heartbeat__manager.cc @@ -1,29 +1,29 @@ ---- google_apis/gcm/engine/heartbeat_manager.cc.orig 2025-05-07 06:48:23 UTC +--- google_apis/gcm/engine/heartbeat_manager.cc.orig 2025-12-10 15:04:57 UTC +++ google_apis/gcm/engine/heartbeat_manager.cc @@ -31,7 +31,7 @@ const int kMinClientHeartbeatIntervalMs = 1000 * 30; // Minimum time spent sleeping before we force a new heartbeat. const int kMinSuspendTimeMs = 1000 * 10; // 10 seconds. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // The period at which to check if the heartbeat time has passed. Used to // protect against platforms where the timer is delayed by the system being // suspended. Only needed on linux because the other OSes provide a standard @@ -190,7 +190,7 @@ void HeartbeatManager::RestartTimer() { base::BindRepeating(&HeartbeatManager::OnHeartbeatTriggered, weak_ptr_factory_.GetWeakPtr())); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Windows, Mac, Android, iOS, and Chrome OS all provide a way to be notified // when the system is suspending or resuming. The only one that does not is // Linux so we need to poll to check for missed heartbeats. @@ -213,7 +213,7 @@ void HeartbeatManager::CheckForMissedHeartbeat() { return; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Otherwise check again later. io_task_runner_->PostDelayedTask( FROM_HERE, diff --git a/www/iridium/files/patch-gpu_command__buffer_client_test__shared__image__interface.cc b/www/iridium/files/patch-gpu_command__buffer_client_test__shared__image__interface.cc index 91ddd3cf69ed..46f2e1d86bda 100644 --- a/www/iridium/files/patch-gpu_command__buffer_client_test__shared__image__interface.cc +++ b/www/iridium/files/patch-gpu_command__buffer_client_test__shared__image__interface.cc @@ -1,20 +1,20 @@ ---- gpu/command_buffer/client/test_shared_image_interface.cc.orig 2025-09-11 13:19:19 UTC +--- gpu/command_buffer/client/test_shared_image_interface.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/command_buffer/client/test_shared_image_interface.cc -@@ -30,7 +30,7 @@ +@@ -29,7 +29,7 @@ #include "ui/gfx/gpu_fence.h" #include "ui/gfx/gpu_memory_buffer_handle.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #endif @@ -154,7 +154,7 @@ TestSharedImageInterface::TestSharedImageInterface() { TestSharedImageInterface::~TestSharedImageInterface() = default; // static -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) gfx::GpuMemoryBufferHandle TestSharedImageInterface::CreatePixmapHandle( const gfx::Size& size, - gfx::BufferFormat format) { + viz::SharedImageFormat format) { diff --git a/www/iridium/files/patch-gpu_command__buffer_client_test__shared__image__interface.h b/www/iridium/files/patch-gpu_command__buffer_client_test__shared__image__interface.h index 3a4dba8c1168..6f1d1f25cad7 100644 --- a/www/iridium/files/patch-gpu_command__buffer_client_test__shared__image__interface.h +++ b/www/iridium/files/patch-gpu_command__buffer_client_test__shared__image__interface.h @@ -1,11 +1,11 @@ ---- gpu/command_buffer/client/test_shared_image_interface.h.orig 2025-09-11 13:19:19 UTC +--- gpu/command_buffer/client/test_shared_image_interface.h.orig 2025-12-10 15:04:57 UTC +++ gpu/command_buffer/client/test_shared_image_interface.h @@ -37,7 +37,7 @@ class TestSharedImageInterface : public SharedImageInt public: TestSharedImageInterface(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // TODO(blundell): Fold this inside of a TestSII::CreateSI() variant and have // test clients that need the handle grab it from the created SI. static gfx::GpuMemoryBufferHandle CreatePixmapHandle( diff --git a/www/iridium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc b/www/iridium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc index 1f1cf1accad3..b70987dc1bee 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc +++ b/www/iridium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/dawn_context_provider.cc.orig 2025-10-28 14:29:43 UTC +--- gpu/command_buffer/service/dawn_context_provider.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/command_buffer/service/dawn_context_provider.cc @@ -407,7 +407,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/iridium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc b/www/iridium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc index 258ebb6934ee..9ab1557b773b 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc +++ b/www/iridium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/gles2_cmd_decoder.cc.orig 2025-11-06 10:11:34 UTC +--- gpu/command_buffer/service/gles2_cmd_decoder.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/command_buffer/service/gles2_cmd_decoder.cc -@@ -2851,7 +2851,7 @@ std::unique_ptr GLES2Decoder::Create( +@@ -2850,7 +2850,7 @@ std::unique_ptr 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 std::make_unique(client, command_buffer_service, outputter, group); #else diff --git a/www/iridium/files/patch-gpu_command__buffer_service_raster__decoder__unittest__context__lost.cc b/www/iridium/files/patch-gpu_command__buffer_service_raster__decoder__unittest__context__lost.cc index 21aede3f06f9..822ed4c605f8 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_raster__decoder__unittest__context__lost.cc +++ b/www/iridium/files/patch-gpu_command__buffer_service_raster__decoder__unittest__context__lost.cc @@ -1,21 +1,21 @@ ---- gpu/command_buffer/service/raster_decoder_unittest_context_lost.cc.orig 2025-05-07 06:48:23 UTC +--- gpu/command_buffer/service/raster_decoder_unittest_context_lost.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/command_buffer/service/raster_decoder_unittest_context_lost.cc @@ -15,6 +15,18 @@ using ::testing::Return; using ::testing::SaveArg; using ::testing::SetArrayArgument; +#ifndef GL_CONTEXT_LOST_KHR +#define GL_CONTEXT_LOST_KHR 0x0507 +#endif + +#ifndef GL_GUILTY_CONTEXT_RESET_KHR +#define GL_GUILTY_CONTEXT_RESET_KHR 0x8253 +#endif + +#ifndef GL_INNOCENT_CONTEXT_RESET_KHR +#define GL_INNOCENT_CONTEXT_RESET_KHR 0x8254 +#endif + namespace gpu { namespace raster { diff --git a/www/iridium/files/patch-gpu_command__buffer_service_shared__context__state.cc b/www/iridium/files/patch-gpu_command__buffer_service_shared__context__state.cc index 16e2b17c9219..57695565fabd 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_shared__context__state.cc +++ b/www/iridium/files/patch-gpu_command__buffer_service_shared__context__state.cc @@ -1,29 +1,29 @@ ---- gpu/command_buffer/service/shared_context_state.cc.orig 2025-09-11 13:19:19 UTC +--- gpu/command_buffer/service/shared_context_state.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/command_buffer/service/shared_context_state.cc @@ -65,7 +65,7 @@ #include "gpu/vulkan/vulkan_implementation.h" #include "gpu/vulkan/vulkan_util.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "gpu/command_buffer/service/external_semaphore_pool.h" #endif @@ -304,7 +304,7 @@ SharedContextState::SharedContextState( if (gr_context_type_ == GrContextType::kVulkan) { if (vk_context_provider_) { #if BUILDFLAG(ENABLE_VULKAN) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) external_semaphore_pool_ = std::make_unique(this); #endif use_virtualized_gl_contexts_ = false; @@ -341,7 +341,7 @@ SharedContextState::~SharedContextState() { } #if BUILDFLAG(ENABLE_VULKAN) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) external_semaphore_pool_.reset(); #endif diff --git a/www/iridium/files/patch-gpu_command__buffer_service_shared__context__state.h b/www/iridium/files/patch-gpu_command__buffer_service_shared__context__state.h index 958e72d6c10a..9a7b8c7961e5 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_shared__context__state.h +++ b/www/iridium/files/patch-gpu_command__buffer_service_shared__context__state.h @@ -1,20 +1,20 @@ ---- gpu/command_buffer/service/shared_context_state.h.orig 2025-09-11 13:19:19 UTC +--- gpu/command_buffer/service/shared_context_state.h.orig 2025-12-10 15:04:57 UTC +++ gpu/command_buffer/service/shared_context_state.h -@@ -236,7 +236,7 @@ class GPU_GLES2_EXPORT SharedContextState +@@ -235,7 +235,7 @@ class GPU_GLES2_EXPORT SharedContextState return &memory_type_tracker_; } #if BUILDFLAG(ENABLE_VULKAN) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) ExternalSemaphorePool* external_semaphore_pool() { return external_semaphore_pool_.get(); } -@@ -401,7 +401,7 @@ class GPU_GLES2_EXPORT SharedContextState +@@ -400,7 +400,7 @@ class GPU_GLES2_EXPORT SharedContextState bool disable_check_reset_status_throttling_for_test_ = false; #if BUILDFLAG(ENABLE_VULKAN) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) std::unique_ptr external_semaphore_pool_; #endif diff --git a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc index 41c675fb556c..298bbbce2576 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc +++ b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc @@ -1,20 +1,20 @@ ---- gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.cc.orig 2025-05-07 06:48:23 UTC +--- gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.cc @@ -20,7 +20,7 @@ namespace { // TODO(penghuang): verify the scanout is the right usage for video playback. // crbug.com/1280798 constexpr SharedImageUsageSet kSupportedUsage = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) SHARED_IMAGE_USAGE_SCANOUT | #endif SHARED_IMAGE_USAGE_GLES2_READ | SHARED_IMAGE_USAGE_GLES2_WRITE | -@@ -121,7 +121,7 @@ bool AngleVulkanImageBackingFactory::IsGMBSupported( +@@ -119,7 +119,7 @@ bool AngleVulkanImageBackingFactory::IsGMBSupported( switch (gmb_type) { case gfx::EMPTY_BUFFER: return true; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) case gfx::NATIVE_PIXMAP: { auto* vulkan_implementation = context_state_->vk_context_provider()->GetVulkanImplementation(); diff --git a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc index 2da8ad0c845d..f89742179120 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc +++ b/www/iridium/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 2025-10-28 14:29:43 UTC +--- gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/command_buffer/service/shared_image/external_vk_image_backing.cc -@@ -58,7 +58,7 @@ +@@ -57,7 +57,7 @@ #include "ui/gl/gl_version_info.h" #include "ui/gl/scoped_binders.h" -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) #include "gpu/command_buffer/service/shared_image/external_vk_image_dawn_representation.h" #if BUILDFLAG(DAWN_ENABLE_BACKEND_OPENGLES) #include "gpu/command_buffer/service/shared_image/dawn_gl_texture_representation.h" @@ -708,7 +708,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/iridium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc index 30674fe6b05c..7e99899c705c 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc +++ b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc.orig 2025-09-11 13:19:19 UTC +--- gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc -@@ -140,7 +140,7 @@ bool IsFormatSupported(viz::SharedImageFormat format, +@@ -139,7 +139,7 @@ bool IsFormatSupported(viz::SharedImageFormat format, SharedImageUsageSet SupportedUsage() { SharedImageUsageSet supported_usage = -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) SHARED_IMAGE_USAGE_WEBGPU_READ | SHARED_IMAGE_USAGE_WEBGPU_WRITE | SHARED_IMAGE_USAGE_WEBGPU_SWAP_CHAIN_TEXTURE | SHARED_IMAGE_USAGE_WEBGPU_STORAGE_TEXTURE | diff --git a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_gpu__memory__buffer__factory.cc b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_gpu__memory__buffer__factory.cc deleted file mode 100644 index 7db8cb11d03a..000000000000 --- a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_gpu__memory__buffer__factory.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- gpu/command_buffer/service/shared_image/gpu_memory_buffer_factory.cc.orig 2025-11-06 10:11:34 UTC -+++ gpu/command_buffer/service/shared_image/gpu_memory_buffer_factory.cc -@@ -14,7 +14,7 @@ - #include "gpu/command_buffer/service/shared_image/gpu_memory_buffer_factory_io_surface.h" - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - #include "gpu/command_buffer/service/shared_image/gpu_memory_buffer_factory_native_pixmap.h" - #endif - -@@ -36,7 +36,7 @@ GpuMemoryBufferFactory::CreateNativeType( - // AHardwareBuffers), but the codebase is structured such that it is easier - // to create a dummy factory than create no factory. - return std::make_unique(); --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - return std::make_unique( - vulkan_context_provider); - #elif BUILDFLAG(IS_WIN) diff --git a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_shared__image__factory.cc b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_shared__image__factory.cc index f78938fe4c68..3c0b7b21a402 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_shared__image__factory.cc +++ b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_shared__image__factory.cc @@ -1,38 +1,38 @@ ---- gpu/command_buffer/service/shared_image/shared_image_factory.cc.orig 2025-11-06 10:11:34 UTC +--- gpu/command_buffer/service/shared_image/shared_image_factory.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/command_buffer/service/shared_image/shared_image_factory.cc -@@ -54,7 +54,7 @@ +@@ -52,7 +52,7 @@ #include "gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.h" #include "gpu/vulkan/vulkan_device_queue.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.h" #endif -@@ -112,7 +112,7 @@ const char* GmbTypeToString(gfx::GpuMemoryBufferType t +@@ -109,7 +109,7 @@ const char* GmbTypeToString(gfx::GpuMemoryBufferType t case gfx::IO_SURFACE_BUFFER: return "platform"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) case gfx::NATIVE_PIXMAP: return "platform"; #endif -@@ -133,7 +133,7 @@ gfx::GpuMemoryBufferType GetNativeBufferType() { +@@ -130,7 +130,7 @@ gfx::GpuMemoryBufferType GetNativeBufferType() { return gfx::GpuMemoryBufferType::IO_SURFACE_BUFFER; #elif BUILDFLAG(IS_ANDROID) return gfx::GpuMemoryBufferType::ANDROID_HARDWARE_BUFFER; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) return gfx::GpuMemoryBufferType::NATIVE_PIXMAP; #elif BUILDFLAG(IS_WIN) return gfx::GpuMemoryBufferType::DXGI_SHARED_HANDLE; -@@ -318,7 +318,7 @@ SharedImageFactory::SharedImageFactory( +@@ -316,7 +316,7 @@ SharedImageFactory::SharedImageFactory( context_state_, workarounds_); factories_.push_back(std::move(ozone_factory)); } -#if BUILDFLAG(ENABLE_VULKAN) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA)) +#if BUILDFLAG(ENABLE_VULKAN) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)) if (gr_context_type_ == GrContextType::kVulkan) { auto external_vk_image_factory = std::make_unique(context_state_); diff --git a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc index a8f4306b3de3..944252077466 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- gpu/command_buffer/service/shared_image/shared_image_manager.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/command_buffer/service/shared_image/shared_image_manager.cc -@@ -765,7 +765,7 @@ bool SharedImageManager::SupportsScanoutImages() { +@@ -769,7 +769,7 @@ bool SharedImageManager::SupportsScanoutImages() { return true; #elif BUILDFLAG(IS_ANDROID) - return base::AndroidHardwareBufferCompat::IsSupportAvailable(); + return true; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) return supports_overlays_on_ozone_; #elif BUILDFLAG(IS_WIN) return gl::DirectCompositionTextureSupported(); diff --git a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc index d30142dddb72..d562798e9be9 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc +++ b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc.orig 2025-05-07 06:48:23 UTC +--- gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc @@ -214,7 +214,7 @@ bool WrappedSkImageBacking::Initialize(const std::stri constexpr GrRenderable is_renderable = GrRenderable::kYes; constexpr GrProtected is_protected = GrProtected::kNo; -#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) +#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // Blue for single-planar and magenta-ish for multi-planar. SkColor4f fallback_color = format().is_single_plane() ? SkColors::kBlue : SkColors::kWhite; diff --git a/www/iridium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc b/www/iridium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc index 167267f09d99..b09369eae6fb 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc +++ b/www/iridium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc @@ -1,20 +1,20 @@ ---- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2025-10-28 14:29:43 UTC +--- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/command_buffer/service/webgpu_decoder_impl.cc -@@ -1747,7 +1747,7 @@ wgpu::Adapter WebGPUDecoderImpl::CreatePreferredAdapte +@@ -1758,7 +1758,7 @@ wgpu::Adapter WebGPUDecoderImpl::CreatePreferredAdapte backend_types = {wgpu::BackendType::D3D12}; #elif BUILDFLAG(IS_APPLE) backend_types = {wgpu::BackendType::Metal}; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (shared_context_state_->GrContextIsVulkan() || shared_context_state_->IsGraphiteDawnVulkan()) { backend_types = {wgpu::BackendType::Vulkan}; -@@ -1992,7 +1992,7 @@ WebGPUDecoderImpl::AssociateMailboxDawn( +@@ -2003,7 +2003,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/iridium/files/patch-gpu_config_gpu__control__list.cc b/www/iridium/files/patch-gpu_config_gpu__control__list.cc index 09f99ddefbf7..f7983444fa79 100644 --- a/www/iridium/files/patch-gpu_config_gpu__control__list.cc +++ b/www/iridium/files/patch-gpu_config_gpu__control__list.cc @@ -1,11 +1,11 @@ ---- gpu/config/gpu_control_list.cc.orig 2025-10-28 14:29:43 UTC +--- gpu/config/gpu_control_list.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/config/gpu_control_list.cc @@ -846,7 +846,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { return kOsAndroid; #elif BUILDFLAG(IS_FUCHSIA) return kOsFuchsia; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kOsLinux; #elif BUILDFLAG(IS_MAC) return kOsMacosx; diff --git a/www/iridium/files/patch-gpu_config_gpu__finch__features.cc b/www/iridium/files/patch-gpu_config_gpu__finch__features.cc index 739374b4830a..82368c23e409 100644 --- a/www/iridium/files/patch-gpu_config_gpu__finch__features.cc +++ b/www/iridium/files/patch-gpu_config_gpu__finch__features.cc @@ -1,12 +1,12 @@ ---- gpu/config/gpu_finch_features.cc.orig 2025-11-06 10:11:34 UTC +--- gpu/config/gpu_finch_features.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/config/gpu_finch_features.cc @@ -122,7 +122,8 @@ BASE_FEATURE(kAllowHardwareBufferUsageFlagsFromVulkanF // Android and Linux. BASE_FEATURE(kDefaultEnableGpuRasterization, #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ + BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/iridium/files/patch-gpu_config_gpu__info__collector.cc b/www/iridium/files/patch-gpu_config_gpu__info__collector.cc index 3d9ec62b0c6e..c67f14d01dc7 100644 --- a/www/iridium/files/patch-gpu_config_gpu__info__collector.cc +++ b/www/iridium/files/patch-gpu_config_gpu__info__collector.cc @@ -1,11 +1,11 @@ ---- gpu/config/gpu_info_collector.cc.orig 2025-11-06 10:11:34 UTC +--- gpu/config/gpu_info_collector.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/config/gpu_info_collector.cc -@@ -363,7 +363,7 @@ void ReportWebGPUAdapterMetrics(dawn::native::Instance +@@ -362,7 +362,7 @@ void ReportWebGPUAdapterMetrics(dawn::native::Instance void ReportWebGPUSupportMetrics(dawn::native::Instance* instance) { static BASE_FEATURE(kCollectWebGPUSupportMetrics, "CollectWebGPUSupportMetrics", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_DISABLED_BY_DEFAULT); #else base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/iridium/files/patch-gpu_config_gpu__test__config.cc b/www/iridium/files/patch-gpu_config_gpu__test__config.cc index 79cfa3f273bf..59ef33c028f8 100644 --- a/www/iridium/files/patch-gpu_config_gpu__test__config.cc +++ b/www/iridium/files/patch-gpu_config_gpu__test__config.cc @@ -1,11 +1,11 @@ ---- gpu/config/gpu_test_config.cc.orig 2025-05-07 06:48:23 UTC +--- gpu/config/gpu_test_config.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/config/gpu_test_config.cc @@ -27,7 +27,7 @@ namespace { GPUTestConfig::OS GetCurrentOS() { #if BUILDFLAG(IS_CHROMEOS) return GPUTestConfig::kOsChromeOS; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return GPUTestConfig::kOsLinux; #elif BUILDFLAG(IS_WIN) int32_t major_version = 0; diff --git a/www/iridium/files/patch-gpu_ipc_service_gpu__init.cc b/www/iridium/files/patch-gpu_ipc_service_gpu__init.cc index 4aec43ef55cd..d647a2273dc1 100644 --- a/www/iridium/files/patch-gpu_ipc_service_gpu__init.cc +++ b/www/iridium/files/patch-gpu_ipc_service_gpu__init.cc @@ -1,83 +1,83 @@ ---- gpu/ipc/service/gpu_init.cc.orig 2025-09-11 13:19:19 UTC +--- gpu/ipc/service/gpu_init.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/ipc/service/gpu_init.cc -@@ -155,7 +155,7 @@ void InitializePlatformOverlaySettings(GPUInfo* gpu_in +@@ -156,7 +156,7 @@ void InitializePlatformOverlaySettings(GPUInfo* gpu_in #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CASTOS) bool CanAccessDeviceFile(const GPUInfo& gpu_info) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (gpu_info.gpu.vendor_id != 0x10de || // NVIDIA gpu_info.gpu.driver_vendor != "NVIDIA") return true; -@@ -417,7 +417,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -418,7 +418,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL enable_watchdog = false; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool gpu_sandbox_start_early = gpu_preferences_.gpu_sandbox_start_early; #else // !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) // For some reasons MacOSX's VideoToolbox might crash when called after -@@ -455,7 +455,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -456,7 +456,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } bool attempted_startsandbox = false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Chrome OS ARM Mali, GPU driver userspace creates threads when // initializing a GL context, so start the sandbox early. // TODO(zmo): Need to collect OS version before this. -@@ -552,7 +552,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -553,7 +553,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL gpu_preferences_.gr_context_type = GrContextType::kGL; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The ContentSandboxHelper is currently the only one implementation of // GpuSandboxHelper and it has no dependency. Except on Linux where // VaapiWrapper checks the GL implementation to determine which display -@@ -610,7 +610,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -611,7 +611,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL command_line, gpu_feature_info_, gpu_preferences_.disable_software_rasterizer, false); if (gl_use_swiftshader_) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) VLOG(1) << "Quit GPU process launch to fallback to SwiftShader cleanly " << "on Linux"; return false; -@@ -778,7 +778,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -779,7 +779,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL ->GetSupportedFormatsForGLNativePixmapImport(); #endif // BUILDFLAG(IS_OZONE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Driver may create a compatibility profile context when collect graphics // information on Linux platform. Try to collect graphics information // based on core profile context after disabling platform extensions. -@@ -830,7 +830,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -831,7 +831,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } } } -#if BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE)) if (!gl_disabled && !gl_use_swiftshader_ && std::getenv("RUNNING_UNDER_RR")) { // https://rr-project.org/ is a Linux-only record-and-replay debugger that -@@ -1032,7 +1032,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -1033,7 +1033,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c } bool gl_disabled = gl::GetGLImplementation() == gl::kGLImplementationDisabled; -#if BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE)) if (!gl_disabled && !gl_use_swiftshader_ && std::getenv("RUNNING_UNDER_RR")) { // https://rr-project.org/ is a Linux-only record-and-replay debugger that -@@ -1088,7 +1088,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -1089,7 +1089,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Driver may create a compatibility profile context when collect graphics // information on Linux platform. Try to collect graphics information // based on core profile context after disabling platform extensions. diff --git a/www/iridium/files/patch-gpu_ipc_service_x__util.h b/www/iridium/files/patch-gpu_ipc_service_x__util.h index a94a018f0ed3..394f1e987e35 100644 --- a/www/iridium/files/patch-gpu_ipc_service_x__util.h +++ b/www/iridium/files/patch-gpu_ipc_service_x__util.h @@ -1,11 +1,11 @@ ---- gpu/ipc/service/x_util.h.orig 2025-05-07 06:48:23 UTC +--- gpu/ipc/service/x_util.h.orig 2025-12-10 15:04:57 UTC +++ gpu/ipc/service/x_util.h @@ -12,7 +12,7 @@ #include "gpu/ipc/service/gpu_config.h" #include "ui/base/ozone_buildflags.h" -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) namespace gpu { diff --git a/www/iridium/files/patch-gpu_vulkan_generate__bindings.py b/www/iridium/files/patch-gpu_vulkan_generate__bindings.py index d38760231276..afba2a3e8912 100644 --- a/www/iridium/files/patch-gpu_vulkan_generate__bindings.py +++ b/www/iridium/files/patch-gpu_vulkan_generate__bindings.py @@ -1,11 +1,11 @@ ---- gpu/vulkan/generate_bindings.py.orig 2025-05-07 06:48:23 UTC +--- gpu/vulkan/generate_bindings.py.orig 2025-12-10 15:04:57 UTC +++ gpu/vulkan/generate_bindings.py @@ -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/iridium/files/patch-gpu_vulkan_semaphore__handle.cc b/www/iridium/files/patch-gpu_vulkan_semaphore__handle.cc index f4f4e355f087..7a5d89de1388 100644 --- a/www/iridium/files/patch-gpu_vulkan_semaphore__handle.cc +++ b/www/iridium/files/patch-gpu_vulkan_semaphore__handle.cc @@ -1,20 +1,20 @@ ---- gpu/vulkan/semaphore_handle.cc.orig 2025-05-07 06:48:23 UTC +--- gpu/vulkan/semaphore_handle.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/vulkan/semaphore_handle.cc @@ -39,7 +39,7 @@ SemaphoreHandle::SemaphoreHandle(gfx::GpuFenceHandle f // https://fuchsia.dev/reference/fidl/fuchsia.ui.scenic. Init(VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA, fence_handle.Release()); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) Init(VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR, fence_handle.Release()); #elif BUILDFLAG(IS_POSIX) @@ -64,7 +64,7 @@ gfx::GpuFenceHandle SemaphoreHandle::ToGpuFenceHandle( // VkSemaphore, which can then be used to submit present work, see // https://fuchsia.dev/reference/fidl/fuchsia.ui.scenic. fence_handle.Adopt(TakeHandle()); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) if (type_ == VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR) { fence_handle.Adopt(TakeHandle()); } else { diff --git a/www/iridium/files/patch-gpu_vulkan_vulkan__device__queue.cc b/www/iridium/files/patch-gpu_vulkan_vulkan__device__queue.cc index f257f866445c..6d7913ff8859 100644 --- a/www/iridium/files/patch-gpu_vulkan_vulkan__device__queue.cc +++ b/www/iridium/files/patch-gpu_vulkan_vulkan__device__queue.cc @@ -1,20 +1,20 @@ ---- gpu/vulkan/vulkan_device_queue.cc.orig 2025-06-19 07:37:57 UTC +--- gpu/vulkan/vulkan_device_queue.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/vulkan/vulkan_device_queue.cc @@ -145,7 +145,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)) { @@ -292,7 +292,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/iridium/files/patch-gpu_vulkan_vulkan__device__queue.h b/www/iridium/files/patch-gpu_vulkan_vulkan__device__queue.h index 587bcd729194..ffee4e84c98f 100644 --- a/www/iridium/files/patch-gpu_vulkan_vulkan__device__queue.h +++ b/www/iridium/files/patch-gpu_vulkan_vulkan__device__queue.h @@ -1,11 +1,11 @@ ---- gpu/vulkan/vulkan_device_queue.h.orig 2025-09-11 13:19:19 UTC +--- gpu/vulkan/vulkan_device_queue.h.orig 2025-12-10 15:04:57 UTC +++ gpu/vulkan/vulkan_device_queue.h @@ -188,7 +188,7 @@ class COMPONENT_EXPORT(VULKAN) VulkanDeviceQueue #endif #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) VkPhysicalDeviceSamplerYcbcrConversionFeatures sampler_ycbcr_conversion_features_{ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES}; diff --git a/www/iridium/files/patch-gpu_vulkan_vulkan__function__pointers.cc b/www/iridium/files/patch-gpu_vulkan_vulkan__function__pointers.cc index 2f1f1d4f4715..45cae77c06ed 100644 --- a/www/iridium/files/patch-gpu_vulkan_vulkan__function__pointers.cc +++ b/www/iridium/files/patch-gpu_vulkan_vulkan__function__pointers.cc @@ -1,20 +1,20 @@ ---- gpu/vulkan/vulkan_function_pointers.cc.orig 2025-05-07 06:48:23 UTC +--- gpu/vulkan/vulkan_function_pointers.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/vulkan/vulkan_function_pointers.cc @@ -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[] = @@ -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/iridium/files/patch-gpu_vulkan_vulkan__function__pointers.h b/www/iridium/files/patch-gpu_vulkan_vulkan__function__pointers.h index 133528551b65..52c791a18a5b 100644 --- a/www/iridium/files/patch-gpu_vulkan_vulkan__function__pointers.h +++ b/www/iridium/files/patch-gpu_vulkan_vulkan__function__pointers.h @@ -1,27 +1,27 @@ ---- gpu/vulkan/vulkan_function_pointers.h.orig 2025-05-07 06:48:23 UTC +--- gpu/vulkan/vulkan_function_pointers.h.orig 2025-12-10 15:04:57 UTC +++ gpu/vulkan/vulkan_function_pointers.h @@ -391,7 +391,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) @@ -1405,7 +1405,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, @@ -1415,4 +1415,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/iridium/files/patch-gpu_vulkan_vulkan__image.h b/www/iridium/files/patch-gpu_vulkan_vulkan__image.h index 1fdd04f1e04a..d97d26d23024 100644 --- a/www/iridium/files/patch-gpu_vulkan_vulkan__image.h +++ b/www/iridium/files/patch-gpu_vulkan_vulkan__image.h @@ -1,20 +1,20 @@ ---- gpu/vulkan/vulkan_image.h.orig 2025-09-11 13:19:19 UTC +--- gpu/vulkan/vulkan_image.h.orig 2025-12-10 15:04:57 UTC +++ gpu/vulkan/vulkan_image.h @@ -86,7 +86,7 @@ class COMPONENT_EXPORT(VULKAN) VulkanImage { VkImageUsageFlags usage, VkImageCreateFlags flags); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) static std::unique_ptr CreateWithExternalMemoryAndModifiers( VulkanDeviceQueue* device_queue, const gfx::Size& size, @@ -198,7 +198,7 @@ class COMPONENT_EXPORT(VULKAN) VulkanImage { VkImageTiling image_tiling, uint32_t queue_family_index); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool InitializeWithExternalMemoryAndModifiers(VulkanDeviceQueue* device_queue, const gfx::Size& size, VkFormat format, diff --git a/www/iridium/files/patch-gpu_vulkan_vulkan__util.cc b/www/iridium/files/patch-gpu_vulkan_vulkan__util.cc index e93fd8313c98..de51a19c6b76 100644 --- a/www/iridium/files/patch-gpu_vulkan_vulkan__util.cc +++ b/www/iridium/files/patch-gpu_vulkan_vulkan__util.cc @@ -1,11 +1,11 @@ ---- gpu/vulkan/vulkan_util.cc.orig 2025-10-28 14:29:43 UTC +--- gpu/vulkan/vulkan_util.cc.orig 2025-12-10 15:04:57 UTC +++ gpu/vulkan/vulkan_util.cc -@@ -481,7 +481,7 @@ bool CheckVulkanCompatibilities( +@@ -474,7 +474,7 @@ bool CheckVulkanCompatibilities( } } -#if BUILDFLAG(IS_LINUX) && !defined(OZONE_PLATFORM_IS_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !defined(OZONE_PLATFORM_IS_X11) // Vulkan is only supported with X11 on Linux for now. return false; #else diff --git a/www/iridium/files/patch-headless_BUILD.gn b/www/iridium/files/patch-headless_BUILD.gn index b7a21f1d7480..ee64e29c4675 100644 --- a/www/iridium/files/patch-headless_BUILD.gn +++ b/www/iridium/files/patch-headless_BUILD.gn @@ -1,11 +1,11 @@ ---- headless/BUILD.gn.orig 2025-10-28 14:29:43 UTC +--- headless/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ headless/BUILD.gn -@@ -483,7 +483,7 @@ component("headless_non_renderer") { +@@ -489,7 +489,7 @@ component("headless_non_renderer") { } } - if (!is_fuchsia) { + if (!is_fuchsia && !is_bsd) { deps += [ "//components/crash/content/browser", "//components/crash/core/app", diff --git a/www/iridium/files/patch-headless_lib_browser_headless__browser__impl.cc b/www/iridium/files/patch-headless_lib_browser_headless__browser__impl.cc new file mode 100644 index 000000000000..725cc84de098 --- /dev/null +++ b/www/iridium/files/patch-headless_lib_browser_headless__browser__impl.cc @@ -0,0 +1,20 @@ +--- headless/lib/browser/headless_browser_impl.cc.orig 2025-12-10 15:04:57 UTC ++++ headless/lib/browser/headless_browser_impl.cc +@@ -40,7 +40,7 @@ + #include "components/os_crypt/async/browser/keychain_key_provider.h" + #endif + +-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DBUS) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DBUS) + #include "base/command_line.h" + #include "components/os_crypt/async/browser/freedesktop_secret_key_provider.h" + #include "components/password_manager/core/browser/password_manager_switches.h" // nogncheck +@@ -413,7 +413,7 @@ void HeadlessBrowserImpl::CreateOSCryptAsync() { + providers.emplace_back(std::make_pair( + /*precedence=*/10u, + std::make_unique())); +-#elif BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DBUS) ++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DBUS) + base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); + const auto password_store = + cmd_line->GetSwitchValueASCII(password_manager::kPasswordStore); diff --git a/www/iridium/files/patch-headless_lib_browser_headless__browser__main__parts__posix.cc b/www/iridium/files/patch-headless_lib_browser_headless__browser__main__parts__posix.cc index f28ea628a446..0175344a3d1b 100644 --- a/www/iridium/files/patch-headless_lib_browser_headless__browser__main__parts__posix.cc +++ b/www/iridium/files/patch-headless_lib_browser_headless__browser__main__parts__posix.cc @@ -1,32 +1,32 @@ ---- headless/lib/browser/headless_browser_main_parts_posix.cc.orig 2025-10-28 14:29:43 UTC +--- headless/lib/browser/headless_browser_main_parts_posix.cc.orig 2025-12-10 15:04:57 UTC +++ headless/lib/browser/headless_browser_main_parts_posix.cc @@ -26,7 +26,7 @@ #include "content/public/browser/browser_thread.h" #include "headless/lib/browser/headless_browser_impl.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/command_line.h" #include "components/os_crypt/sync/key_storage_config_linux.h" #include "components/os_crypt/sync/os_crypt.h" @@ -168,7 +168,7 @@ class BrowserShutdownHandler { } // namespace -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) constexpr char kProductName[] = "HeadlessChrome"; #endif @@ -176,9 +176,9 @@ void HeadlessBrowserMainParts::PostCreateMainMessageLo BrowserShutdownHandler::Install(base::BindOnce( &HeadlessBrowserImpl::ShutdownWithExitCode, browser_->GetWeakPtr())); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) -#if BUILDFLAG(USE_DBUS) +#if BUILDFLAG(USE_DBUS) && !BUILDFLAG(IS_BSD) bluez::BluezDBusManager::Initialize( dbus_thread_linux::GetSharedSystemBus().get()); #endif diff --git a/www/iridium/files/patch-headless_lib_browser_headless__content__browser__client.cc b/www/iridium/files/patch-headless_lib_browser_headless__content__browser__client.cc index 377070d3f930..18a714c61df9 100644 --- a/www/iridium/files/patch-headless_lib_browser_headless__content__browser__client.cc +++ b/www/iridium/files/patch-headless_lib_browser_headless__content__browser__client.cc @@ -1,20 +1,20 @@ ---- headless/lib/browser/headless_content_browser_client.cc.orig 2025-09-11 13:19:19 UTC +--- headless/lib/browser/headless_content_browser_client.cc.orig 2025-12-10 15:04:57 UTC +++ headless/lib/browser/headless_content_browser_client.cc -@@ -59,7 +59,7 @@ +@@ -61,7 +61,7 @@ #include "content/public/common/content_descriptors.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)) && defined(HEADLESS_USE_PREFS) +#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(HEADLESS_USE_PREFS) #include "components/os_crypt/sync/os_crypt.h" // nogncheck #include "content/public/browser/network_service_util.h" #endif -@@ -557,7 +557,7 @@ void HeadlessContentBrowserClient::HandleExplicitlyAll +@@ -569,7 +569,7 @@ void HeadlessContentBrowserClient::HandleExplicitlyAll void HeadlessContentBrowserClient::SetEncryptionKey( ::network::mojom::NetworkService* network_service) { -#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)) && defined(HEADLESS_USE_PREFS) +#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(HEADLESS_USE_PREFS) // The OSCrypt keys are process bound, so if network service is out of // process, send it the required key if it is available. if (content::IsOutOfProcessNetworkService() diff --git a/www/iridium/files/patch-headless_lib_browser_headless__content__browser__client.h b/www/iridium/files/patch-headless_lib_browser_headless__content__browser__client.h index 2feee573b9cc..fcd38b395cfe 100644 --- a/www/iridium/files/patch-headless_lib_browser_headless__content__browser__client.h +++ b/www/iridium/files/patch-headless_lib_browser_headless__content__browser__client.h @@ -1,11 +1,11 @@ ---- headless/lib/browser/headless_content_browser_client.h.orig 2025-09-11 13:19:19 UTC +--- headless/lib/browser/headless_content_browser_client.h.orig 2025-12-10 15:04:57 UTC +++ headless/lib/browser/headless_content_browser_client.h @@ -48,7 +48,7 @@ class HeadlessContentBrowserClient : public content::C CreateDevToolsManagerDelegate() override; content::GeneratedCodeCacheSettings GetGeneratedCodeCacheSettings( content::BrowserContext* context) 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/iridium/files/patch-headless_lib_browser_headless__web__contents__impl.cc b/www/iridium/files/patch-headless_lib_browser_headless__web__contents__impl.cc index d8ae23f2473e..0e3282c0fa5c 100644 --- a/www/iridium/files/patch-headless_lib_browser_headless__web__contents__impl.cc +++ b/www/iridium/files/patch-headless_lib_browser_headless__web__contents__impl.cc @@ -1,11 +1,11 @@ ---- headless/lib/browser/headless_web_contents_impl.cc.orig 2025-11-06 10:11:34 UTC +--- headless/lib/browser/headless_web_contents_impl.cc.orig 2025-12-10 15:04:57 UTC +++ headless/lib/browser/headless_web_contents_impl.cc -@@ -69,7 +69,7 @@ BASE_FEATURE(kPrerender2InHeadlessMode, base::FEATURE_ +@@ -71,7 +71,7 @@ BASE_FEATURE(kPrerender2InHeadlessMode, base::FEATURE_ namespace { void UpdatePrefsFromSystemSettings(blink::RendererPreferences* prefs) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) content::UpdateFontRendererPreferencesFromSystemSettings(prefs); #endif diff --git a/www/iridium/files/patch-headless_lib_headless__content__main__delegate.cc b/www/iridium/files/patch-headless_lib_headless__content__main__delegate.cc index 904e1244541b..f4b508fb6170 100644 --- a/www/iridium/files/patch-headless_lib_headless__content__main__delegate.cc +++ b/www/iridium/files/patch-headless_lib_headless__content__main__delegate.cc @@ -1,11 +1,11 @@ ---- headless/lib/headless_content_main_delegate.cc.orig 2025-09-11 13:19:19 UTC +--- headless/lib/headless_content_main_delegate.cc.orig 2025-12-10 15:04:57 UTC +++ headless/lib/headless_content_main_delegate.cc @@ -411,7 +411,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/iridium/files/patch-ipc_ipc__channel.cc b/www/iridium/files/patch-ipc_ipc__channel.cc index d83fab1a1b0a..22baf45fc18d 100644 --- a/www/iridium/files/patch-ipc_ipc__channel.cc +++ b/www/iridium/files/patch-ipc_ipc__channel.cc @@ -1,20 +1,29 @@ ---- ipc/ipc_channel.cc.orig 2025-11-06 10:11:34 UTC +--- ipc/ipc_channel.cc.orig 2025-12-10 15:04:57 UTC +++ ipc/ipc_channel.cc -@@ -22,7 +22,7 @@ namespace { +@@ -41,7 +41,7 @@ namespace { // Global atomic used to guarantee channel IDs are unique. base::AtomicSequenceNumber g_last_id; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) int g_global_pid = 0; -@@ -60,7 +60,7 @@ std::string Channel::GenerateUniqueRandomChannelID() { +@@ -83,7 +83,7 @@ class ThreadSafeChannelProxy : public mojo::ThreadSafe + }; + + base::ProcessId GetSelfPID() { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + if (int global_pid = Channel::GetGlobalPid()) { + return global_pid; + } +@@ -123,7 +123,7 @@ std::string Channel::GenerateUniqueRandomChannelID() { base::RandInt(0, std::numeric_limits::max())); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // static void Channel::SetGlobalPid(int pid) { g_global_pid = pid; diff --git a/www/iridium/files/patch-ipc_ipc__channel.h b/www/iridium/files/patch-ipc_ipc__channel.h index 89e044dbf6bd..133ef8a13ec6 100644 --- a/www/iridium/files/patch-ipc_ipc__channel.h +++ b/www/iridium/files/patch-ipc_ipc__channel.h @@ -1,11 +1,11 @@ ---- ipc/ipc_channel.h.orig 2025-11-06 10:11:34 UTC +--- ipc/ipc_channel.h.orig 2025-12-10 15:04:57 UTC +++ ipc/ipc_channel.h -@@ -206,7 +206,7 @@ class COMPONENT_EXPORT(IPC) Channel : public Sender { +@@ -201,7 +201,7 @@ class COMPONENT_EXPORT(IPC) Channel final // Generates a channel ID that's non-predictable and unique. static std::string GenerateUniqueRandomChannelID(); -#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/iridium/files/patch-ipc_ipc__channel__mojo.cc b/www/iridium/files/patch-ipc_ipc__channel__mojo.cc deleted file mode 100644 index a0848ff76a3d..000000000000 --- a/www/iridium/files/patch-ipc_ipc__channel__mojo.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- ipc/ipc_channel_mojo.cc.orig 2025-11-06 10:11:34 UTC -+++ ipc/ipc_channel_mojo.cc -@@ -72,7 +72,7 @@ class ThreadSafeChannelProxy : public mojo::ThreadSafe - }; - - base::ProcessId GetSelfPID() { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (int global_pid = Channel::GetGlobalPid()) - return global_pid; - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/iridium/files/patch-ipc_ipc__message__utils.h b/www/iridium/files/patch-ipc_param__traits__utils.h similarity index 76% rename from www/iridium/files/patch-ipc_ipc__message__utils.h rename to www/iridium/files/patch-ipc_param__traits__utils.h index 72d5c171251c..290049993073 100644 --- a/www/iridium/files/patch-ipc_ipc__message__utils.h +++ b/www/iridium/files/patch-ipc_param__traits__utils.h @@ -1,11 +1,11 @@ ---- ipc/ipc_message_utils.h.orig 2025-11-06 10:11:34 UTC -+++ ipc/ipc_message_utils.h -@@ -178,7 +178,7 @@ struct ParamTraits { +--- ipc/param_traits_utils.h.orig 2025-12-10 15:04:57 UTC ++++ ipc/param_traits_utils.h +@@ -177,7 +177,7 @@ struct ParamTraits { // Since we want to support Android 32<>64 bit IPC, as long as we don't have // these traits for 32 bit ARM then that'll catch any errors. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS)) template <> struct ParamTraits { diff --git a/www/iridium/files/patch-media_BUILD.gn b/www/iridium/files/patch-media_BUILD.gn index 21e5b2395c1c..213603b7b60d 100644 --- a/www/iridium/files/patch-media_BUILD.gn +++ b/www/iridium/files/patch-media_BUILD.gn @@ -1,12 +1,12 @@ ---- media/BUILD.gn.orig 2025-09-11 13:19:19 UTC +--- media/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ media/BUILD.gn @@ -101,6 +101,9 @@ config("media_config") { defines += [ "DLOPEN_PULSEAUDIO" ] } } + if (use_sndio) { + defines += [ "USE_SNDIO" ] + } } # Internal grouping of the configs necessary to support sub-folders having their diff --git a/www/iridium/files/patch-media_audio_BUILD.gn b/www/iridium/files/patch-media_audio_BUILD.gn index 08ca8176eb48..63466c9a6016 100644 --- a/www/iridium/files/patch-media_audio_BUILD.gn +++ b/www/iridium/files/patch-media_audio_BUILD.gn @@ -1,27 +1,27 @@ ---- media/audio/BUILD.gn.orig 2025-10-28 14:29:43 UTC +--- media/audio/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ media/audio/BUILD.gn @@ -291,9 +291,23 @@ source_set("audio") { deps += [ "//media/base/android:media_jni_headers" ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "linux/audio_manager_linux.cc" ] } + + if (is_bsd) { + sources += [ "sndio/audio_manager_sndio.cc" ] + } + + if (use_sndio) { + libs += [ "sndio" ] + sources += [ + "sndio/sndio_input.cc", + "sndio/sndio_input.h", + "sndio/sndio_output.cc", + "sndio/sndio_output.h" + ] + } if (use_alsa) { libs += [ "asound" ] diff --git a/www/iridium/files/patch-media_audio_alsa_audio__manager__alsa.cc b/www/iridium/files/patch-media_audio_alsa_audio__manager__alsa.cc index 57ca288e272e..c1fcb69a6bd2 100644 --- a/www/iridium/files/patch-media_audio_alsa_audio__manager__alsa.cc +++ b/www/iridium/files/patch-media_audio_alsa_audio__manager__alsa.cc @@ -1,54 +1,54 @@ ---- media/audio/alsa/audio_manager_alsa.cc.orig 2025-09-11 13:19:19 UTC +--- media/audio/alsa/audio_manager_alsa.cc.orig 2025-12-10 15:04:57 UTC +++ media/audio/alsa/audio_manager_alsa.cc @@ -103,7 +103,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType int card = -1; // Loop through the physical sound cards to get ALSA device hints. +#if !BUILDFLAG(IS_BSD) while (!wrapper_->CardNext(&card) && card >= 0) { +#endif void** hints = nullptr; int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints); if (!error) { @@ -115,7 +117,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType DLOG(WARNING) << "GetAlsaAudioDevices: unable to get device hints: " << wrapper_->StrError(error); } +#if !BUILDFLAG(IS_BSD) } +#endif } void AudioManagerAlsa::GetAlsaDevicesInfo(AudioManagerAlsa::StreamType type, @@ -199,7 +203,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvailable(AudioMana // goes through software conversion if needed (e.g. incompatible // sample rate). // TODO(joi): Should we prefer "hw" instead? +#if BUILDFLAG(IS_BSD) + static constexpr std::string_view kDeviceTypeDesired = "plug"; +#else static constexpr std::string_view kDeviceTypeDesired = "plughw"; +#endif return device_name.starts_with(kDeviceTypeDesired); } @@ -250,7 +258,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( // Loop through the sound cards. // Don't use snd_device_name_hint(-1,..) since there is an access violation // inside this ALSA API with libasound.so.2.0.0. +#if !BUILDFLAG(IS_BSD) while (!wrapper_->CardNext(&card) && (card >= 0) && !has_device) { +#endif int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints); if (!error) { const std::string_view unwanted_type = @@ -279,7 +289,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( DLOG(WARNING) << "HasAnyAudioDevice: unable to get device hints: " << wrapper_->StrError(error); } +#if !BUILDFLAG(IS_BSD) } +#endif return has_device; } diff --git a/www/iridium/files/patch-media_audio_audio__input__device.cc b/www/iridium/files/patch-media_audio_audio__input__device.cc index a033e9366d54..669d8e39044c 100644 --- a/www/iridium/files/patch-media_audio_audio__input__device.cc +++ b/www/iridium/files/patch-media_audio_audio__input__device.cc @@ -1,11 +1,11 @@ ---- media/audio/audio_input_device.cc.orig 2025-11-06 10:11:34 UTC +--- media/audio/audio_input_device.cc.orig 2025-12-10 15:04:57 UTC +++ media/audio/audio_input_device.cc @@ -270,7 +270,7 @@ void AudioInputDevice::OnStreamCreated( // here. See comments in AliveChecker and PowerObserverHelper for details and // todos. if (detect_dead_stream_ == DeadStreamDetection::kEnabled) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const bool stop_at_first_alive_notification = true; const bool pause_check_during_suspend = false; #else diff --git a/www/iridium/files/patch-media_audio_audio__output__proxy__unittest.cc b/www/iridium/files/patch-media_audio_audio__output__proxy__unittest.cc index 4b78211fd102..4f850e729adb 100644 --- a/www/iridium/files/patch-media_audio_audio__output__proxy__unittest.cc +++ b/www/iridium/files/patch-media_audio_audio__output__proxy__unittest.cc @@ -1,14 +1,14 @@ ---- media/audio/audio_output_proxy_unittest.cc.orig 2025-05-07 06:48:23 UTC +--- media/audio/audio_output_proxy_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ media/audio/audio_output_proxy_unittest.cc @@ -443,7 +443,11 @@ class AudioOutputProxyTest : public testing::Test { // |stream| is closed at this point. Start() should reopen it again. EXPECT_CALL(manager(), MakeAudioOutputStream(_, _, _)) .Times(2) +#if BUILDFLAG(IS_BSD) + .WillRepeatedly(Return(static_cast(NULL))); +#else .WillRepeatedly(Return(reinterpret_cast(NULL))); +#endif EXPECT_CALL(callback_, OnError(_)).Times(2); diff --git a/www/iridium/files/patch-media_audio_pulse_pulse__util.cc b/www/iridium/files/patch-media_audio_pulse_pulse__util.cc index bc5b2a1d4775..b42e1166ed0c 100644 --- a/www/iridium/files/patch-media_audio_pulse_pulse__util.cc +++ b/www/iridium/files/patch-media_audio_pulse_pulse__util.cc @@ -1,14 +1,14 @@ ---- media/audio/pulse/pulse_util.cc.orig 2025-09-11 13:19:19 UTC +--- media/audio/pulse/pulse_util.cc.orig 2025-12-10 15:04:57 UTC +++ media/audio/pulse/pulse_util.cc @@ -45,7 +45,11 @@ constexpr char kBrowserDisplayName[] = "chromium-brows #if defined(DLOPEN_PULSEAUDIO) static const base::FilePath::CharType kPulseLib[] = +#if BUILDFLAG(IS_BSD) + FILE_PATH_LITERAL("libpulse.so"); +#else FILE_PATH_LITERAL("libpulse.so.0"); +#endif #endif void DestroyMainloop(pa_threaded_mainloop* mainloop) { diff --git a/www/iridium/files/patch-media_audio_sndio_audio__manager__sndio.cc b/www/iridium/files/patch-media_audio_sndio_audio__manager__sndio.cc index 3f5b095436a1..160aa9d34be7 100644 --- a/www/iridium/files/patch-media_audio_sndio_audio__manager__sndio.cc +++ b/www/iridium/files/patch-media_audio_sndio_audio__manager__sndio.cc @@ -1,218 +1,218 @@ ---- media/audio/sndio/audio_manager_sndio.cc.orig 2025-09-11 13:19:19 UTC +--- media/audio/sndio/audio_manager_sndio.cc.orig 2025-12-10 15:04:57 UTC +++ media/audio/sndio/audio_manager_sndio.cc @@ -0,0 +1,215 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/command_line.h" +#include "base/metrics/histogram_macros.h" +#include "base/memory/ptr_util.h" + +#include "base/logging.h" + +#include "media/audio/sndio/audio_manager_sndio.h" + +#include "media/audio/audio_device_description.h" +#include "media/audio/audio_output_dispatcher.h" +#if defined(USE_SNDIO) +#include "media/audio/sndio/sndio_input.h" +#include "media/audio/sndio/sndio_output.h" +#endif +#if defined(USE_PULSEAUDIO) +#include "media/audio/pulse/audio_manager_pulse.h" +#include "media/audio/pulse/pulse_util.h" +#endif +#if defined(USE_ALSA) +#include "media/audio/alsa/audio_manager_alsa.h" +#endif +#include "media/audio/fake_audio_manager.h" +#include "media/base/limits.h" +#include "media/base/media_switches.h" + +namespace media { + +#if defined(USE_SNDIO) +// Maximum number of output streams that can be open simultaneously. +static const int kMaxOutputStreams = 50; + +// Default sample rate for input and output streams. +static const int kDefaultSampleRate = 48000; + +void AddDefaultDevice(AudioDeviceNames* device_names) { + DCHECK(device_names->empty()); + device_names->push_front(AudioDeviceName::CreateDefault()); +} + +bool AudioManagerSndio::HasAudioOutputDevices() { + return true; +} + +bool AudioManagerSndio::HasAudioInputDevices() { + return true; +} + +void AudioManagerSndio::GetAudioInputDeviceNames( + AudioDeviceNames* device_names) { + DCHECK(device_names->empty()); + AddDefaultDevice(device_names); +} + +void AudioManagerSndio::GetAudioOutputDeviceNames( + AudioDeviceNames* device_names) { + AddDefaultDevice(device_names); +} + +#if defined(USE_SNDIO) +const std::string_view AudioManagerSndio::GetName() { + return "SNDIO"; +} +#endif + +AudioParameters AudioManagerSndio::GetInputStreamParameters( + const std::string& device_id) { + static const int kDefaultInputBufferSize = 1024; + + int user_buffer_size = GetUserBufferSize(); + int buffer_size = user_buffer_size ? + user_buffer_size : kDefaultInputBufferSize; + + return AudioParameters( + AudioParameters::AUDIO_PCM_LOW_LATENCY, ChannelLayoutConfig::Stereo(), + kDefaultSampleRate, buffer_size); +} + +AudioManagerSndio::AudioManagerSndio(std::unique_ptr audio_thread, + AudioLogFactory* audio_log_factory) + : AudioManagerBase(std::move(audio_thread), + audio_log_factory) { + DLOG(WARNING) << "AudioManagerSndio"; + SetMaxOutputStreamsAllowed(kMaxOutputStreams); +} + +AudioManagerSndio::~AudioManagerSndio() = default; + +AudioOutputStream* AudioManagerSndio::MakeLinearOutputStream( + const AudioParameters& params, + const LogCallback& log_callback) { + DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); + return MakeOutputStream(params); +} + +AudioOutputStream* AudioManagerSndio::MakeLowLatencyOutputStream( + const AudioParameters& params, + const std::string& device_id, + const LogCallback& log_callback) { + DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!"; + DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); + return MakeOutputStream(params); +} + +AudioInputStream* AudioManagerSndio::MakeLinearInputStream( + const AudioParameters& params, + const std::string& device_id, + const LogCallback& log_callback) { + DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); + return MakeInputStream(params); +} + +AudioInputStream* AudioManagerSndio::MakeLowLatencyInputStream( + const AudioParameters& params, + const std::string& device_id, + const LogCallback& log_callback) { + DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); + return MakeInputStream(params); +} + +AudioParameters AudioManagerSndio::GetPreferredOutputStreamParameters( + const std::string& output_device_id, + const AudioParameters& input_params) { + // TODO(tommi): Support |output_device_id|. + DLOG_IF(ERROR, !output_device_id.empty()) << "Not implemented!"; + static const int kDefaultOutputBufferSize = 2048; + + ChannelLayoutConfig channel_layout_config = ChannelLayoutConfig::Stereo(); + int sample_rate = kDefaultSampleRate; + int buffer_size = kDefaultOutputBufferSize; + if (input_params.IsValid()) { + sample_rate = input_params.sample_rate(); + channel_layout_config = input_params.channel_layout_config(); + buffer_size = std::min(buffer_size, input_params.frames_per_buffer()); + } + + int user_buffer_size = GetUserBufferSize(); + if (user_buffer_size) + buffer_size = user_buffer_size; + + return AudioParameters( + AudioParameters::AUDIO_PCM_LOW_LATENCY, + channel_layout_config, sample_rate, buffer_size); +} + +AudioInputStream* AudioManagerSndio::MakeInputStream( + const AudioParameters& params) { + DLOG(WARNING) << "MakeInputStream"; + return new SndioAudioInputStream(this, + AudioDeviceDescription::kDefaultDeviceId, params); +} + +AudioOutputStream* AudioManagerSndio::MakeOutputStream( + const AudioParameters& params) { + DLOG(WARNING) << "MakeOutputStream"; + return new SndioAudioOutputStream(params, this); +} +#endif + +std::unique_ptr CreateAudioManager( + std::unique_ptr audio_thread, + AudioLogFactory* audio_log_factory) { + DLOG(WARNING) << "CreateAudioManager"; + + auto _ab = kAudioBackendParam.Get(); + + // For testing allow audio output to be disabled. + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableAudioOutput) || + !base::FeatureList::IsEnabled(media::kAudioBackend)) { + return std::make_unique(std::move(audio_thread), + audio_log_factory); + } + +#if defined(USE_PULSEAUDIO) + pa_threaded_mainloop* pa_mainloop = nullptr; + pa_context* pa_context = nullptr; + if (_ab != AudioBackend::kSndio && _ab != AudioBackend::kAlsa && + pulse::InitPulse(&pa_mainloop, &pa_context)) { + return std::make_unique( + std::move(audio_thread), audio_log_factory, pa_mainloop, pa_context); + } else if (_ab == AudioBackend::kAuto) { + LOG(WARNING) << "Falling back to SNDIO for audio output. PulseAudio is not " + "available or could not be initialized."; + } +#endif + +#if defined(USE_SNDIO) + if (_ab != AudioBackend::kPulseAudio && _ab != AudioBackend::kAlsa) { + return std::make_unique(std::move(audio_thread), + audio_log_factory); + } else if (_ab == AudioBackend::kAuto) { + LOG(WARNING) << "Falling back to ALSA audio output. SNDIO is not " + "available or could not be initialized."; + } +#endif + +#if defined(USE_ALSA) + if (_ab != AudioBackend::kPulseAudio && _ab != AudioBackend::kSndio) { + return std::make_unique(std::move(audio_thread), + audio_log_factory); + } else if (_ab == AudioBackend::kAuto) { + LOG(WARNING) << "Falling back to fake audio output. ALSA is not " + "available or could not be initialized."; + } +#endif + + return std::make_unique(std::move(audio_thread), + audio_log_factory); +} + +} // namespace media diff --git a/www/iridium/files/patch-media_audio_sndio_audio__manager__sndio.h b/www/iridium/files/patch-media_audio_sndio_audio__manager__sndio.h index aca65ef9fcd5..2c0ccd78b805 100644 --- a/www/iridium/files/patch-media_audio_sndio_audio__manager__sndio.h +++ b/www/iridium/files/patch-media_audio_sndio_audio__manager__sndio.h @@ -1,69 +1,69 @@ ---- media/audio/sndio/audio_manager_sndio.h.orig 2025-09-11 13:19:19 UTC +--- media/audio/sndio/audio_manager_sndio.h.orig 2025-12-10 15:04:57 UTC +++ media/audio/sndio/audio_manager_sndio.h @@ -0,0 +1,66 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_ +#define MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_ + +#include + +#include "base/compiler_specific.h" +#include "base/memory/ref_counted.h" +#include "base/threading/thread.h" +#include "media/audio/audio_manager_base.h" + +namespace media { + +class MEDIA_EXPORT AudioManagerSndio : public AudioManagerBase { + public: + AudioManagerSndio(std::unique_ptr audio_thread, + AudioLogFactory* audio_log_factory); + + AudioManagerSndio(const AudioManagerSndio&) = delete; + AudioManagerSndio& operator=(const AudioManagerSndio&) = delete; + + ~AudioManagerSndio() override; + + // Implementation of AudioManager. + bool HasAudioOutputDevices() override; + bool HasAudioInputDevices() override; + void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override; + void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override; + AudioParameters GetInputStreamParameters( + const std::string& device_id) override; + const std::string_view GetName() override; + + // Implementation of AudioManagerBase. + AudioOutputStream* MakeLinearOutputStream( + const AudioParameters& params, + const LogCallback& log_callback) override; + AudioOutputStream* MakeLowLatencyOutputStream( + const AudioParameters& params, + const std::string& device_id, + const LogCallback& log_callback) override; + AudioInputStream* MakeLinearInputStream( + const AudioParameters& params, + const std::string& device_id, + const LogCallback& log_callback) override; + AudioInputStream* MakeLowLatencyInputStream( + const AudioParameters& params, + const std::string& device_id, + const LogCallback& log_callback) override; + + protected: + AudioParameters GetPreferredOutputStreamParameters( + const std::string& output_device_id, + const AudioParameters& input_params) override; + + private: + // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream. + AudioOutputStream* MakeOutputStream(const AudioParameters& params); + AudioInputStream* MakeInputStream(const AudioParameters& params); +}; + +} // namespace media + +#endif // MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_ diff --git a/www/iridium/files/patch-media_audio_sndio_sndio__input.cc b/www/iridium/files/patch-media_audio_sndio_sndio__input.cc index 680c1a755617..50302b9c172e 100644 --- a/www/iridium/files/patch-media_audio_sndio_sndio__input.cc +++ b/www/iridium/files/patch-media_audio_sndio_sndio__input.cc @@ -1,204 +1,204 @@ ---- media/audio/sndio/sndio_input.cc.orig 2025-09-11 13:19:19 UTC +--- media/audio/sndio/sndio_input.cc.orig 2025-12-10 15:04:57 UTC +++ media/audio/sndio/sndio_input.cc @@ -0,0 +1,201 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/logging.h" +#include "media/base/audio_sample_types.h" +#include "media/base/audio_timestamp_helper.h" +#include "media/audio/sndio/audio_manager_sndio.h" +#include "media/audio/audio_manager.h" +#include "media/audio/sndio/sndio_input.h" + +namespace media { + +static const SampleFormat kSampleFormat = kSampleFormatS16; + +void SndioAudioInputStream::OnMoveCallback(void *arg, int delta) +{ + SndioAudioInputStream* self = static_cast(arg); + + self->hw_delay += delta; +} + +void *SndioAudioInputStream::ThreadEntry(void *arg) { + SndioAudioInputStream* self = static_cast(arg); + + self->ThreadLoop(); + return NULL; +} + +SndioAudioInputStream::SndioAudioInputStream(AudioManagerBase* manager, + const std::string& device_name, + const AudioParameters& params) + : manager(manager), + params(params), + audio_bus(AudioBus::Create(params)), + state(kClosed) { +} + +SndioAudioInputStream::~SndioAudioInputStream() { + if (state != kClosed) + Close(); +} + +AudioInputStream::OpenOutcome SndioAudioInputStream::Open() { + struct sio_par par; + int sig; + + if (state != kClosed) + return OpenOutcome::kFailed; + + if (params.format() != AudioParameters::AUDIO_PCM_LINEAR && + params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) { + LOG(WARNING) << "Unsupported audio format."; + return OpenOutcome::kFailed; + } + + sio_initpar(&par); + par.rate = params.sample_rate(); + par.rchan = params.channels(); + par.bits = SampleFormatToBitsPerChannel(kSampleFormat); + par.bps = par.bits / 8; + par.sig = sig = par.bits != 8 ? 1 : 0; + par.le = SIO_LE_NATIVE; + par.appbufsz = params.frames_per_buffer(); + + hdl = sio_open(SIO_DEVANY, SIO_REC, 0); + + if (hdl == NULL) { + LOG(ERROR) << "Couldn't open audio device."; + return OpenOutcome::kFailed; + } + + if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) { + LOG(ERROR) << "Couldn't set audio parameters."; + goto bad_close; + } + + if (par.rate != (unsigned int)params.sample_rate() || + par.rchan != (unsigned int)params.channels() || + par.bits != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) || + par.sig != (unsigned int)sig || + (par.bps > 1 && par.le != SIO_LE_NATIVE) || + (par.bits != par.bps * 8)) { + LOG(ERROR) << "Unsupported audio parameters."; + goto bad_close; + } + state = kStopped; + buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)]; + sio_onmove(hdl, &OnMoveCallback, this); + return OpenOutcome::kSuccess; +bad_close: + sio_close(hdl); + return OpenOutcome::kFailed; +} + +void SndioAudioInputStream::Start(AudioInputCallback* cb) { + + StartAgc(); + + state = kRunning; + hw_delay = 0; + callback = cb; + sio_start(hdl); + if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) { + LOG(ERROR) << "Failed to create real-time thread for recording."; + sio_stop(hdl); + state = kStopped; + } +} + +void SndioAudioInputStream::Stop() { + + if (state == kStopped) + return; + + state = kStopWait; + pthread_join(thread, NULL); + sio_stop(hdl); + state = kStopped; + + StopAgc(); +} + +void SndioAudioInputStream::Close() { + + if (state == kClosed) + goto release; + + if (state == kRunning) + Stop(); + + state = kClosed; + delete [] buffer; + sio_close(hdl); + +release: + manager->ReleaseInputStream(this); +} + +double SndioAudioInputStream::GetMaxVolume() { + // Not supported + return 0.0; +} + +void SndioAudioInputStream::SetVolume(double volume) { + // Not supported. Do nothing. +} + +double SndioAudioInputStream::GetVolume() { + // Not supported. + return 0.0; +} + +bool SndioAudioInputStream::IsMuted() { + // Not supported. + return false; +} + +void SndioAudioInputStream::SetOutputDeviceForAec( + const std::string& output_device_id) { + // Not supported. +} + +void SndioAudioInputStream::ThreadLoop(void) { + size_t todo, n; + char *data; + unsigned int nframes; + double normalized_volume = 0.0; + + nframes = audio_bus->frames(); + + while (state == kRunning && !sio_eof(hdl)) { + + GetAgcVolume(&normalized_volume); + + // read one block + todo = nframes * params.GetBytesPerFrame(kSampleFormat); + data = buffer; + while (todo > 0) { + n = sio_read(hdl, data, todo); + if (n == 0) + return; // unrecoverable I/O error + todo -= n; + data += n; + } + hw_delay -= nframes; + + // convert frames count to TimeDelta + const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay, + params.sample_rate()); + + // push into bus + audio_bus->FromInterleaved(reinterpret_cast(buffer), nframes); + + + // invoke callback + callback->OnData(audio_bus.get(), base::TimeTicks::Now() - delay, 1., {}); + } +} + +} // namespace media diff --git a/www/iridium/files/patch-media_audio_sndio_sndio__input.h b/www/iridium/files/patch-media_audio_sndio_sndio__input.h index 55d8bff8a511..d4f301fb2509 100644 --- a/www/iridium/files/patch-media_audio_sndio_sndio__input.h +++ b/www/iridium/files/patch-media_audio_sndio_sndio__input.h @@ -1,94 +1,94 @@ ---- media/audio/sndio/sndio_input.h.orig 2025-05-07 06:48:23 UTC +--- media/audio/sndio/sndio_input.h.orig 2025-12-10 15:04:57 UTC +++ media/audio/sndio/sndio_input.h @@ -0,0 +1,91 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_ +#define MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_ + +#include +#include +#include + +#include "base/compiler_specific.h" +#include "base/memory/weak_ptr.h" +#include "base/time/time.h" +#include "media/audio/agc_audio_stream.h" +#include "media/audio/audio_io.h" +#include "media/audio/audio_device_description.h" +#include "media/base/audio_parameters.h" + +namespace media { + +class AudioManagerBase; + +// Implementation of AudioOutputStream using sndio(7) +class SndioAudioInputStream : public AgcAudioStream { + public: + // Pass this to the constructor if you want to attempt auto-selection + // of the audio recording device. + static const char kAutoSelectDevice[]; + + // Create a PCM Output stream for the SNDIO device identified by + // |device_name|. If unsure of what to use for |device_name|, use + // |kAutoSelectDevice|. + SndioAudioInputStream(AudioManagerBase* audio_manager, + const std::string& device_name, + const AudioParameters& params); + + SndioAudioInputStream(const SndioAudioInputStream&) = delete; + SndioAudioInputStream& operator=(const SndioAudioInputStream&) = delete; + + ~SndioAudioInputStream() override; + + // Implementation of AudioInputStream. + OpenOutcome Open() override; + void Start(AudioInputCallback* callback) override; + void Stop() override; + void Close() override; + double GetMaxVolume() override; + void SetVolume(double volume) override; + double GetVolume() override; + bool IsMuted() override; + void SetOutputDeviceForAec(const std::string& output_device_id) override; + + private: + + enum StreamState { + kClosed, // Not opened yet + kStopped, // Device opened, but not started yet + kRunning, // Started, device playing + kStopWait // Stopping, waiting for the real-time thread to exit + }; + + // C-style call-backs + static void OnMoveCallback(void *arg, int delta); + static void* ThreadEntry(void *arg); + + // Continuously moves data from the device to the consumer + void ThreadLoop(); + // Our creator, the audio manager needs to be notified when we close. + AudioManagerBase* manager; + // Parameters of the source + AudioParameters params; + // We store data here for consumer + std::unique_ptr audio_bus; + // Call-back that consumes recorded data + AudioInputCallback* callback; // Valid during a recording session. + // Handle of the audio device + struct sio_hdl* hdl; + // Current state of the stream + enum StreamState state; + // High priority thread running ThreadLoop() + pthread_t thread; + // Number of frames buffered in the hardware + int hw_delay; + // Temporary buffer where data is stored sndio-compatible format + char* buffer; +}; + +} // namespace media + +#endif // MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_ diff --git a/www/iridium/files/patch-media_audio_sndio_sndio__output.cc b/www/iridium/files/patch-media_audio_sndio_sndio__output.cc index 99273e058ec9..b235aef03565 100644 --- a/www/iridium/files/patch-media_audio_sndio_sndio__output.cc +++ b/www/iridium/files/patch-media_audio_sndio_sndio__output.cc @@ -1,191 +1,191 @@ ---- media/audio/sndio/sndio_output.cc.orig 2025-09-11 13:19:19 UTC +--- media/audio/sndio/sndio_output.cc.orig 2025-12-10 15:04:57 UTC +++ media/audio/sndio/sndio_output.cc @@ -0,0 +1,188 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/logging.h" +#include "base/time/time.h" +#include "base/time/default_tick_clock.h" +#include "media/audio/audio_manager_base.h" +#include "media/base/audio_sample_types.h" +#include "media/base/audio_timestamp_helper.h" +#include "media/audio/sndio/sndio_output.h" + +namespace media { + +static const SampleFormat kSampleFormat = kSampleFormatS16; + +void SndioAudioOutputStream::OnMoveCallback(void *arg, int delta) { + SndioAudioOutputStream* self = static_cast(arg); + + self->hw_delay -= delta; +} + +void SndioAudioOutputStream::OnVolCallback(void *arg, unsigned int vol) { + SndioAudioOutputStream* self = static_cast(arg); + + self->vol = vol; +} + +void *SndioAudioOutputStream::ThreadEntry(void *arg) { + SndioAudioOutputStream* self = static_cast(arg); + + self->ThreadLoop(); + return NULL; +} + +SndioAudioOutputStream::SndioAudioOutputStream(const AudioParameters& params, + AudioManagerBase* manager) + : manager(manager), + params(params), + audio_bus(AudioBus::Create(params)), + state(kClosed), + mutex(PTHREAD_MUTEX_INITIALIZER) { +} + +SndioAudioOutputStream::~SndioAudioOutputStream() { + if (state != kClosed) + Close(); +} + +bool SndioAudioOutputStream::Open() { + if (params.format() != AudioParameters::AUDIO_PCM_LINEAR && + params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) { + LOG(WARNING) << "Unsupported audio format."; + return false; + } + state = kStopped; + volpending = 0; + vol = SIO_MAXVOL; + buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)]; + return true; +} + +void SndioAudioOutputStream::Close() { + if (state == kClosed) + goto release; + if (state == kRunning) + Stop(); + state = kClosed; + delete [] buffer; +release: + manager->ReleaseOutputStream(this); // Calls the destructor +} + +void SndioAudioOutputStream::Start(AudioSourceCallback* callback) { + struct sio_par par; + int sig; + + sio_initpar(&par); + par.rate = params.sample_rate(); + par.pchan = params.channels(); + par.bits = SampleFormatToBitsPerChannel(kSampleFormat); + par.bps = par.bits / 8; + par.sig = sig = par.bits != 8 ? 1 : 0; + par.le = SIO_LE_NATIVE; + par.appbufsz = params.frames_per_buffer(); + + hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0); + if (hdl == NULL) { + LOG(ERROR) << "Couldn't open audio device."; + return; + } + if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) { + LOG(ERROR) << "Couldn't set audio parameters."; + sio_close(hdl); + return; + } + if (par.rate != (unsigned int)params.sample_rate() || + par.pchan != (unsigned int)params.channels() || + par.bits != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) || + par.sig != (unsigned int)sig || + (par.bps > 1 && par.le != SIO_LE_NATIVE) || + (par.bits != par.bps * 8)) { + LOG(ERROR) << "Unsupported audio parameters."; + sio_close(hdl); + return; + } + + sio_onmove(hdl, &OnMoveCallback, this); + sio_onvol(hdl, &OnVolCallback, this); + + state = kRunning; + hw_delay = 0; + source = callback; + sio_start(hdl); + + if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) { + LOG(ERROR) << "Failed to create real-time thread."; + sio_stop(hdl); + sio_close(hdl); + state = kStopped; + } +} + +void SndioAudioOutputStream::Stop() { + if (state == kStopped) + return; + state = kStopWait; + pthread_join(thread, NULL); + sio_stop(hdl); + sio_close(hdl); + state = kStopped; +} + +void SndioAudioOutputStream::SetVolume(double v) { + pthread_mutex_lock(&mutex); + vol = v * SIO_MAXVOL; + volpending = 1; + pthread_mutex_unlock(&mutex); +} + +void SndioAudioOutputStream::GetVolume(double* v) { + pthread_mutex_lock(&mutex); + *v = vol * (1. / SIO_MAXVOL); + pthread_mutex_unlock(&mutex); +} + +// This stream is always used with sub second buffer sizes, where it's +// sufficient to simply always flush upon Start(). +void SndioAudioOutputStream::Flush() {} + +void SndioAudioOutputStream::ThreadLoop(void) { + int avail, count, result; + + while (state == kRunning) { + // Update volume if needed + pthread_mutex_lock(&mutex); + if (volpending) { + volpending = 0; + sio_setvol(hdl, vol); + } + pthread_mutex_unlock(&mutex); + + // Get data to play + const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay, + params.sample_rate()); + count = source->OnMoreData(delay, base::TimeTicks::Now(), {}, audio_bus.get()); + audio_bus->ToInterleaved(count, reinterpret_cast(buffer)); + if (count == 0) { + // We have to submit something to the device + count = audio_bus->frames(); + memset(buffer, 0, count * params.GetBytesPerFrame(kSampleFormat)); + LOG(WARNING) << "No data to play, running empty cycle."; + } + + // Submit data to the device + avail = count * params.GetBytesPerFrame(kSampleFormat); + result = sio_write(hdl, buffer, avail); + if (result == 0) { + LOG(WARNING) << "Audio device disconnected."; + break; + } + + // Update hardware pointer + hw_delay += count; + } +} + +} // namespace media diff --git a/www/iridium/files/patch-media_audio_sndio_sndio__output.h b/www/iridium/files/patch-media_audio_sndio_sndio__output.h index 486e8c1c08cd..8e2c13ac5a88 100644 --- a/www/iridium/files/patch-media_audio_sndio_sndio__output.h +++ b/www/iridium/files/patch-media_audio_sndio_sndio__output.h @@ -1,91 +1,91 @@ ---- media/audio/sndio/sndio_output.h.orig 2025-05-07 06:48:23 UTC +--- media/audio/sndio/sndio_output.h.orig 2025-12-10 15:04:57 UTC +++ media/audio/sndio/sndio_output.h @@ -0,0 +1,88 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_ +#define MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_ + +#include +#include + +#include "base/time/tick_clock.h" +#include "base/time/time.h" +#include "media/audio/audio_io.h" + +namespace media { + +class AudioManagerBase; + +// Implementation of AudioOutputStream using sndio(7) +class SndioAudioOutputStream : public AudioOutputStream { + public: + // The manager is creating this object + SndioAudioOutputStream(const AudioParameters& params, + AudioManagerBase* manager); + + SndioAudioOutputStream(const SndioAudioOutputStream&) = delete; + SndioAudioOutputStream& operator=(const SndioAudioOutputStream&) = delete; + + virtual ~SndioAudioOutputStream(); + + // Implementation of AudioOutputStream. + bool Open() override; + void Close() override; + void Start(AudioSourceCallback* callback) override; + void Stop() override; + void SetVolume(double volume) override; + void GetVolume(double* volume) override; + void Flush() override; + + friend void sndio_onmove(void *arg, int delta); + friend void sndio_onvol(void *arg, unsigned int vol); + friend void *sndio_threadstart(void *arg); + + private: + enum StreamState { + kClosed, // Not opened yet + kStopped, // Device opened, but not started yet + kRunning, // Started, device playing + kStopWait // Stopping, waiting for the real-time thread to exit + }; + + // C-style call-backs + static void OnMoveCallback(void *arg, int delta); + static void OnVolCallback(void *arg, unsigned int vol); + static void* ThreadEntry(void *arg); + + // Continuously moves data from the producer to the device + void ThreadLoop(void); + + // Our creator, the audio manager needs to be notified when we close. + AudioManagerBase* manager; + // Parameters of the source + AudioParameters params; + // Source stores data here + std::unique_ptr audio_bus; + // Call-back that produces data to play + AudioSourceCallback* source; + // Handle of the audio device + struct sio_hdl* hdl; + // Current state of the stream + enum StreamState state; + // High priority thread running ThreadLoop() + pthread_t thread; + // Protects vol, volpending and hw_delay + pthread_mutex_t mutex; + // Current volume in the 0..SIO_MAXVOL range + int vol; + // Set to 1 if volumes must be refreshed in the realtime thread + int volpending; + // Number of frames buffered in the hardware + int hw_delay; + // Temporary buffer where data is stored sndio-compatible format + char* buffer; +}; + +} // namespace media + +#endif // MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_ diff --git a/www/iridium/files/patch-media_base_audio__latency.cc b/www/iridium/files/patch-media_base_audio__latency.cc index 3193d31a65f5..d044d80be9f7 100644 --- a/www/iridium/files/patch-media_base_audio__latency.cc +++ b/www/iridium/files/patch-media_base_audio__latency.cc @@ -1,11 +1,11 @@ ---- media/base/audio_latency.cc.orig 2025-09-11 13:19:19 UTC +--- media/base/audio_latency.cc.orig 2025-12-10 15:04:57 UTC +++ media/base/audio_latency.cc @@ -143,7 +143,7 @@ int AudioLatency::GetRtcBufferSize(int sample_rate, in } #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // On Linux, MacOS and Fuchsia, the low level IO implementations on the // browser side supports all buffer size the clients want. We use the native // peer connection buffer size (10ms) to achieve best possible performance. diff --git a/www/iridium/files/patch-media_base_libaom__thread__wrapper.cc b/www/iridium/files/patch-media_base_libaom__thread__wrapper.cc index c48ec2e2d4d3..c8785990b5a7 100644 --- a/www/iridium/files/patch-media_base_libaom__thread__wrapper.cc +++ b/www/iridium/files/patch-media_base_libaom__thread__wrapper.cc @@ -1,24 +1,24 @@ ---- media/base/libaom_thread_wrapper.cc.orig 2025-05-07 06:48:23 UTC +--- media/base/libaom_thread_wrapper.cc.orig 2025-12-10 15:04:57 UTC +++ media/base/libaom_thread_wrapper.cc @@ -5,17 +5,21 @@ #include "base/logging.h" #include "media/base/codec_worker_impl.h" #include "media/base/libvpx_thread_wrapper.h" +#if !BUILDFLAG(IS_BSD) #include "third_party/libaom/source/libaom/aom_util/aom_thread.h" +#endif namespace media { void InitLibAomThreadWrapper() { +#if !BUILDFLAG(IS_BSD) const AVxWorkerInterface interface = CodecWorkerImpl::GetCodecWorkerInterface(); CHECK(aom_set_worker_interface(&interface)); +#endif } } // namespace media diff --git a/www/iridium/files/patch-media_base_libvpx__thread__wrapper.cc b/www/iridium/files/patch-media_base_libvpx__thread__wrapper.cc index 19cb05d67d88..f6f0b53e6051 100644 --- a/www/iridium/files/patch-media_base_libvpx__thread__wrapper.cc +++ b/www/iridium/files/patch-media_base_libvpx__thread__wrapper.cc @@ -1,25 +1,25 @@ ---- media/base/libvpx_thread_wrapper.cc.orig 2025-05-07 06:48:23 UTC +--- media/base/libvpx_thread_wrapper.cc.orig 2025-12-10 15:04:57 UTC +++ media/base/libvpx_thread_wrapper.cc @@ -5,11 +5,14 @@ #include "media/base/libvpx_thread_wrapper.h" #include "media/base/codec_worker_impl.h" +#if !BUILDFLAG(IS_OPENBSD) #include "third_party/libvpx/source/libvpx/vpx_util/vpx_thread.h" +#endif namespace media { void InitLibVpxThreadWrapper() { +#if !BUILDFLAG(IS_OPENBSD) const VPxWorkerInterface interface = CodecWorkerImpl::GetCodecWorkerInterface(); CHECK(vpx_set_worker_interface(&interface)); +#endif } } // namespace media diff --git a/www/iridium/files/patch-media_base_media__switches.cc b/www/iridium/files/patch-media_base_media__switches.cc index 09590cc07a6f..736f0a93877a 100644 --- a/www/iridium/files/patch-media_base_media__switches.cc +++ b/www/iridium/files/patch-media_base_media__switches.cc @@ -1,120 +1,120 @@ ---- media/base/media_switches.cc.orig 2025-11-06 10:11:34 UTC +--- media/base/media_switches.cc.orig 2025-12-10 15:04:57 UTC +++ media/base/media_switches.cc @@ -19,7 +19,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 -@@ -368,13 +368,35 @@ BASE_FEATURE(kMacCatapLoopbackAudioForScreenShare, +@@ -367,13 +367,35 @@ BASE_FEATURE(kMacCatapLoopbackAudioForScreenShare, BASE_FEATURE(kUseSCContentSharingPicker, 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, base::FEATURE_DISABLED_BY_DEFAULT); // Enables system audio sharing using pulseaudio. BASE_FEATURE(kPulseaudioLoopbackForScreenShare, base::FEATURE_DISABLED_BY_DEFAULT); + +BASE_FEATURE(kAudioBackend, + "AudioBackend", + base::FEATURE_ENABLED_BY_DEFAULT); + +constexpr base::FeatureParam::Option + kAudioBackendOptions[] = { + {AudioBackend::kAuto, + "auto"}, + {AudioBackend::kPulseAudio, "pulseaudio"}, + {AudioBackend::kSndio, "sndio"}, + {AudioBackend::kAlsa, "alsa"}}; + +const base::FeatureParam + kAudioBackendParam{ + &kAudioBackend, "audio-backend", +#if BUILDFLAG(IS_OPENBSD) + AudioBackend::kSndio, +#elif BUILDFLAG(IS_FREEBSD) + AudioBackend::kAuto, +#endif + &kAudioBackendOptions}; #endif // BUILDFLAG(IS_LINUX) // When enabled, MediaCapabilities will check with GPU Video Accelerator -@@ -626,7 +648,7 @@ BASE_FEATURE(kFileDialogsTuckPictureInPicture, +@@ -614,7 +636,7 @@ BASE_FEATURE(kFileDialogsTuckPictureInPicture, // Show toolbar button that opens dialog for controlling media sessions. BASE_FEATURE(kGlobalMediaControls, -#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 -@@ -644,7 +666,7 @@ BASE_FEATURE(kGlobalMediaControlsUpdatedUI, base::FEAT +@@ -632,7 +654,7 @@ BASE_FEATURE(kGlobalMediaControlsUpdatedUI, base::FEAT #if !BUILDFLAG(IS_ANDROID) // If enabled, users can request Media Remoting without fullscreen-in-tab. BASE_FEATURE(kMediaRemotingWithoutFullscreen, -#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 -@@ -655,7 +677,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen, +@@ -643,7 +665,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen, // Show picture-in-picture button in Global Media Controls. BASE_FEATURE(kGlobalMediaControlsPictureInPicture, #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 -@@ -677,7 +699,7 @@ BASE_FEATURE(kSuspendMediaForFrozenFrames, base::FEATU +@@ -665,7 +687,7 @@ BASE_FEATURE(kSuspendMediaForFrozenFrames, base::FEATU // autoplay policy. BASE_FEATURE(kUnifiedAutoplay, base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enable vaapi/v4l2 video decoding on linux. This is already enabled by default // on chromeos, but needs an experiment on linux. BASE_FEATURE(kAcceleratedVideoDecodeLinux, -@@ -733,7 +755,7 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding, base::FEATURE_E +@@ -721,7 +743,7 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding, base::FEATURE_E // Enables VSync aligned MJPEG decoding. BASE_FEATURE(kVSyncMjpegDecoding, base::FEATURE_DISABLED_BY_DEFAULT); #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enable H264 temporal layer encoding with V4L2 HW encoder on ChromeOS. BASE_FEATURE(kV4L2H264TemporalLayerHWEncoding, base::FEATURE_DISABLED_BY_DEFAULT); -@@ -1235,7 +1257,7 @@ BASE_FEATURE(kUseOutOfProcessVideoDecoding, - ); +@@ -1220,7 +1242,7 @@ BASE_FEATURE(kUseOutOfProcessVideoDecoding, + BASE_FEATURE(kUseSharedImageInOOPVDProcess, 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, base::FEATURE_DISABLED_BY_DEFAULT); -@@ -1297,7 +1319,7 @@ BASE_FEATURE(kRecordMediaEngagementScores, base::FEATU +@@ -1282,7 +1304,7 @@ BASE_FEATURE(kRecordMediaEngagementScores, base::FEATU // Enables Media Engagement Index recording for Web Audio playbacks. BASE_FEATURE(kRecordWebAudioEngagement, 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. -@@ -1565,7 +1587,7 @@ bool IsSystemLoopbackCaptureSupported() { +@@ -1545,7 +1567,7 @@ bool IsSystemLoopbackCaptureSupported() { #elif BUILDFLAG(IS_MAC) return (IsMacSckSystemLoopbackCaptureSupported() || IsMacCatapSystemLoopbackCaptureSupported()); -#elif BUILDFLAG(IS_LINUX) && defined(USE_PULSEAUDIO) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(USE_PULSEAUDIO) return true; #else return false; diff --git a/www/iridium/files/patch-media_base_media__switches.h b/www/iridium/files/patch-media_base_media__switches.h index 3ce3df778ab3..15c0641b7ec1 100644 --- a/www/iridium/files/patch-media_base_media__switches.h +++ b/www/iridium/files/patch-media_base_media__switches.h @@ -1,57 +1,57 @@ ---- media/base/media_switches.h.orig 2025-11-06 10:11:34 UTC +--- media/base/media_switches.h.orig 2025-12-10 15:04:57 UTC +++ media/base/media_switches.h -@@ -342,13 +342,25 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kMediaRecorderHEVCSu +@@ -334,13 +334,25 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kMediaRecorderHEVCSu MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlaybackSpeedButton); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMediaEngagementData); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMetadataSuspend); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForCast); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForScreenShare); + +enum class AudioBackend { + kAuto, + kPulseAudio, + kSndio, + kAlsa +}; + +MEDIA_EXPORT BASE_DECLARE_FEATURE(kAudioBackend); +MEDIA_EXPORT extern const base::FeatureParam< + AudioBackend> + kAudioBackendParam; #endif // BUILDFLAG(IS_LINUX) MEDIA_EXPORT BASE_DECLARE_FEATURE(kRecordMediaEngagementScores); MEDIA_EXPORT BASE_DECLARE_FEATURE(kRecordWebAudioEngagement); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kReduceHardwareVideoDecoderBuffers); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) MEDIA_EXPORT BASE_DECLARE_FEATURE(kResumeBackgroundVideo); -@@ -366,7 +378,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUnifiedAutoplay); +@@ -358,7 +370,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUnifiedAutoplay); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseAndroidOverlayForSecureOnly); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseFakeDeviceForMediaStream); MEDIA_EXPORT BASE_DECLARE_FEATURE(kMediaStreamAccurateDroppedFrameCount); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kAcceleratedVideoDecodeLinux); MEDIA_EXPORT BASE_DECLARE_FEATURE(kAcceleratedVideoDecodeLinuxGL); MEDIA_EXPORT BASE_DECLARE_FEATURE(kAcceleratedVideoEncodeLinux); -@@ -382,7 +394,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiAV1TemporalLay +@@ -374,7 +386,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiAV1TemporalLay MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9SModeHWEncoding); MEDIA_EXPORT BASE_DECLARE_FEATURE(kVSyncMjpegDecoding); #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2H264TemporalLayerHWEncoding); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) MEDIA_EXPORT BASE_DECLARE_FEATURE(kVideoBlitColorAccuracy); -@@ -501,7 +513,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kBackgroundListening - MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoDecoding); +@@ -478,7 +490,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVide + MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseSharedImageInOOPVDProcess); #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/iridium/files/patch-media_base_video__frame.cc b/www/iridium/files/patch-media_base_video__frame.cc index 11cf1f79023e..134f53b46c3c 100644 --- a/www/iridium/files/patch-media_base_video__frame.cc +++ b/www/iridium/files/patch-media_base_video__frame.cc @@ -1,47 +1,47 @@ ---- media/base/video_frame.cc.orig 2025-11-06 10:11:34 UTC +--- media/base/video_frame.cc.orig 2025-12-10 15:04:57 UTC +++ media/base/video_frame.cc -@@ -86,7 +86,7 @@ std::string VideoFrame::StorageTypeToString( +@@ -85,7 +85,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 -@@ -100,7 +100,7 @@ std::string VideoFrame::StorageTypeToString( +@@ -99,7 +99,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 && -@@ -395,7 +395,7 @@ scoped_refptr VideoFrame::CreateFrameForMa +@@ -503,7 +503,7 @@ scoped_refptr VideoFrame::WrapMappableShar plane_size.width() * VideoFrame::BytesPerElement(*format, plane); } uint64_t modifier = gfx::NativePixmapHandle::kNoModifier; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool is_native_buffer = !shared_image->IsSharedMemoryForVideoFrame(); if (is_native_buffer) { const auto gmb_handle = shared_image->CloneGpuMemoryBufferHandle(); -@@ -852,7 +852,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM +@@ -800,7 +800,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM } #endif -#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, -@@ -1539,7 +1539,7 @@ scoped_refptr VideoFrame::shar +@@ -1492,7 +1492,7 @@ scoped_refptr VideoFrame::shar return wrapped_frame_ ? wrapped_frame_->shared_image() : shared_image_; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) size_t VideoFrame::NumDmabufFds() const { if (wrapped_frame_) { return wrapped_frame_->NumDmabufFds(); diff --git a/www/iridium/files/patch-media_base_video__frame.h b/www/iridium/files/patch-media_base_video__frame.h index 14d0a7512a3a..8bc077c3bae7 100644 --- a/www/iridium/files/patch-media_base_video__frame.h +++ b/www/iridium/files/patch-media_base_video__frame.h @@ -1,47 +1,47 @@ ---- media/base/video_frame.h.orig 2025-10-28 14:29:43 UTC +--- media/base/video_frame.h.orig 2025-12-10 15:04:57 UTC +++ media/base/video_frame.h @@ -41,7 +41,7 @@ #include "ui/gfx/geometry/size.h" #include "ui/gfx/hdr_metadata.h" -#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) @@ -95,7 +95,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) STORAGE_DMABUFS = 5, // Each plane is stored into a DmaBuf. #endif STORAGE_GPU_MEMORY_BUFFER = 6, -@@ -370,7 +370,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -348,7 +348,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte base::TimeDelta timestamp); #endif -#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 -@@ -712,7 +712,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -693,7 +693,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // wait for the included sync point. scoped_refptr shared_image() const; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The number of DmaBufs will be equal or less than the number of planes of // the frame. If there are less, this means that the last FD contains the // remaining planes. Should be > 0 for STORAGE_DMABUFS. -@@ -947,7 +947,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -909,7 +909,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // GpuMemoryBuffers. Clients will set this flag while creating a VideoFrame. bool is_mappable_si_enabled_ = false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Dmabufs for the frame, used when storage is STORAGE_DMABUFS. Size is either // equal or less than the number of planes of the frame. If it is less, then // the memory area represented by the last FD contains the remaining planes. diff --git a/www/iridium/files/patch-media_capture_video_create__video__capture__device__factory.cc b/www/iridium/files/patch-media_capture_video_create__video__capture__device__factory.cc index 36d2591728a3..0fe8c5afca8d 100644 --- a/www/iridium/files/patch-media_capture_video_create__video__capture__device__factory.cc +++ b/www/iridium/files/patch-media_capture_video_create__video__capture__device__factory.cc @@ -1,20 +1,20 @@ ---- media/capture/video/create_video_capture_device_factory.cc.orig 2025-09-11 13:19:19 UTC +--- media/capture/video/create_video_capture_device_factory.cc.orig 2025-12-10 15:04:57 UTC +++ media/capture/video/create_video_capture_device_factory.cc @@ -13,7 +13,7 @@ #include "media/capture/video/fake_video_capture_device_factory.h" #include "media/capture/video/file_video_capture_device_factory.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "media/capture/video/linux/video_capture_device_factory_linux.h" #elif BUILDFLAG(IS_CHROMEOS) #include "media/capture/video/chromeos/public/cros_features.h" @@ -56,7 +56,7 @@ CreateFakeVideoCaptureDeviceFactory() { std::unique_ptr CreatePlatformSpecificVideoCaptureDeviceFactory( scoped_refptr ui_task_runner) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return std::make_unique(ui_task_runner); #elif BUILDFLAG(IS_CHROMEOS) if (base::SysInfo::IsRunningOnChromeOS()) diff --git a/www/iridium/files/patch-media_capture_video_fake__video__capture__device__factory.cc b/www/iridium/files/patch-media_capture_video_fake__video__capture__device__factory.cc index 07bb8317488d..025ac3fa3c6a 100644 --- a/www/iridium/files/patch-media_capture_video_fake__video__capture__device__factory.cc +++ b/www/iridium/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 2025-06-19 07:37:57 UTC +--- media/capture/video/fake_video_capture_device_factory.cc.orig 2025-12-10 15:04:57 UTC +++ media/capture/video/fake_video_capture_device_factory.cc @@ -228,7 +228,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/iridium/files/patch-media_capture_video_file__video__capture__device__factory.cc b/www/iridium/files/patch-media_capture_video_file__video__capture__device__factory.cc index 8ac1039bced3..758cd3502241 100644 --- a/www/iridium/files/patch-media_capture_video_file__video__capture__device__factory.cc +++ b/www/iridium/files/patch-media_capture_video_file__video__capture__device__factory.cc @@ -1,11 +1,11 @@ ---- media/capture/video/file_video_capture_device_factory.cc.orig 2025-05-07 06:48:23 UTC +--- media/capture/video/file_video_capture_device_factory.cc.orig 2025-12-10 15:04:57 UTC +++ media/capture/video/file_video_capture_device_factory.cc @@ -52,7 +52,7 @@ void FileVideoCaptureDeviceFactory::GetDevicesInfo( VideoCaptureApi::WIN_DIRECT_SHOW; #elif BUILDFLAG(IS_MAC) VideoCaptureApi::MACOSX_AVFOUNDATION; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE; #else VideoCaptureApi::UNKNOWN; diff --git a/www/iridium/files/patch-media_capture_video_linux_fake__v4l2__impl.cc b/www/iridium/files/patch-media_capture_video_linux_fake__v4l2__impl.cc index 90b051f056ce..67eb5e3b11e0 100644 --- a/www/iridium/files/patch-media_capture_video_linux_fake__v4l2__impl.cc +++ b/www/iridium/files/patch-media_capture_video_linux_fake__v4l2__impl.cc @@ -1,11 +1,11 @@ ---- media/capture/video/linux/fake_v4l2_impl.cc.orig 2025-10-28 14:29:43 UTC +--- media/capture/video/linux/fake_v4l2_impl.cc.orig 2025-12-10 15:04:57 UTC +++ media/capture/video/linux/fake_v4l2_impl.cc @@ -571,7 +571,7 @@ int FakeV4L2Impl::close(int fd) { return kSuccessReturnValue; } -int FakeV4L2Impl::ioctl(int fd, int request, void* argp) { +int FakeV4L2Impl::ioctl(int fd, unsigned long request, void* argp) { base::AutoLock lock(lock_); auto device_iter = opened_devices_.find(fd); if (device_iter == opened_devices_.end()) diff --git a/www/iridium/files/patch-media_capture_video_linux_fake__v4l2__impl.h b/www/iridium/files/patch-media_capture_video_linux_fake__v4l2__impl.h index fbdc3644a319..b6eba5b7322f 100644 --- a/www/iridium/files/patch-media_capture_video_linux_fake__v4l2__impl.h +++ b/www/iridium/files/patch-media_capture_video_linux_fake__v4l2__impl.h @@ -1,25 +1,25 @@ ---- media/capture/video/linux/fake_v4l2_impl.h.orig 2025-05-07 06:48:23 UTC +--- media/capture/video/linux/fake_v4l2_impl.h.orig 2025-12-10 15:04:57 UTC +++ media/capture/video/linux/fake_v4l2_impl.h @@ -8,7 +8,13 @@ #include #include +#include "build/build_config.h" +#if BUILDFLAG(IS_OPENBSD) +#include +typedef __uint32_t __u32; +#else #include +#endif #include "base/synchronization/lock.h" #include "media/capture/capture_export.h" @@ -38,7 +44,7 @@ class CAPTURE_EXPORT FakeV4L2Impl : public V4L2Capture // Implementation of V4L2CaptureDevice interface: int open(const char* device_name, int flags) override; int close(int fd) override; - int ioctl(int fd, int request, void* argp) override; + int ioctl(int fd, unsigned long request, void* argp) override; void* mmap(void* start, size_t length, int prot, diff --git a/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc b/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc index 4bf35a29ba18..e6566294e2ee 100644 --- a/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc +++ b/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc @@ -1,156 +1,156 @@ ---- media/capture/video/linux/v4l2_capture_delegate.cc.orig 2025-09-11 13:19:19 UTC +--- media/capture/video/linux/v4l2_capture_delegate.cc.orig 2025-12-10 15:04:57 UTC +++ media/capture/video/linux/v4l2_capture_delegate.cc @@ -10,8 +10,10 @@ #include "media/capture/video/linux/v4l2_capture_delegate.h" #include +#if !BUILDFLAG(IS_BSD) #include #include +#endif #include #include #include @@ -35,17 +37,19 @@ #include "media/capture/video/blob_utils.h" #include "media/capture/video/linux/video_capture_device_linux.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "media/capture/capture_switches.h" #include "media/capture/video/linux/v4l2_capture_delegate_gpu_helper.h" #endif // BUILDFLAG(IS_LINUX) using media::mojom::MeteringMode; +#if !BUILDFLAG(IS_BSD) #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) // 16 bit depth, Realsense F200. #define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') #endif +#endif // TODO(aleksandar.stojiljkovic): Wrap this with kernel version check once the // format is introduced to kernel. @@ -55,6 +59,14 @@ using media::mojom::MeteringMode; #define V4L2_PIX_FMT_INVZ v4l2_fourcc('I', 'N', 'V', 'Z') #endif +#ifndef V4L2_COLORSPACE_OPRGB +#define V4L2_COLORSPACE_OPRGB V4L2_COLORSPACE_ADOBERGB +#endif + +#ifndef V4L2_XFER_FUNC_OPRGB +#define V4L2_XFER_FUNC_OPRGB V4L2_XFER_FUNC_ADOBERGB +#endif + namespace media { namespace { @@ -274,7 +286,7 @@ bool V4L2CaptureDelegate::IsBlockedControl(int control // static bool V4L2CaptureDelegate::IsControllableControl( int control_id, - const base::RepeatingCallback& do_ioctl) { + const base::RepeatingCallback& do_ioctl) { const int special_control_id = GetControllingSpecialControl(control_id); if (!special_control_id) { // The control is not controlled by a special control thus the control is @@ -330,7 +342,7 @@ V4L2CaptureDelegate::V4L2CaptureDelegate( is_capturing_(false), timeout_count_(0), rotation_(rotation) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) use_gpu_buffer_ = switches::IsVideoCaptureUseGpuMemoryBufferEnabled(); #endif // BUILDFLAG(IS_LINUX) } @@ -457,7 +469,7 @@ void V4L2CaptureDelegate::AllocateAndStart( client_->OnStarted(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (use_gpu_buffer_) { v4l2_gpu_helper_ = std::make_unique(); } @@ -801,7 +813,7 @@ base::WeakPtr V4L2CaptureDelegate V4L2CaptureDelegate::~V4L2CaptureDelegate() = default; -bool V4L2CaptureDelegate::RunIoctl(int request, void* argp) { +bool V4L2CaptureDelegate::RunIoctl(unsigned int request, void* argp) { int num_retries = 0; for (; DoIoctl(request, argp) < 0 && num_retries < kMaxIOCtrlRetries; ++num_retries) { @@ -811,7 +823,7 @@ bool V4L2CaptureDelegate::RunIoctl(int request, void* return num_retries != kMaxIOCtrlRetries; } -int V4L2CaptureDelegate::DoIoctl(int request, void* argp) { +int V4L2CaptureDelegate::DoIoctl(unsigned int request, void* argp) { return HANDLE_EINTR(v4l2_->ioctl(device_fd_.get(), request, argp)); } @@ -822,6 +834,7 @@ bool V4L2CaptureDelegate::IsControllableControl(int co } void V4L2CaptureDelegate::ReplaceControlEventSubscriptions() { +#if !BUILDFLAG(IS_BSD) constexpr uint32_t kControlIds[] = {V4L2_CID_AUTO_EXPOSURE_BIAS, V4L2_CID_AUTO_WHITE_BALANCE, V4L2_CID_BRIGHTNESS, @@ -849,6 +862,7 @@ void V4L2CaptureDelegate::ReplaceControlEventSubscript << ", {type = V4L2_EVENT_CTRL, id = " << control_id << "}"; } } +#endif } mojom::RangePtr V4L2CaptureDelegate::RetrieveUserControlRange(int control_id) { @@ -1029,7 +1043,11 @@ void V4L2CaptureDelegate::DoCapture() { pollfd device_pfd = {}; device_pfd.fd = device_fd_.get(); +#if !BUILDFLAG(IS_BSD) device_pfd.events = POLLIN | POLLPRI; +#else + device_pfd.events = POLLIN; +#endif const int result = HANDLE_EINTR(v4l2_->poll(&device_pfd, 1, kCaptureTimeoutMs)); @@ -1067,6 +1085,7 @@ void V4L2CaptureDelegate::DoCapture() { timeout_count_ = 0; } +#if !BUILDFLAG(IS_BSD) // Dequeue events if the driver has filled in some. if (device_pfd.revents & POLLPRI) { bool controls_changed = false; @@ -1100,6 +1119,7 @@ void V4L2CaptureDelegate::DoCapture() { client_->OnCaptureConfigurationChanged(); } } +#endif // Deenqueue, send and reenqueue a buffer if the driver has filled one in. if (device_pfd.revents & POLLIN) { @@ -1153,7 +1173,7 @@ void V4L2CaptureDelegate::DoCapture() { // workable on Linux. // See http://crbug.com/959919. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (use_gpu_buffer_) { v4l2_gpu_helper_->OnIncomingCapturedData( client_.get(), buffer_tracker->start(), @@ -1227,7 +1247,7 @@ void V4L2CaptureDelegate::SetErrorState(VideoCaptureEr client_->OnError(error, from_here, reason); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gfx::ColorSpace V4L2CaptureDelegate::BuildColorSpaceFromv4l2() { v4l2_colorspace v4l2_primary = (v4l2_colorspace)video_fmt_.fmt.pix.colorspace; v4l2_quantization v4l2_range = diff --git a/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__delegate.h b/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__delegate.h index 340f0bf13255..ad9b03d3a926 100644 --- a/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__delegate.h +++ b/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__delegate.h @@ -1,51 +1,51 @@ ---- media/capture/video/linux/v4l2_capture_delegate.h.orig 2025-05-07 06:48:23 UTC +--- media/capture/video/linux/v4l2_capture_delegate.h.orig 2025-12-10 15:04:57 UTC +++ media/capture/video/linux/v4l2_capture_delegate.h @@ -34,7 +34,7 @@ class Location; namespace media { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class V4L2CaptureDelegateGpuHelper; #endif // BUILDFLAG(IS_LINUX) @@ -85,7 +85,7 @@ class CAPTURE_EXPORT V4L2CaptureDelegate final { static bool IsBlockedControl(int control_id); static bool IsControllableControl( int control_id, - const base::RepeatingCallback& do_ioctl); + const base::RepeatingCallback& do_ioctl); private: friend class V4L2CaptureDelegateTest; @@ -96,10 +96,10 @@ class CAPTURE_EXPORT V4L2CaptureDelegate final { // device file descriptor or (re)starting streaming, can fail but works after // retrying (https://crbug.com/670262). Returns false if the |request| ioctl // fails too many times. - bool RunIoctl(int request, void* argp); + bool RunIoctl(unsigned int request, void* argp); // Simple wrapper to do HANDLE_EINTR(v4l2_->ioctl(device_fd_.get(), ...)). - int DoIoctl(int request, void* argp); + int DoIoctl(unsigned int request, void* argp); // Check whether the control is controllable (and not changed automatically). bool IsControllableControl(int control_id); @@ -129,7 +129,7 @@ class CAPTURE_EXPORT V4L2CaptureDelegate final { const base::Location& from_here, const std::string& reason); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Systems which describe a "color space" usually map that to one or more of // {primary, matrix, transfer, range}. BuildColorSpaceFromv4l2() will use the // matched value as first priority. Otherwise, if there is no best matching @@ -163,7 +163,7 @@ class CAPTURE_EXPORT V4L2CaptureDelegate final { // Clockwise rotation in degrees. This value should be 0, 90, 180, or 270. int rotation_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Support GPU memory buffer. bool use_gpu_buffer_; std::unique_ptr v4l2_gpu_helper_; diff --git a/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__device.h b/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__device.h index 480b70d44df0..738ad9c840f8 100644 --- a/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__device.h +++ b/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__device.h @@ -1,11 +1,11 @@ ---- media/capture/video/linux/v4l2_capture_device.h.orig 2025-05-07 06:48:23 UTC +--- media/capture/video/linux/v4l2_capture_device.h.orig 2025-12-10 15:04:57 UTC +++ media/capture/video/linux/v4l2_capture_device.h @@ -23,7 +23,7 @@ class CAPTURE_EXPORT V4L2CaptureDevice virtual int open(const char* device_name, int flags) = 0; virtual int close(int fd) = 0; - virtual int ioctl(int fd, int request, void* argp) = 0; + virtual int ioctl(int fd, unsigned long request, void* argp) = 0; virtual void* mmap(void* start, size_t length, int prot, diff --git a/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__device__impl.cc b/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__device__impl.cc index eb712e6a3148..9069b9ad1902 100644 --- a/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__device__impl.cc +++ b/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__device__impl.cc @@ -1,11 +1,11 @@ ---- media/capture/video/linux/v4l2_capture_device_impl.cc.orig 2025-05-07 06:48:23 UTC +--- media/capture/video/linux/v4l2_capture_device_impl.cc.orig 2025-12-10 15:04:57 UTC +++ media/capture/video/linux/v4l2_capture_device_impl.cc @@ -22,7 +22,7 @@ int V4L2CaptureDeviceImpl::close(int fd) { return ::close(fd); } -int V4L2CaptureDeviceImpl::ioctl(int fd, int request, void* argp) { +int V4L2CaptureDeviceImpl::ioctl(int fd, unsigned long request, void* argp) { return ::ioctl(fd, request, argp); } diff --git a/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__device__impl.h b/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__device__impl.h index 00ed40868bc0..ac4f64badef7 100644 --- a/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__device__impl.h +++ b/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__device__impl.h @@ -1,11 +1,11 @@ ---- media/capture/video/linux/v4l2_capture_device_impl.h.orig 2025-05-07 06:48:23 UTC +--- media/capture/video/linux/v4l2_capture_device_impl.h.orig 2025-12-10 15:04:57 UTC +++ media/capture/video/linux/v4l2_capture_device_impl.h @@ -19,7 +19,7 @@ class CAPTURE_EXPORT V4L2CaptureDeviceImpl : public V4 public: int open(const char* device_name, int flags) override; int close(int fd) override; - int ioctl(int fd, int request, void* argp) override; + int ioctl(int fd, unsigned long request, void* argp) override; void* mmap(void* start, size_t length, int prot, diff --git a/www/iridium/files/patch-media_capture_video_linux_video__capture__device__factory__v4l2.cc b/www/iridium/files/patch-media_capture_video_linux_video__capture__device__factory__v4l2.cc index da9abf1f55b5..dd36f4778a98 100644 --- a/www/iridium/files/patch-media_capture_video_linux_video__capture__device__factory__v4l2.cc +++ b/www/iridium/files/patch-media_capture_video_linux_video__capture__device__factory__v4l2.cc @@ -1,80 +1,80 @@ ---- media/capture/video/linux/video_capture_device_factory_v4l2.cc.orig 2025-09-11 13:19:19 UTC +--- media/capture/video/linux/video_capture_device_factory_v4l2.cc.orig 2025-12-10 15:04:57 UTC +++ media/capture/video/linux/video_capture_device_factory_v4l2.cc @@ -44,6 +44,7 @@ bool CompareCaptureDevices(const VideoCaptureDeviceInf return a.descriptor < b.descriptor; } +#if !BUILDFLAG(IS_OPENBSD) // USB VID and PID are both 4 bytes long. const size_t kVidPidSize = 4; const size_t kMaxInterfaceNameSize = 256; @@ -76,11 +77,24 @@ std::string ExtractFileNameFromDeviceId(const std::str DCHECK(base::StartsWith(device_id, kDevDir, base::CompareCase::SENSITIVE)); return device_id.substr(strlen(kDevDir), device_id.length()); } +#endif class DevVideoFilePathsDeviceProvider : public VideoCaptureDeviceFactoryV4L2::DeviceProvider { public: void GetDeviceIds(std::vector* target_container) override { +#if BUILDFLAG(IS_OPENBSD) + char device[12]; + int fd; + /* unveil(2) limits access to /dev/, try /dev/video[0-7] */ + for (int n = 0; n < 8; n++) { + snprintf(device, sizeof(device), "/dev/video%d", n); + if ((fd = open(device, O_RDONLY)) != -1) { + close(fd); + target_container->emplace_back(device); + } + } +#else const base::FilePath path("/dev/"); base::FileEnumerator enumerator(path, false, base::FileEnumerator::FILES, "video*"); @@ -88,9 +102,13 @@ class DevVideoFilePathsDeviceProvider const base::FileEnumerator::FileInfo info = enumerator.GetInfo(); target_container->emplace_back(path.value() + info.GetName().value()); } +#endif } std::string GetDeviceModelId(const std::string& device_id) override { +#if BUILDFLAG(IS_OPENBSD) + return std::string(); +#else const std::string file_name = ExtractFileNameFromDeviceId(device_id); std::string usb_id; const std::string vid_path = @@ -107,9 +125,13 @@ class DevVideoFilePathsDeviceProvider } return usb_id; +#endif } std::string GetDeviceDisplayName(const std::string& device_id) override { +#if BUILDFLAG(IS_OPENBSD) + return std::string(); +#else const std::string file_name = ExtractFileNameFromDeviceId(device_id); const std::string interface_path = base::StringPrintf(kInterfacePathTemplate, file_name.c_str()); @@ -120,6 +142,7 @@ class DevVideoFilePathsDeviceProvider return std::string(); } return display_name; +#endif } }; @@ -225,7 +248,7 @@ void VideoCaptureDeviceFactoryV4L2::GetDevicesInfo( std::move(callback).Run(std::move(devices_info)); } -int VideoCaptureDeviceFactoryV4L2::DoIoctl(int fd, int request, void* argp) { +int VideoCaptureDeviceFactoryV4L2::DoIoctl(int fd, unsigned int request, void* argp) { return HANDLE_EINTR(v4l2_->ioctl(fd, request, argp)); } diff --git a/www/iridium/files/patch-media_capture_video_linux_video__capture__device__factory__v4l2.h b/www/iridium/files/patch-media_capture_video_linux_video__capture__device__factory__v4l2.h index 42d3b6bd7131..75eefe8b87f6 100644 --- a/www/iridium/files/patch-media_capture_video_linux_video__capture__device__factory__v4l2.h +++ b/www/iridium/files/patch-media_capture_video_linux_video__capture__device__factory__v4l2.h @@ -1,11 +1,11 @@ ---- media/capture/video/linux/video_capture_device_factory_v4l2.h.orig 2025-05-07 06:48:23 UTC +--- media/capture/video/linux/video_capture_device_factory_v4l2.h.orig 2025-12-10 15:04:57 UTC +++ media/capture/video/linux/video_capture_device_factory_v4l2.h @@ -51,7 +51,7 @@ class CAPTURE_EXPORT VideoCaptureDeviceFactoryV4L2 private: // Simple wrapper to do HANDLE_EINTR(v4l2_->ioctl(fd, ...)). - int DoIoctl(int fd, int request, void* argp); + int DoIoctl(int fd, unsigned int request, void* argp); VideoCaptureControlSupport GetControlSupport(int fd); bool GetControlSupport(int fd, int control_id); diff --git a/www/iridium/files/patch-media_capture_video_video__capture__buffer__tracker__factory__impl.cc b/www/iridium/files/patch-media_capture_video_video__capture__buffer__tracker__factory__impl.cc index 7e1982fb6afb..d34bf0920b05 100644 --- a/www/iridium/files/patch-media_capture_video_video__capture__buffer__tracker__factory__impl.cc +++ b/www/iridium/files/patch-media_capture_video_video__capture__buffer__tracker__factory__impl.cc @@ -1,20 +1,20 @@ ---- media/capture/video/video_capture_buffer_tracker_factory_impl.cc.orig 2025-05-07 06:48:23 UTC +--- media/capture/video/video_capture_buffer_tracker_factory_impl.cc.orig 2025-12-10 15:04:57 UTC +++ media/capture/video/video_capture_buffer_tracker_factory_impl.cc @@ -13,7 +13,7 @@ #include "media/capture/video/chromeos/gpu_memory_buffer_tracker_cros.h" #elif BUILDFLAG(IS_APPLE) #include "media/capture/video/apple/gpu_memory_buffer_tracker_apple.h" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "media/capture/video/linux/v4l2_gpu_memory_buffer_tracker.h" #elif BUILDFLAG(IS_WIN) #include "media/capture/video/win/gpu_memory_buffer_tracker_win.h" @@ -41,7 +41,7 @@ VideoCaptureBufferTrackerFactoryImpl::CreateTracker( return std::make_unique(); #elif BUILDFLAG(IS_APPLE) return std::make_unique(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return std::make_unique(); #elif BUILDFLAG(IS_WIN) if (!dxgi_device_manager_) { diff --git a/www/iridium/files/patch-media_capture_video_video__capture__device__client.cc b/www/iridium/files/patch-media_capture_video_video__capture__device__client.cc index 4438947bbe24..989597506759 100644 --- a/www/iridium/files/patch-media_capture_video_video__capture__device__client.cc +++ b/www/iridium/files/patch-media_capture_video_video__capture__device__client.cc @@ -1,11 +1,11 @@ ---- media/capture/video/video_capture_device_client.cc.orig 2025-11-06 10:11:34 UTC +--- media/capture/video/video_capture_device_client.cc.orig 2025-12-10 15:04:57 UTC +++ media/capture/video/video_capture_device_client.cc -@@ -167,7 +167,7 @@ FourccAndFlip GetFourccAndFlipFromPixelFormat( +@@ -168,7 +168,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/iridium/files/patch-media_cdm_cdm__paths__unittest.cc b/www/iridium/files/patch-media_cdm_cdm__paths__unittest.cc index d35d5e2916a6..730603e69670 100644 --- a/www/iridium/files/patch-media_cdm_cdm__paths__unittest.cc +++ b/www/iridium/files/patch-media_cdm_cdm__paths__unittest.cc @@ -1,11 +1,11 @@ ---- media/cdm/cdm_paths_unittest.cc.orig 2025-05-07 06:48:23 UTC +--- media/cdm/cdm_paths_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ media/cdm/cdm_paths_unittest.cc @@ -26,7 +26,7 @@ const char kComponentPlatform[] = "win"; #elif BUILDFLAG(IS_CHROMEOS) "cros"; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) "linux"; #elif BUILDFLAG(IS_FUCHSIA) "fuchsia"; diff --git a/www/iridium/files/patch-media_cdm_library__cdm_cdm__paths.gni b/www/iridium/files/patch-media_cdm_library__cdm_cdm__paths.gni index 86f4bc40074d..5af009149bd4 100644 --- a/www/iridium/files/patch-media_cdm_library__cdm_cdm__paths.gni +++ b/www/iridium/files/patch-media_cdm_library__cdm_cdm__paths.gni @@ -1,11 +1,11 @@ ---- media/cdm/library_cdm/cdm_paths.gni.orig 2025-05-07 06:48:23 UTC +--- media/cdm/library_cdm/cdm_paths.gni.orig 2025-12-10 15:04:57 UTC +++ media/cdm/library_cdm/cdm_paths.gni @@ -14,7 +14,7 @@ assert(enable_library_cdms) # Explicitly define what we use to avoid confusion. if (is_chromeos) { component_os = "cros" -} else if (is_linux) { +} else if (is_linux || is_bsd) { component_os = "linux" } else if (is_win) { component_os = "win" diff --git a/www/iridium/files/patch-media_ffmpeg_scripts_build__ffmpeg.py b/www/iridium/files/patch-media_ffmpeg_scripts_build__ffmpeg.py index f02ec1dd731d..e1007d4b300b 100644 --- a/www/iridium/files/patch-media_ffmpeg_scripts_build__ffmpeg.py +++ b/www/iridium/files/patch-media_ffmpeg_scripts_build__ffmpeg.py @@ -1,66 +1,66 @@ ---- media/ffmpeg/scripts/build_ffmpeg.py.orig 2025-09-11 13:19:19 UTC +--- media/ffmpeg/scripts/build_ffmpeg.py.orig 2025-12-10 15:04:57 UTC +++ media/ffmpeg/scripts/build_ffmpeg.py @@ -33,7 +33,7 @@ NDK_ROOT_DIR = os.path.abspath( SUCCESS_TOKEN = 'THIS_BUILD_WORKED' sys.path.append(os.path.join(CHROMIUM_ROOT_DIR, 'build')) -import gn_helpers +#import gn_helpers BRANDINGS = [ 'Chrome', @@ -43,6 +43,8 @@ BRANDINGS = [ ARCH_MAP = { 'android': ['ia32', 'x64', 'arm-neon', 'arm64'], 'linux': ['ia32', 'x64', 'noasm-x64', 'arm', 'arm-neon', 'arm64', 'riscv64'], + 'openbsd': ['x64', 'arm64', 'ia32'], + 'freebsd': ['x64', 'arm64', 'ia32'], 'mac': ['x64', 'arm64'], 'win': ['ia32', 'x64', 'arm64'], } @@ -124,7 +126,7 @@ def PrintAndCheckCall(argv, *args, **kwargs): def GetDsoName(target_os, dso_name, dso_version): - if target_os in ('linux', 'linux-noasm', 'android'): + if target_os in ('linux', 'linux-noasm', 'android', 'openbsd', 'freebsd'): return 'lib%s.so.%s' % (dso_name, dso_version) elif target_os == 'mac': return 'lib%s.%s.dylib' % (dso_name, dso_version) @@ -475,7 +477,7 @@ def BuildFFmpeg(target_os, target_arch, host_os, host_ # removing soon, so this is needed to silence a deprecation # #warning which will be converted to an error via -Werror. # There is also no prctl.h - if target_os in ['linux', 'linux-noasm']: + if target_os in ['linux', 'linux-noasm', 'openbsd', 'freebsd']: pre_make_rewrites += [ (r'(#define HAVE_SYSCTL [01])', r'#define HAVE_SYSCTL 0 /* \1 -- forced to 0 for Fuchsia */'), @@ -598,7 +600,7 @@ def main(argv): configure_args = args[2:] if target_os not in ('android', 'linux', 'linux-noasm', 'mac', 'win', - 'all'): + 'all', 'openbsd', 'freebsd'): parser.print_help() return 1 @@ -712,7 +714,7 @@ def ConfigureAndBuild(target_arch, target_os, host_os, '--optflags="-O2"', ]) - if target_os in ('linux', 'linux-noasm', 'android'): + if target_os in ('linux', 'linux-noasm', 'android', 'openbsd', 'freebsd'): if target_arch == 'x64': if target_os == 'android': configure_flags['Common'].extend([ @@ -827,9 +829,6 @@ def ConfigureAndBuild(target_arch, target_os, host_os, configure_flags['Common'].extend([ '--target-os=linux', - '--sysroot=' + - os.path.join(CHROMIUM_ROOT_DIR, - 'build/linux/debian_bullseye_arm64-sysroot'), # See crbug.com/1467681. These could be removed eventually '--disable-dotprod', '--disable-i8mm', diff --git a/www/iridium/files/patch-media_ffmpeg_scripts_robo__lib_config.py b/www/iridium/files/patch-media_ffmpeg_scripts_robo__lib_config.py index 4ee9a0571977..8467845293f4 100644 --- a/www/iridium/files/patch-media_ffmpeg_scripts_robo__lib_config.py +++ b/www/iridium/files/patch-media_ffmpeg_scripts_robo__lib_config.py @@ -1,56 +1,56 @@ ---- media/ffmpeg/scripts/robo_lib/config.py.orig 2025-09-11 13:19:19 UTC +--- media/ffmpeg/scripts/robo_lib/config.py.orig 2025-12-10 15:04:57 UTC +++ media/ffmpeg/scripts/robo_lib/config.py @@ -56,19 +56,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.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 @@ -187,9 +181,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" @@ -230,6 +224,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()}") @@ -238,8 +236,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/iridium/files/patch-media_gpu_chromeos_gl__image__processor__backend.cc b/www/iridium/files/patch-media_gpu_chromeos_gl__image__processor__backend.cc index 845c2d0496d9..38dc54bab539 100644 --- a/www/iridium/files/patch-media_gpu_chromeos_gl__image__processor__backend.cc +++ b/www/iridium/files/patch-media_gpu_chromeos_gl__image__processor__backend.cc @@ -1,13 +1,13 @@ ---- media/gpu/chromeos/gl_image_processor_backend.cc.orig 2025-05-07 06:48:23 UTC +--- media/gpu/chromeos/gl_image_processor_backend.cc.orig 2025-12-10 15:04:57 UTC +++ media/gpu/chromeos/gl_image_processor_backend.cc -@@ -28,6 +28,10 @@ +@@ -29,6 +29,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/iridium/files/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc b/www/iridium/files/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc index 1d0222ae30d4..b827df92c9ac 100644 --- a/www/iridium/files/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc +++ b/www/iridium/files/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc @@ -1,29 +1,29 @@ ---- media/gpu/chromeos/libyuv_image_processor_backend.cc.orig 2025-05-07 06:48:23 UTC +--- media/gpu/chromeos/libyuv_image_processor_backend.cc.orig 2025-12-10 15:04:57 UTC +++ media/gpu/chromeos/libyuv_image_processor_backend.cc @@ -53,7 +53,7 @@ static constexpr struct { #define CONV(in, out, trans, result) \ {Fourcc::in, Fourcc::out, Transform::trans, SupportResult::result} // Conversion. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) CONV(NV12, AR24, kConversion, Supported), #endif CONV(NV12, NV12, kConversion, Supported), @@ -412,7 +412,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Fr fr->GetWritableVisibleData(VideoFrame::Plane::kUV)), \ fr->stride(VideoFrame::Plane::kUV) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define ARGB_DATA(fr) \ fr->GetWritableVisibleData(VideoFrame::Plane::kARGB), \ fr->stride(VideoFrame::Plane::kARGB) @@ -574,7 +574,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Fr } } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (output->format() == PIXEL_FORMAT_ARGB) { if (input_config_.fourcc == Fourcc(Fourcc::NV12)) { return LIBYUV_FUNC(NV12ToARGB, Y_UV_DATA(input), diff --git a/www/iridium/files/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc b/www/iridium/files/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc index 4b57bb3eefff..0605e269d776 100644 --- a/www/iridium/files/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc +++ b/www/iridium/files/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc @@ -1,11 +1,11 @@ ---- media/gpu/chromeos/mailbox_video_frame_converter.cc.orig 2025-11-06 10:11:34 UTC +--- media/gpu/chromeos/mailbox_video_frame_converter.cc.orig 2025-12-10 15:04:57 UTC +++ media/gpu/chromeos/mailbox_video_frame_converter.cc @@ -226,7 +226,7 @@ MailboxVideoFrameConverter::GenerateSharedImage( VideoPixelFormatToString(origin_frame->format())); return nullptr; } -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If format is true multiplanar format, we prefer external sampler on // ChromeOS and Linux. if (si_format->is_multi_plane()) { diff --git a/www/iridium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc b/www/iridium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc index 3d144e4239cb..b04a41f74196 100644 --- a/www/iridium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc +++ b/www/iridium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc @@ -1,20 +1,20 @@ ---- media/gpu/chromeos/platform_video_frame_utils.cc.orig 2025-10-28 14:29:43 UTC +--- media/gpu/chromeos/platform_video_frame_utils.cc.orig 2025-12-10 15:04:57 UTC +++ media/gpu/chromeos/platform_video_frame_utils.cc -@@ -71,7 +71,7 @@ static std::unique_ptr CreateGbmDevice( +@@ -70,7 +70,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 -@@ -176,7 +176,7 @@ class GbmDeviceWrapper { +@@ -175,7 +175,7 @@ class GbmDeviceWrapper { const base::FilePath dev_path( base::CommandLine::ForCurrentProcess()->GetSwitchValuePath( switches::kRenderNodeOverride)); -#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(dev_path.value(), "render"); // TODO(b/313513760): don't guard base::File::FLAG_WRITE behind diff --git a/www/iridium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc b/www/iridium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc index 806e9ebccd8f..2ab645a12882 100644 --- a/www/iridium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc +++ b/www/iridium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc @@ -1,29 +1,29 @@ ---- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2025-06-19 07:37:57 UTC +--- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2025-12-10 15:04:57 UTC +++ media/gpu/chromeos/video_decoder_pipeline.cc -@@ -1128,7 +1128,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1132,7 +1132,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()); -@@ -1137,7 +1137,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1141,7 +1141,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 -@@ -1311,7 +1311,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1315,7 +1315,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/iridium/files/patch-media_gpu_gpu__video__decode__accelerator__factory.cc b/www/iridium/files/patch-media_gpu_gpu__video__decode__accelerator__factory.cc index 6af0aad32ad1..9de918d3a466 100644 --- a/www/iridium/files/patch-media_gpu_gpu__video__decode__accelerator__factory.cc +++ b/www/iridium/files/patch-media_gpu_gpu__video__decode__accelerator__factory.cc @@ -1,20 +1,20 @@ ---- media/gpu/gpu_video_decode_accelerator_factory.cc.orig 2025-05-07 06:48:23 UTC +--- media/gpu/gpu_video_decode_accelerator_factory.cc.orig 2025-12-10 15:04:57 UTC +++ media/gpu/gpu_video_decode_accelerator_factory.cc @@ -13,7 +13,7 @@ #include "media/gpu/media_gpu_export.h" #include "media/media_buildflags.h" -#if BUILDFLAG(USE_V4L2_CODEC) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(USE_V4L2_CODEC) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) #include "media/gpu/v4l2/legacy/v4l2_video_decode_accelerator.h" #include "media/gpu/v4l2/v4l2_device.h" #endif @@ -29,7 +29,7 @@ GpuVideoDecodeAcceleratorFactory::CreateVDA( if (gpu_preferences.disable_accelerated_video_decode) return nullptr; -#if BUILDFLAG(USE_V4L2_CODEC) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(USE_V4L2_CODEC) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) std::unique_ptr vda; vda.reset(new V4L2VideoDecodeAccelerator(base::MakeRefCounted())); diff --git a/www/iridium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc b/www/iridium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc index 70ff7109e5db..e893578ceb91 100644 --- a/www/iridium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc +++ b/www/iridium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc @@ -1,20 +1,20 @@ ---- media/gpu/gpu_video_encode_accelerator_factory.cc.orig 2025-11-06 10:11:34 UTC +--- media/gpu/gpu_video_encode_accelerator_factory.cc.orig 2025-12-10 15:04:57 UTC +++ media/gpu/gpu_video_encode_accelerator_factory.cc @@ -160,7 +160,7 @@ std::vector GetVEAFactoryFunctions } #if BUILDFLAG(USE_VAAPI) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(kAcceleratedVideoEncodeLinux)) { vea_factory_functions->push_back(base::BindRepeating(&CreateVaapiVEA)); } @@ -168,7 +168,7 @@ std::vector GetVEAFactoryFunctions vea_factory_functions->push_back(base::BindRepeating(&CreateVaapiVEA)); #endif #elif BUILDFLAG(USE_V4L2_CODEC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(kAcceleratedVideoEncodeLinux)) { vea_factory_functions->push_back(base::BindRepeating(&CreateV4L2VEA)); } diff --git a/www/iridium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc b/www/iridium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc index e51170c64625..d93345d6c21d 100644 --- a/www/iridium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc +++ b/www/iridium/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 2025-09-11 13:19:19 UTC +--- media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc.orig 2025-12-10 15:04:57 UTC +++ media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc @@ -17,7 +17,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 @@ -33,6 +35,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) { @@ -180,6 +183,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( NOTREACHED(); #endif // BUILDFLAG(USE_V4L2_CODEC) } +#endif } // namespace @@ -195,6 +199,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( // (at least). bool HardwareVideoDecodingPreSandboxHook( sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) using HardwareVideoDecodingProcessPolicy = sandbox::policy::HardwareVideoDecodingProcessPolicy; using PolicyType = @@ -240,6 +245,7 @@ bool HardwareVideoDecodingPreSandboxHook( // |permissions| is empty? sandbox::policy::SandboxLinux::GetInstance()->StartBrokerProcess( command_set, permissions, options); +#endif return true; } diff --git a/www/iridium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h b/www/iridium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h index 685c1bb3cb5e..0ad52d2a3c56 100644 --- a/www/iridium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h +++ b/www/iridium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h @@ -1,16 +1,16 @@ ---- media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h.orig 2025-05-07 06:48:23 UTC +--- media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h.orig 2025-12-10 15:04:57 UTC +++ media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h @@ -5,7 +5,13 @@ #ifndef MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_DECODING_SANDBOX_HOOK_LINUX_H_ #define MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_DECODING_SANDBOX_HOOK_LINUX_H_ +#include "build/build_config.h" + +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif namespace media { diff --git a/www/iridium/files/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc b/www/iridium/files/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc index 80e64e3ae0de..28ef034e5535 100644 --- a/www/iridium/files/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc +++ b/www/iridium/files/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc @@ -1,26 +1,26 @@ ---- media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.cc.orig 2025-05-07 06:48:23 UTC +--- media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.cc.orig 2025-12-10 15:04:57 UTC +++ media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.cc @@ -18,12 +18,15 @@ #include "media/gpu/v4l2/v4l2_device.h" #endif +#if !BUILDFLAG(IS_BSD) using sandbox::syscall_broker::BrokerFilePermission; +#endif namespace media { bool HardwareVideoEncodingPreSandboxHook( sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) sandbox::syscall_broker::BrokerCommandSet command_set; std::vector permissions; @@ -131,6 +134,7 @@ bool HardwareVideoEncodingPreSandboxHook( dlopen("libvulkan.so.1", kDlopenFlags); dlopen("libvulkan_radeon.so", kDlopenFlags); } +#endif #endif return true; } diff --git a/www/iridium/files/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h b/www/iridium/files/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h index 5d41e5f2814a..d0f8e2310de6 100644 --- a/www/iridium/files/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h +++ b/www/iridium/files/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h @@ -1,23 +1,23 @@ ---- media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h.orig 2025-05-07 06:48:23 UTC +--- media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h.orig 2025-12-10 15:04:57 UTC +++ media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h @@ -5,7 +5,13 @@ #ifndef MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_ENCODING_SANDBOX_HOOK_LINUX_H_ #define MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_ENCODING_SANDBOX_HOOK_LINUX_H_ +#include "build/build_config.h" + +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif namespace media { @@ -14,4 +20,4 @@ bool HardwareVideoEncodingPreSandboxHook( } // namespace media -#endif // MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_ENCODING_SANDBOX_HOOK_LINUX_H_ \ No newline at end of file +#endif // MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_ENCODING_SANDBOX_HOOK_LINUX_H_ diff --git a/www/iridium/files/patch-media_gpu_test_raw__video.cc b/www/iridium/files/patch-media_gpu_test_raw__video.cc index e6c21bd0da00..0cc847031889 100644 --- a/www/iridium/files/patch-media_gpu_test_raw__video.cc +++ b/www/iridium/files/patch-media_gpu_test_raw__video.cc @@ -1,11 +1,11 @@ ---- media/gpu/test/raw_video.cc.orig 2025-10-28 14:29:43 UTC +--- media/gpu/test/raw_video.cc.orig 2025-12-10 15:04:57 UTC +++ media/gpu/test/raw_video.cc @@ -64,7 +64,7 @@ std::unique_ptr CreateMemoryMa base::File::FLAG_READ | base::File::FLAG_WRITE // On Windows FLAG_CREATE_ALWAYS will require FLAG_WRITE, and FLAG_APPEND // must not be specified. -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) | base::File::FLAG_APPEND #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ), diff --git a/www/iridium/files/patch-media_gpu_test_video__frame__file__writer.cc b/www/iridium/files/patch-media_gpu_test_video__frame__file__writer.cc index f9307ae01958..5ae170745234 100644 --- a/www/iridium/files/patch-media_gpu_test_video__frame__file__writer.cc +++ b/www/iridium/files/patch-media_gpu_test_video__frame__file__writer.cc @@ -1,11 +1,11 @@ ---- media/gpu/test/video_frame_file_writer.cc.orig 2025-05-07 06:48:23 UTC +--- media/gpu/test/video_frame_file_writer.cc.orig 2025-12-10 15:04:57 UTC +++ media/gpu/test/video_frame_file_writer.cc @@ -25,7 +25,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/codec/png_codec.h" -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-media_gpu_test_video__frame__helpers.cc b/www/iridium/files/patch-media_gpu_test_video__frame__helpers.cc index d2f74f0459d0..39dcbb4a7e39 100644 --- a/www/iridium/files/patch-media_gpu_test_video__frame__helpers.cc +++ b/www/iridium/files/patch-media_gpu_test_video__frame__helpers.cc @@ -1,11 +1,11 @@ ---- media/gpu/test/video_frame_helpers.cc.orig 2025-09-11 13:19:19 UTC +--- media/gpu/test/video_frame_helpers.cc.orig 2025-12-10 15:04:57 UTC +++ media/gpu/test/video_frame_helpers.cc -@@ -23,7 +23,7 @@ - #include "ui/gfx/buffer_format_util.h" +@@ -22,7 +22,7 @@ + #include "third_party/libyuv/include/libyuv.h" #include "ui/gfx/gpu_memory_buffer_handle.h" -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-media_gpu_test_video__frame__validator.cc b/www/iridium/files/patch-media_gpu_test_video__frame__validator.cc index 85cbdebb9cb8..98676b8ddbaf 100644 --- a/www/iridium/files/patch-media_gpu_test_video__frame__validator.cc +++ b/www/iridium/files/patch-media_gpu_test_video__frame__validator.cc @@ -1,11 +1,11 @@ ---- media/gpu/test/video_frame_validator.cc.orig 2025-09-11 13:19:19 UTC +--- media/gpu/test/video_frame_validator.cc.orig 2025-12-10 15:04:57 UTC +++ media/gpu/test/video_frame_validator.cc @@ -29,7 +29,7 @@ #include "media/media_buildflags.h" #include "testing/gtest/include/gtest/gtest.h" -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-media_gpu_v4l2_v4l2__utils.cc b/www/iridium/files/patch-media_gpu_v4l2_v4l2__utils.cc index ad132a2f1b00..bfb02eb9a14f 100644 --- a/www/iridium/files/patch-media_gpu_v4l2_v4l2__utils.cc +++ b/www/iridium/files/patch-media_gpu_v4l2_v4l2__utils.cc @@ -1,20 +1,20 @@ ---- media/gpu/v4l2/v4l2_utils.cc.orig 2025-11-06 10:11:34 UTC +--- media/gpu/v4l2/v4l2_utils.cc.orig 2025-12-10 15:04:57 UTC +++ media/gpu/v4l2/v4l2_utils.cc @@ -18,7 +18,7 @@ #include #include -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include #endif @@ -244,7 +244,7 @@ std::optional V4L2FormatToVideoFrame } const VideoPixelFormat video_format = video_fourcc->ToVideoPixelFormat(); uint64_t modifiers = gfx::NativePixmapHandle::kNoModifier; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (video_fourcc == Fourcc(Fourcc::MM21)) { modifiers = DRM_FORMAT_MOD_MTK_16L_32S_TILE; } diff --git a/www/iridium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc b/www/iridium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc index 97ad0e9f7f12..d6ecefe2562c 100644 --- a/www/iridium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc +++ b/www/iridium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc @@ -1,11 +1,11 @@ ---- media/gpu/vaapi/vaapi_video_decoder.cc.orig 2025-09-11 13:19:19 UTC +--- media/gpu/vaapi/vaapi_video_decoder.cc.orig 2025-12-10 15:04:57 UTC +++ media/gpu/vaapi/vaapi_video_decoder.cc -@@ -787,7 +787,7 @@ void VaapiVideoDecoder::ApplyResolutionChangeWithScree +@@ -786,7 +786,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/iridium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc b/www/iridium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc index adca30aba66a..d2ce13873b0c 100644 --- a/www/iridium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc +++ b/www/iridium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc @@ -1,11 +1,11 @@ ---- media/gpu/vaapi/vaapi_wrapper.cc.orig 2025-10-28 14:29:43 UTC +--- media/gpu/vaapi/vaapi_wrapper.cc.orig 2025-12-10 15:04:57 UTC +++ media/gpu/vaapi/vaapi_wrapper.cc -@@ -85,7 +85,7 @@ +@@ -84,7 +84,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/iridium/files/patch-media_media__options.gni b/www/iridium/files/patch-media_media__options.gni index 3cbdce867c12..2e44570e0f15 100644 --- a/www/iridium/files/patch-media_media__options.gni +++ b/www/iridium/files/patch-media_media__options.gni @@ -1,19 +1,19 @@ ---- media/media_options.gni.orig 2025-09-11 13:19:19 UTC +--- media/media_options.gni.orig 2025-12-10 15:04:57 UTC +++ media/media_options.gni @@ -206,12 +206,15 @@ declare_args() { # Enables runtime selection of ALSA library for audio. use_alsa = false + # Enable runtime selection of sndio(7) + use_sndio = false + # Alsa should be used on all non-Android, non-Mac POSIX systems - with the # exception of CastOS desktop builds. # # TODO(crbug.com/1336055): Remove legacy target_cpu hack used for targeting # desktop Chromecast builds. - if (is_posix && !is_android && !is_apple && + if (is_posix && !is_android && !is_apple && !is_bsd && (!is_castos || (target_cpu == "x86" || target_cpu == "x64") || is_cast_audio_only)) { use_alsa = true diff --git a/www/iridium/files/patch-media_mojo_mojom_BUILD.gn b/www/iridium/files/patch-media_mojo_mojom_BUILD.gn index 331c27fac613..38fde6c8d8b8 100644 --- a/www/iridium/files/patch-media_mojo_mojom_BUILD.gn +++ b/www/iridium/files/patch-media_mojo_mojom_BUILD.gn @@ -1,11 +1,11 @@ ---- media/mojo/mojom/BUILD.gn.orig 2025-11-06 10:11:34 UTC +--- media/mojo/mojom/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ media/mojo/mojom/BUILD.gn -@@ -970,7 +970,7 @@ source_set("test_support") { +@@ -1037,7 +1037,7 @@ source_set("test_support") { sources = [] deps = [] - if (is_linux || is_chromeos) { + if (!is_bsd && (is_linux || is_chromeos)) { sources += [ "buffer_handle_test_util.cc", "buffer_handle_test_util.h", diff --git a/www/iridium/files/patch-media_mojo_mojom_video__frame__mojom__traits.cc b/www/iridium/files/patch-media_mojo_mojom_video__frame__mojom__traits.cc index 65f2d4c08904..93f6a2efe7ce 100644 --- a/www/iridium/files/patch-media_mojo_mojom_video__frame__mojom__traits.cc +++ b/www/iridium/files/patch-media_mojo_mojom_video__frame__mojom__traits.cc @@ -1,38 +1,38 @@ ---- media/mojo/mojom/video_frame_mojom_traits.cc.orig 2025-10-28 14:29:43 UTC +--- media/mojo/mojom/video_frame_mojom_traits.cc.orig 2025-12-10 15:04:57 UTC +++ media/mojo/mojom/video_frame_mojom_traits.cc -@@ -21,7 +21,7 @@ +@@ -22,7 +22,7 @@ #include "ui/gfx/mojom/color_space_mojom_traits.h" #include "ui/gfx/mojom/hdr_metadata_mojom_traits.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/posix/eintr_wrapper.h" #include "media/gpu/buffer_validation.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -182,7 +182,7 @@ media::mojom::VideoFrameDataPtr MakeVideoFrameData( +@@ -183,7 +183,7 @@ media::mojom::VideoFrameDataPtr MakeVideoFrameData( media::mojom::OpaqueVideoFrameData::New()); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (input->storage_type() == media::VideoFrame::STORAGE_DMABUFS) { // Duplicates the DMA buffer FDs to a new vector since this cannot take // ownership of the FDs in |input| due to constness. -@@ -213,7 +213,7 @@ media::mojom::VideoFrameDataPtr MakeVideoFrameData( +@@ -214,7 +214,7 @@ media::mojom::VideoFrameDataPtr MakeVideoFrameData( } // namespace -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // static bool StructTraits< media::mojom::ColorPlaneLayoutDataView, -@@ -445,7 +445,7 @@ bool StructTraits struct StructTraits { diff --git a/www/iridium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc b/www/iridium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc index 668db5df3cbe..aec3e530ff35 100644 --- a/www/iridium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc +++ b/www/iridium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc @@ -1,29 +1,29 @@ ---- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2025-10-28 14:29:43 UTC +--- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2025-12-10 15:04:57 UTC +++ media/video/gpu_memory_buffer_video_frame_pool.cc -@@ -679,7 +679,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa +@@ -677,7 +677,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa } bool is_software_backed_video_frame = !video_frame->HasSharedImage(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) is_software_backed_video_frame &= !video_frame->HasDmaBufs(); #endif -@@ -1080,7 +1080,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo +@@ -1078,7 +1078,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo media::IOSurfaceIsWebGPUCompatible(handle.io_surface().get()); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) is_webgpu_compatible = handle.type == gfx::NATIVE_PIXMAP && handle.native_pixmap_handle().supports_zero_copy_webgpu_import; -@@ -1248,7 +1248,7 @@ GpuMemoryBufferVideoFramePool::PoolImpl::GetOrCreateFr +@@ -1246,7 +1246,7 @@ GpuMemoryBufferVideoFramePool::PoolImpl::GetOrCreateFr si_usage |= gpu::SHARED_IMAGE_USAGE_SCANOUT; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // TODO(crbug.com/40194712): Always add the flag once the // OzoneImageBacking is by default turned on. if (base::CommandLine::ForCurrentProcess()->HasSwitch( diff --git a/www/iridium/files/patch-media_video_renderable__gpu__memory__buffer__video__frame__pool.cc b/www/iridium/files/patch-media_video_renderable__gpu__memory__buffer__video__frame__pool.cc index 119480503dbd..ad84e553b2ae 100644 --- a/www/iridium/files/patch-media_video_renderable__gpu__memory__buffer__video__frame__pool.cc +++ b/www/iridium/files/patch-media_video_renderable__gpu__memory__buffer__video__frame__pool.cc @@ -1,11 +1,11 @@ ---- media/video/renderable_gpu_memory_buffer_video_frame_pool.cc.orig 2025-10-28 14:29:43 UTC +--- media/video/renderable_gpu_memory_buffer_video_frame_pool.cc.orig 2025-12-10 15:04:57 UTC +++ media/video/renderable_gpu_memory_buffer_video_frame_pool.cc @@ -196,7 +196,7 @@ bool FrameResources::Initialize(VideoPixelFormat forma #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) buffer_usage = gfx::BufferUsage::SCANOUT_VEA_CPU_READ; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Linux, GBM_BO_USE_LINEAR (implied by SCANOUT_CPU_READ_WRITE) can // prevent GPU rendering on some drivers, notably NVIDIA's GBM driver, // because it disables GBM_BO_USE_RENDERING. Use SCANOUT instead if diff --git a/www/iridium/files/patch-media_video_video__encode__accelerator__adapter.cc b/www/iridium/files/patch-media_video_video__encode__accelerator__adapter.cc index ecd15d3162a5..2ac0429ea62c 100644 --- a/www/iridium/files/patch-media_video_video__encode__accelerator__adapter.cc +++ b/www/iridium/files/patch-media_video_video__encode__accelerator__adapter.cc @@ -1,11 +1,11 @@ ---- media/video/video_encode_accelerator_adapter.cc.orig 2025-10-28 14:29:43 UTC +--- media/video/video_encode_accelerator_adapter.cc.orig 2025-12-10 15:04:57 UTC +++ media/video/video_encode_accelerator_adapter.cc @@ -468,7 +468,7 @@ void VideoEncodeAcceleratorAdapter::InitializeOnAccele auto format = PIXEL_FORMAT_I420; auto storage_type = VideoEncodeAccelerator::Config::StorageType::kShmem; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Linux/ChromeOS require a special configuration to use dmabuf storage. // We need to keep sending frames with the same storage type. // Other platforms will happily mix GpuMemoryBuffer storage with shared-mem diff --git a/www/iridium/files/patch-media_video_video__encode__accelerator__adapter__test.cc b/www/iridium/files/patch-media_video_video__encode__accelerator__adapter__test.cc index 3471131656d0..275faf158471 100644 --- a/www/iridium/files/patch-media_video_video__encode__accelerator__adapter__test.cc +++ b/www/iridium/files/patch-media_video_video__encode__accelerator__adapter__test.cc @@ -1,38 +1,38 @@ ---- media/video/video_encode_accelerator_adapter_test.cc.orig 2025-10-28 14:29:43 UTC +--- media/video/video_encode_accelerator_adapter_test.cc.orig 2025-12-10 15:04:57 UTC +++ media/video/video_encode_accelerator_adapter_test.cc @@ -260,7 +260,7 @@ TEST_F(VideoEncodeAcceleratorAdapterTest, InitializeAf }); VideoPixelFormat expected_input_format = PIXEL_FORMAT_I420; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) expected_input_format = PIXEL_FORMAT_NV12; #endif vea()->SetEncodingCallback(base::BindLambdaForTesting( @@ -369,7 +369,7 @@ TEST_F(VideoEncodeAcceleratorAdapterTest, FlushDuringI }); VideoPixelFormat expected_input_format = PIXEL_FORMAT_I420; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) expected_input_format = PIXEL_FORMAT_NV12; #endif @@ -467,7 +467,7 @@ TEST_P(VideoEncodeAcceleratorAdapterTest, TwoFramesRes CreateGreenFrame(large_size, pixel_format, base::Milliseconds(2)); VideoPixelFormat expected_input_format = PIXEL_FORMAT_I420; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) expected_input_format = PIXEL_FORMAT_NV12; #endif const gfx::ColorSpace expected_color_space = @@ -714,7 +714,7 @@ TEST_F(VideoEncodeAcceleratorAdapterTest, }); VideoPixelFormat expected_input_format = PIXEL_FORMAT_I420; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) expected_input_format = PIXEL_FORMAT_NV12; #endif vea()->SetEncodingCallback(base::BindLambdaForTesting( diff --git a/www/iridium/files/patch-media_webrtc_audio__processor.cc b/www/iridium/files/patch-media_webrtc_audio__processor.cc index bd7dd0a9080d..f162dc4c7ec8 100644 --- a/www/iridium/files/patch-media_webrtc_audio__processor.cc +++ b/www/iridium/files/patch-media_webrtc_audio__processor.cc @@ -1,11 +1,11 @@ ---- media/webrtc/audio_processor.cc.orig 2025-09-11 13:19:19 UTC +--- media/webrtc/audio_processor.cc.orig 2025-12-10 15:04:57 UTC +++ media/webrtc/audio_processor.cc -@@ -510,7 +510,7 @@ std::optional AudioProcessor::ProcessData( +@@ -517,7 +517,7 @@ std::optional AudioProcessor::ProcessData( // controller. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) DCHECK_LE(volume, 1.0); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // We have a special situation on Linux where the microphone volume can be // "higher than maximum". The input volume slider in the sound preference // allows the user to set a scaling that is higher than 100%. It means that diff --git a/www/iridium/files/patch-media_webrtc_helpers.cc b/www/iridium/files/patch-media_webrtc_helpers.cc index 534204b61942..99836218a759 100644 --- a/www/iridium/files/patch-media_webrtc_helpers.cc +++ b/www/iridium/files/patch-media_webrtc_helpers.cc @@ -1,19 +1,19 @@ ---- media/webrtc/helpers.cc.orig 2025-06-19 07:37:57 UTC +--- media/webrtc/helpers.cc.orig 2025-12-10 15:04:57 UTC +++ media/webrtc/helpers.cc -@@ -46,14 +46,14 @@ void ConfigAutomaticGainControl(const AudioProcessingS +@@ -48,14 +48,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/40872787): Remove `kWebRtcAllowInputVolumeAdjustment` safely // and set `input_volume_controller.enabled` true. diff --git a/www/iridium/files/patch-media_webrtc_helpers__unittests.cc b/www/iridium/files/patch-media_webrtc_helpers__unittests.cc index e0fabf09f0da..1ae291b861b4 100644 --- a/www/iridium/files/patch-media_webrtc_helpers__unittests.cc +++ b/www/iridium/files/patch-media_webrtc_helpers__unittests.cc @@ -1,38 +1,38 @@ ---- media/webrtc/helpers_unittests.cc.orig 2025-09-11 13:19:19 UTC +--- media/webrtc/helpers_unittests.cc.orig 2025-12-10 15:04:57 UTC +++ media/webrtc/helpers_unittests.cc -@@ -38,7 +38,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, CheckDefau +@@ -37,7 +37,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, CheckDefau EXPECT_TRUE(config.echo_canceller.enabled); #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) EXPECT_FALSE(config.gain_controller1.enabled); EXPECT_TRUE(config.gain_controller2.enabled); #elif BUILDFLAG(IS_CASTOS) || BUILDFLAG(IS_CAST_ANDROID) -@@ -65,7 +65,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, +@@ -63,7 +63,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) TEST(CreateWebRtcAudioProcessingModuleTest, InputVolumeAdjustmentEnabledWithAgc2) { ::base::test::ScopedFeatureList feature_list; -@@ -81,7 +81,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, +@@ -79,7 +79,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) TEST(CreateWebRtcAudioProcessingModuleTest, CanDisableInputVolumeAdjustmentWithAgc2) { ::base::test::ScopedFeatureList feature_list; -@@ -98,7 +98,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, +@@ -96,7 +96,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) TEST(CreateWebRtcAudioProcessingModuleTest, OnlyOneInputVolumeControllerEnabledOnDesktopPlatforms) { auto config = CreateApmGetConfig( diff --git a/www/iridium/files/patch-mojo_core_BUILD.gn b/www/iridium/files/patch-mojo_core_BUILD.gn index 19e27e1c71a2..c1eae976fe35 100644 --- a/www/iridium/files/patch-mojo_core_BUILD.gn +++ b/www/iridium/files/patch-mojo_core_BUILD.gn @@ -1,11 +1,11 @@ ---- mojo/core/BUILD.gn.orig 2025-09-11 13:19:19 UTC +--- mojo/core/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ mojo/core/BUILD.gn @@ -161,7 +161,7 @@ source_set("impl_for_embedder") { "channel_posix.h", ] - if (is_linux || is_chromeos || is_android) { + if ((is_linux || is_chromeos || is_android) && !is_bsd) { sources += [ "channel_linux.cc", "channel_linux.h", diff --git a/www/iridium/files/patch-mojo_core_channel.cc b/www/iridium/files/patch-mojo_core_channel.cc index 6bf30214a211..650c157195d1 100644 --- a/www/iridium/files/patch-mojo_core_channel.cc +++ b/www/iridium/files/patch-mojo_core_channel.cc @@ -1,23 +1,32 @@ ---- mojo/core/channel.cc.orig 2025-11-06 10:11:34 UTC +--- mojo/core/channel.cc.orig 2025-12-10 15:04:57 UTC +++ mojo/core/channel.cc @@ -81,7 +81,11 @@ const size_t kMaxAttachedHandles = 64; const size_t kMaxAttachedHandles = 253; #endif // BUILDFLAG(IS_FUCHSIA) +#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 -@@ -1121,7 +1125,7 @@ bool Channel::OnControlMessage(Message::MessageType me +@@ -274,7 +278,7 @@ bool ShouldRecordSubsampledHistograms() { + } // namespace + + #if BUILDFLAG(IS_ANDROID) || \ +- (BUILDFLAG(IS_LINUX) && defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)) ++ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)) + + namespace { + +@@ -1306,7 +1310,7 @@ bool Channel::OnControlMessage(Message::MessageType me } // Currently only CrOs, Linux, and Android support upgrades. -#if !(BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)) +#if !(BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)) // static MOJO_SYSTEM_IMPL_EXPORT bool Channel::SupportsChannelUpgrade() { return false; diff --git a/www/iridium/files/patch-mojo_core_channel.h b/www/iridium/files/patch-mojo_core_channel.h new file mode 100644 index 000000000000..3a47db677922 --- /dev/null +++ b/www/iridium/files/patch-mojo_core_channel.h @@ -0,0 +1,11 @@ +--- mojo/core/channel.h.orig 2025-12-10 15:04:57 UTC ++++ mojo/core/channel.h +@@ -167,7 +167,7 @@ class MOJO_SYSTEM_IMPL_EXPORT Channel + } v2; + + #if BUILDFLAG(IS_ANDROID) || \ +- (BUILDFLAG(IS_LINUX) && defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)) ++ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)) + // On Android for each pair of connected ipcz::Node instances both sides + // of the connection run the same version of code. Restricting this + // extension of IpczHeader to Android allows to iterate on the wire format diff --git a/www/iridium/files/patch-mojo_core_channel__posix.cc b/www/iridium/files/patch-mojo_core_channel__posix.cc new file mode 100644 index 000000000000..45e0d4446db8 --- /dev/null +++ b/www/iridium/files/patch-mojo_core_channel__posix.cc @@ -0,0 +1,16 @@ +--- mojo/core/channel_posix.cc.orig 2025-12-10 15:04:57 UTC ++++ mojo/core/channel_posix.cc +@@ -594,6 +594,13 @@ void Channel::OfferChannelUpgrade() { + } + static_cast(this)->OfferSharedMemUpgrade(); + } ++#elif BUILDFLAG(IS_BSD) ++// static ++bool Channel::SupportsChannelUpgrade() { ++ return false; ++} ++void Channel::OfferChannelUpgrade() { ++} + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || + // BUILDFLAG(IS_ANDROID) + diff --git a/www/iridium/files/patch-mojo_core_embedder_features.h b/www/iridium/files/patch-mojo_core_embedder_features.h index 6d38f49ab44e..08bf9c708565 100644 --- a/www/iridium/files/patch-mojo_core_embedder_features.h +++ b/www/iridium/files/patch-mojo_core_embedder_features.h @@ -1,11 +1,11 @@ ---- mojo/core/embedder/features.h.orig 2025-09-11 13:19:19 UTC +--- mojo/core/embedder/features.h.orig 2025-12-10 15:04:57 UTC +++ mojo/core/embedder/features.h -@@ -15,7 +15,7 @@ namespace mojo { +@@ -14,7 +14,7 @@ + namespace mojo { namespace core { - #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(MOJO_USE_APPLE_CHANNEL) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(MOJO_CORE_EMBEDDER_FEATURES) - BASE_DECLARE_FEATURE(kMojoLinuxChannelSharedMem); + BASE_DECLARE_FEATURE(kMojoUseEventFd); diff --git a/www/iridium/files/patch-mojo_public_tools_bindings_mojom.gni b/www/iridium/files/patch-mojo_public_tools_bindings_mojom.gni index 443316317532..4c954da00e9d 100644 --- a/www/iridium/files/patch-mojo_public_tools_bindings_mojom.gni +++ b/www/iridium/files/patch-mojo_public_tools_bindings_mojom.gni @@ -1,19 +1,19 @@ ---- mojo/public/tools/bindings/mojom.gni.orig 2025-11-06 10:11:34 UTC +--- mojo/public/tools/bindings/mojom.gni.orig 2025-12-10 15:04:57 UTC +++ mojo/public/tools/bindings/mojom.gni -@@ -763,6 +763,16 @@ template("mojom") { +@@ -751,6 +751,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_outputs = [] foreach(base_path, output_file_base_paths) { filename = get_path_info(base_path, "file") diff --git a/www/iridium/files/patch-net_BUILD.gn b/www/iridium/files/patch-net_BUILD.gn index bb452ad07520..c09646d3b840 100644 --- a/www/iridium/files/patch-net_BUILD.gn +++ b/www/iridium/files/patch-net_BUILD.gn @@ -1,103 +1,103 @@ ---- net/BUILD.gn.orig 2025-11-06 10:11:34 UTC +--- net/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ net/BUILD.gn @@ -126,7 +126,7 @@ net_configs = [ "//build/config/compiler:wexit_time_destructors", ] -if (is_linux || is_chromeos) { +if ((is_linux || is_chromeos) && !is_bsd) { net_configs += [ "//build/config/linux:libresolv" ] } -@@ -1172,6 +1172,7 @@ component("net") { +@@ -1177,6 +1177,7 @@ component("net") { ":net_deps", - "//components/miracle_parameter/common", "//components/network_time/time_tracker", + "//components/unexportable_keys", + "//content/public/common:buildflags", "//net/http:transport_security_state_generated_files", "//third_party/simdutf", ] -@@ -1376,6 +1377,19 @@ component("net") { +@@ -1379,6 +1380,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", -@@ -1541,7 +1555,7 @@ component("net") { +@@ -1544,7 +1558,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", -@@ -2277,7 +2291,7 @@ static_library("test_support") { +@@ -2290,7 +2304,7 @@ static_library("test_support") { ] } - if (is_linux || is_chromeos || is_android) { + if (!is_bsd && (is_linux || is_chromeos || is_android)) { sources += [ "base/address_tracker_linux_test_util.cc", "base/address_tracker_linux_test_util.h", -@@ -3076,14 +3090,14 @@ target(_test_target_type, "net_unittests") { +@@ -3091,14 +3105,14 @@ target(_test_target_type, "net_unittests") { ] } - if (is_linux) { + if (is_linux && !is_bsd) { sources += [ "base/network_change_notifier_linux_unittest.cc", "proxy_resolution/proxy_config_service_linux_unittest.cc", ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "base/address_tracker_linux_unittest.cc", "base/network_interfaces_linux_unittest.cc", -@@ -3185,6 +3199,10 @@ target(_test_target_type, "net_unittests") { +@@ -3204,6 +3218,10 @@ target(_test_target_type, "net_unittests") { ] } + if (is_bsd) { + deps += [ "//sandbox/policy" ] + } + if (enable_websockets) { sources += [ "server/http_connection_unittest.cc", -@@ -3241,7 +3259,7 @@ target(_test_target_type, "net_unittests") { +@@ -3260,7 +3278,7 @@ target(_test_target_type, "net_unittests") { ] data_deps = [ "//testing/buildbot/filters:net_unittests_filters" ] - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "tools/quic/quic_simple_server_test.cc" ] } -@@ -3371,7 +3389,7 @@ target(_test_target_type, "net_unittests") { +@@ -3390,7 +3408,7 @@ target(_test_target_type, "net_unittests") { } # Use getifaddrs() on POSIX platforms, except Linux. - if (is_posix && !is_linux && !is_chromeos) { + if (is_posix && !is_linux && !is_chromeos && !is_bsd) { sources += [ "base/network_interfaces_getifaddrs_unittest.cc" ] } diff --git a/www/iridium/files/patch-net_base_features.cc b/www/iridium/files/patch-net_base_features.cc index 9840b8175741..9b2095ba6d20 100644 --- a/www/iridium/files/patch-net_base_features.cc +++ b/www/iridium/files/patch-net_base_features.cc @@ -1,38 +1,38 @@ ---- net/base/features.cc.orig 2025-11-06 10:11:34 UTC +--- net/base/features.cc.orig 2025-12-10 15:04:57 UTC +++ net/base/features.cc @@ -29,7 +29,7 @@ BASE_FEATURE(kCapReferrerToOriginOnCrossOrigin, BASE_FEATURE(kAsyncDns, #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 -@@ -521,7 +521,7 @@ BASE_FEATURE(kDisableBlackholeOnNoNewNetwork, - "DisableBlackHoleOnNoNewNetwork", - base::FEATURE_DISABLED_BY_DEFAULT); +@@ -519,7 +519,7 @@ inline constexpr auto kMigrateSessionsOnNetworkChangeV + BASE_FEATURE(kMigrateSessionsOnNetworkChangeV2, + kMigrateSessionsOnNetworkChangeV2Default); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_FEATURE(kAddressTrackerLinuxIsProxied, base::FEATURE_ENABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_LINUX) -@@ -616,7 +616,7 @@ BASE_FEATURE(kReportingApiEnableEnterpriseCookieIssues +@@ -627,7 +627,7 @@ BASE_FEATURE(kReportingApiEnableEnterpriseCookieIssues base::FEATURE_DISABLED_BY_DEFAULT); BASE_FEATURE(kSimdutfBase64Support, -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -680,7 +680,7 @@ BASE_FEATURE(kHttpCacheMappedFileFlushWin, base::FEATU - #endif +@@ -712,7 +712,7 @@ BASE_FEATURE(kHttpCacheMappedFileFlushWin, base::FEATU BASE_FEATURE(kHttpCacheNoVarySearch, --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/iridium/files/patch-net_base_network__change__notifier.cc b/www/iridium/files/patch-net_base_network__change__notifier.cc index ea558783fa7e..3a786dc5c4ed 100644 --- a/www/iridium/files/patch-net_base_network__change__notifier.cc +++ b/www/iridium/files/patch-net_base_network__change__notifier.cc @@ -1,21 +1,21 @@ ---- net/base/network_change_notifier.cc.orig 2025-06-19 07:37:57 UTC +--- net/base/network_change_notifier.cc.orig 2025-12-10 15:04:57 UTC +++ net/base/network_change_notifier.cc @@ -38,7 +38,7 @@ #include "net/base/network_change_notifier_linux.h" #elif BUILDFLAG(IS_APPLE) #include "net/base/network_change_notifier_apple.h" -#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "net/base/network_change_notifier_passive.h" #elif BUILDFLAG(IS_FUCHSIA) #include "net/base/network_change_notifier_fuchsia.h" @@ -325,6 +325,9 @@ std::unique_ptr NetworkChangeNo #elif BUILDFLAG(IS_FUCHSIA) return std::make_unique( /*require_wlan=*/false); +#elif BUILDFLAG(IS_BSD) + return std::make_unique( + /*dns_config_notifier*/nullptr); #else NOTIMPLEMENTED(); return nullptr; diff --git a/www/iridium/files/patch-net_base_network__change__notifier__passive.cc b/www/iridium/files/patch-net_base_network__change__notifier__passive.cc index e221e2862d6a..e706ad78031a 100644 --- a/www/iridium/files/patch-net_base_network__change__notifier__passive.cc +++ b/www/iridium/files/patch-net_base_network__change__notifier__passive.cc @@ -1,11 +1,11 @@ ---- net/base/network_change_notifier_passive.cc.orig 2025-10-28 14:29:43 UTC +--- net/base/network_change_notifier_passive.cc.orig 2025-12-10 15:04:57 UTC +++ net/base/network_change_notifier_passive.cc @@ -108,7 +108,7 @@ NetworkChangeNotifierPassive::GetAddressMapOwnerIntern NetworkChangeNotifier::NetworkChangeCalculatorParams NetworkChangeNotifierPassive::NetworkChangeCalculatorParamsPassive() { NetworkChangeCalculatorParams params; -#if BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Delay values arrived at by simple experimentation and adjusted so as to // produce a single signal when switching between network connections. params.ip_address_offline_delay_ = base::Milliseconds(4000); diff --git a/www/iridium/files/patch-net_base_network__interfaces__posix.h b/www/iridium/files/patch-net_base_network__interfaces__posix.h index b83ccfd0d65a..2599a3d6d6b9 100644 --- a/www/iridium/files/patch-net_base_network__interfaces__posix.h +++ b/www/iridium/files/patch-net_base_network__interfaces__posix.h @@ -1,11 +1,11 @@ ---- net/base/network_interfaces_posix.h.orig 2025-05-07 06:48:23 UTC +--- net/base/network_interfaces_posix.h.orig 2025-12-10 15:04:57 UTC +++ net/base/network_interfaces_posix.h @@ -8,6 +8,8 @@ // This file provides some basic functionality shared between // network_interfaces_linux.cc and network_interfaces_getifaddrs.cc. +#include + #include struct sockaddr; diff --git a/www/iridium/files/patch-net_base_sockaddr__util__posix.cc b/www/iridium/files/patch-net_base_sockaddr__util__posix.cc index 741638b3d127..f8ef75e6330d 100644 --- a/www/iridium/files/patch-net_base_sockaddr__util__posix.cc +++ b/www/iridium/files/patch-net_base_sockaddr__util__posix.cc @@ -1,12 +1,12 @@ ---- net/base/sockaddr_util_posix.cc.orig 2025-10-28 14:29:43 UTC +--- net/base/sockaddr_util_posix.cc.orig 2025-12-10 15:04:57 UTC +++ net/base/sockaddr_util_posix.cc @@ -51,7 +51,8 @@ bool FillUnixAddress(std::string_view socket_path, return true; } -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // XXX ? // Convert the path given into abstract socket name. It must start with // the '\0' character, skip over it, as it should already be zero. `addr_len` // must specify the length of the structure exactly, as potentially the socket diff --git a/www/iridium/files/patch-net_base_sockaddr__util__posix__unittest.cc b/www/iridium/files/patch-net_base_sockaddr__util__posix__unittest.cc index ed7195b2b5b6..f40eab4ff607 100644 --- a/www/iridium/files/patch-net_base_sockaddr__util__posix__unittest.cc +++ b/www/iridium/files/patch-net_base_sockaddr__util__posix__unittest.cc @@ -1,12 +1,12 @@ ---- net/base/sockaddr_util_posix_unittest.cc.orig 2025-10-28 14:29:43 UTC +--- net/base/sockaddr_util_posix_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ net/base/sockaddr_util_posix_unittest.cc @@ -77,7 +77,8 @@ TEST(FillUnixAddressTest, AbstractLinuxAddress) { SockaddrStorage storage; std::string path(kMaxUnixAddressPath, '0'); -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // XXX? EXPECT_TRUE(FillUnixAddress(path, /*use_abstract_namespace=*/true, &storage)); EXPECT_EQ(path.size() + 1U + offsetof(struct sockaddr_un, sun_path), diff --git a/www/iridium/files/patch-net_disk__cache_backend__experiment.h b/www/iridium/files/patch-net_disk__cache_backend__experiment.h index 866271676faa..10b11819dfc6 100644 --- a/www/iridium/files/patch-net_disk__cache_backend__experiment.h +++ b/www/iridium/files/patch-net_disk__cache_backend__experiment.h @@ -1,11 +1,11 @@ ---- net/disk_cache/backend_experiment.h.orig 2025-09-11 13:19:19 UTC +--- net/disk_cache/backend_experiment.h.orig 2025-12-10 15:04:57 UTC +++ net/disk_cache/backend_experiment.h @@ -15,7 +15,7 @@ namespace disk_cache { // default. constexpr bool IsSimpleBackendEnabledByDefaultPlatform() { return BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC); + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD); } // True if assigned to any of disk cache backend experiment groups. diff --git a/www/iridium/files/patch-net_disk__cache_simple_simple__file__tracker.cc b/www/iridium/files/patch-net_disk__cache_simple_simple__file__tracker.cc index df7cd23e9d5d..54f09f4888e0 100644 --- a/www/iridium/files/patch-net_disk__cache_simple_simple__file__tracker.cc +++ b/www/iridium/files/patch-net_disk__cache_simple_simple__file__tracker.cc @@ -1,20 +1,20 @@ ---- net/disk_cache/simple/simple_file_tracker.cc.orig 2025-10-28 14:29:43 UTC +--- net/disk_cache/simple/simple_file_tracker.cc.orig 2025-12-10 15:04:57 UTC +++ net/disk_cache/simple/simple_file_tracker.cc @@ -36,7 +36,17 @@ bool SimpleFileTracker::TrackedFiles::InLRUList() cons } SimpleFileTracker::SimpleFileTracker(int file_limit) +#if defined(OS_OPENBSD) +{ + // cap the file descriptor limit at 75% of the size of the + // file descriptor table and also substract the amount of + // currently used file descriptors as this should give us + // enough reserve to avoid hitting the limit + file_limit_ = (getdtablesize() * 0.75) - getdtablecount(); +} +#else : file_limit_(file_limit) {} +#endif SimpleFileTracker::~SimpleFileTracker() { DCHECK(lru_.empty()); diff --git a/www/iridium/files/patch-net_dns_BUILD.gn b/www/iridium/files/patch-net_dns_BUILD.gn index a6765598272c..ba62be5581dc 100644 --- a/www/iridium/files/patch-net_dns_BUILD.gn +++ b/www/iridium/files/patch-net_dns_BUILD.gn @@ -1,39 +1,39 @@ ---- net/dns/BUILD.gn.orig 2025-11-06 10:11:34 UTC +--- net/dns/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ net/dns/BUILD.gn -@@ -142,7 +142,7 @@ source_set("dns") { - "dns_config_service_android.cc", - "dns_config_service_android.h", +@@ -144,7 +144,7 @@ source_set("dns") { + "platform_dns_query_executor_android.cc", + "platform_dns_query_executor_android.h", ] - } else if (is_linux) { + } else if (is_linux && !is_bsd) { sources += [ "dns_config_service_linux.cc", "dns_config_service_linux.h", -@@ -176,6 +176,7 @@ source_set("dns") { +@@ -178,6 +178,7 @@ source_set("dns") { } deps = [ "//net:net_deps" ] + deps += [ "//services/screen_ai/buildflags" ] public_deps = [ ":dns_client", -@@ -183,6 +184,7 @@ source_set("dns") { - ":host_resolver_manager", - ":mdns_client", - "//net:net_public_deps", +@@ -258,6 +259,7 @@ source_set("host_resolver") { + deps = [ + "//net:net_deps", + "//net/dns/public", + "//printing/buildflags", ] + public_deps = [ "//net:net_public_deps" ] - if (enable_mdns) { -@@ -458,9 +460,9 @@ source_set("tests") { - - if (is_android) { - sources += [ "dns_config_service_android_unittest.cc" ] +@@ -463,9 +465,9 @@ source_set("tests") { + "dns_config_service_android_unittest.cc", + "platform_dns_query_executor_android_unittest.cc", + ] - } else if (is_linux) { + } else if (is_linux && !is_bsd) { sources += [ "dns_config_service_linux_unittest.cc" ] - } else if (is_posix) { + } else if (is_posix && !is_bsd) { sources += [ "dns_config_service_posix_unittest.cc" ] } diff --git a/www/iridium/files/patch-net_dns_address__info.cc b/www/iridium/files/patch-net_dns_address__info.cc index 863308fb101c..e6709917669f 100644 --- a/www/iridium/files/patch-net_dns_address__info.cc +++ b/www/iridium/files/patch-net_dns_address__info.cc @@ -1,16 +1,16 @@ ---- net/dns/address_info.cc.orig 2025-09-11 13:19:19 UTC +--- net/dns/address_info.cc.orig 2025-12-10 15:04:57 UTC +++ net/dns/address_info.cc @@ -78,8 +78,12 @@ AddressInfo::AddressInfoAndResult AddressInfo::Get( // error. // http://crbug.com/134142 err = ERR_NAME_NOT_RESOLVED; -#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_FREEBSD) +#elif BUILDFLAG(IS_POSIX) +#ifdef EAI_NODATA if (os_error != EAI_NONAME && os_error != EAI_NODATA) +#else + if (os_error != EAI_NONAME) +#endif err = ERR_NAME_RESOLUTION_FAILED; #endif diff --git a/www/iridium/files/patch-net_dns_address__sorter__posix.cc b/www/iridium/files/patch-net_dns_address__sorter__posix.cc index 6ef2132de6a9..e805145db692 100644 --- a/www/iridium/files/patch-net_dns_address__sorter__posix.cc +++ b/www/iridium/files/patch-net_dns_address__sorter__posix.cc @@ -1,10 +1,10 @@ ---- net/dns/address_sorter_posix.cc.orig 2025-09-11 13:19:19 UTC +--- net/dns/address_sorter_posix.cc.orig 2025-12-10 15:04:57 UTC +++ net/dns/address_sorter_posix.cc @@ -33,6 +33,7 @@ #include "net/dns/netinet_in_var_ios.h" #else #include +#include #endif // BUILDFLAG(IS_IOS) #endif #include diff --git a/www/iridium/files/patch-net_dns_dns__config__service__posix.cc b/www/iridium/files/patch-net_dns_dns__config__service__posix.cc index baf57aede3c0..b0a313fdb3ca 100644 --- a/www/iridium/files/patch-net_dns_dns__config__service__posix.cc +++ b/www/iridium/files/patch-net_dns_dns__config__service__posix.cc @@ -1,26 +1,26 @@ ---- net/dns/dns_config_service_posix.cc.orig 2025-05-07 06:48:23 UTC +--- net/dns/dns_config_service_posix.cc.orig 2025-12-10 15:04:57 UTC +++ net/dns/dns_config_service_posix.cc @@ -39,6 +39,11 @@ #include "net/dns/dns_config_watcher_mac.h" #endif +#if BUILDFLAG(IS_BSD) +#include "base/command_line.h" +#include "sandbox/policy/switches.h" +#endif + namespace net { namespace internal { @@ -135,6 +140,11 @@ class DnsConfigServicePosix::Watcher : public DnsConfi bool Watch() override { CheckOnCorrectSequence(); + +// pledge + unveil + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + if (!command_line->HasSwitch(sandbox::policy::switches::kNoSandbox)) + return false; bool success = true; if (!config_watcher_.Watch(base::BindRepeating(&Watcher::OnConfigChanged, diff --git a/www/iridium/files/patch-net_dns_dns__reloader.cc b/www/iridium/files/patch-net_dns_dns__reloader.cc index c7e7f88074ac..7d9148c0cef5 100644 --- a/www/iridium/files/patch-net_dns_dns__reloader.cc +++ b/www/iridium/files/patch-net_dns_dns__reloader.cc @@ -1,10 +1,10 @@ ---- net/dns/dns_reloader.cc.orig 2025-05-07 06:48:23 UTC +--- net/dns/dns_reloader.cc.orig 2025-12-10 15:04:57 UTC +++ net/dns/dns_reloader.cc @@ -10,6 +10,7 @@ // - there's not guarantee it exists at all. :( #if BUILDFLAG(IS_POSIX) +#include #include // This code only works on systems where the C library provides res_ninit(3) and diff --git a/www/iridium/files/patch-net_dns_dns__util.cc b/www/iridium/files/patch-net_dns_dns__util.cc index 5d057d67fd63..05c4f2295f68 100644 --- a/www/iridium/files/patch-net_dns_dns__util.cc +++ b/www/iridium/files/patch-net_dns_dns__util.cc @@ -1,11 +1,11 @@ ---- net/dns/dns_util.cc.orig 2025-05-07 06:48:23 UTC +--- net/dns/dns_util.cc.orig 2025-12-10 15:04:57 UTC +++ net/dns/dns_util.cc @@ -29,6 +29,8 @@ #include "net/dns/public/util.h" #include "net/third_party/uri_template/uri_template.h" +#include + #if BUILDFLAG(IS_POSIX) #include #include diff --git a/www/iridium/files/patch-net_dns_host__resolver__proc.cc b/www/iridium/files/patch-net_dns_host__resolver__proc.cc index 00bedc71283a..3fd4f44de8d9 100644 --- a/www/iridium/files/patch-net_dns_host__resolver__proc.cc +++ b/www/iridium/files/patch-net_dns_host__resolver__proc.cc @@ -1,13 +1,13 @@ ---- net/dns/host_resolver_proc.cc.orig 2025-06-19 07:37:57 UTC +--- net/dns/host_resolver_proc.cc.orig 2025-12-10 15:04:57 UTC +++ net/dns/host_resolver_proc.cc @@ -16,10 +16,6 @@ #include "net/base/net_errors.h" #include "net/dns/host_resolver_system_task.h" -#if BUILDFLAG(IS_OPENBSD) -#define AI_ADDRCONFIG 0 -#endif - namespace net { HostResolverProc* HostResolverProc::default_proc_ = nullptr; diff --git a/www/iridium/files/patch-net_dns_public_BUILD.gn b/www/iridium/files/patch-net_dns_public_BUILD.gn index 32c48e931966..a93e0b29e9ef 100644 --- a/www/iridium/files/patch-net_dns_public_BUILD.gn +++ b/www/iridium/files/patch-net_dns_public_BUILD.gn @@ -1,11 +1,11 @@ ---- net/dns/public/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- net/dns/public/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ net/dns/public/BUILD.gn @@ -78,7 +78,7 @@ source_set("tests") { "doh_provider_entry_unittest.cc", ] - if (is_posix && !is_android) { + if (is_posix && !is_android && !is_bsd) { sources += [ "resolv_reader_unittest.cc" ] } diff --git a/www/iridium/files/patch-net_dns_public_resolv__reader.cc b/www/iridium/files/patch-net_dns_public_resolv__reader.cc index ace7f25bffcb..6e190f75bb7e 100644 --- a/www/iridium/files/patch-net_dns_public_resolv__reader.cc +++ b/www/iridium/files/patch-net_dns_public_resolv__reader.cc @@ -1,11 +1,11 @@ ---- net/dns/public/resolv_reader.cc.orig 2025-09-11 13:19:19 UTC +--- net/dns/public/resolv_reader.cc.orig 2025-12-10 15:04:57 UTC +++ net/dns/public/resolv_reader.cc @@ -34,7 +34,7 @@ std::unique_ptr ResolvReader::GetResSt } bool ResolvReader::IsLikelySystemdResolved() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // Look for a single 127.0.0.53:53 nameserver endpoint. The only known // significant usage of such a configuration is the systemd-resolved local // resolver, so it is then a fairly safe assumption that any DNS queries to diff --git a/www/iridium/files/patch-net_dns_public_resolv__reader.h b/www/iridium/files/patch-net_dns_public_resolv__reader.h index 61f200c3d2e0..1b28a49375ab 100644 --- a/www/iridium/files/patch-net_dns_public_resolv__reader.h +++ b/www/iridium/files/patch-net_dns_public_resolv__reader.h @@ -1,10 +1,10 @@ ---- net/dns/public/resolv_reader.h.orig 2025-05-07 06:48:23 UTC +--- net/dns/public/resolv_reader.h.orig 2025-12-10 15:04:57 UTC +++ net/dns/public/resolv_reader.h @@ -5,6 +5,7 @@ #ifndef NET_DNS_PUBLIC_RESOLV_READER_H_ #define NET_DNS_PUBLIC_RESOLV_READER_H_ +#include #include #include diff --git a/www/iridium/files/patch-net_dns_public_scoped__res__state.h b/www/iridium/files/patch-net_dns_public_scoped__res__state.h index d8a9f30611e2..ac8d3c2074bc 100644 --- a/www/iridium/files/patch-net_dns_public_scoped__res__state.h +++ b/www/iridium/files/patch-net_dns_public_scoped__res__state.h @@ -1,10 +1,10 @@ ---- net/dns/public/scoped_res_state.h.orig 2025-05-07 06:48:23 UTC +--- net/dns/public/scoped_res_state.h.orig 2025-12-10 15:04:57 UTC +++ net/dns/public/scoped_res_state.h @@ -5,6 +5,7 @@ #ifndef NET_DNS_PUBLIC_SCOPED_RES_STATE_H_ #define NET_DNS_PUBLIC_SCOPED_RES_STATE_H_ +#include #include #include diff --git a/www/iridium/files/patch-net_filter_zstd__source__stream.cc b/www/iridium/files/patch-net_filter_zstd__source__stream.cc index 5e91cb56a88d..fd8539bfec93 100644 --- a/www/iridium/files/patch-net_filter_zstd__source__stream.cc +++ b/www/iridium/files/patch-net_filter_zstd__source__stream.cc @@ -1,10 +1,10 @@ ---- net/filter/zstd_source_stream.cc.orig 2025-05-07 06:48:23 UTC +--- net/filter/zstd_source_stream.cc.orig 2025-12-10 15:04:57 UTC +++ net/filter/zstd_source_stream.cc @@ -7,6 +7,7 @@ #include #include #include +#include #define ZSTD_STATIC_LINKING_ONLY diff --git a/www/iridium/files/patch-net_http_http__auth__gssapi__posix.cc b/www/iridium/files/patch-net_http_http__auth__gssapi__posix.cc index 7db9301607ac..0231670e9160 100644 --- a/www/iridium/files/patch-net_http_http__auth__gssapi__posix.cc +++ b/www/iridium/files/patch-net_http_http__auth__gssapi__posix.cc @@ -1,13 +1,13 @@ ---- net/http/http_auth_gssapi_posix.cc.orig 2025-05-07 06:48:23 UTC +--- net/http/http_auth_gssapi_posix.cc.orig 2025-12-10 15:04:57 UTC +++ net/http/http_auth_gssapi_posix.cc @@ -366,7 +366,9 @@ base::NativeLibrary GSSAPISharedLibrary::LoadSharedLib } else { #if BUILDFLAG(IS_APPLE) library_names.emplace_back("/System/Library/Frameworks/GSS.framework/GSS"); -#elif BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_BSD) + // MIT Kerberos - FreeBSD + library_names.emplace_back("libgssapi_krb5.so.2"); // Heimdal - OpenBSD library_names.emplace_back("libgssapi.so"); #else diff --git a/www/iridium/files/patch-net_http_http__auth__gssapi__posix.h b/www/iridium/files/patch-net_http_http__auth__gssapi__posix.h index 471c76ddb2cb..fa4a5e1ed908 100644 --- a/www/iridium/files/patch-net_http_http__auth__gssapi__posix.h +++ b/www/iridium/files/patch-net_http_http__auth__gssapi__posix.h @@ -1,12 +1,12 @@ ---- net/http/http_auth_gssapi_posix.h.orig 2025-05-07 06:48:23 UTC +--- net/http/http_auth_gssapi_posix.h.orig 2025-12-10 15:04:57 UTC +++ net/http/http_auth_gssapi_posix.h @@ -21,6 +21,9 @@ #if BUILDFLAG(IS_APPLE) #include #elif BUILDFLAG(IS_FREEBSD) +#ifndef GSS_C_DELEG_POLICY_FLAG +#define GSS_C_DELEG_POLICY_FLAG 32768 +#endif #include #else #include diff --git a/www/iridium/files/patch-net_http_http__auth__handler__negotiate.cc b/www/iridium/files/patch-net_http_http__auth__handler__negotiate.cc index 61bcbe06cd1d..ee741fa21295 100644 --- a/www/iridium/files/patch-net_http_http__auth__handler__negotiate.cc +++ b/www/iridium/files/patch-net_http_http__auth__handler__negotiate.cc @@ -1,11 +1,11 @@ ---- net/http/http_auth_handler_negotiate.cc.orig 2025-05-07 06:48:23 UTC +--- net/http/http_auth_handler_negotiate.cc.orig 2025-12-10 15:04:57 UTC +++ net/http/http_auth_handler_negotiate.cc @@ -119,7 +119,7 @@ int HttpAuthHandlerNegotiate::Factory::CreateAuthHandl #elif BUILDFLAG(IS_POSIX) if (is_unsupported_) return ERR_UNSUPPORTED_AUTH_SCHEME; -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Note: Don't set is_unsupported_ = true here. AllowGssapiLibraryLoad() // might change to true during a session. if (!http_auth_preferences() || diff --git a/www/iridium/files/patch-net_http_http__auth__preferences.cc b/www/iridium/files/patch-net_http_http__auth__preferences.cc index 01cc5ce69525..e797df623f67 100644 --- a/www/iridium/files/patch-net_http_http__auth__preferences.cc +++ b/www/iridium/files/patch-net_http_http__auth__preferences.cc @@ -1,11 +1,11 @@ ---- net/http/http_auth_preferences.cc.orig 2025-05-07 06:48:23 UTC +--- net/http/http_auth_preferences.cc.orig 2025-12-10 15:04:57 UTC +++ net/http/http_auth_preferences.cc @@ -38,7 +38,7 @@ std::string HttpAuthPreferences::AuthAndroidNegotiateA } #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool HttpAuthPreferences::AllowGssapiLibraryLoad() const { return allow_gssapi_library_load_; } diff --git a/www/iridium/files/patch-net_http_http__auth__preferences.h b/www/iridium/files/patch-net_http_http__auth__preferences.h index f437953d92e3..fdd118744134 100644 --- a/www/iridium/files/patch-net_http_http__auth__preferences.h +++ b/www/iridium/files/patch-net_http_http__auth__preferences.h @@ -1,29 +1,29 @@ ---- net/http/http_auth_preferences.h.orig 2025-05-07 06:48:23 UTC +--- net/http/http_auth_preferences.h.orig 2025-12-10 15:04:57 UTC +++ net/http/http_auth_preferences.h @@ -49,7 +49,7 @@ class NET_EXPORT HttpAuthPreferences { #if BUILDFLAG(IS_ANDROID) virtual std::string AuthAndroidNegotiateAccountType() const; #endif -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) virtual bool AllowGssapiLibraryLoad() const; #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) virtual bool CanUseDefaultCredentials( @@ -85,7 +85,7 @@ class NET_EXPORT HttpAuthPreferences { } #endif // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void set_allow_gssapi_library_load(bool allow_gssapi_library_load) { allow_gssapi_library_load_ = allow_gssapi_library_load; } @@ -136,7 +136,7 @@ class NET_EXPORT HttpAuthPreferences { std::string auth_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) bool allow_gssapi_library_load_ = true; #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-net_http_http__network__session.cc b/www/iridium/files/patch-net_http_http__network__session.cc index 1d9f1dd20f68..721fd87c347c 100644 --- a/www/iridium/files/patch-net_http_http__network__session.cc +++ b/www/iridium/files/patch-net_http_http__network__session.cc @@ -1,12 +1,12 @@ ---- net/http/http_network_session.cc.orig 2025-09-11 13:19:19 UTC +--- net/http/http_network_session.cc.orig 2025-12-10 15:04:57 UTC +++ net/http/http_network_session.cc @@ -21,7 +21,9 @@ #include "build/build_config.h" #include "net/base/features.h" #include "net/dns/host_resolver.h" +#if defined(USE_KERBEROS) #include "net/http/http_auth_handler_factory.h" +#endif #include "net/http/http_response_body_drainer.h" #include "net/http/http_stream_factory.h" #include "net/http/http_stream_pool.h" diff --git a/www/iridium/files/patch-net_proxy__resolution_proxy__config__service.cc b/www/iridium/files/patch-net_proxy__resolution_proxy__config__service.cc index 523a3393da25..ddbf7b7557b7 100644 --- a/www/iridium/files/patch-net_proxy__resolution_proxy__config__service.cc +++ b/www/iridium/files/patch-net_proxy__resolution_proxy__config__service.cc @@ -1,35 +1,35 @@ ---- net/proxy_resolution/proxy_config_service.cc.orig 2025-05-07 06:48:23 UTC +--- net/proxy_resolution/proxy_config_service.cc.orig 2025-12-10 15:04:57 UTC +++ net/proxy_resolution/proxy_config_service.cc @@ -19,20 +19,20 @@ #include "net/proxy_resolution/proxy_config_service_ios.h" #elif BUILDFLAG(IS_MAC) #include "net/proxy_resolution/proxy_config_service_mac.h" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "net/proxy_resolution/proxy_config_service_linux.h" #elif BUILDFLAG(IS_ANDROID) #include "net/proxy_resolution/proxy_config_service_android.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "net/traffic_annotation/network_traffic_annotation.h" #endif namespace net { namespace { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) constexpr net::NetworkTrafficAnnotationTag kSystemProxyConfigTrafficAnnotation = net::DefineNetworkTrafficAnnotation("proxy_config_system", R"( semantics { @@ -108,7 +108,7 @@ ProxyConfigService::CreateSystemProxyConfigService( << "profile_io_data.cc::CreateProxyConfigService and this should " << "be used only for examples."; return std::make_unique(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr linux_config_service( std::make_unique()); diff --git a/www/iridium/files/patch-net_proxy__resolution_proxy__config__service__linux.cc b/www/iridium/files/patch-net_proxy__resolution_proxy__config__service__linux.cc index 754a7f915686..fed6790713b0 100644 --- a/www/iridium/files/patch-net_proxy__resolution_proxy__config__service__linux.cc +++ b/www/iridium/files/patch-net_proxy__resolution_proxy__config__service__linux.cc @@ -1,40 +1,40 @@ ---- net/proxy_resolution/proxy_config_service_linux.cc.orig 2025-09-11 13:19:19 UTC +--- net/proxy_resolution/proxy_config_service_linux.cc.orig 2025-12-10 15:04:57 UTC +++ net/proxy_resolution/proxy_config_service_linux.cc @@ -11,7 +11,9 @@ #include #include +#if !BUILDFLAG(IS_BSD) #include +#endif #include #include @@ -502,6 +504,7 @@ bool SettingGetterImplGSettings::CheckVersion() { } #endif // defined(USE_GIO) +#if !BUILDFLAG(IS_BSD) // Converts |value| from a decimal string to an int. If there was a failure // parsing, returns |default_value|. int StringToIntOrDefault(std::string_view value, int default_value) { @@ -1039,6 +1042,7 @@ class SettingGetterImplKDE : public ProxyConfigService // events on. scoped_refptr file_task_runner_; }; +#endif } // namespace @@ -1259,9 +1263,11 @@ ProxyConfigServiceLinux::Delegate::Delegate( case base::nix::DESKTOP_ENVIRONMENT_KDE4: case base::nix::DESKTOP_ENVIRONMENT_KDE5: case base::nix::DESKTOP_ENVIRONMENT_KDE6: +#if !BUILDFLAG(IS_BSD) setting_getter_ = std::make_unique(env_var_getter_.get()); break; +#endif case base::nix::DESKTOP_ENVIRONMENT_XFCE: case base::nix::DESKTOP_ENVIRONMENT_LXQT: case base::nix::DESKTOP_ENVIRONMENT_OTHER: diff --git a/www/iridium/files/patch-net_socket_socks5__client__socket.cc b/www/iridium/files/patch-net_socket_socks5__client__socket.cc index 34adf2bc3bf0..18d98d827ef2 100644 --- a/www/iridium/files/patch-net_socket_socks5__client__socket.cc +++ b/www/iridium/files/patch-net_socket_socks5__client__socket.cc @@ -1,12 +1,12 @@ ---- net/socket/socks5_client_socket.cc.orig 2025-05-07 06:48:23 UTC +--- net/socket/socks5_client_socket.cc.orig 2025-12-10 15:04:57 UTC +++ net/socket/socks5_client_socket.cc @@ -23,6 +23,9 @@ #include "net/log/net_log_event_type.h" #include "net/traffic_annotation/network_traffic_annotation.h" +#include +#include + namespace net { const unsigned int SOCKS5ClientSocket::kGreetReadHeaderSize = 2; diff --git a/www/iridium/files/patch-net_socket_tcp__socket__posix.cc b/www/iridium/files/patch-net_socket_tcp__socket__posix.cc index e5ddd98226c0..08bdbcb3e0c0 100644 --- a/www/iridium/files/patch-net_socket_tcp__socket__posix.cc +++ b/www/iridium/files/patch-net_socket_tcp__socket__posix.cc @@ -1,20 +1,20 @@ ---- net/socket/tcp_socket_posix.cc.orig 2025-10-28 14:29:43 UTC +--- net/socket/tcp_socket_posix.cc.orig 2025-12-10 15:04:57 UTC +++ net/socket/tcp_socket_posix.cc @@ -98,6 +98,17 @@ bool SetTCPKeepAlive(int fd, bool enable, int delay) { PLOG(ERROR) << "Failed to set TCP_KEEPALIVE on fd: " << fd; return false; } +#elif BUILDFLAG(IS_FREEBSD) + // Set seconds until first TCP keep alive. + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &delay, sizeof(delay))) { + PLOG(ERROR) << "Failed to set TCP_KEEPIDLE on fd: " << fd; + return false; + } + // Set seconds between TCP keep alives. + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &delay, sizeof(delay))) { + PLOG(ERROR) << "Failed to set TCP_KEEPINTVL on fd: " << fd; + return false; + } #endif } diff --git a/www/iridium/files/patch-net_socket_udp__socket__posix.cc b/www/iridium/files/patch-net_socket_udp__socket__posix.cc index 76788c85862b..3fbddb092c5d 100644 --- a/www/iridium/files/patch-net_socket_udp__socket__posix.cc +++ b/www/iridium/files/patch-net_socket_udp__socket__posix.cc @@ -1,39 +1,39 @@ ---- net/socket/udp_socket_posix.cc.orig 2025-11-06 10:11:34 UTC +--- net/socket/udp_socket_posix.cc.orig 2025-12-10 15:04:57 UTC +++ net/socket/udp_socket_posix.cc @@ -550,12 +550,17 @@ int UDPSocketPosix::SetRecvTos() { #endif // BUILDFLAG(IS_APPLE) } +#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 { @@ -576,7 +581,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. @@ -934,7 +939,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address) #if BUILDFLAG(IS_CHROMEOS) 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/iridium/files/patch-net_socket_udp__socket__unittest.cc b/www/iridium/files/patch-net_socket_udp__socket__unittest.cc index e5ccbca829a9..3263c88d2816 100644 --- a/www/iridium/files/patch-net_socket_udp__socket__unittest.cc +++ b/www/iridium/files/patch-net_socket_udp__socket__unittest.cc @@ -1,47 +1,47 @@ ---- net/socket/udp_socket_unittest.cc.orig 2025-10-28 14:29:43 UTC +--- net/socket/udp_socket_unittest.cc.orig 2025-12-10 15:04:57 UTC +++ net/socket/udp_socket_unittest.cc @@ -396,7 +396,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). @@ -707,7 +707,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/42050633): IP_MTU_DISCOVER is not implemented on Fuchsia. EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED)); #else @@ -729,7 +729,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/42050633): IP_MTU_DISCOVER is not implemented on Fuchsia. EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED)); #else @@ -795,7 +795,7 @@ TEST_F(UDPSocketTest, JoinMulticastGroup) { // 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 @@ -849,7 +849,7 @@ TEST_F(UDPSocketTest, MAYBE_SharedMulticastAddress) { NetLogSource()); ASSERT_THAT(client_socket.Connect(send_address), IsOk()); -#if !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_CHROMEOS) && !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/iridium/files/patch-net_third__party_quiche_BUILD.gn b/www/iridium/files/patch-net_third__party_quiche_BUILD.gn index 87c4e02d1819..63cddd95d2e8 100644 --- a/www/iridium/files/patch-net_third__party_quiche_BUILD.gn +++ b/www/iridium/files/patch-net_third__party_quiche_BUILD.gn @@ -1,11 +1,11 @@ ---- net/third_party/quiche/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- net/third_party/quiche/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ net/third_party/quiche/BUILD.gn @@ -28,7 +28,7 @@ import("//net/third_party/quiche/src/build/source_list import("//testing/libfuzzer/fuzzer_test.gni") import("//third_party/protobuf/proto_library.gni") -build_epoll_based_tools = is_linux || is_chromeos +build_epoll_based_tools = (is_linux && !is_bsd) || is_chromeos config("quiche_internal_config") { cflags = [] diff --git a/www/iridium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc b/www/iridium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc index eab2b10549fd..36c2c12d32df 100644 --- a/www/iridium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc +++ b/www/iridium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc @@ -1,20 +1,20 @@ ---- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2025-06-19 07:37:57 UTC +--- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2025-12-10 15:04:57 UTC +++ net/tools/cert_verify_tool/cert_verify_tool.cc @@ -35,7 +35,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 @@ -67,7 +67,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. // diff --git a/www/iridium/files/patch-net_tools_net__watcher_net__watcher.cc b/www/iridium/files/patch-net_tools_net__watcher_net__watcher.cc index 69fdeaaad68d..f3807142603b 100644 --- a/www/iridium/files/patch-net_tools_net__watcher_net__watcher.cc +++ b/www/iridium/files/patch-net_tools_net__watcher_net__watcher.cc @@ -1,38 +1,38 @@ ---- net/tools/net_watcher/net_watcher.cc.orig 2025-11-06 10:11:34 UTC +--- net/tools/net_watcher/net_watcher.cc.orig 2025-12-10 15:04:57 UTC +++ net/tools/net_watcher/net_watcher.cc @@ -31,7 +31,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 @@ -41,7 +41,7 @@ namespace { -#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"; @@ -159,7 +159,7 @@ class NetWatcher : } // namespace int main(int argc, char* argv[]) { -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::apple::ScopedNSAutoreleasePool pool; #endif base::AtExitManager exit_manager; @@ -176,7 +176,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/iridium/files/patch-net_traffic__annotation_network__traffic__annotation.h b/www/iridium/files/patch-net_traffic__annotation_network__traffic__annotation.h index 0b260ad8ad2c..046aed894694 100644 --- a/www/iridium/files/patch-net_traffic__annotation_network__traffic__annotation.h +++ b/www/iridium/files/patch-net_traffic__annotation_network__traffic__annotation.h @@ -1,20 +1,20 @@ ---- net/traffic_annotation/network_traffic_annotation.h.orig 2025-11-06 10:11:34 UTC +--- net/traffic_annotation/network_traffic_annotation.h.orig 2025-12-10 15:04:57 UTC +++ net/traffic_annotation/network_traffic_annotation.h @@ -369,7 +369,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 @@ -380,7 +380,7 @@ struct MutablePartialNetworkTrafficAnnotationTag { // // On Linux and Windows, use MISSING_TRAFFIC_ANNOTATION or // TRAFFIC_ANNOTATION_FOR_TESTS. -#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) #define NO_TRAFFIC_ANNOTATION_YET \ net::DefineNetworkTrafficAnnotation("undefined", "Nothing here yet.") diff --git a/www/iridium/files/patch-net_url__request_url__request.cc b/www/iridium/files/patch-net_url__request_url__request.cc index 19bb489c965b..a38b64278511 100644 --- a/www/iridium/files/patch-net_url__request_url__request.cc +++ b/www/iridium/files/patch-net_url__request_url__request.cc @@ -1,30 +1,30 @@ ---- net/url_request/url_request.cc.orig 2025-05-07 06:48:23 UTC +--- net/url_request/url_request.cc.orig 2025-12-10 15:04:57 UTC +++ net/url_request/url_request.cc @@ -10,6 +10,7 @@ # include #endif +#include "base/command_line.h" #include "base/compiler_specific.h" #include "base/functional/bind.h" #include "base/functional/callback.h" @@ -24,6 +25,7 @@ #include "base/types/optional_util.h" #include "base/types/pass_key.h" #include "base/values.h" +#include "content/public/common/content_switches.h" #include "net/base/auth.h" #include "net/base/features.h" #include "net/base/io_buffer.h" @@ -64,7 +66,10 @@ namespace iridium { void textlog_request(const char *caller, const GURL &url) { -#ifdef __linux__ + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + if (!command_line->HasSwitch(switches::kTrk)) + return; +#ifdef __unix__ bool tty = isatty(fileno(stderr)); #else bool tty = false; diff --git a/www/iridium/files/patch-net_url__request_url__request__context.cc b/www/iridium/files/patch-net_url__request_url__request__context.cc index c3838782375f..5cee27a9796f 100644 --- a/www/iridium/files/patch-net_url__request_url__request__context.cc +++ b/www/iridium/files/patch-net_url__request_url__request__context.cc @@ -1,11 +1,11 @@ ---- net/url_request/url_request_context.cc.orig 2025-09-11 13:19:19 UTC +--- net/url_request/url_request_context.cc.orig 2025-12-10 15:04:57 UTC +++ net/url_request/url_request_context.cc @@ -128,7 +128,7 @@ const HttpNetworkSessionContext* URLRequestContext::Ge return &network_session->context(); } -#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) std::unique_ptr URLRequestContext::CreateRequest( const GURL& url, RequestPriority priority, diff --git a/www/iridium/files/patch-net_url__request_url__request__context.h b/www/iridium/files/patch-net_url__request_url__request__context.h index dbf0b579fb38..ed8221f45c0d 100644 --- a/www/iridium/files/patch-net_url__request_url__request__context.h +++ b/www/iridium/files/patch-net_url__request_url__request__context.h @@ -1,11 +1,11 @@ ---- net/url_request/url_request_context.h.orig 2025-05-07 06:48:23 UTC +--- net/url_request/url_request_context.h.orig 2025-12-10 15:04:57 UTC +++ net/url_request/url_request_context.h @@ -86,7 +86,7 @@ class NET_EXPORT URLRequestContext final { // session. const HttpNetworkSessionContext* GetNetworkSessionContext() const; -#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // This function should not be used in Chromium, please use the version with // NetworkTrafficAnnotationTag in the future. // diff --git a/www/iridium/files/patch-net_url__request_url__request__context__builder.cc b/www/iridium/files/patch-net_url__request_url__request__context__builder.cc index d48009e5eb53..62b048c00545 100644 --- a/www/iridium/files/patch-net_url__request_url__request__context__builder.cc +++ b/www/iridium/files/patch-net_url__request_url__request__context__builder.cc @@ -1,11 +1,11 @@ ---- net/url_request/url_request_context_builder.cc.orig 2025-09-11 13:19:19 UTC +--- net/url_request/url_request_context_builder.cc.orig 2025-12-10 15:04:57 UTC +++ net/url_request/url_request_context_builder.cc @@ -446,7 +446,7 @@ std::unique_ptr URLRequestContextBu } if (!proxy_resolution_service_) { -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) // TODO(willchan): Switch to using this code when // ProxyConfigService::CreateSystemProxyConfigService()'s // signature doesn't suck. diff --git a/www/iridium/files/patch-net_websockets_websocket__basic__stream__adapters__test.cc b/www/iridium/files/patch-net_websockets_websocket__basic__stream__adapters__test.cc index 2d4937097db9..3953700589ec 100644 --- a/www/iridium/files/patch-net_websockets_websocket__basic__stream__adapters__test.cc +++ b/www/iridium/files/patch-net_websockets_websocket__basic__stream__adapters__test.cc @@ -1,15 +1,15 @@ ---- net/websockets/websocket_basic_stream_adapters_test.cc.orig 2025-10-28 14:29:43 UTC +--- net/websockets/websocket_basic_stream_adapters_test.cc.orig 2025-12-10 15:04:57 UTC +++ net/websockets/websocket_basic_stream_adapters_test.cc @@ -1097,10 +1097,10 @@ TEST_F(WebSocketSpdyStreamAdapterTest, OnCloseOkShouldBeTranslatedToConnectionClose) { spdy::SpdySerializedFrame response_headers( spdy_util_.ConstructSpdyResponseHeaders(1, ResponseHeaders(), false)); - spdy::SpdySerializedFrame close( + spdy::SpdySerializedFrame test_close( spdy_util_.ConstructSpdyRstStream(1, spdy::ERROR_CODE_NO_ERROR)); MockRead reads[] = {CreateMockRead(response_headers, 1), - CreateMockRead(close, 2), MockRead(ASYNC, 0, 3)}; + CreateMockRead(test_close, 2), MockRead(ASYNC, 0, 3)}; spdy::SpdySerializedFrame request_headers(spdy_util_.ConstructSpdyHeaders( 1, RequestHeaders(), DEFAULT_PRIORITY, false)); MockWrite writes[] = {CreateMockWrite(request_headers, 0)}; diff --git a/www/iridium/files/patch-pdf_pdfium_pdfium__engine.cc b/www/iridium/files/patch-pdf_pdfium_pdfium__engine.cc index 64b44e12e66a..8cea364fec28 100644 --- a/www/iridium/files/patch-pdf_pdfium_pdfium__engine.cc +++ b/www/iridium/files/patch-pdf_pdfium_pdfium__engine.cc @@ -1,20 +1,20 @@ ---- pdf/pdfium/pdfium_engine.cc.orig 2025-11-06 10:11:34 UTC +--- pdf/pdfium/pdfium_engine.cc.orig 2025-12-10 15:04:57 UTC +++ pdf/pdfium/pdfium_engine.cc @@ -116,7 +116,7 @@ #include "ui/accessibility/ax_features.mojom-features.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "pdf/pdfium/pdfium_font_linux.h" #endif @@ -578,7 +578,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/iridium/files/patch-printing_backend_cups__helper.cc b/www/iridium/files/patch-printing_backend_cups__helper.cc index efec9eb85041..4ad99ef35c28 100644 --- a/www/iridium/files/patch-printing_backend_cups__helper.cc +++ b/www/iridium/files/patch-printing_backend_cups__helper.cc @@ -1,52 +1,52 @@ ---- printing/backend/cups_helper.cc.orig 2025-09-11 13:19:19 UTC +--- printing/backend/cups_helper.cc.orig 2025-12-10 15:04:57 UTC +++ printing/backend/cups_helper.cc @@ -13,7 +13,7 @@ #include "base/time/time.h" #include "build/build_config.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include #include #include @@ -43,11 +43,11 @@ #include "url/gurl.h" #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "printing/backend/cups_weak_functions.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) using base::EqualsCaseInsensitiveASCII; #endif // BUILDFLAG(IS_LINUX) @@ -60,7 +60,7 @@ namespace { // able to start and respond on all systems within this duration. constexpr base::TimeDelta kCupsTimeout = base::Seconds(5); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // CUPS default max copies value (parsed from kCupsMaxCopies PPD attribute). constexpr int32_t kDefaultMaxCopies = 9999; constexpr char kCupsMaxCopies[] = "cupsMaxCopies"; @@ -766,7 +766,7 @@ const int kDefaultIPPServerPort = 631; } // namespace -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Helper wrapper around http_t structure, with connection and cleanup // functionality. HttpConnectionCUPS::HttpConnectionCUPS(const GURL& print_server_url, @@ -971,7 +971,7 @@ ScopedHttpPtr HttpConnect2(const char* host, int blocking, int msec, int* cancel) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ScopedHttpPtr http; if (httpConnect2) { http.reset(httpConnect2(host, port, diff --git a/www/iridium/files/patch-printing_backend_cups__helper.h b/www/iridium/files/patch-printing_backend_cups__helper.h index a226031b5ffe..7ac64d4f129c 100644 --- a/www/iridium/files/patch-printing_backend_cups__helper.h +++ b/www/iridium/files/patch-printing_backend_cups__helper.h @@ -1,11 +1,11 @@ ---- printing/backend/cups_helper.h.orig 2025-09-11 13:19:19 UTC +--- printing/backend/cups_helper.h.orig 2025-12-10 15:04:57 UTC +++ printing/backend/cups_helper.h @@ -32,7 +32,7 @@ constexpr int kCupsTimeoutMs = 3000; constexpr cups_ptype_t kDestinationsFilterMask = CUPS_PRINTER_FAX | CUPS_PRINTER_SCANNER | CUPS_PRINTER_DISCOVERED; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Helper wrapper around http_t structure, with connection and cleanup // functionality. class COMPONENT_EXPORT(PRINT_BACKEND) HttpConnectionCUPS { diff --git a/www/iridium/files/patch-printing_backend_cups__ipp__helper.cc b/www/iridium/files/patch-printing_backend_cups__ipp__helper.cc index 50d07bd8983c..655ed4be68eb 100644 --- a/www/iridium/files/patch-printing_backend_cups__ipp__helper.cc +++ b/www/iridium/files/patch-printing_backend_cups__ipp__helper.cc @@ -1,11 +1,11 @@ ---- printing/backend/cups_ipp_helper.cc.orig 2025-09-11 13:19:19 UTC +--- printing/backend/cups_ipp_helper.cc.orig 2025-12-10 15:04:57 UTC +++ printing/backend/cups_ipp_helper.cc @@ -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/iridium/files/patch-printing_backend_cups__jobs.cc b/www/iridium/files/patch-printing_backend_cups__jobs.cc index 00c63a26b126..36d2fee796f7 100644 --- a/www/iridium/files/patch-printing_backend_cups__jobs.cc +++ b/www/iridium/files/patch-printing_backend_cups__jobs.cc @@ -1,11 +1,11 @@ ---- printing/backend/cups_jobs.cc.orig 2025-09-11 13:19:19 UTC +--- printing/backend/cups_jobs.cc.orig 2025-12-10 15:04:57 UTC +++ printing/backend/cups_jobs.cc @@ -31,7 +31,7 @@ #include "printing/backend/cups_ipp_helper.h" #include "printing/printer_status.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "printing/backend/cups_weak_functions.h" #endif diff --git a/www/iridium/files/patch-printing_backend_cups__printer.cc b/www/iridium/files/patch-printing_backend_cups__printer.cc index 03eac1ccc465..03540e3e05f4 100644 --- a/www/iridium/files/patch-printing_backend_cups__printer.cc +++ b/www/iridium/files/patch-printing_backend_cups__printer.cc @@ -1,11 +1,11 @@ ---- printing/backend/cups_printer.cc.orig 2025-09-11 13:19:19 UTC +--- printing/backend/cups_printer.cc.orig 2025-12-10 15:04:57 UTC +++ printing/backend/cups_printer.cc @@ -24,7 +24,7 @@ #include "printing/print_job_constants.h" #include "url/gurl.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "printing/backend/cups_weak_functions.h" #endif diff --git a/www/iridium/files/patch-printing_backend_cups__weak__functions.h b/www/iridium/files/patch-printing_backend_cups__weak__functions.h index 7d2c3d40c9a5..21ba679404d2 100644 --- a/www/iridium/files/patch-printing_backend_cups__weak__functions.h +++ b/www/iridium/files/patch-printing_backend_cups__weak__functions.h @@ -1,11 +1,11 @@ ---- printing/backend/cups_weak_functions.h.orig 2025-09-11 13:19:19 UTC +--- printing/backend/cups_weak_functions.h.orig 2025-12-10 15:04:57 UTC +++ printing/backend/cups_weak_functions.h @@ -6,7 +6,7 @@ #include "build/build_config.h" -static_assert(BUILDFLAG(IS_LINUX)); +static_assert(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)); // Function availability can be tested by checking whether its address is not // nullptr. Weak symbols remove the need for platform specific build flags and diff --git a/www/iridium/files/patch-printing_backend_print__backend__cups.h b/www/iridium/files/patch-printing_backend_print__backend__cups.h index 63335dd1fa22..ded6b1d8f903 100644 --- a/www/iridium/files/patch-printing_backend_print__backend__cups.h +++ b/www/iridium/files/patch-printing_backend_print__backend__cups.h @@ -1,11 +1,11 @@ ---- printing/backend/print_backend_cups.h.orig 2025-09-11 13:19:19 UTC +--- printing/backend/print_backend_cups.h.orig 2025-12-10 15:04:57 UTC +++ printing/backend/print_backend_cups.h @@ -17,7 +17,7 @@ #include "printing/mojom/print.mojom.h" #include "url/gurl.h" -static_assert(BUILDFLAG(IS_LINUX)); +static_assert(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)); namespace printing { diff --git a/www/iridium/files/patch-printing_backend_print__backend__cups__ipp.cc b/www/iridium/files/patch-printing_backend_print__backend__cups__ipp.cc index d7020a617a2c..afa64542379e 100644 --- a/www/iridium/files/patch-printing_backend_print__backend__cups__ipp.cc +++ b/www/iridium/files/patch-printing_backend_print__backend__cups__ipp.cc @@ -1,11 +1,11 @@ ---- printing/backend/print_backend_cups_ipp.cc.orig 2025-09-11 13:19:19 UTC +--- printing/backend/print_backend_cups_ipp.cc.orig 2025-12-10 15:04:57 UTC +++ printing/backend/print_backend_cups_ipp.cc @@ -21,7 +21,7 @@ #include "printing/mojom/print.mojom.h" #include "printing/units.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "printing/backend/cups_weak_functions.h" #endif diff --git a/www/iridium/files/patch-printing_mojom_printing__context__mojom__traits.cc b/www/iridium/files/patch-printing_mojom_printing__context__mojom__traits.cc index 17143fab2eac..1a3287622c74 100644 --- a/www/iridium/files/patch-printing_mojom_printing__context__mojom__traits.cc +++ b/www/iridium/files/patch-printing_mojom_printing__context__mojom__traits.cc @@ -1,29 +1,29 @@ ---- printing/mojom/printing_context_mojom_traits.cc.orig 2025-09-11 13:19:19 UTC +--- printing/mojom/printing_context_mojom_traits.cc.orig 2025-12-10 15:04:57 UTC +++ printing/mojom/printing_context_mojom_traits.cc @@ -19,7 +19,7 @@ #include "base/numerics/safe_conversions.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "mojo/public/mojom/base/values.mojom.h" #endif @@ -217,7 +217,7 @@ bool StructTraits< } out->set_pages_per_sheet(data.pages_per_sheet()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) DCHECK(out->advanced_settings().empty()); if (!data.ReadAdvancedSettings(&out->advanced_settings())) return false; @@ -294,7 +294,7 @@ bool StructTraits< if (system_print_dialog_data.size() != dictionary_entries) { return false; } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // The dictionary must contain three strings. const base::Value* value = system_print_dialog_data.Find( printing::kLinuxSystemPrintDialogDataPrinter); diff --git a/www/iridium/files/patch-printing_mojom_printing__context__mojom__traits.h b/www/iridium/files/patch-printing_mojom_printing__context__mojom__traits.h index d3f22e8e85ba..8ad94470eb5c 100644 --- a/www/iridium/files/patch-printing_mojom_printing__context__mojom__traits.h +++ b/www/iridium/files/patch-printing_mojom_printing__context__mojom__traits.h @@ -1,11 +1,11 @@ ---- printing/mojom/printing_context_mojom_traits.h.orig 2025-05-07 06:48:23 UTC +--- printing/mojom/printing_context_mojom_traits.h.orig 2025-12-10 15:04:57 UTC +++ printing/mojom/printing_context_mojom_traits.h @@ -166,7 +166,7 @@ struct StructTraits #include "base/values.h" @@ -52,7 +52,7 @@ inline constexpr char kMacSystemPrintDialogDataPrintSe "print_settings"; #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) inline constexpr char kLinuxSystemPrintDialogDataPrinter[] = "printer_name"; inline constexpr char kLinuxSystemPrintDialogDataPrintSettings[] = "print_settings"; @@ -102,7 +102,7 @@ class COMPONENT_EXPORT(PRINTING_SETTINGS) PrintSetting std::string vendor_id; }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) using AdvancedSettings = std::map; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -290,7 +290,7 @@ class COMPONENT_EXPORT(PRINTING_SETTINGS) PrintSetting pages_per_sheet_ = pages_per_sheet; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) AdvancedSettings& advanced_settings() { return advanced_settings_; } const AdvancedSettings& advanced_settings() const { return advanced_settings_; @@ -451,7 +451,7 @@ class COMPONENT_EXPORT(PRINTING_SETTINGS) PrintSetting // Number of pages per sheet. int pages_per_sheet_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Advanced settings. AdvancedSettings advanced_settings_; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/iridium/files/patch-printing_print__settings__conversion.cc b/www/iridium/files/patch-printing_print__settings__conversion.cc index 386a3835cb9a..c137957b80a0 100644 --- a/www/iridium/files/patch-printing_print__settings__conversion.cc +++ b/www/iridium/files/patch-printing_print__settings__conversion.cc @@ -1,11 +1,11 @@ ---- printing/print_settings_conversion.cc.orig 2025-06-19 07:37:57 UTC +--- printing/print_settings_conversion.cc.orig 2025-12-10 15:04:57 UTC +++ printing/print_settings_conversion.cc @@ -291,7 +291,7 @@ std::unique_ptr PrintSettingsFromJobSet settings->set_is_modifiable(is_modifiable.value()); } -#if BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS)) +#if BUILDFLAG(IS_CHROMEOS) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_CUPS)) const base::Value::Dict* advanced_settings = job_settings.FindDict(kSettingAdvancedSettings); if (advanced_settings) { diff --git a/www/iridium/files/patch-printing_printing__context__linux.cc b/www/iridium/files/patch-printing_printing__context__linux.cc index 9015973bbbae..14cc0988b6f4 100644 --- a/www/iridium/files/patch-printing_printing__context__linux.cc +++ b/www/iridium/files/patch-printing_printing__context__linux.cc @@ -1,38 +1,38 @@ ---- printing/printing_context_linux.cc.orig 2025-06-19 07:37:57 UTC +--- printing/printing_context_linux.cc.orig 2025-12-10 15:04:57 UTC +++ printing/printing_context_linux.cc -@@ -23,7 +23,7 @@ +@@ -22,7 +22,7 @@ #endif // Avoid using LinuxUi on Fuchsia. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui.h" #endif -@@ -69,7 +69,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSett +@@ -68,7 +68,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSett ResetSettings(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!ui::LinuxUi::instance()) return mojom::ResultCode::kSuccess; -@@ -85,7 +85,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSett +@@ -84,7 +84,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSett } gfx::Size PrintingContextLinux::GetPdfPaperSizeDeviceUnits() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (ui::LinuxUi::instance()) return ui::LinuxUi::instance()->GetPdfPaperSize(this); #endif -@@ -98,7 +98,7 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterS +@@ -97,7 +97,7 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterS DCHECK(!printer_settings.show_system_dialog); DCHECK(!in_print_job_); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!ui::LinuxUi::instance()) return mojom::ResultCode::kSuccess; diff --git a/www/iridium/files/patch-printing_printing__features.cc b/www/iridium/files/patch-printing_printing__features.cc index 9e6a9dfd3c33..08cded012cbb 100644 --- a/www/iridium/files/patch-printing_printing__features.cc +++ b/www/iridium/files/patch-printing_printing__features.cc @@ -1,20 +1,20 @@ ---- printing/printing_features.cc.orig 2025-11-06 10:11:34 UTC +--- printing/printing_features.cc.orig 2025-12-10 15:04:57 UTC +++ printing/printing_features.cc @@ -22,7 +22,7 @@ BASE_FEATURE(kAddPrinterViaPrintscanmgr, base::FEATURE BASE_FEATURE(kApiPrintingMarginsAndScale, base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Use the CUPS IPP printing backend instead of the original CUPS backend that // calls the deprecated PPD API. BASE_FEATURE(kCupsIppPrintingBackend, base::FEATURE_DISABLED_BY_DEFAULT); @@ -54,7 +54,7 @@ BASE_FEATURE(kUseXpsForPrintingFromPdf, base::FEATURE_ // Enables printing interactions with the operating system to be performed // out-of-process. BASE_FEATURE(kEnableOopPrintDrivers, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/iridium/files/patch-printing_printing__features.h b/www/iridium/files/patch-printing_printing__features.h index 54c61f97687a..18886a157de9 100644 --- a/www/iridium/files/patch-printing_printing__features.h +++ b/www/iridium/files/patch-printing_printing__features.h @@ -1,11 +1,11 @@ ---- printing/printing_features.h.orig 2025-09-11 13:19:19 UTC +--- printing/printing_features.h.orig 2025-12-10 15:04:57 UTC +++ printing/printing_features.h @@ -24,7 +24,7 @@ COMPONENT_EXPORT(PRINTING_BASE) BASE_DECLARE_FEATURE(kApiPrintingMarginsAndScale); #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(PRINTING_BASE) BASE_DECLARE_FEATURE(kCupsIppPrintingBackend); #endif // BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.cc b/www/iridium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.cc index 5fa377a79c06..248d833a516b 100644 --- a/www/iridium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.cc +++ b/www/iridium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.cc @@ -1,50 +1,50 @@ ---- printing/sandbox/print_backend_sandbox_hook_linux.cc.orig 2025-05-07 06:48:23 UTC +--- printing/sandbox/print_backend_sandbox_hook_linux.cc.orig 2025-12-10 15:04:57 UTC +++ printing/sandbox/print_backend_sandbox_hook_linux.cc @@ -10,20 +10,27 @@ #include "base/path_service.h" #include "build/build_config.h" #include "printing/buildflags/buildflags.h" +#if !BUILDFLAG(IS_BSD) #include "sandbox/linux/syscall_broker/broker_command.h" #include "sandbox/linux/syscall_broker/broker_file_permission.h" #include "sandbox/policy/export.h" #include "sandbox/policy/linux/sandbox_linux.h" +#else +#include "sandbox/policy/sandbox.h" +#endif #if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_CUPS) #include "printing/backend/cups_connection_pool.h" #endif +#if !BUILDFLAG(IS_BSD) using sandbox::syscall_broker::BrokerFilePermission; using sandbox::syscall_broker::MakeBrokerCommandSet; +#endif namespace printing { +#if !BUILDFLAG(IS_BSD) namespace { sandbox::syscall_broker::BrokerCommandSet GetPrintBackendBrokerCommandSet() { @@ -76,9 +83,11 @@ std::vector GetPrintBackendFileP } } // namespace +#endif bool PrintBackendPreSandboxHook( sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) #if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_CUPS) // Create the socket connections to the CUPS server before engaging the // sandbox, since new connections cannot be made after that. @@ -91,6 +100,7 @@ bool PrintBackendPreSandboxHook( GetPrintBackendFilePermissions(), options); instance->EngageNamespaceSandboxIfPossible(); +#endif return true; } diff --git a/www/iridium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.h b/www/iridium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.h index ce222611e103..491a2c3d177c 100644 --- a/www/iridium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.h +++ b/www/iridium/files/patch-printing_sandbox_print__backend__sandbox__hook__linux.h @@ -1,16 +1,16 @@ ---- printing/sandbox/print_backend_sandbox_hook_linux.h.orig 2025-05-07 06:48:23 UTC +--- printing/sandbox/print_backend_sandbox_hook_linux.h.orig 2025-12-10 15:04:57 UTC +++ printing/sandbox/print_backend_sandbox_hook_linux.h @@ -5,8 +5,13 @@ #ifndef PRINTING_SANDBOX_PRINT_BACKEND_SANDBOX_HOOK_LINUX_H_ #define PRINTING_SANDBOX_PRINT_BACKEND_SANDBOX_HOOK_LINUX_H_ +#include "build/build_config.h" #include "base/component_export.h" +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif namespace printing { diff --git a/www/iridium/files/patch-remoting_base_constants.h b/www/iridium/files/patch-remoting_base_constants.h index 755bf706ac0e..a6fcbc645683 100644 --- a/www/iridium/files/patch-remoting_base_constants.h +++ b/www/iridium/files/patch-remoting_base_constants.h @@ -1,11 +1,11 @@ ---- remoting/base/constants.h.orig 2025-06-19 07:37:57 UTC +--- remoting/base/constants.h.orig 2025-12-10 15:04:57 UTC +++ remoting/base/constants.h @@ -27,7 +27,7 @@ const int kDefaultDpi = 96; // The video frame rate. constexpr int kTargetFrameRate = 30; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) inline constexpr char kChromeRemoteDesktopSessionEnvVar[] = "CHROME_REMOTE_DESKTOP_SESSION"; #endif diff --git a/www/iridium/files/patch-remoting_base_host__settings.cc b/www/iridium/files/patch-remoting_base_host__settings.cc index 72a3e103c91b..eee8523ae9ae 100644 --- a/www/iridium/files/patch-remoting_base_host__settings.cc +++ b/www/iridium/files/patch-remoting_base_host__settings.cc @@ -1,20 +1,20 @@ ---- remoting/base/host_settings.cc.orig 2025-05-07 06:48:23 UTC +--- remoting/base/host_settings.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/base/host_settings.cc @@ -7,7 +7,7 @@ #include "base/no_destructor.h" #include "build/build_config.h" -#if BUILDFLAG(IS_APPLE) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(IS_APPLE) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) #include "remoting/base/file_host_settings.h" #endif // BUILDFLAG(IS_LINUX) @@ -44,7 +44,7 @@ HostSettings::~HostSettings() = default; // static HostSettings* HostSettings::GetInstance() { -#if BUILDFLAG(IS_APPLE) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(IS_APPLE) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) static base::NoDestructor instance( FileHostSettings::GetSettingsFilePath()); #elif BUILDFLAG(IS_WIN) diff --git a/www/iridium/files/patch-remoting_codec_webrtc__video__encoder__vpx.cc b/www/iridium/files/patch-remoting_codec_webrtc__video__encoder__vpx.cc index d32adda37d50..95621ae56f0d 100644 --- a/www/iridium/files/patch-remoting_codec_webrtc__video__encoder__vpx.cc +++ b/www/iridium/files/patch-remoting_codec_webrtc__video__encoder__vpx.cc @@ -1,11 +1,11 @@ ---- remoting/codec/webrtc_video_encoder_vpx.cc.orig 2025-05-07 06:48:23 UTC +--- remoting/codec/webrtc_video_encoder_vpx.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/codec/webrtc_video_encoder_vpx.cc @@ -92,7 +92,7 @@ void SetVp8CodecParameters(vpx_codec_enc_cfg_t* config const webrtc::DesktopSize& size) { SetCommonCodecParameters(config, size); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Linux, using too many threads for VP8 encoding has been linked to high // CPU usage on machines that are under stress. See http://crbug.com/1151148. // 5/3/2022 update: Perf testing has shown that doubling the number of threads diff --git a/www/iridium/files/patch-remoting_host_base_desktop__environment__options.cc b/www/iridium/files/patch-remoting_host_base_desktop__environment__options.cc index 0c26dcf1c068..fd46f3b5e148 100644 --- a/www/iridium/files/patch-remoting_host_base_desktop__environment__options.cc +++ b/www/iridium/files/patch-remoting_host_base_desktop__environment__options.cc @@ -1,11 +1,11 @@ ---- remoting/host/base/desktop_environment_options.cc.orig 2025-05-07 06:48:23 UTC +--- remoting/host/base/desktop_environment_options.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/base/desktop_environment_options.cc @@ -109,7 +109,7 @@ bool DesktopEnvironmentOptions::capture_video_on_dedic // TODO(joedow): Determine whether we can migrate additional platforms to // using the DesktopCaptureWrapper instead of the DesktopCaptureProxy. Then // clean up DesktopCapturerProxy::Core::CreateCapturer(). -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return capture_video_on_dedicated_thread_; #else return false; diff --git a/www/iridium/files/patch-remoting_host_base_switches.cc b/www/iridium/files/patch-remoting_host_base_switches.cc index 6519b3cd630b..224aafbd423d 100644 --- a/www/iridium/files/patch-remoting_host_base_switches.cc +++ b/www/iridium/files/patch-remoting_host_base_switches.cc @@ -1,18 +1,18 @@ ---- remoting/host/base/switches.cc.orig 2025-06-19 07:37:57 UTC +--- remoting/host/base/switches.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/base/switches.cc @@ -23,13 +23,13 @@ const char kProcessTypeEvaluateCapability[] = "evaluat const char kProcessTypeFileChooser[] = "file_chooser"; const char kProcessTypeUrlForwarderConfigurator[] = "url_forwarder_configurator"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kProcessTypeXSessionChooser[] = "xsession_chooser"; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) const char kEvaluateCapabilitySwitchName[] = "evaluate-type"; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kEnableWtmpdb[] = "enable-wtmpdb"; #endif diff --git a/www/iridium/files/patch-remoting_host_base_switches.h b/www/iridium/files/patch-remoting_host_base_switches.h index 378e547502aa..f90bf4fa709a 100644 --- a/www/iridium/files/patch-remoting_host_base_switches.h +++ b/www/iridium/files/patch-remoting_host_base_switches.h @@ -1,18 +1,18 @@ ---- remoting/host/base/switches.h.orig 2025-06-19 07:37:57 UTC +--- remoting/host/base/switches.h.orig 2025-12-10 15:04:57 UTC +++ remoting/host/base/switches.h @@ -35,13 +35,13 @@ extern const char kProcessTypeRdpDesktopSession[]; extern const char kProcessTypeEvaluateCapability[]; extern const char kProcessTypeFileChooser[]; extern const char kProcessTypeUrlForwarderConfigurator[]; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kProcessTypeXSessionChooser[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) extern const char kEvaluateCapabilitySwitchName[]; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Used to record client sessions to wtmpd. extern const char kEnableWtmpdb[]; #endif diff --git a/www/iridium/files/patch-remoting_host_chromoting__host.cc b/www/iridium/files/patch-remoting_host_chromoting__host.cc index 24c263f5aa18..eeb66da2997a 100644 --- a/www/iridium/files/patch-remoting_host_chromoting__host.cc +++ b/www/iridium/files/patch-remoting_host_chromoting__host.cc @@ -1,11 +1,11 @@ ---- remoting/host/chromoting_host.cc.orig 2025-09-11 13:19:19 UTC +--- remoting/host/chromoting_host.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/chromoting_host.cc @@ -138,7 +138,7 @@ void ChromotingHost::Start(const std::string& host_own &ChromotingHost::OnIncomingSession, base::Unretained(this))); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void ChromotingHost::StartChromotingHostServices() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(!ipc_server_); diff --git a/www/iridium/files/patch-remoting_host_chromoting__host.h b/www/iridium/files/patch-remoting_host_chromoting__host.h index 85529fb300c8..b305716cd3e9 100644 --- a/www/iridium/files/patch-remoting_host_chromoting__host.h +++ b/www/iridium/files/patch-remoting_host_chromoting__host.h @@ -1,29 +1,29 @@ ---- remoting/host/chromoting_host.h.orig 2025-05-07 06:48:23 UTC +--- remoting/host/chromoting_host.h.orig 2025-12-10 15:04:57 UTC +++ remoting/host/chromoting_host.h @@ -36,7 +36,7 @@ #include "remoting/protocol/session_manager.h" #include "remoting/protocol/transport_context.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/chromoting_host_services_server.h" #endif @@ -112,7 +112,7 @@ class ChromotingHost : public ClientSession::EventHand // This method can only be called once during the lifetime of this object. void Start(const std::string& host_owner); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Starts running the ChromotingHostServices server and listening for incoming // IPC binding requests. // Currently only Linux runs the ChromotingHostServices server on the host @@ -222,7 +222,7 @@ class ChromotingHost : public ClientSession::EventHand // List of host extensions. std::vector> extensions_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // IPC server that runs the CRD host service API. Non-null if the server name // is set and the host is started. // Currently only Linux runs the ChromotingHostServices server on the host diff --git a/www/iridium/files/patch-remoting_host_chromoting__host__context.cc b/www/iridium/files/patch-remoting_host_chromoting__host__context.cc index fef136f0a176..208802e3bafc 100644 --- a/www/iridium/files/patch-remoting_host_chromoting__host__context.cc +++ b/www/iridium/files/patch-remoting_host_chromoting__host__context.cc @@ -1,11 +1,11 @@ ---- remoting/host/chromoting_host_context.cc.orig 2025-05-07 06:48:23 UTC +--- remoting/host/chromoting_host_context.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/chromoting_host_context.cc @@ -335,7 +335,7 @@ std::unique_ptr ChromotingHostC // on a UI thread. scoped_refptr input_task_runner = AutoThread::CreateWithType("ChromotingInputThread", ui_task_runner, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::MessagePumpType::UI); #else base::MessagePumpType::IO); diff --git a/www/iridium/files/patch-remoting_host_chromoting__host__services__client.cc b/www/iridium/files/patch-remoting_host_chromoting__host__services__client.cc index a3cc2b734608..4f19481d344f 100644 --- a/www/iridium/files/patch-remoting_host_chromoting__host__services__client.cc +++ b/www/iridium/files/patch-remoting_host_chromoting__host__services__client.cc @@ -1,11 +1,11 @@ ---- remoting/host/chromoting_host_services_client.cc.orig 2025-09-11 13:19:19 UTC +--- remoting/host/chromoting_host_services_client.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/chromoting_host_services_client.cc @@ -139,7 +139,7 @@ bool ChromotingHostServicesClient::EnsureSessionServic if (session_services_remote_.is_bound()) { return true; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!environment_->HasVar(kChromeRemoteDesktopSessionEnvVar)) { LOG(WARNING) << "Current desktop environment is not remotable."; return false; diff --git a/www/iridium/files/patch-remoting_host_client__session.cc b/www/iridium/files/patch-remoting_host_client__session.cc index dab2b504767d..c3d908c06ca7 100644 --- a/www/iridium/files/patch-remoting_host_client__session.cc +++ b/www/iridium/files/patch-remoting_host_client__session.cc @@ -1,11 +1,11 @@ ---- remoting/host/client_session.cc.orig 2025-05-07 06:48:23 UTC +--- remoting/host/client_session.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/client_session.cc -@@ -188,7 +188,7 @@ void ClientSession::NotifyClientResolution( +@@ -195,7 +195,7 @@ void ClientSession::NotifyClientResolution( if (effective_policies_.curtain_required.value_or(false)) { dpi_vector.set(resolution.x_dpi(), resolution.y_dpi()); } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) dpi_vector.set(resolution.x_dpi(), resolution.y_dpi()); #endif diff --git a/www/iridium/files/patch-remoting_host_crash_crash__file__uploader.cc b/www/iridium/files/patch-remoting_host_crash_crash__file__uploader.cc index 3b8fe884f6af..23252acf35fc 100644 --- a/www/iridium/files/patch-remoting_host_crash_crash__file__uploader.cc +++ b/www/iridium/files/patch-remoting_host_crash_crash__file__uploader.cc @@ -1,11 +1,11 @@ ---- remoting/host/crash/crash_file_uploader.cc.orig 2025-11-06 10:11:34 UTC +--- remoting/host/crash/crash_file_uploader.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/crash/crash_file_uploader.cc @@ -45,7 +45,7 @@ constexpr char kMinidumpFileName[] = "dump"; #if BUILDFLAG(IS_WIN) constexpr char kProductNameValue[] = "Chromoting"; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) constexpr char kProductNameValue[] = "Chromoting_Linux"; #elif BUILDFLAG(IS_MAC) constexpr char kProductNameValue[] = "Chromoting_Mac"; diff --git a/www/iridium/files/patch-remoting_host_create__desktop__interaction__strategy__factory.cc b/www/iridium/files/patch-remoting_host_create__desktop__interaction__strategy__factory.cc index ef9b0b3ed39d..9e22348924b2 100644 --- a/www/iridium/files/patch-remoting_host_create__desktop__interaction__strategy__factory.cc +++ b/www/iridium/files/patch-remoting_host_create__desktop__interaction__strategy__factory.cc @@ -1,20 +1,20 @@ ---- remoting/host/create_desktop_interaction_strategy_factory.cc.orig 2025-11-06 10:11:34 UTC +--- remoting/host/create_desktop_interaction_strategy_factory.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/create_desktop_interaction_strategy_factory.cc @@ -12,7 +12,7 @@ #include "remoting/host/desktop_interaction_strategy.h" #include "remoting/host/legacy_interaction_strategy.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/linux/gnome_interaction_strategy.h" #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" #endif // BUILDFLAG(IS_LINUX) @@ -25,7 +25,7 @@ CreateDesktopInteractionStrategyFactory( scoped_refptr ui_task_runner, scoped_refptr video_capture_task_runner, scoped_refptr input_task_runner) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (webrtc::DesktopCapturer::IsRunningUnderWayland()) { return std::make_unique(ui_task_runner); } diff --git a/www/iridium/files/patch-remoting_host_evaluate__capability.cc b/www/iridium/files/patch-remoting_host_evaluate__capability.cc index a1b0d65c4054..f167a7963f4e 100644 --- a/www/iridium/files/patch-remoting_host_evaluate__capability.cc +++ b/www/iridium/files/patch-remoting_host_evaluate__capability.cc @@ -1,11 +1,11 @@ ---- remoting/host/evaluate_capability.cc.orig 2025-05-07 06:48:23 UTC +--- remoting/host/evaluate_capability.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/evaluate_capability.cc @@ -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/iridium/files/patch-remoting_host_host__attributes.cc b/www/iridium/files/patch-remoting_host_host__attributes.cc index 732e08e0f836..b6e26996f89e 100644 --- a/www/iridium/files/patch-remoting_host_host__attributes.cc +++ b/www/iridium/files/patch-remoting_host_host__attributes.cc @@ -1,11 +1,11 @@ ---- remoting/host/host_attributes.cc.orig 2025-10-28 14:29:43 UTC +--- remoting/host/host_attributes.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/host_attributes.cc @@ -102,7 +102,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/iridium/files/patch-remoting_host_host__details.cc b/www/iridium/files/patch-remoting_host_host__details.cc index 19d2f60b0cd0..8c79f32d757a 100644 --- a/www/iridium/files/patch-remoting_host_host__details.cc +++ b/www/iridium/files/patch-remoting_host_host__details.cc @@ -1,29 +1,29 @@ ---- remoting/host/host_details.cc.orig 2025-05-07 06:48:23 UTC +--- remoting/host/host_details.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/host_details.cc @@ -7,7 +7,7 @@ #include "base/system/sys_info.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/linux_util.h" #endif @@ -22,7 +22,7 @@ std::string GetHostOperatingSystemName() { return "Mac"; #elif BUILDFLAG(IS_CHROMEOS) return "ChromeOS"; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return "Linux"; #elif BUILDFLAG(IS_ANDROID) return "Android"; @@ -34,7 +34,7 @@ std::string GetHostOperatingSystemName() { // Get the host Operating System Version, removing the need to check for OS // definitions and keeps the format used consistent. std::string GetHostOperatingSystemVersion() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return base::GetLinuxDistro(); #else return base::SysInfo::OperatingSystemVersion(); diff --git a/www/iridium/files/patch-remoting_host_host__main.cc b/www/iridium/files/patch-remoting_host_host__main.cc index ce6ba887651f..1bc882fc7592 100644 --- a/www/iridium/files/patch-remoting_host_host__main.cc +++ b/www/iridium/files/patch-remoting_host_host__main.cc @@ -1,38 +1,38 @@ ---- remoting/host/host_main.cc.orig 2025-09-11 13:19:19 UTC +--- remoting/host/host_main.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/host_main.cc @@ -57,7 +57,7 @@ int FileChooserMain(); int RdpDesktopSessionMain(); int UrlForwarderConfiguratorMain(); #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) int XSessionChooserMain(); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -70,7 +70,7 @@ const char kUsageMessage[] = "\n" "Options:\n" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) " --audio-pipe-name= - Sets the pipe name to capture audio on " "Linux.\n" #endif // BUILDFLAG(IS_LINUX) @@ -163,7 +163,7 @@ MainRoutineFn SelectMainRoutine(const std::string& pro } else if (process_type == kProcessTypeUrlForwarderConfigurator) { main_routine = &UrlForwarderConfiguratorMain; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) } else if (process_type == kProcessTypeXSessionChooser) { main_routine = &XSessionChooserMain; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -231,7 +231,7 @@ int HostMain(int argc, char** argv) { // Note that we enable crash reporting only if the user has opted in to having // the crash reports uploaded. if (IsUsageStatsAllowed()) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) InitializeCrashpadReporting(); #elif BUILDFLAG(IS_WIN) // TODO: joedow - Enable crash reporting for the RDP process. diff --git a/www/iridium/files/patch-remoting_host_host__power__save__blocker.cc b/www/iridium/files/patch-remoting_host_host__power__save__blocker.cc index 3b694530fa14..af550449b68a 100644 --- a/www/iridium/files/patch-remoting_host_host__power__save__blocker.cc +++ b/www/iridium/files/patch-remoting_host_host__power__save__blocker.cc @@ -1,11 +1,11 @@ ---- remoting/host/host_power_save_blocker.cc.orig 2025-11-06 10:11:34 UTC +--- remoting/host/host_power_save_blocker.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/host_power_save_blocker.cc @@ -29,7 +29,7 @@ HostPowerSaveBlocker::~HostPowerSaveBlocker() { void HostPowerSaveBlocker::OnClientConnected(const std::string& jid) { // TODO(447203893): Re-enable this on Linux once the bug is fixed. -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) blocker_ = std::make_unique( device::mojom::WakeLockType::kPreventDisplaySleep, device::mojom::WakeLockReason::kOther, "Remoting session is active", diff --git a/www/iridium/files/patch-remoting_host_ipc__constants.cc b/www/iridium/files/patch-remoting_host_ipc__constants.cc index 39ea397a36f3..e91d2527e17d 100644 --- a/www/iridium/files/patch-remoting_host_ipc__constants.cc +++ b/www/iridium/files/patch-remoting_host_ipc__constants.cc @@ -1,20 +1,20 @@ ---- remoting/host/ipc_constants.cc.orig 2025-05-07 06:48:23 UTC +--- remoting/host/ipc_constants.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/ipc_constants.cc @@ -17,7 +17,7 @@ namespace remoting { namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #if !defined(NDEBUG) // Use a different IPC name for debug builds so that we can run the host @@ -81,7 +81,7 @@ GetChromotingHostServicesServerName() { static const base::NoDestructor server_name( named_mojo_ipc_server::WorkingDirectoryIndependentServerNameFromUTF8( -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Linux host creates the socket file in /tmp, and it won't be // deleted until reboot, so we put username in the path in case // the user switches the host owner. diff --git a/www/iridium/files/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc b/www/iridium/files/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc index 411596b47c75..e1061b70e54f 100644 --- a/www/iridium/files/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc +++ b/www/iridium/files/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc @@ -1,65 +1,65 @@ ---- remoting/host/it2me/it2me_native_messaging_host_main.cc.orig 2025-09-11 13:19:19 UTC +--- remoting/host/it2me/it2me_native_messaging_host_main.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/it2me/it2me_native_messaging_host_main.cc @@ -29,7 +29,7 @@ #include "remoting/host/resources.h" #include "remoting/host/usage_stats_consent.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if defined(REMOTING_USE_X11) #include #include "base/linux_util.h" @@ -43,7 +43,7 @@ #include "remoting/host/mac/permission_utils.h" #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/base/crash/crash_reporting_crashpad.h" #endif // BUILDFLAG(IS_LINUX) @@ -79,7 +79,7 @@ bool CurrentProcessHasUiAccess() { // Creates a It2MeNativeMessagingHost instance, attaches it to stdin/stdout and // runs the task executor until It2MeNativeMessagingHost signals shutdown. int It2MeNativeMessagingHostMain(int argc, char** argv) { -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) // Initialize Xlib for multi-threaded use, allowing non-Chromium code to // use X11 safely (such as the WebRTC capturer, GTK ...) x11::InitXlib(); @@ -104,7 +104,7 @@ int It2MeNativeMessagingHostMain(int argc, char** argv // needs to be initialized first, so that the preference for crash-reporting // can be looked up in the config file. if (IsUsageStatsAllowed()) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) InitializeCrashpadReporting(); #elif BUILDFLAG(IS_WIN) InitializeBreakpadReporting(); @@ -129,7 +129,7 @@ int It2MeNativeMessagingHostMain(int argc, char** argv remoting::LoadResources(""); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) // Required for any calls into GTK functions, such as the Disconnect and // Continue windows. Calling with nullptr arguments because we don't have // any command line arguments for gtk to consume. @@ -257,7 +257,7 @@ int It2MeNativeMessagingHostMain(int argc, char** argv PolicyWatcher::CreateWithTaskRunner(context->file_task_runner(), context->management_service()); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) scoped_refptr input_task_runner; // Create an X11EventSource on all UI threads, so the global X11 connection // (x11::Connection::Get()) can dispatch X events. @@ -281,7 +281,7 @@ int It2MeNativeMessagingHostMain(int argc, char** argv // Run the loop until channel is alive. run_loop.Run(); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) input_task_runner->PostTask(FROM_HERE, base::BindOnce([]() { delete ui::X11EventSource::GetInstance(); })); diff --git a/www/iridium/files/patch-remoting_host_me2me__desktop__environment.cc b/www/iridium/files/patch-remoting_host_me2me__desktop__environment.cc index 6539dd3ec9e1..89d6f23f3f86 100644 --- a/www/iridium/files/patch-remoting_host_me2me__desktop__environment.cc +++ b/www/iridium/files/patch-remoting_host_me2me__desktop__environment.cc @@ -1,29 +1,29 @@ ---- remoting/host/me2me_desktop_environment.cc.orig 2025-10-28 14:29:43 UTC +--- remoting/host/me2me_desktop_environment.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/me2me_desktop_environment.cc @@ -119,7 +119,7 @@ std::string Me2MeDesktopEnvironment::GetCapabilities() capabilities += protocol::kRemoteWebAuthnCapability; } -#if BUILDFLAG(IS_LINUX) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) capabilities += " "; capabilities += protocol::kMultiStreamCapability; capabilities += " "; @@ -168,7 +168,7 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnvironment( // properly under Xvfb. mutable_desktop_capture_options()->set_use_update_notifications(true); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Setting this option to false means that the capture differ wrapper will not // be used when the X11 capturer is selected. This reduces the X11 capture // time by a few milliseconds per frame and is safe because we can rely on @@ -195,7 +195,7 @@ bool Me2MeDesktopEnvironment::InitializeSecurity( // Otherwise, if the session is shared with the local user start monitoring // the local input and create the in-session UI. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool want_user_interface = false; #elif BUILDFLAG(IS_APPLE) // Don't try to display any UI on top of the system's login screen as this diff --git a/www/iridium/files/patch-remoting_host_mojo__caller__security__checker.cc b/www/iridium/files/patch-remoting_host_mojo__caller__security__checker.cc index cf4d8958bd36..fd5556fd032f 100644 --- a/www/iridium/files/patch-remoting_host_mojo__caller__security__checker.cc +++ b/www/iridium/files/patch-remoting_host_mojo__caller__security__checker.cc @@ -1,29 +1,29 @@ ---- remoting/host/mojo_caller_security_checker.cc.orig 2025-06-19 07:37:57 UTC +--- remoting/host/mojo_caller_security_checker.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/mojo_caller_security_checker.cc @@ -32,7 +32,7 @@ namespace remoting { namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) constexpr auto kAllowedCallerProgramNames = base::MakeFixedFlatSet({ "remote-open-url", @@ -60,7 +60,7 @@ bool IsTrustedMojoEndpoint( const named_mojo_ipc_server::ConnectionInfo& caller) { #if BUILDFLAG(IS_MAC) return IsProcessTrusted(caller.audit_token, kAllowedIdentifiers); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // TODO: yuweih - see if it's possible to move away from PID-based security // checks, which might be susceptible of PID reuse attacks. @@ -84,7 +84,7 @@ bool IsTrustedMojoEndpoint( base::FilePath::StringType program_name = caller_process_image_path.BaseName().value(); if (!kAllowedCallerProgramNames.contains(program_name)) { -#if BUILDFLAG(IS_LINUX) && !defined(NDEBUG) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !defined(NDEBUG) // Linux binaries generated in out/Debug are underscore-separated. To make // debugging easier, we just check the name again with underscores replaced // with hyphens. diff --git a/www/iridium/files/patch-remoting_host_policy__watcher.cc b/www/iridium/files/patch-remoting_host_policy__watcher.cc index 416893e72fd5..4378df1d9325 100644 --- a/www/iridium/files/patch-remoting_host_policy__watcher.cc +++ b/www/iridium/files/patch-remoting_host_policy__watcher.cc @@ -1,11 +1,11 @@ ---- remoting/host/policy_watcher.cc.orig 2025-09-11 13:19:19 UTC +--- remoting/host/policy_watcher.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/policy_watcher.cc @@ -183,7 +183,7 @@ base::Value::Dict PolicyWatcher::GetDefaultPolicies() result.Set(key::kRemoteAccessHostAllowEnterpriseFileTransfer, false); result.Set(key::kClassManagementEnabled, "disabled"); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) result.Set(key::kRemoteAccessHostMatchUsername, false); #endif #if !BUILDFLAG(IS_CHROMEOS) diff --git a/www/iridium/files/patch-remoting_host_remote__open__url_remote__open__url__client.cc b/www/iridium/files/patch-remoting_host_remote__open__url_remote__open__url__client.cc index 49f80ced7afc..6b7ba9c4e781 100644 --- a/www/iridium/files/patch-remoting_host_remote__open__url_remote__open__url__client.cc +++ b/www/iridium/files/patch-remoting_host_remote__open__url_remote__open__url__client.cc @@ -1,20 +1,20 @@ ---- remoting/host/remote_open_url/remote_open_url_client.cc.orig 2025-05-07 06:48:23 UTC +--- remoting/host/remote_open_url/remote_open_url_client.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/remote_open_url/remote_open_url_client.cc @@ -18,7 +18,7 @@ #include "remoting/host/mojom/chromoting_host_services.mojom.h" #include "remoting/host/mojom/remote_url_opener.mojom.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/remote_open_url/remote_open_url_client_delegate_linux.h" #elif BUILDFLAG(IS_WIN) #include "remoting/host/remote_open_url/remote_open_url_client_delegate_win.h" @@ -31,7 +31,7 @@ namespace { constexpr base::TimeDelta kRequestTimeout = base::Seconds(5); std::unique_ptr CreateDelegate() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return std::make_unique(); #elif BUILDFLAG(IS_WIN) return std::make_unique(); diff --git a/www/iridium/files/patch-remoting_host_remote__open__url_remote__open__url__main.cc b/www/iridium/files/patch-remoting_host_remote__open__url_remote__open__url__main.cc index a32bd0eb1740..55144db8809c 100644 --- a/www/iridium/files/patch-remoting_host_remote__open__url_remote__open__url__main.cc +++ b/www/iridium/files/patch-remoting_host_remote__open__url_remote__open__url__main.cc @@ -1,20 +1,20 @@ ---- remoting/host/remote_open_url/remote_open_url_main.cc.orig 2025-09-11 13:19:19 UTC +--- remoting/host/remote_open_url/remote_open_url_main.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/remote_open_url/remote_open_url_main.cc @@ -27,7 +27,7 @@ #include "remoting/host/usage_stats_consent.h" #include "ui/base/l10n/l10n_util.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/base/crash/crash_reporting_crashpad.h" #endif // BUILDFLAG(IS_LINUX) @@ -51,7 +51,7 @@ int RemoteOpenUrlMain(int argc, char** argv) { #if defined(REMOTING_ENABLE_CRASH_REPORTING) if (IsUsageStatsAllowed()) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) InitializeCrashpadReporting(); #elif BUILDFLAG(IS_WIN) InitializeBreakpadReporting(); diff --git a/www/iridium/files/patch-remoting_host_remote__open__url_remote__open__url__util.cc b/www/iridium/files/patch-remoting_host_remote__open__url_remote__open__url__util.cc index 84d3fbe5ce60..9c67935c6716 100644 --- a/www/iridium/files/patch-remoting_host_remote__open__url_remote__open__url__util.cc +++ b/www/iridium/files/patch-remoting_host_remote__open__url_remote__open__url__util.cc @@ -1,11 +1,11 @@ ---- remoting/host/remote_open_url/remote_open_url_util.cc.orig 2025-05-07 06:48:23 UTC +--- remoting/host/remote_open_url/remote_open_url_util.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/remote_open_url/remote_open_url_util.cc @@ -29,7 +29,7 @@ const wchar_t kRegisteredApplicationsKeyName[] = #endif // BUILDFLAG(IS_WIN) bool IsRemoteOpenUrlSupported() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return true; #elif BUILDFLAG(IS_WIN) // The MSI installs the ProgID and capabilities into registry, but not the diff --git a/www/iridium/files/patch-remoting_host_remote__open__url_url__forwarder__configurator.cc b/www/iridium/files/patch-remoting_host_remote__open__url_url__forwarder__configurator.cc index 90eb5e0b6237..3374e9b085d6 100644 --- a/www/iridium/files/patch-remoting_host_remote__open__url_url__forwarder__configurator.cc +++ b/www/iridium/files/patch-remoting_host_remote__open__url_url__forwarder__configurator.cc @@ -1,11 +1,11 @@ ---- remoting/host/remote_open_url/url_forwarder_configurator.cc.orig 2025-09-11 13:19:19 UTC +--- remoting/host/remote_open_url/url_forwarder_configurator.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/remote_open_url/url_forwarder_configurator.cc @@ -13,7 +13,7 @@ UrlForwarderConfigurator::UrlForwarderConfigurator() = UrlForwarderConfigurator::~UrlForwarderConfigurator() = default; -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_WIN) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_BSD) // static std::unique_ptr UrlForwarderConfigurator::Create() { diff --git a/www/iridium/files/patch-remoting_host_remoting__me2me__host.cc b/www/iridium/files/patch-remoting_host_remoting__me2me__host.cc index 87600a3f43dd..9afb2169cb99 100644 --- a/www/iridium/files/patch-remoting_host_remoting__me2me__host.cc +++ b/www/iridium/files/patch-remoting_host_remoting__me2me__host.cc @@ -1,155 +1,155 @@ ---- remoting/host/remoting_me2me_host.cc.orig 2025-10-28 14:29:43 UTC +--- remoting/host/remoting_me2me_host.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/remoting_me2me_host.cc @@ -140,7 +140,7 @@ #include "remoting/host/mac/permission_utils.h" #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if defined(REMOTING_USE_X11) #include @@ -151,7 +151,7 @@ #endif // defined(REMOTING_USE_X11) #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/linux_util.h" #include "remoting/host/linux/audio_capturer_linux.h" #include "remoting/host/linux/certificate_watcher.h" @@ -166,7 +166,7 @@ #include "remoting/host/pairing_registry_delegate_win.h" #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/base/crash/crash_reporting_crashpad.h" #include "remoting/host/host_wtmpdb_logger.h" #endif // BUILDFLAG(IS_LINUX) @@ -200,7 +200,7 @@ const char kApplicationName[] = "chromoting"; const char kStdinConfigPath[] = "-"; #endif // !defined(REMOTING_MULTI_PROCESS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The command line switch used to pass name of the pipe to capture audio on // linux. const char kAudioPipeSwitchName[] = "audio-pipe-name"; @@ -448,7 +448,7 @@ class HostProcess : public ConfigWatcher::Delegate, std::unique_ptr agent_process_broker_client_; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Watch for certificate changes and kill the host when changes occur std::unique_ptr cert_watcher_; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -510,7 +510,7 @@ class HostProcess : public ConfigWatcher::Delegate, std::unique_ptr ftl_echo_message_listener_; std::unique_ptr host_event_logger_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr host_wtmpdb_logger_; #endif std::unique_ptr power_save_blocker_; @@ -837,7 +837,7 @@ void HostProcess::StartOnNetworkThread() { void HostProcess::ShutdownOnNetworkThread() { DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); config_watcher_.reset(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) cert_watcher_.reset(); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) } @@ -914,7 +914,7 @@ void HostProcess::CreateAuthenticatorFactory() { context_->create_client_cert_store_callback(), service_account_email_, oauth_refresh_token_)); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!cert_watcher_) { cert_watcher_ = std::make_unique( base::BindRepeating(&HostProcess::ShutdownHost, @@ -1052,7 +1052,7 @@ void HostProcess::StartOnUiThread() { base::BindRepeating(&HostProcess::OnPolicyUpdate, base::Unretained(this)), base::BindRepeating(&HostProcess::OnPolicyError, base::Unretained(this))); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If an audio pipe is specific on the command-line then initialize // AudioCapturerLinux to capture from it. base::FilePath audio_pipe_name = @@ -1131,7 +1131,7 @@ void HostProcess::ShutdownOnUiThread() { // It is now safe for the HostProcess to be deleted. self_ = nullptr; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Cause the global AudioPipeReader to be freed, otherwise the audio // thread will remain in-use and prevent the process from exiting. // TODO(wez): DesktopEnvironmentFactory should own the pipe reader. @@ -1139,7 +1139,7 @@ void HostProcess::ShutdownOnUiThread() { AudioCapturerLinux::InitializePipeReader(nullptr, base::FilePath()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) context_->input_task_runner()->PostTask( FROM_HERE, base::BindOnce([]() { delete ui::X11EventSource::GetInstance(); })); -@@ -1835,7 +1835,7 @@ void HostProcess::StartHost() { +@@ -1829,7 +1829,7 @@ void HostProcess::StartHost() { SetState(HOST_STARTED); -#if BUILDFLAG(IS_LINUX) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) if (webrtc::DesktopCapturer::IsRunningUnderWayland()) { GnomeRemoteDesktopSession::GetInstance()->Init( base::BindOnce([](base::expected result) { -@@ -1925,7 +1925,7 @@ void HostProcess::StartHost() { +@@ -1919,7 +1919,7 @@ void HostProcess::StartHost() { host_->AddExtension(std::make_unique()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); if (cmd_line->HasSwitch(kEnableWtmpdb)) { host_wtmpdb_logger_ = -@@ -1960,7 +1960,7 @@ void HostProcess::StartHost() { +@@ -1954,7 +1954,7 @@ void HostProcess::StartHost() { // addresses. host_->Start(*host_owner_emails_.begin()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // For Windows and Mac, ChromotingHostServices connections are handled by // another process, then the message pipe is forwarded to the network process. host_->StartChromotingHostServices(); -@@ -2105,7 +2105,7 @@ int HostProcessMain() { +@@ -2099,7 +2099,7 @@ int HostProcessMain() { HOST_LOG << "Starting host process: version " << STRINGIZE(VERSION); const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if defined(REMOTING_USE_X11) // Initialize Xlib for multi-threaded use, allowing non-Chromium code to // use X11 safely (such as the WebRTC capturer, GTK ...) -@@ -2150,7 +2150,7 @@ int HostProcessMain() { +@@ -2144,7 +2144,7 @@ int HostProcessMain() { return kInitializationFailed; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Log and cleanup the crash database. We do this after a short delay so that // the crash database has a chance to be updated properly if we just got // relaunched after a crash. -@@ -2170,7 +2170,7 @@ int HostProcessMain() { +@@ -2164,7 +2164,7 @@ int HostProcessMain() { std::unique_ptr network_change_notifier( net::NetworkChangeNotifier::CreateIfNeeded()); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) // Create an X11EventSource on all UI threads, so the global X11 connection // (x11::Connection::Get()) can dispatch X events. auto event_source = diff --git a/www/iridium/files/patch-remoting_host_security__key_remote__security__key__main.cc b/www/iridium/files/patch-remoting_host_security__key_remote__security__key__main.cc index 7fa167b68fb7..bd8d3806f6bd 100644 --- a/www/iridium/files/patch-remoting_host_security__key_remote__security__key__main.cc +++ b/www/iridium/files/patch-remoting_host_security__key_remote__security__key__main.cc @@ -1,20 +1,20 @@ ---- remoting/host/security_key/remote_security_key_main.cc.orig 2025-09-11 13:19:19 UTC +--- remoting/host/security_key/remote_security_key_main.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/security_key/remote_security_key_main.cc @@ -24,7 +24,7 @@ #include "remoting/host/security_key/security_key_message_handler.h" #include "remoting/host/usage_stats_consent.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/base/crash/crash_reporting_crashpad.h" #endif // BUILDFLAG(IS_LINUX) @@ -96,7 +96,7 @@ int RemoteSecurityKeyMain(int argc, char** argv) { #if defined(REMOTING_ENABLE_CRASH_REPORTING) if (IsUsageStatsAllowed()) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) InitializeCrashpadReporting(); #elif BUILDFLAG(IS_WIN) InitializeBreakpadReporting(); diff --git a/www/iridium/files/patch-remoting_host_session__policies__from__dict.cc b/www/iridium/files/patch-remoting_host_session__policies__from__dict.cc index 4447e45de248..39a244393a1c 100644 --- a/www/iridium/files/patch-remoting_host_session__policies__from__dict.cc +++ b/www/iridium/files/patch-remoting_host_session__policies__from__dict.cc @@ -1,11 +1,11 @@ ---- remoting/host/session_policies_from_dict.cc.orig 2025-05-07 06:48:23 UTC +--- remoting/host/session_policies_from_dict.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/session_policies_from_dict.cc @@ -75,7 +75,7 @@ std::optional SessionPoliciesFromDict session_policies.curtain_required = dict.FindBool(policy::key::kRemoteAccessHostRequireCurtain); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) session_policies.host_username_match_required = dict.FindBool(policy::key::kRemoteAccessHostMatchUsername); #endif diff --git a/www/iridium/files/patch-remoting_host_setup_me2me__native__messaging__host__main.cc b/www/iridium/files/patch-remoting_host_setup_me2me__native__messaging__host__main.cc index 2f0defe3fc1d..cad0973ff565 100644 --- a/www/iridium/files/patch-remoting_host_setup_me2me__native__messaging__host__main.cc +++ b/www/iridium/files/patch-remoting_host_setup_me2me__native__messaging__host__main.cc @@ -1,20 +1,20 @@ ---- remoting/host/setup/me2me_native_messaging_host_main.cc.orig 2025-09-11 13:19:19 UTC +--- remoting/host/setup/me2me_native_messaging_host_main.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/setup/me2me_native_messaging_host_main.cc @@ -41,7 +41,7 @@ #include "base/apple/scoped_nsautorelease_pool.h" #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/base/crash/crash_reporting_crashpad.h" #endif // BUILDFLAG(IS_LINUX) @@ -99,7 +99,7 @@ int Me2MeNativeMessagingHostMain(int argc, char** argv // needs to be initialized first, so that the preference for crash-reporting // can be looked up in the config file. if (IsUsageStatsAllowed()) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) InitializeCrashpadReporting(); #elif BUILDFLAG(IS_WIN) InitializeBreakpadReporting(); diff --git a/www/iridium/files/patch-remoting_host_setup_start__host__main.cc b/www/iridium/files/patch-remoting_host_setup_start__host__main.cc index 78ec6a5f9991..1be46d93df5f 100644 --- a/www/iridium/files/patch-remoting_host_setup_start__host__main.cc +++ b/www/iridium/files/patch-remoting_host_setup_start__host__main.cc @@ -1,38 +1,38 @@ ---- remoting/host/setup/start_host_main.cc.orig 2025-09-11 13:19:19 UTC +--- remoting/host/setup/start_host_main.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/setup/start_host_main.cc @@ -44,7 +44,7 @@ #include #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/base/crash/crash_reporting_crashpad.h" #include "remoting/host/setup/daemon_controller_delegate_linux.h" #include "remoting/host/setup/start_host_as_root.h" @@ -370,7 +370,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); @@ -395,7 +395,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 @@ -445,7 +445,7 @@ int StartHostMain(int argc, char** argv) { // We don't have a config file yet so we can't use IsUsageStatsAllowed(), // instead we can just check the command line parameter. if (params.enable_crash_reporting) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) InitializeCrashpadReporting(); #elif BUILDFLAG(IS_WIN) InitializeBreakpadReporting(); diff --git a/www/iridium/files/patch-remoting_host_webauthn_desktop__session__type__util.cc b/www/iridium/files/patch-remoting_host_webauthn_desktop__session__type__util.cc index c230d4f8f2eb..69059df6cb37 100644 --- a/www/iridium/files/patch-remoting_host_webauthn_desktop__session__type__util.cc +++ b/www/iridium/files/patch-remoting_host_webauthn_desktop__session__type__util.cc @@ -1,20 +1,20 @@ ---- remoting/host/webauthn/desktop_session_type_util.cc.orig 2025-06-19 07:37:57 UTC +--- remoting/host/webauthn/desktop_session_type_util.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/webauthn/desktop_session_type_util.cc @@ -11,7 +11,7 @@ namespace remoting { namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) DesktopSessionType GetDesktopSessionTypeInternal( std::unique_ptr environment) { // Currently on Linux, a desktop session is either remote-only or local-only. @@ -29,7 +29,7 @@ DesktopSessionType GetDesktopSessionTypeInternal( } // namespace DesktopSessionType GetDesktopSessionType() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) static const DesktopSessionType desktop_session_type = GetDesktopSessionTypeInternal(base::Environment::Create()); return desktop_session_type; diff --git a/www/iridium/files/patch-remoting_host_webauthn_remote__webauthn__caller__security__utils.cc b/www/iridium/files/patch-remoting_host_webauthn_remote__webauthn__caller__security__utils.cc index 3a339bcf6bb5..36f495f7f8e8 100644 --- a/www/iridium/files/patch-remoting_host_webauthn_remote__webauthn__caller__security__utils.cc +++ b/www/iridium/files/patch-remoting_host_webauthn_remote__webauthn__caller__security__utils.cc @@ -1,29 +1,29 @@ ---- remoting/host/webauthn/remote_webauthn_caller_security_utils.cc.orig 2025-06-19 07:37:57 UTC +--- remoting/host/webauthn/remote_webauthn_caller_security_utils.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/webauthn/remote_webauthn_caller_security_utils.cc @@ -14,7 +14,7 @@ #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "base/containers/fixed_flat_set.h" #include "base/files/file_path.h" #include "remoting/host/base/process_util.h" @@ -48,7 +48,7 @@ namespace { // No static variables needed for debug builds. -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) constexpr auto kAllowedCallerPrograms = base::MakeFixedFlatSet({ @@ -99,7 +99,7 @@ bool IsLaunchedByTrustedProcess() { #if !defined(NDEBUG) // Just return true on debug builds for the convenience of development. return true; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::ProcessId parent_pid = base::GetParentProcessId(base::GetCurrentProcessHandle()); // Note that on Linux the process image may no longer exist in its original diff --git a/www/iridium/files/patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc b/www/iridium/files/patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc index e0ef1d3bfd83..136c0f4fcdcd 100644 --- a/www/iridium/files/patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc +++ b/www/iridium/files/patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc @@ -1,28 +1,28 @@ ---- remoting/host/webauthn/remote_webauthn_extension_notifier.cc.orig 2025-09-11 13:19:19 UTC +--- remoting/host/webauthn/remote_webauthn_extension_notifier.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/webauthn/remote_webauthn_extension_notifier.cc @@ -27,7 +27,7 @@ #include "base/task/thread_pool.h" #include "build/build_config.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/environment.h" #include "base/nix/xdg_util.h" #include "base/strings/string_util.h" @@ -72,14 +72,14 @@ static constexpr char kExtensionWakeupFileContent[] = // Caller should check if the directory exists before writing files to it. A // directory only exists if the corresponding Chrome version is installed. std::vector GetRemoteStateChangeDirPaths() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) constexpr base::FilePath::CharType kStateChangeDirName[] = FILE_PATH_LITERAL("WebAuthenticationProxyRemoteSessionStateChange"); #endif std::vector dirs; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // See: chrome/common/chrome_paths_linux.cc auto env = base::Environment::Create(); base::FilePath base_path; diff --git a/www/iridium/files/patch-remoting_host_webauthn_remote__webauthn__main.cc b/www/iridium/files/patch-remoting_host_webauthn_remote__webauthn__main.cc index 74996317ada1..5db02ce3e0be 100644 --- a/www/iridium/files/patch-remoting_host_webauthn_remote__webauthn__main.cc +++ b/www/iridium/files/patch-remoting_host_webauthn_remote__webauthn__main.cc @@ -1,20 +1,20 @@ ---- remoting/host/webauthn/remote_webauthn_main.cc.orig 2025-09-11 13:19:19 UTC +--- remoting/host/webauthn/remote_webauthn_main.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/host/webauthn/remote_webauthn_main.cc @@ -27,7 +27,7 @@ #include "remoting/host/webauthn/remote_webauthn_caller_security_utils.h" #include "remoting/host/webauthn/remote_webauthn_native_messaging_host.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/base/crash/crash_reporting_crashpad.h" #endif // BUILDFLAG(IS_LINUX) @@ -50,7 +50,7 @@ int RemoteWebAuthnMain(int argc, char** argv) { #if defined(REMOTING_ENABLE_CRASH_REPORTING) if (IsUsageStatsAllowed()) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) InitializeCrashpadReporting(); #elif BUILDFLAG(IS_WIN) InitializeBreakpadReporting(); diff --git a/www/iridium/files/patch-remoting_protocol_webrtc__video__stream.cc b/www/iridium/files/patch-remoting_protocol_webrtc__video__stream.cc index 10d08002ab81..c75895da56e9 100644 --- a/www/iridium/files/patch-remoting_protocol_webrtc__video__stream.cc +++ b/www/iridium/files/patch-remoting_protocol_webrtc__video__stream.cc @@ -1,11 +1,11 @@ ---- remoting/protocol/webrtc_video_stream.cc.orig 2025-09-11 13:19:19 UTC +--- remoting/protocol/webrtc_video_stream.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/protocol/webrtc_video_stream.cc -@@ -271,7 +271,7 @@ WebrtcVideoStream::WebrtcVideoStream(const SessionOpti +@@ -276,7 +276,7 @@ WebrtcVideoStream::WebrtcVideoStream(const SessionOpti : session_options_(session_options) { // TODO(joedow): Dig into the threading model on other platforms to see if they // can also be updated to run on a dedicated thread. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) core_task_runner_ = base::ThreadPool::CreateSingleThreadTaskRunner( {base::TaskPriority::HIGHEST}, base::SingleThreadTaskRunnerThreadMode::DEDICATED); diff --git a/www/iridium/files/patch-remoting_signaling_ftl__host__device__id__provider.cc b/www/iridium/files/patch-remoting_signaling_ftl__host__device__id__provider.cc index ab9e587cde00..65193e22147b 100644 --- a/www/iridium/files/patch-remoting_signaling_ftl__host__device__id__provider.cc +++ b/www/iridium/files/patch-remoting_signaling_ftl__host__device__id__provider.cc @@ -1,11 +1,11 @@ ---- remoting/signaling/ftl_host_device_id_provider.cc.orig 2025-05-07 06:48:23 UTC +--- remoting/signaling/ftl_host_device_id_provider.cc.orig 2025-12-10 15:04:57 UTC +++ remoting/signaling/ftl_host_device_id_provider.cc @@ -16,7 +16,7 @@ constexpr char kDeviceIdPrefix[] = "crd-win-host-"; constexpr char kDeviceIdPrefix[] = "crd-mac-host-"; #elif BUILDFLAG(IS_CHROMEOS) constexpr char kDeviceIdPrefix[] = "crd-cros-host-"; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) constexpr char kDeviceIdPrefix[] = "crd-linux-host-"; #else constexpr char kDeviceIdPrefix[] = "crd-unknown-host-"; diff --git a/www/iridium/files/patch-sandbox_BUILD.gn b/www/iridium/files/patch-sandbox_BUILD.gn index 1ff9ef4bf85c..c76fe3952693 100644 --- a/www/iridium/files/patch-sandbox_BUILD.gn +++ b/www/iridium/files/patch-sandbox_BUILD.gn @@ -1,11 +1,11 @@ ---- sandbox/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- sandbox/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ sandbox/BUILD.gn @@ -49,7 +49,7 @@ group("sandbox") { "//sandbox/mac:system_services", "//sandbox/mac/mojom", ] - } else if (is_linux || is_chromeos || is_android) { + } else if ((is_linux && !is_bsd) || is_chromeos || is_android) { public_deps = [ "//sandbox/linux:sandbox" ] } } diff --git a/www/iridium/files/patch-sandbox_features.gni b/www/iridium/files/patch-sandbox_features.gni index 5c95dfcfbbe7..d0af851b8b5d 100644 --- a/www/iridium/files/patch-sandbox_features.gni +++ b/www/iridium/files/patch-sandbox_features.gni @@ -1,11 +1,11 @@ ---- sandbox/features.gni.orig 2025-05-07 06:48:23 UTC +--- sandbox/features.gni.orig 2025-12-10 15:04:57 UTC +++ sandbox/features.gni @@ -6,7 +6,7 @@ # currently. # Do not disable seccomp_bpf anywhere without talking to # security@chromium.org! -use_seccomp_bpf = (is_linux || is_chromeos || is_android) && +use_seccomp_bpf = !is_bsd && (is_linux || is_chromeos || is_android) && (current_cpu == "x86" || current_cpu == "x64" || current_cpu == "arm" || current_cpu == "arm64" || current_cpu == "mipsel" || current_cpu == "mips64el") diff --git a/www/iridium/files/patch-sandbox_linux_BUILD.gn b/www/iridium/files/patch-sandbox_linux_BUILD.gn index 0f82dea8eec8..1f3fdb06f197 100644 --- a/www/iridium/files/patch-sandbox_linux_BUILD.gn +++ b/www/iridium/files/patch-sandbox_linux_BUILD.gn @@ -1,35 +1,35 @@ ---- sandbox/linux/BUILD.gn.orig 2025-09-11 13:19:19 UTC +--- sandbox/linux/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ sandbox/linux/BUILD.gn -@@ -11,11 +11,11 @@ if (is_android) { +@@ -10,11 +10,11 @@ if (is_android) { } declare_args() { - compile_suid_client = is_linux || is_chromeos + compile_suid_client = (is_linux || is_chromeos) && !is_bsd - compile_credentials = is_linux || is_chromeos + compile_credentials = (is_linux || is_chromeos) && !is_bsd - compile_syscall_broker = is_linux || is_chromeos + compile_syscall_broker = (is_linux || is_chromeos) && !is_bsd # On Android, use plain GTest. use_base_test_suite = is_linux || is_chromeos -@@ -373,6 +373,17 @@ component("sandbox_services") { +@@ -372,6 +372,17 @@ component("sandbox_services") { "services/libc_interceptor.h", ] } + + if (is_bsd) { + sources -= [ + "services/scoped_process.cc", + "services/scoped_process.h", + "services/syscall_wrappers.cc", + "services/syscall_wrappers.h", + "services/yama.cc", + "services/yama.h", + ] + } } source_set("sandbox_services_headers") { diff --git a/www/iridium/files/patch-sandbox_linux_services_init__process__reaper.cc b/www/iridium/files/patch-sandbox_linux_services_init__process__reaper.cc index 2a03dd236635..ae88369e898e 100644 --- a/www/iridium/files/patch-sandbox_linux_services_init__process__reaper.cc +++ b/www/iridium/files/patch-sandbox_linux_services_init__process__reaper.cc @@ -1,15 +1,15 @@ ---- sandbox/linux/services/init_process_reaper.cc.orig 2025-10-28 14:29:43 UTC +--- sandbox/linux/services/init_process_reaper.cc.orig 2025-12-10 15:04:57 UTC +++ sandbox/linux/services/init_process_reaper.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#if 0 #include "sandbox/linux/services/init_process_reaper.h" #include @@ -100,3 +101,4 @@ bool CreateInitProcessReaper(base::OnceClosure post_fo } } // namespace sandbox. +#endif diff --git a/www/iridium/files/patch-sandbox_linux_services_libc__interceptor.cc b/www/iridium/files/patch-sandbox_linux_services_libc__interceptor.cc index 4441596ed0a6..8365bcc3daa9 100644 --- a/www/iridium/files/patch-sandbox_linux_services_libc__interceptor.cc +++ b/www/iridium/files/patch-sandbox_linux_services_libc__interceptor.cc @@ -1,21 +1,21 @@ ---- sandbox/linux/services/libc_interceptor.cc.orig 2025-05-07 06:48:23 UTC +--- sandbox/linux/services/libc_interceptor.cc.orig 2025-12-10 15:04:57 UTC +++ sandbox/linux/services/libc_interceptor.cc @@ -17,7 +17,9 @@ #include #include #include +#if !BUILDFLAG(IS_BSD) #include +#endif #include #include #include @@ -173,7 +175,7 @@ bool ReadTimeStruct(base::PickleIterator* iter, } else { base::AutoLock lock(g_timezones_lock.Get()); auto ret_pair = g_timezones.Get().insert(timezone); - output->tm_zone = ret_pair.first->c_str(); + output->tm_zone = (char *)ret_pair.first->c_str(); } return true; diff --git a/www/iridium/files/patch-sandbox_policy_BUILD.gn b/www/iridium/files/patch-sandbox_policy_BUILD.gn index 5c63bc8dca5f..512c53dca977 100644 --- a/www/iridium/files/patch-sandbox_policy_BUILD.gn +++ b/www/iridium/files/patch-sandbox_policy_BUILD.gn @@ -1,38 +1,38 @@ ---- sandbox/policy/BUILD.gn.orig 2025-11-06 10:11:34 UTC +--- sandbox/policy/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ sandbox/policy/BUILD.gn -@@ -47,7 +47,7 @@ component("policy") { +@@ -46,7 +46,7 @@ component("policy") { "//third_party/jni_zero", ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "linux/bpf_audio_policy_linux.cc", "linux/bpf_audio_policy_linux.h", -@@ -117,6 +117,26 @@ component("policy") { +@@ -116,6 +116,26 @@ component("policy") { "//sandbox/linux:sandbox_services", "//sandbox/linux:seccomp_bpf", "//sandbox/linux:suid_sandbox_client", + ] + } + if (is_openbsd) { + sources += [ + "openbsd/sandbox_openbsd.cc", + "openbsd/sandbox_openbsd.h", + ] + libs = [ "util" ] + } + if (is_freebsd) { + sources += [ + "freebsd/sandbox_freebsd.cc", + "freebsd/sandbox_freebsd.h", + ] + } + if (is_bsd) { + deps += [ + "//sandbox:sandbox_buildflags", + "//skia", + "//ui/gfx/x", ] } if (is_chromeos) { diff --git a/www/iridium/files/patch-sandbox_policy_features.cc b/www/iridium/files/patch-sandbox_policy_features.cc index 6bfdcff8f3f7..fd69a92f0ccb 100644 --- a/www/iridium/files/patch-sandbox_policy_features.cc +++ b/www/iridium/files/patch-sandbox_policy_features.cc @@ -1,14 +1,14 @@ ---- sandbox/policy/features.cc.orig 2025-11-06 10:11:34 UTC +--- sandbox/policy/features.cc.orig 2025-12-10 15:04:57 UTC +++ sandbox/policy/features.cc @@ -17,7 +17,11 @@ namespace sandbox::policy::features { #if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_FUCHSIA) // Enables network service sandbox. // (Only causes an effect when feature kNetworkServiceInProcess is disabled.) +#if BUILDFLAG(IS_BSD) +BASE_FEATURE(kNetworkServiceSandbox, base::FEATURE_ENABLED_BY_DEFAULT); +#else BASE_FEATURE(kNetworkServiceSandbox, base::FEATURE_DISABLED_BY_DEFAULT); +#endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) // Enables a fine-grained seccomp-BPF syscall filter for the network service. diff --git a/www/iridium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.cc b/www/iridium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.cc index fc0e10623722..0e3e18f314aa 100644 --- a/www/iridium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.cc +++ b/www/iridium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.cc @@ -1,213 +1,213 @@ ---- sandbox/policy/freebsd/sandbox_freebsd.cc.orig 2025-09-11 13:19:19 UTC +--- sandbox/policy/freebsd/sandbox_freebsd.cc.orig 2025-12-10 15:04:57 UTC +++ sandbox/policy/freebsd/sandbox_freebsd.cc @@ -0,0 +1,210 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "sandbox/policy/freebsd/sandbox_freebsd.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "base/command_line.h" +#include "base/debug/stack_trace.h" +#include "base/feature_list.h" +#include "base/files/file_path.h" +#include "base/files/file_util.h" +#include "base/files/scoped_file.h" +#include "base/logging.h" +#include "base/memory/singleton.h" +#include "base/path_service.h" +#include "base/posix/eintr_wrapper.h" +#include "base/strings/string_number_conversions.h" +#include "base/system/sys_info.h" +#include "base/threading/thread.h" +#include "base/time/time.h" +#include "build/build_config.h" +#include "crypto/crypto_buildflags.h" +#include "sandbox/constants.h" +#include "sandbox/linux/services/credentials.h" +#include "sandbox/linux/services/namespace_sandbox.h" +#include "sandbox/linux/services/proc_util.h" +#include "sandbox/linux/services/resource_limits.h" +#include "sandbox/linux/services/thread_helpers.h" +#include "sandbox/linux/syscall_broker/broker_command.h" +#include "sandbox/linux/syscall_broker/broker_process.h" +#include "sandbox/policy/sandbox.h" +#include "sandbox/policy/sandbox_type.h" +#include "sandbox/policy/mojom/sandbox.mojom.h" +#include "sandbox/policy/switches.h" +#include "sandbox/sandbox_buildflags.h" + +#if BUILDFLAG(USING_SANITIZER) +#include +#endif + +#if BUILDFLAG(USE_NSS_CERTS) +#include "crypto/nss_util.h" +#endif + +#include "third_party/boringssl/src/include/openssl/crypto.h" + +#include "ui/gfx/font_util.h" + +namespace sandbox { +namespace policy { + +SandboxLinux::SandboxLinux() + : sandbox_status_flags_(kInvalid), + pre_initialized_(false), + initialize_sandbox_ran_(false), + broker_process_(nullptr) { +} + +SandboxLinux::~SandboxLinux() { + if (pre_initialized_) { + CHECK(initialize_sandbox_ran_); + } +} + +SandboxLinux* SandboxLinux::GetInstance() { + SandboxLinux* instance = base::Singleton::get(); + CHECK(instance); + return instance; +} + +void SandboxLinux::StopThread(base::Thread* thread) { + DCHECK(thread); + thread->Stop(); +} + +void SandboxLinux::PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type) { + CHECK(!pre_initialized_); +#if BUILDFLAG(USING_SANITIZER) + // Sanitizers need to open some resources before the sandbox is enabled. + // This should not fork, not launch threads, not open a directory. + __sanitizer_sandbox_on_notify(sanitizer_args()); + sanitizer_args_.reset(); +#endif + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + const std::string process_type = + command_line->GetSwitchValueASCII(switches::kProcessType); + + base::SysInfo::AmountOfPhysicalMemory(); + base::SysInfo::NumberOfProcessors(); + base::SysInfo::CPUModelName(); + + switch (sandbox_type) { + case sandbox::mojom::Sandbox::kNoSandbox: + { +#if BUILDFLAG(USE_NSS_CERTS) + // The main process has to initialize the ~/.pki dir which won't work + // after unveil(2). + crypto::EnsureNSSInit(); +#endif + CRYPTO_pre_sandbox_init(); + + base::FilePath cache_directory, local_directory; + + base::PathService::Get(base::DIR_CACHE, &cache_directory); + base::PathService::Get(base::DIR_HOME, &local_directory); + + cache_directory = cache_directory.AppendASCII("iridium"); + local_directory = local_directory.AppendASCII(".local").AppendASCII("share").AppendASCII("applications"); + + if (!base::CreateDirectory(cache_directory)) { + LOG(ERROR) << "Failed to create " << cache_directory.value() << " directory."; + } + + if (!base::CreateDirectory(local_directory)) { + LOG(ERROR) << "Failed to create " << local_directory.value() << " directory."; + } + + break; + } + case sandbox::mojom::Sandbox::kRenderer: + gfx::InitializeFonts(); + break; + default: + break; + } + + pre_initialized_ = true; +} + +bool SandboxLinux::InitializeSandbox(sandbox::mojom::Sandbox sandbox_type, + SandboxLinux::PreSandboxHook hook, + const Options& options) { + DCHECK(!initialize_sandbox_ran_); + initialize_sandbox_ran_ = true; + + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + const std::string process_type = + command_line->GetSwitchValueASCII(switches::kProcessType); + + if (command_line->HasSwitch(switches::kNoSandbox)) + return true; + + VLOG(1) << "SandboxLinux::InitializeSandbox: process_type=" + << process_type << " sandbox_type=" << sandbox_type; + + // Only one thread is running, pre-initialize if not already done. + if (!pre_initialized_) + PreinitializeSandbox(sandbox_type); + + // Attempt to limit the future size of the address space of the process. + int error = 0; + const bool limited_as = LimitAddressSpace(&error); + if (error) { + // Restore errno. Internally to |LimitAddressSpace|, the errno due to + // setrlimit may be lost. + errno = error; + PCHECK(limited_as); + } + + if (hook) + CHECK(std::move(hook).Run(options)); + + return true; +} + +bool SandboxLinux::LimitAddressSpace(int* error) { +#if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \ + !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER) + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + if (SandboxTypeFromCommandLine(*command_line) == sandbox::mojom::Sandbox::kNoSandbox) { + return false; + } + + // Unfortunately, it does not appear possible to set RLIMIT_AS such that it + // will both (a) be high enough to support V8's and WebAssembly's address + // space requirements while also (b) being low enough to mitigate exploits + // using integer overflows that require large allocations, heap spray, or + // other memory-hungry attack modes. + + *error = sandbox::ResourceLimits::Lower( + RLIMIT_DATA, static_cast(sandbox::kDataSizeLimit)); + + // Cache the resource limit before turning on the sandbox. + base::SysInfo::AmountOfVirtualMemory(); + base::SysInfo::MaxSharedMemorySize(); + + return *error == 0; +#else + base::SysInfo::AmountOfVirtualMemory(); + return false; +#endif // !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && + // !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER) +} + +} // namespace policy +} // namespace sandbox diff --git a/www/iridium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.h b/www/iridium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.h index 349dd78ea0b1..658610a41a57 100644 --- a/www/iridium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.h +++ b/www/iridium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.h @@ -1,279 +1,279 @@ ---- sandbox/policy/freebsd/sandbox_freebsd.h.orig 2025-05-07 06:48:23 UTC +--- sandbox/policy/freebsd/sandbox_freebsd.h.orig 2025-12-10 15:04:57 UTC +++ sandbox/policy/freebsd/sandbox_freebsd.h @@ -0,0 +1,276 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +#ifndef SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ +#define SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ + +#include +#include +#include + +#include "base/logging.h" +#include "base/posix/global_descriptors.h" +#include "sandbox/policy/export.h" +#include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h" +#include "sandbox/policy/mojom/sandbox.mojom.h" +#include "base/sanitizer_buildflags.h" + +#if BUILDFLAG(USING_SANITIZER) +#include +#endif + +namespace base { +template +struct DefaultSingletonTraits; +class Thread; +} // namespace base + +namespace sandbox { +namespace syscall_broker { +class BrokerProcess; +} // namespace syscall_broker +} // namespace sandbox + +namespace sandbox { +namespace policy { + +// A singleton class to represent and change our sandboxing state for the +// three main Linux sandboxes. +// The sandboxing model allows using two layers of sandboxing. The first layer +// can be implemented either with unprivileged namespaces or with the setuid +// sandbox. This class provides a way to engage the namespace sandbox, but does +// not deal with the legacy setuid sandbox directly. +// The second layer is mainly based on seccomp-bpf and is engaged with +// InitializeSandbox(). InitializeSandbox() is also responsible for "sealing" +// the first layer of sandboxing. That is, InitializeSandbox must always be +// called to have any meaningful sandboxing at all. +class SANDBOX_POLICY_EXPORT SandboxLinux { + public: + // This is a list of sandbox IPC methods which the renderer may send to the + // sandbox host. See + // https://chromium.googlesource.com/chromium/src/+/master/docs/linux_sandbox_ipc.md + // This isn't the full list, values < 32 are reserved for methods called from + // Skia, and values < 64 are reserved for libc_interceptor.cc. + enum LinuxSandboxIPCMethods { + DEPRECATED_METHOD_GET_FALLBACK_FONT_FOR_CHAR = 64, + DEPRECATED_METHOD_GET_CHILD_WITH_INODE, + DEPRECATED_METHOD_GET_STYLE_FOR_STRIKE, + METHOD_MAKE_SHARED_MEMORY_SEGMENT, + DEPRECATED_METHOD_MATCH_WITH_FALLBACK, + }; + + // These form a bitmask which describes the conditions of the Linux sandbox. + // Note: this doesn't strictly give you the current status, it states + // what will be enabled when the relevant processes are initialized. + enum Status { + // SUID sandbox active. + kSUID = 1 << 0, + + // Sandbox is using a new PID namespace. + kPIDNS = 1 << 1, + + // Sandbox is using a new network namespace. + kNetNS = 1 << 2, + + // seccomp-bpf sandbox active. + kSeccompBPF = 1 << 3, + + // The Yama LSM module is present and enforcing. + kYama = 1 << 4, + + // seccomp-bpf sandbox is active and the kernel supports TSYNC. + kSeccompTSYNC = 1 << 5, + + // User namespace sandbox active. + kUserNS = 1 << 6, + + // A flag that denotes an invalid sandbox status. + kInvalid = 1 << 31, + }; + + // SandboxLinux Options are a superset of SandboxSecompBPF Options. + struct Options : public SandboxSeccompBPF::Options { + // When running with a zygote, the namespace sandbox will have already + // been engaged prior to initializing SandboxLinux itself, and need not + // be done so again. Set to true to indicate that there isn't a zygote + // for this process and the step is to be performed here explicitly. + bool engage_namespace_sandbox = false; + + // Allow starting the sandbox with multiple threads already running. This + // will enable TSYNC for seccomp-BPF, which syncs the seccomp-BPF policy + // across all running threads. + bool allow_threads_during_sandbox_init = false; + + // Enables the CHECK for open directories. The open directory check is only + // useful for the chroot jail (from the semantic layer of the sandbox), and + // can safely be disabled if we are only enabling the seccomp-BPF layer. + bool check_for_open_directories = true; + }; + + // Callers can provide this hook to run code right before the policy + // is passed to the BPF compiler and the sandbox is engaged. If + // pre_sandbox_hook() returns true, the sandbox will be engaged + // afterwards, otherwise the process is terminated. + using PreSandboxHook = base::OnceCallback; + + // Get our singleton instance. + static SandboxLinux* GetInstance(); + + SandboxLinux(const SandboxLinux&) = delete; + SandboxLinux& operator=(const SandboxLinux&) = delete; + + bool SetPledge(const char *pstring, const char *ppath); + bool SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type); + + // Do some initialization that can only be done before any of the sandboxes + // are enabled. If using the setuid sandbox, this should be called manually + // before the setuid sandbox is engaged. + // Security: When this runs, it is imperative that either InitializeSandbox() + // runs as well or that all file descriptors returned in + // GetFileDescriptorsToClose() get closed. + // Otherwise file descriptors that bypass the security of the setuid sandbox + // would be kept open. One must be particularly careful if a process performs + // a fork(). + void PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type); + + // Check that the current process is the init process of a new PID + // namespace and then proceed to drop access to the file system by using + // a new unprivileged namespace. This is a layer-1 sandbox. + // In order for this sandbox to be effective, it must be "sealed" by calling + // InitializeSandbox(). + void EngageNamespaceSandbox(bool from_zygote); + + // Return a list of file descriptors to close if PreinitializeSandbox() ran + // but InitializeSandbox() won't. Avoid using. + // TODO(jln): get rid of this hack. + std::vector GetFileDescriptorsToClose(); + + // Seal an eventual layer-1 sandbox and initialize the layer-2 sandbox with + // an adequate policy depending on the process type and command line + // arguments. + // Currently the layer-2 sandbox is composed of seccomp-bpf and address space + // limitations. + // This function should only be called without any thread running. + bool InitializeSandbox(sandbox::mojom::Sandbox sandbox_type, + PreSandboxHook hook, + const Options& options); + + // Stop |thread| in a way that can be trusted by the sandbox. + void StopThread(base::Thread* thread); + + // Returns the status of the renderer, worker and ppapi sandbox. Can only + // be queried after going through PreinitializeSandbox(). This is a bitmask + // and uses the constants defined in "enum Status" above. Since the + // status needs to be provided before the sandboxes are actually started, + // this returns what will actually happen once InitializeSandbox() + // is called from inside these processes. + int GetStatus(); + + // Returns true if the current process is single-threaded or if the number + // of threads cannot be determined. + bool IsSingleThreaded() const; + + // Returns true if we started Seccomp BPF. + bool seccomp_bpf_started() const; + + // Check the policy and eventually start the seccomp-bpf sandbox. This should + // never be called with threads started. If we detect that threads have + // started we will crash. + bool StartSeccompBPF(sandbox::mojom::Sandbox sandbox_type, + PreSandboxHook hook, + const Options& options); + + // Limit the address space of the current process (and its children) to make + // some vulnerabilities harder to exploit. Writes the errno due to setrlimit + // (including 0 if no error) into |error|. + bool LimitAddressSpace(int* error); + + // Returns a file descriptor to proc. The file descriptor is no longer valid + // after the sandbox has been sealed. + int proc_fd() const { + DCHECK_NE(-1, proc_fd_); + return proc_fd_; + } + +#if BUILDFLAG(USING_SANITIZER) + __sanitizer_sandbox_arguments* sanitizer_args() const { + return sanitizer_args_.get(); + }; +#endif + + // A BrokerProcess is a helper that is started before the sandbox is engaged, + // typically from a pre-sandbox hook, that will serve requests to access + // files over an IPC channel. The client of this runs from a SIGSYS handler + // triggered by the seccomp-bpf sandbox. + // |client_sandbox_policy| is the policy being run by the client, and is + // used to derive the equivalent broker-side policy. + // |broker_side_hook| is an alternate pre-sandbox hook to be run before the + // broker itself gets sandboxed, to which the broker side policy and + // |options| are passed. + // Crashes the process if the broker can not be started since continuation + // is impossible (and presumably unsafe). + // This should never be destroyed, as after the sandbox is started it is + // vital to the process. +#if 0 + void StartBrokerProcess( + const sandbox::syscall_broker::BrokerCommandSet& allowed_command_set, + std::vector permissions, + PreSandboxHook broker_side_hook, + const Options& options); + + sandbox::syscall_broker::BrokerProcess* broker_process() const { + return broker_process_; + } +#endif + + private: + friend struct base::DefaultSingletonTraits; + + SandboxLinux(); + ~SandboxLinux(); + + // We must have been pre_initialized_ before using these. + bool seccomp_bpf_supported() const; + bool seccomp_bpf_with_tsync_supported() const; + + // Returns true if it can be determined that the current process has open + // directories that are not managed by the SandboxLinux class. This would + // be a vulnerability as it would allow to bypass the setuid sandbox. + bool HasOpenDirectories() const; + + // The last part of the initialization is to make sure any temporary "hole" + // in the sandbox is closed. For now, this consists of closing proc_fd_. + void SealSandbox(); + + // GetStatus() makes promises as to how the sandbox will behave. This + // checks that no promises have been broken. + void CheckForBrokenPromises(sandbox::mojom::Sandbox sandbox_type); + + // Stop |thread| and make sure it does not appear in /proc/self/tasks/ + // anymore. + void StopThreadAndEnsureNotCounted(base::Thread* thread) const; + + // A file descriptor to /proc. It's dangerous to have it around as it could + // allow for sandbox bypasses. It needs to be closed before we consider + // ourselves sandboxed. + int proc_fd_; + + bool seccomp_bpf_started_; + // The value returned by GetStatus(). Gets computed once and then cached. + int sandbox_status_flags_; + // Did PreinitializeSandbox() run? + bool pre_initialized_; + bool seccomp_bpf_supported_; // Accurate if pre_initialized_. + bool seccomp_bpf_with_tsync_supported_; // Accurate if pre_initialized_. + bool yama_is_enforcing_; // Accurate if pre_initialized_. + bool initialize_sandbox_ran_; // InitializeSandbox() was called. +#if BUILDFLAG(USING_SANITIZER) + std::unique_ptr<__sanitizer_sandbox_arguments> sanitizer_args_; +#endif + sandbox::syscall_broker::BrokerProcess* broker_process_; // Leaked as global. +}; + +} // namespace policy +} // namespace sandbox + +#endif // SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ diff --git a/www/iridium/files/patch-sandbox_policy_mojom_sandbox.mojom b/www/iridium/files/patch-sandbox_policy_mojom_sandbox.mojom index acaf60422a19..d1b2acb6b86b 100644 --- a/www/iridium/files/patch-sandbox_policy_mojom_sandbox.mojom +++ b/www/iridium/files/patch-sandbox_policy_mojom_sandbox.mojom @@ -1,15 +1,15 @@ ---- sandbox/policy/mojom/sandbox.mojom.orig 2025-09-11 13:19:19 UTC +--- sandbox/policy/mojom/sandbox.mojom.orig 2025-12-10 15:04:57 UTC +++ sandbox/policy/mojom/sandbox.mojom -@@ -71,6 +71,12 @@ enum Sandbox { +@@ -68,6 +68,12 @@ enum Sandbox { // Minimally privileged sandbox on Fuchsia. [EnableIf=is_fuchsia] kVideoCapture, + [EnableIf=is_openbsd] + kVideoCapture, + + [EnableIf=is_freebsd] + kVideoCapture, + // Allows access to file contents and Windows APIs for parsing icons from PE // files. [EnableIf=is_win] kIconReader, diff --git a/www/iridium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc b/www/iridium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc index d108e89284ac..1bb89f696e51 100644 --- a/www/iridium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc +++ b/www/iridium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc @@ -1,399 +1,399 @@ ---- sandbox/policy/openbsd/sandbox_openbsd.cc.orig 2025-11-06 10:11:34 UTC +--- sandbox/policy/openbsd/sandbox_openbsd.cc.orig 2025-12-10 15:04:57 UTC +++ sandbox/policy/openbsd/sandbox_openbsd.cc @@ -0,0 +1,396 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "sandbox/policy/openbsd/sandbox_openbsd.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "base/command_line.h" +#include "base/debug/stack_trace.h" +#include "base/feature_list.h" +#include "base/files/file_path.h" +#include "base/files/file_util.h" +#include "base/files/scoped_file.h" +#include "base/logging.h" +#include "base/memory/singleton.h" +#include "base/path_service.h" +#include "base/posix/eintr_wrapper.h" +#include "base/strings/string_number_conversions.h" +#include "base/system/sys_info.h" +#include "base/threading/thread.h" +#include "base/time/time.h" +#include "build/build_config.h" +#include "crypto/crypto_buildflags.h" +#include "sandbox/constants.h" +#include "sandbox/linux/services/credentials.h" +#include "sandbox/linux/services/namespace_sandbox.h" +#include "sandbox/linux/services/proc_util.h" +#include "sandbox/linux/services/resource_limits.h" +#include "sandbox/linux/services/thread_helpers.h" +#include "sandbox/linux/syscall_broker/broker_command.h" +#include "sandbox/linux/syscall_broker/broker_process.h" +#include "sandbox/policy/sandbox.h" +#include "sandbox/policy/sandbox_type.h" +#include "sandbox/policy/mojom/sandbox.mojom.h" +#include "sandbox/policy/switches.h" +#include "sandbox/sandbox_buildflags.h" + +#if BUILDFLAG(USING_SANITIZER) +#include +#endif + +#if BUILDFLAG(USE_NSS_CERTS) +#include "crypto/nss_util.h" +#endif + +#include "third_party/boringssl/src/include/openssl/crypto.h" +#include "third_party/skia/rust/png/FFI.rs.h" + +#include +#include "ui/gfx/linux/fontconfig_util.h" + +#define MAXTOKENS 3 + +#define _UNVEIL_MAIN "/etc/iridium/unveil.main"; +#define _UNVEIL_GPU "/etc/iridium/unveil.gpu"; +#define _UNVEIL_UTILITY_NETWORK "/etc/iridium/unveil.utility_network"; +#define _UNVEIL_UTILITY_AUDIO "/etc/iridium/unveil.utility_audio"; +#define _UNVEIL_UTILITY_VIDEO "/etc/iridium/unveil.utility_video"; + +namespace sandbox { +namespace policy { + +SandboxLinux::SandboxLinux() + : unveil_initialized_(false), + sandbox_status_flags_(kInvalid), + pre_initialized_(false), + initialize_sandbox_ran_(false), + broker_process_(nullptr) { +} + +SandboxLinux::~SandboxLinux() { + if (pre_initialized_) { + CHECK(initialize_sandbox_ran_); + } +} + +SandboxLinux* SandboxLinux::GetInstance() { + SandboxLinux* instance = base::Singleton::get(); + CHECK(instance); + return instance; +} + +void SandboxLinux::StopThread(base::Thread* thread) { + DCHECK(thread); + thread->Stop(); +} + +void SandboxLinux::PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type) { + CHECK(!pre_initialized_); +#if BUILDFLAG(USING_SANITIZER) + // Sanitizers need to open some resources before the sandbox is enabled. + // This should not fork, not launch threads, not open a directory. + __sanitizer_sandbox_on_notify(sanitizer_args()); + sanitizer_args_.reset(); +#endif + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + const std::string process_type = + command_line->GetSwitchValueASCII(switches::kProcessType); + + base::SysInfo::AmountOfPhysicalMemory(); + base::SysInfo::NumberOfProcessors(); + base::SysInfo::CPUModelName(); + + switch (sandbox_type) { + case sandbox::mojom::Sandbox::kNoSandbox: + { +#if BUILDFLAG(USE_NSS_CERTS) + // The main process has to initialize the ~/.pki dir which won't work + // after unveil(2). + crypto::EnsureNSSInit(); +#endif + CRYPTO_pre_sandbox_init(); + + rust_png::initialize_cpudetect(); + + base::FilePath cache_directory, local_directory; + + base::PathService::Get(base::DIR_CACHE, &cache_directory); + base::PathService::Get(base::DIR_HOME, &local_directory); + + cache_directory = cache_directory.AppendASCII("iridium"); + local_directory = local_directory.AppendASCII(".local").AppendASCII("share").AppendASCII("applications"); + + if (!base::CreateDirectory(cache_directory)) { + LOG(ERROR) << "Failed to create " << cache_directory.value() << " directory."; + } + + if (!base::CreateDirectory(local_directory)) { + LOG(ERROR) << "Failed to create " << local_directory.value() << " directory."; + } + + break; + } + case sandbox::mojom::Sandbox::kRenderer: + { + FcConfig* config = gfx::GetGlobalFontConfig(); + DCHECK(config); + break; + } + default: + break; + } + + pre_initialized_ = true; +} + +bool SandboxLinux::SetPledge(const char *pstring, const char *ppath) { + FILE *fp; + char *s = NULL; + size_t len = 0; + ssize_t read; + + if (pstring != NULL) { + if (pledge(pstring, NULL) == -1) + goto err; + VLOG(5) << "pledge " << pstring; + } else if (ppath != NULL) { + fp = fopen(ppath, "r"); + if (fp != NULL) { + while ((read = getline(&s, &len, fp)) != -1 ) { + if (s[strlen(s)-1] == '\n') + s[strlen(s)-1] = '\0'; + if (pledge(s, NULL) == -1) + goto err; + VLOG(5) << "pledge " << s; + } + fclose(fp); + } else { + LOG(ERROR) << "fopen(" << ppath << ") failed, errno: " << errno; + return false; + } + } + return true; +err: + LOG(ERROR) << "pledge() failed, errno: " << errno; + return false; +} + +bool SandboxLinux::SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type) { + FILE *fp; + char *s = NULL, *cp = NULL, *home = NULL, **ap, *tokens[MAXTOKENS]; + char *xdg_var = NULL; + char path[PATH_MAX]; + const char *ufile; + size_t len = 0, lineno = 0; + + switch (sandbox_type) { + case sandbox::mojom::Sandbox::kNoSandbox: + ufile = _UNVEIL_MAIN; + break; + case sandbox::mojom::Sandbox::kGpu: + case sandbox::mojom::Sandbox::kOnDeviceModelExecution: + ufile = _UNVEIL_GPU; + break; + case sandbox::mojom::Sandbox::kNetwork: + ufile = _UNVEIL_UTILITY_NETWORK; + break; + case sandbox::mojom::Sandbox::kAudio: + ufile = _UNVEIL_UTILITY_AUDIO; + break; + case sandbox::mojom::Sandbox::kVideoCapture: + ufile = _UNVEIL_UTILITY_VIDEO; + break; + default: + unveil("/dev/null", "r"); + goto done; + } + + fp = fopen(ufile, "r"); + if (fp != NULL) { + while (!feof(fp)) { + if ((s = fparseln(fp, &len, &lineno, NULL, + FPARSELN_UNESCCOMM | FPARSELN_UNESCCONT)) == NULL) { + if (ferror(fp)) { + LOG(ERROR) << "ferror(), errno: " << errno; + _exit(1); + } else { + continue; + } + } + cp = s; + cp += strspn(cp, " \t\n"); /* eat whitespace */ + if (cp[0] == '\0') + continue; + + for (ap = tokens; ap < &tokens[MAXTOKENS - 1] && + (*ap = strsep(&cp, " \t")) != NULL;) { + if (**ap != '\0') + ap++; + } + *ap = NULL; + + if (tokens[1] == NULL) { + LOG(ERROR) << ufile << ": line " << lineno << ": must supply value to " << s; + _exit(1); + } + + if (tokens[0][0] == '~') { + if ((home = getenv("HOME")) == NULL || *home == '\0') { + LOG(ERROR) << "failed to get home"; + _exit(1); + } + memmove(tokens[0], tokens[0] + 1, strlen(tokens[0])); + strncpy(path, home, sizeof(path) - 1); + path[sizeof(path) - 1] = '\0'; + strncat(path, tokens[0], sizeof(path) - 1 - strlen(path)); + } else if (strncmp(tokens[0], "XDG_", 4) == 0) { + if ((xdg_var = getenv(tokens[0])) == NULL || *xdg_var == '\0') { + LOG(ERROR) << "failed to get " << tokens[0]; + continue; + } + strncpy(path, xdg_var, sizeof(path) - 1); + path[sizeof(path) - 1] = '\0'; + } else { + strncpy(path, tokens[0], sizeof(path) - 1); + path[sizeof(path) - 1] = '\0'; + } + + if (unveil(path, tokens[1]) == -1) { + LOG(ERROR) << "failed unveiling " << path << " with permissions " << tokens[1]; + _exit(1); + } else { + VLOG(5) << "unveiling " << path << " with permissions " << tokens[1]; + } + } + fclose(fp); + } else { + LOG(ERROR) << "failed to open " << ufile << " errno: " << errno; + _exit(1); + } + +done: + unveil_initialized_ = true; + + return true; +} + +bool SandboxLinux::unveil_initialized() const { + return unveil_initialized_; +} + +bool SandboxLinux::InitializeSandbox(sandbox::mojom::Sandbox sandbox_type, + SandboxLinux::PreSandboxHook hook, + const Options& options) { + DCHECK(!initialize_sandbox_ran_); + initialize_sandbox_ran_ = true; + + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + const std::string process_type = + command_line->GetSwitchValueASCII(switches::kProcessType); + + if (command_line->HasSwitch(switches::kNoSandbox)) + return true; + + VLOG(1) << "SandboxLinux::InitializeSandbox: process_type=" + << process_type << " sandbox_type=" << sandbox_type; + + // Only one thread is running, pre-initialize if not already done. + if (!pre_initialized_) + PreinitializeSandbox(sandbox_type); + + // Attempt to limit the future size of the address space of the process. + int error = 0; + const bool limited_as = LimitAddressSpace(&error); + if (error) { + // Restore errno. Internally to |LimitAddressSpace|, the errno due to + // setrlimit may be lost. + errno = error; + PCHECK(limited_as); + } + + if (hook) + CHECK(std::move(hook).Run(options)); + + if (!command_line->HasSwitch(switches::kDisableUnveil)) + SetUnveil(process_type, sandbox_type); + + switch(sandbox_type) { + case sandbox::mojom::Sandbox::kNoSandbox: + SetPledge(NULL, "/etc/iridium/pledge.main"); + break; + case sandbox::mojom::Sandbox::kRenderer: + // prot_exec needed by v8 + // flock needed by sqlite3 locking + SetPledge("stdio rpath flock prot_exec recvfd sendfd ps", NULL); + break; + case sandbox::mojom::Sandbox::kGpu: + case sandbox::mojom::Sandbox::kOnDeviceModelExecution: + SetPledge("stdio drm inet rpath flock cpath wpath prot_exec recvfd sendfd tmppath unix", NULL); + break; + case sandbox::mojom::Sandbox::kAudio: + SetPledge(NULL, "/etc/iridium/pledge.utility_audio"); + break; + case sandbox::mojom::Sandbox::kNetwork: + SetPledge(NULL, "/etc/iridium/pledge.utility_network"); + break; + case sandbox::mojom::Sandbox::kVideoCapture: + SetPledge(NULL, "/etc/iridium/pledge.utility_video"); + break; + case sandbox::mojom::Sandbox::kUtility: + case sandbox::mojom::Sandbox::kService: + SetPledge("stdio rpath cpath wpath fattr flock sendfd recvfd prot_exec", NULL); + break; + default: + LOG(ERROR) << "non-pledge()'d process: " << sandbox_type; + break; + } + + return true; +} + +bool SandboxLinux::LimitAddressSpace(int* error) { +#if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \ + !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER) + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + if (SandboxTypeFromCommandLine(*command_line) == sandbox::mojom::Sandbox::kNoSandbox) { + return false; + } + + // Unfortunately, it does not appear possible to set RLIMIT_AS such that it + // will both (a) be high enough to support V8's and WebAssembly's address + // space requirements while also (b) being low enough to mitigate exploits + // using integer overflows that require large allocations, heap spray, or + // other memory-hungry attack modes. + + *error = sandbox::ResourceLimits::Lower( + RLIMIT_DATA, static_cast(sandbox::kDataSizeLimit)); + + // Cache the resource limit before turning on the sandbox. + base::SysInfo::AmountOfVirtualMemory(); + base::SysInfo::MaxSharedMemorySize(); + + return *error == 0; +#else + base::SysInfo::AmountOfVirtualMemory(); + return false; +#endif // !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && + // !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER) +} + +} // namespace policy +} // namespace sandbox diff --git a/www/iridium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.h b/www/iridium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.h index e0cb48db622d..029c1bf460a3 100644 --- a/www/iridium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.h +++ b/www/iridium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.h @@ -1,283 +1,283 @@ ---- sandbox/policy/openbsd/sandbox_openbsd.h.orig 2025-05-07 06:48:23 UTC +--- sandbox/policy/openbsd/sandbox_openbsd.h.orig 2025-12-10 15:04:57 UTC +++ sandbox/policy/openbsd/sandbox_openbsd.h @@ -0,0 +1,280 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +#ifndef SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ +#define SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ + +#include +#include +#include + +#include "base/logging.h" +#include "base/posix/global_descriptors.h" +#include "sandbox/policy/export.h" +#include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h" +#include "sandbox/policy/mojom/sandbox.mojom.h" +#include "base/sanitizer_buildflags.h" + +#if BUILDFLAG(USING_SANITIZER) +#include +#endif + +namespace base { +template +struct DefaultSingletonTraits; +class Thread; +} // namespace base + +namespace sandbox { +namespace syscall_broker { +class BrokerProcess; +} // namespace syscall_broker +} // namespace sandbox + +namespace sandbox { +namespace policy { + +// A singleton class to represent and change our sandboxing state for the +// three main Linux sandboxes. +// The sandboxing model allows using two layers of sandboxing. The first layer +// can be implemented either with unprivileged namespaces or with the setuid +// sandbox. This class provides a way to engage the namespace sandbox, but does +// not deal with the legacy setuid sandbox directly. +// The second layer is mainly based on seccomp-bpf and is engaged with +// InitializeSandbox(). InitializeSandbox() is also responsible for "sealing" +// the first layer of sandboxing. That is, InitializeSandbox must always be +// called to have any meaningful sandboxing at all. +class SANDBOX_POLICY_EXPORT SandboxLinux { + public: + // This is a list of sandbox IPC methods which the renderer may send to the + // sandbox host. See + // https://chromium.googlesource.com/chromium/src/+/master/docs/linux_sandbox_ipc.md + // This isn't the full list, values < 32 are reserved for methods called from + // Skia, and values < 64 are reserved for libc_interceptor.cc. + enum LinuxSandboxIPCMethods { + DEPRECATED_METHOD_GET_FALLBACK_FONT_FOR_CHAR = 64, + DEPRECATED_METHOD_GET_CHILD_WITH_INODE, + DEPRECATED_METHOD_GET_STYLE_FOR_STRIKE, + METHOD_MAKE_SHARED_MEMORY_SEGMENT, + DEPRECATED_METHOD_MATCH_WITH_FALLBACK, + }; + + // These form a bitmask which describes the conditions of the Linux sandbox. + // Note: this doesn't strictly give you the current status, it states + // what will be enabled when the relevant processes are initialized. + enum Status { + // SUID sandbox active. + kSUID = 1 << 0, + + // Sandbox is using a new PID namespace. + kPIDNS = 1 << 1, + + // Sandbox is using a new network namespace. + kNetNS = 1 << 2, + + // seccomp-bpf sandbox active. + kSeccompBPF = 1 << 3, + + // The Yama LSM module is present and enforcing. + kYama = 1 << 4, + + // seccomp-bpf sandbox is active and the kernel supports TSYNC. + kSeccompTSYNC = 1 << 5, + + // User namespace sandbox active. + kUserNS = 1 << 6, + + // A flag that denotes an invalid sandbox status. + kInvalid = 1 << 31, + }; + + // SandboxLinux Options are a superset of SandboxSecompBPF Options. + struct Options : public SandboxSeccompBPF::Options { + // When running with a zygote, the namespace sandbox will have already + // been engaged prior to initializing SandboxLinux itself, and need not + // be done so again. Set to true to indicate that there isn't a zygote + // for this process and the step is to be performed here explicitly. + bool engage_namespace_sandbox = false; + + // Allow starting the sandbox with multiple threads already running. This + // will enable TSYNC for seccomp-BPF, which syncs the seccomp-BPF policy + // across all running threads. + bool allow_threads_during_sandbox_init = false; + + // Enables the CHECK for open directories. The open directory check is only + // useful for the chroot jail (from the semantic layer of the sandbox), and + // can safely be disabled if we are only enabling the seccomp-BPF layer. + bool check_for_open_directories = true; + }; + + // Callers can provide this hook to run code right before the policy + // is passed to the BPF compiler and the sandbox is engaged. If + // pre_sandbox_hook() returns true, the sandbox will be engaged + // afterwards, otherwise the process is terminated. + using PreSandboxHook = base::OnceCallback; + + // Get our singleton instance. + static SandboxLinux* GetInstance(); + + SandboxLinux(const SandboxLinux&) = delete; + SandboxLinux& operator=(const SandboxLinux&) = delete; + + bool SetPledge(const char *pstring, const char *ppath); + bool SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type); + + // Do some initialization that can only be done before any of the sandboxes + // are enabled. If using the setuid sandbox, this should be called manually + // before the setuid sandbox is engaged. + // Security: When this runs, it is imperative that either InitializeSandbox() + // runs as well or that all file descriptors returned in + // GetFileDescriptorsToClose() get closed. + // Otherwise file descriptors that bypass the security of the setuid sandbox + // would be kept open. One must be particularly careful if a process performs + // a fork(). + void PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type); + + // Check that the current process is the init process of a new PID + // namespace and then proceed to drop access to the file system by using + // a new unprivileged namespace. This is a layer-1 sandbox. + // In order for this sandbox to be effective, it must be "sealed" by calling + // InitializeSandbox(). + void EngageNamespaceSandbox(bool from_zygote); + + // Return a list of file descriptors to close if PreinitializeSandbox() ran + // but InitializeSandbox() won't. Avoid using. + // TODO(jln): get rid of this hack. + std::vector GetFileDescriptorsToClose(); + + // Seal an eventual layer-1 sandbox and initialize the layer-2 sandbox with + // an adequate policy depending on the process type and command line + // arguments. + // Currently the layer-2 sandbox is composed of seccomp-bpf and address space + // limitations. + // This function should only be called without any thread running. + bool InitializeSandbox(sandbox::mojom::Sandbox sandbox_type, + PreSandboxHook hook, + const Options& options); + + // Stop |thread| in a way that can be trusted by the sandbox. + void StopThread(base::Thread* thread); + + // Returns the status of the renderer, worker and ppapi sandbox. Can only + // be queried after going through PreinitializeSandbox(). This is a bitmask + // and uses the constants defined in "enum Status" above. Since the + // status needs to be provided before the sandboxes are actually started, + // this returns what will actually happen once InitializeSandbox() + // is called from inside these processes. + int GetStatus(); + + // Returns true if the current process is single-threaded or if the number + // of threads cannot be determined. + bool IsSingleThreaded() const; + + // Returns true if we started Seccomp BPF. + bool seccomp_bpf_started() const; + + // Returns true if unveil(2) is used. + bool unveil_initialized() const; + + // Check the policy and eventually start the seccomp-bpf sandbox. This should + // never be called with threads started. If we detect that threads have + // started we will crash. + bool StartSeccompBPF(sandbox::mojom::Sandbox sandbox_type, + PreSandboxHook hook, + const Options& options); + + // Limit the address space of the current process (and its children) to make + // some vulnerabilities harder to exploit. Writes the errno due to setrlimit + // (including 0 if no error) into |error|. + bool LimitAddressSpace(int* error); + + // Returns a file descriptor to proc. The file descriptor is no longer valid + // after the sandbox has been sealed. + int proc_fd() const { + DCHECK_NE(-1, proc_fd_); + return proc_fd_; + } + +#if BUILDFLAG(USING_SANITIZER) + __sanitizer_sandbox_arguments* sanitizer_args() const { + return sanitizer_args_.get(); + }; +#endif + + // A BrokerProcess is a helper that is started before the sandbox is engaged, + // typically from a pre-sandbox hook, that will serve requests to access + // files over an IPC channel. The client of this runs from a SIGSYS handler + // triggered by the seccomp-bpf sandbox. + // |client_sandbox_policy| is the policy being run by the client, and is + // used to derive the equivalent broker-side policy. + // |broker_side_hook| is an alternate pre-sandbox hook to be run before the + // broker itself gets sandboxed, to which the broker side policy and + // |options| are passed. + // Crashes the process if the broker can not be started since continuation + // is impossible (and presumably unsafe). + // This should never be destroyed, as after the sandbox is started it is + // vital to the process. +#if 0 + void StartBrokerProcess( + const sandbox::syscall_broker::BrokerCommandSet& allowed_command_set, + std::vector permissions, + PreSandboxHook broker_side_hook, + const Options& options); + + sandbox::syscall_broker::BrokerProcess* broker_process() const { + return broker_process_; + } +#endif + + private: + friend struct base::DefaultSingletonTraits; + + SandboxLinux(); + ~SandboxLinux(); + + // We must have been pre_initialized_ before using these. + bool seccomp_bpf_supported() const; + bool seccomp_bpf_with_tsync_supported() const; + + // Returns true if it can be determined that the current process has open + // directories that are not managed by the SandboxLinux class. This would + // be a vulnerability as it would allow to bypass the setuid sandbox. + bool HasOpenDirectories() const; + + // The last part of the initialization is to make sure any temporary "hole" + // in the sandbox is closed. For now, this consists of closing proc_fd_. + void SealSandbox(); + + // GetStatus() makes promises as to how the sandbox will behave. This + // checks that no promises have been broken. + void CheckForBrokenPromises(sandbox::mojom::Sandbox sandbox_type); + + // Stop |thread| and make sure it does not appear in /proc/self/tasks/ + // anymore. + void StopThreadAndEnsureNotCounted(base::Thread* thread) const; + + // A file descriptor to /proc. It's dangerous to have it around as it could + // allow for sandbox bypasses. It needs to be closed before we consider + // ourselves sandboxed. + int proc_fd_; + + bool seccomp_bpf_started_; + bool unveil_initialized_; + // The value returned by GetStatus(). Gets computed once and then cached. + int sandbox_status_flags_; + // Did PreinitializeSandbox() run? + bool pre_initialized_; + bool seccomp_bpf_supported_; // Accurate if pre_initialized_. + bool seccomp_bpf_with_tsync_supported_; // Accurate if pre_initialized_. + bool yama_is_enforcing_; // Accurate if pre_initialized_. + bool initialize_sandbox_ran_; // InitializeSandbox() was called. +#if BUILDFLAG(USING_SANITIZER) + std::unique_ptr<__sanitizer_sandbox_arguments> sanitizer_args_; +#endif + sandbox::syscall_broker::BrokerProcess* broker_process_; // Leaked as global. +}; + +} // namespace policy +} // namespace sandbox + +#endif // SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ diff --git a/www/iridium/files/patch-sandbox_policy_sandbox.cc b/www/iridium/files/patch-sandbox_policy_sandbox.cc index 77ece39fd1b3..1578e8942604 100644 --- a/www/iridium/files/patch-sandbox_policy_sandbox.cc +++ b/www/iridium/files/patch-sandbox_policy_sandbox.cc @@ -1,22 +1,22 @@ ---- sandbox/policy/sandbox.cc.orig 2025-09-11 13:19:19 UTC +--- sandbox/policy/sandbox.cc.orig 2025-12-10 15:04:57 UTC +++ sandbox/policy/sandbox.cc @@ -18,6 +18,10 @@ #include "sandbox/policy/linux/sandbox_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif // BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_MAC) #include "sandbox/mac/seatbelt.h" #endif // BUILDFLAG(IS_MAC) @@ -34,7 +38,7 @@ namespace sandbox { namespace policy { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool Sandbox::Initialize(sandbox::mojom::Sandbox sandbox_type, SandboxLinux::PreSandboxHook hook, const SandboxLinux::Options& options) { diff --git a/www/iridium/files/patch-sandbox_policy_sandbox.h b/www/iridium/files/patch-sandbox_policy_sandbox.h index 11d9055e7fca..f27b561ce059 100644 --- a/www/iridium/files/patch-sandbox_policy_sandbox.h +++ b/www/iridium/files/patch-sandbox_policy_sandbox.h @@ -1,24 +1,24 @@ ---- sandbox/policy/sandbox.h.orig 2025-05-07 06:48:23 UTC +--- sandbox/policy/sandbox.h.orig 2025-12-10 15:04:57 UTC +++ sandbox/policy/sandbox.h @@ -12,6 +12,12 @@ #include "sandbox/policy/linux/sandbox_linux.h" #endif +#if BUILDFLAG(IS_OPENBSD) +#include "sandbox/policy/openbsd/sandbox_openbsd.h" +#elif BUILDFLAG(IS_FREEBSD) +#include "sandbox/policy/freebsd/sandbox_freebsd.h" +#endif + namespace sandbox { namespace mojom { enum class Sandbox; @@ -32,7 +38,7 @@ namespace policy { class SANDBOX_POLICY_EXPORT Sandbox { public: -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) static bool Initialize(sandbox::mojom::Sandbox sandbox_type, SandboxLinux::PreSandboxHook hook, const SandboxLinux::Options& options); diff --git a/www/iridium/files/patch-sandbox_policy_sandbox__type.cc b/www/iridium/files/patch-sandbox_policy_sandbox__type.cc index 229314f97899..5b3e047a9a08 100644 --- a/www/iridium/files/patch-sandbox_policy_sandbox__type.cc +++ b/www/iridium/files/patch-sandbox_policy_sandbox__type.cc @@ -1,178 +1,167 @@ ---- sandbox/policy/sandbox_type.cc.orig 2025-09-11 13:19:19 UTC +--- sandbox/policy/sandbox_type.cc.orig 2025-12-10 15:04:57 UTC +++ sandbox/policy/sandbox_type.cc -@@ -16,7 +16,7 @@ - #include "chromeos/ash/components/assistant/buildflags.h" - #endif // BUILDFLAG(IS_CHROMEOS) +@@ -12,7 +12,7 @@ + #include "sandbox/policy/mojom/sandbox.mojom.h" + #include "sandbox/policy/switches.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "media/gpu/buildflags.h" // nogncheck #include "media/media_buildflags.h" // nogncheck #endif -@@ -38,7 +38,7 @@ constexpr char kServiceSandboxWithJit[] = "service_wit +@@ -34,7 +34,7 @@ constexpr char kServiceSandboxWithJit[] = "service_wit constexpr char kSpeechRecognitionSandbox[] = "speech_recognition"; #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) constexpr char kPrintBackendSandbox[] = "print_backend"; constexpr char kScreenAISandbox[] = "screen_ai"; #endif -@@ -56,15 +56,15 @@ constexpr char kWindowsSystemProxyResolverSandbox[] = +@@ -52,11 +52,11 @@ constexpr char kWindowsSystemProxyResolverSandbox[] = constexpr char kMirroringSandbox[] = "mirroring"; #endif // BUILDFLAG(IS_MAC) --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - constexpr char kVideoEffectsSandbox[] = "video_effects"; - #endif - -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) constexpr char kVideoCaptureSandbox[] = "video_capture"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) constexpr char kShapeDetectionSandbox[] = "shape_detection"; // USE_LINUX_VIDEO_ACCELERATION implies IS_LINUX || IS_CHROMEOS, so this double // #if is redundant, however, we cannot include "media/gpu/buildflags.h" on all -@@ -85,7 +85,7 @@ constexpr char kLibassistantSandbox[] = "libassistant" - #endif // BUILDFLAG(ENABLE_CROS_LIBASSISTANT) +@@ -74,7 +74,7 @@ constexpr char kTtsSandbox[] = "tts"; + constexpr char kNearbySandbox[] = "nearby"; #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) constexpr char kOnDeviceTranslationSandbox[] = "on_device_translation"; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -@@ -135,7 +135,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -124,7 +124,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi case Sandbox::kCdm: case Sandbox::kPrintCompositor: case Sandbox::kAudio: -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) case Sandbox::kVideoCapture: #endif #if BUILDFLAG(IS_WIN) -@@ -146,7 +146,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -135,7 +135,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi case Sandbox::kMediaFoundationCdm: case Sandbox::kWindowsSystemProxyResolver: #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case Sandbox::kShapeDetection: #if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) case Sandbox::kHardwareVideoDecoding: -@@ -165,15 +165,15 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -151,12 +151,12 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi case Sandbox::kMirroring: #endif // BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) case Sandbox::kPrintBackend: case Sandbox::kScreenAI: #endif case Sandbox::kSpeechRecognition: --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - case Sandbox::kVideoEffects: - #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) case Sandbox::kOnDeviceTranslation: #endif DCHECK(command_line->GetSwitchValueASCII(switches::kProcessType) == -@@ -183,7 +183,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -166,7 +166,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi switches::kServiceSandboxType, StringFromUtilitySandboxType(sandbox_type)); return; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case Sandbox::kZygoteIntermediateSandbox: return; #endif -@@ -214,7 +214,7 @@ sandbox::mojom::Sandbox SandboxTypeFromCommandLine( +@@ -197,7 +197,7 @@ sandbox::mojom::Sandbox SandboxTypeFromCommandLine( return Sandbox::kGpu; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Intermediate process gains a sandbox later. if (process_type == switches::kZygoteProcessType) return Sandbox::kZygoteIntermediateSandbox; -@@ -252,7 +252,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -235,7 +235,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb return kUtilitySandbox; case Sandbox::kAudio: return kAudioSandbox; -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) case Sandbox::kVideoCapture: return kVideoCaptureSandbox; #endif -@@ -263,17 +263,17 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -246,13 +246,13 @@ std::string StringFromUtilitySandboxType(Sandbox sandb case Sandbox::kSpeechRecognition: return kSpeechRecognitionSandbox; #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) case Sandbox::kPrintBackend: return kPrintBackendSandbox; case Sandbox::kScreenAI: return kScreenAISandbox; #endif --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - case Sandbox::kVideoEffects: - return kVideoEffectsSandbox; - #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) case Sandbox::kOnDeviceTranslation: return kOnDeviceTranslationSandbox; #endif -@@ -293,7 +293,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -272,7 +272,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb case Sandbox::kMirroring: return kMirroringSandbox; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case Sandbox::kShapeDetection: return kShapeDetectionSandbox; #if BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -@@ -394,7 +394,7 @@ sandbox::mojom::Sandbox UtilitySandboxTypeFromString( +@@ -295,7 +295,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb + // The following are not utility processes so should not occur. + case Sandbox::kRenderer: + case Sandbox::kGpu: +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + case Sandbox::kZygoteIntermediateSandbox: + #endif + NOTREACHED(); +@@ -369,7 +369,7 @@ sandbox::mojom::Sandbox UtilitySandboxTypeFromString( return Sandbox::kSpeechRecognition; } #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (sandbox_string == kPrintBackendSandbox) { return Sandbox::kPrintBackend; } -@@ -402,22 +402,22 @@ sandbox::mojom::Sandbox UtilitySandboxTypeFromString( +@@ -377,17 +377,17 @@ sandbox::mojom::Sandbox UtilitySandboxTypeFromString( return Sandbox::kScreenAI; } #endif --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - if (sandbox_string == kVideoEffectsSandbox) { - return Sandbox::kVideoEffects; - } - #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (sandbox_string == kOnDeviceTranslationSandbox) { return Sandbox::kOnDeviceTranslation; } #endif -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) if (sandbox_string == kVideoCaptureSandbox) { return Sandbox::kVideoCapture; } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (sandbox_string == kShapeDetectionSandbox) { return Sandbox::kShapeDetection; } diff --git a/www/iridium/files/patch-sandbox_policy_switches.cc b/www/iridium/files/patch-sandbox_policy_switches.cc index 0c2736a828f2..772b6fe48387 100644 --- a/www/iridium/files/patch-sandbox_policy_switches.cc +++ b/www/iridium/files/patch-sandbox_policy_switches.cc @@ -1,13 +1,13 @@ ---- sandbox/policy/switches.cc.orig 2025-09-11 13:19:19 UTC +--- sandbox/policy/switches.cc.orig 2025-12-10 15:04:57 UTC +++ sandbox/policy/switches.cc @@ -40,7 +40,9 @@ const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-f // Meant to be used as a browser-level switch for testing purposes only. const char kNoSandbox[] = "no-sandbox"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +const char kDisableUnveil[] = "disable-unveil"; + +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Instructs the zygote to launch without a sandbox. Processes forked from this // type of zygote will apply their own custom sandboxes later. const char kNoZygoteSandbox[] = "no-zygote-sandbox"; diff --git a/www/iridium/files/patch-sandbox_policy_switches.h b/www/iridium/files/patch-sandbox_policy_switches.h index e3ef1f791b44..fd93f9334e0f 100644 --- a/www/iridium/files/patch-sandbox_policy_switches.h +++ b/www/iridium/files/patch-sandbox_policy_switches.h @@ -1,12 +1,12 @@ ---- sandbox/policy/switches.h.orig 2025-09-11 13:19:19 UTC +--- sandbox/policy/switches.h.orig 2025-12-10 15:04:57 UTC +++ sandbox/policy/switches.h @@ -24,7 +24,8 @@ SANDBOX_POLICY_EXPORT extern const char kDisableSetuid SANDBOX_POLICY_EXPORT extern const char kGpuSandboxAllowSysVShm[]; SANDBOX_POLICY_EXPORT extern const char kGpuSandboxFailuresFatal[]; SANDBOX_POLICY_EXPORT extern const char kNoSandbox[]; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +SANDBOX_POLICY_EXPORT extern const char kDisableUnveil[]; +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) SANDBOX_POLICY_EXPORT extern const char kNoZygoteSandbox[]; #endif #if BUILDFLAG(IS_WIN) diff --git a/www/iridium/files/patch-services_audio_audio__sandbox__hook__linux.cc b/www/iridium/files/patch-services_audio_audio__sandbox__hook__linux.cc index 2afa95de116d..24a906b52537 100644 --- a/www/iridium/files/patch-services_audio_audio__sandbox__hook__linux.cc +++ b/www/iridium/files/patch-services_audio_audio__sandbox__hook__linux.cc @@ -1,31 +1,31 @@ ---- services/audio/audio_sandbox_hook_linux.cc.orig 2025-06-19 07:37:57 UTC +--- services/audio/audio_sandbox_hook_linux.cc.orig 2025-12-10 15:04:57 UTC +++ services/audio/audio_sandbox_hook_linux.cc @@ -147,6 +147,7 @@ void AddPulseAudioFilePermissions( } #endif +#if !BUILDFLAG(IS_BSD) std::vector GetAudioFilePermissions() { std::vector permissions{ BrokerFilePermission::ReadOnly("/dev/urandom"), @@ -175,10 +176,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({ @@ -196,6 +199,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/iridium/files/patch-services_audio_audio__sandbox__hook__linux.h b/www/iridium/files/patch-services_audio_audio__sandbox__hook__linux.h index 3e86964b41f9..05ed249ffe04 100644 --- a/www/iridium/files/patch-services_audio_audio__sandbox__hook__linux.h +++ b/www/iridium/files/patch-services_audio_audio__sandbox__hook__linux.h @@ -1,16 +1,16 @@ ---- services/audio/audio_sandbox_hook_linux.h.orig 2025-05-07 06:48:23 UTC +--- services/audio/audio_sandbox_hook_linux.h.orig 2025-12-10 15:04:57 UTC +++ services/audio/audio_sandbox_hook_linux.h @@ -5,7 +5,13 @@ #ifndef SERVICES_AUDIO_AUDIO_SANDBOX_HOOK_LINUX_H_ #define SERVICES_AUDIO_AUDIO_SANDBOX_HOOK_LINUX_H_ +#include "build/build_config.h" + +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif namespace audio { diff --git a/www/iridium/files/patch-services_device_BUILD.gn b/www/iridium/files/patch-services_device_BUILD.gn index 1d047d892a48..1a5ab97f7453 100644 --- a/www/iridium/files/patch-services_device_BUILD.gn +++ b/www/iridium/files/patch-services_device_BUILD.gn @@ -1,11 +1,11 @@ ---- services/device/BUILD.gn.orig 2025-06-19 07:37:57 UTC +--- services/device/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ services/device/BUILD.gn @@ -17,7 +17,7 @@ if (is_ios) { } is_serial_enabled_platform = - is_win || ((is_linux || is_chromeos) && use_udev) || is_mac || is_android + is_win || ((!is_bsd && is_linux || is_chromeos) && use_udev) || is_mac || is_android source_set("lib") { # This should be visible only to embedders of the Device Service, and the diff --git a/www/iridium/files/patch-services_device_geolocation_location__provider__manager.cc b/www/iridium/files/patch-services_device_geolocation_location__provider__manager.cc index 55c514bcb5fe..89e86f3b6553 100644 --- a/www/iridium/files/patch-services_device_geolocation_location__provider__manager.cc +++ b/www/iridium/files/patch-services_device_geolocation_location__provider__manager.cc @@ -1,11 +1,11 @@ ---- services/device/geolocation/location_provider_manager.cc.orig 2025-05-07 06:48:23 UTC +--- services/device/geolocation/location_provider_manager.cc.orig 2025-12-10 15:04:57 UTC +++ services/device/geolocation/location_provider_manager.cc @@ -91,7 +91,7 @@ LocationProviderManager::LocationProviderManager( #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) // On Android and iOS, default to using the platform location provider. provider_manager_mode_ = kPlatformOnly; -#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Ash / Lacros / Linux, default to using the network location provider. provider_manager_mode_ = kNetworkOnly; #else diff --git a/www/iridium/files/patch-services_device_hid_BUILD.gn b/www/iridium/files/patch-services_device_hid_BUILD.gn index 4059213b7c4b..77027c9c48fb 100644 --- a/www/iridium/files/patch-services_device_hid_BUILD.gn +++ b/www/iridium/files/patch-services_device_hid_BUILD.gn @@ -1,30 +1,30 @@ ---- services/device/hid/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- services/device/hid/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ services/device/hid/BUILD.gn @@ -34,7 +34,26 @@ source_set("hid") { "//services/device/public/mojom", ] - if ((is_linux || is_chromeos) && use_udev) { + if (is_openbsd) { + sources += [ + "hid_connection_fido.cc", + "hid_connection_fido.h", + "hid_service_fido.cc", + "hid_service_fido.h", + ] + libs = ["fido2", "cbor", "usbhid", "crypto", "util"] + } + + if (is_freebsd) { + sources += [ + "hid_connection_freebsd.cc", + "hid_connection_freebsd.h", + "hid_service_freebsd.cc", + "hid_service_freebsd.h", + ] + } + + if ((is_linux || is_chromeos) && !is_bsd && use_udev) { sources += [ "hid_connection_linux.cc", "hid_connection_linux.h", diff --git a/www/iridium/files/patch-services_device_hid_hid__connection__fido.cc b/www/iridium/files/patch-services_device_hid_hid__connection__fido.cc index d4ed45556fbf..9507daee54f2 100644 --- a/www/iridium/files/patch-services_device_hid_hid__connection__fido.cc +++ b/www/iridium/files/patch-services_device_hid_hid__connection__fido.cc @@ -1,219 +1,219 @@ ---- services/device/hid/hid_connection_fido.cc.orig 2025-05-07 06:48:23 UTC +--- services/device/hid/hid_connection_fido.cc.orig 2025-12-10 15:04:57 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->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->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->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/iridium/files/patch-services_device_hid_hid__connection__fido.h b/www/iridium/files/patch-services_device_hid_hid__connection__fido.h index 6a46f5ee92e7..4146e3f66370 100644 --- a/www/iridium/files/patch-services_device_hid_hid__connection__fido.h +++ b/www/iridium/files/patch-services_device_hid_hid__connection__fido.h @@ -1,63 +1,63 @@ ---- services/device/hid/hid_connection_fido.h.orig 2025-05-07 06:48:23 UTC +--- services/device/hid/hid_connection_fido.h.orig 2025-12-10 15:04:57 UTC +++ services/device/hid/hid_connection_fido.h @@ -0,0 +1,60 @@ +// 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. + +#ifndef SERVICES_DEVICE_HID_HID_CONNECTION_LINUX_H_ +#define SERVICES_DEVICE_HID_HID_CONNECTION_LINUX_H_ + +#include +#include + +#include "base/files/scoped_file.h" +#include "base/memory/weak_ptr.h" +#include "base/task/sequenced_task_runner.h" +#include "services/device/hid/hid_connection.h" + +namespace base { +class SequencedTaskRunner; +} + +namespace device { + +class HidConnectionFido : public HidConnection { + public: + HidConnectionFido( + scoped_refptr device_info, + base::ScopedFD fd, + scoped_refptr blocking_task_runner, + bool allow_protected_reports, + bool allow_fido_reports); + HidConnectionFido(HidConnectionFido&) = delete; + HidConnectionFido& operator=(HidConnectionFido&) = delete; + + private: + friend class base::RefCountedThreadSafe; + class BlockingTaskRunnerHelper; + + ~HidConnectionFido() override; + + // HidConnection implementation. + void PlatformClose() override; + void PlatformWrite(scoped_refptr buffer, + WriteCallback callback) override; + void PlatformGetFeatureReport(uint8_t report_id, + ReadCallback callback) override; + void PlatformSendFeatureReport(scoped_refptr buffer, + WriteCallback callback) override; + + // |helper_| lives on the sequence to which |blocking_task_runner_| posts + // tasks so all calls must be posted there including this object's + // destruction. + std::unique_ptr helper_; + + const scoped_refptr blocking_task_runner_; + + base::WeakPtrFactory weak_factory_{this}; +}; + +} // namespace device + +#endif // SERVICES_DEVICE_HID_HID_CONNECTION_LINUX_H_ diff --git a/www/iridium/files/patch-services_device_hid_hid__connection__freebsd.cc b/www/iridium/files/patch-services_device_hid_hid__connection__freebsd.cc index aa6a28cf61d1..3b8b5b639b6d 100644 --- a/www/iridium/files/patch-services_device_hid_hid__connection__freebsd.cc +++ b/www/iridium/files/patch-services_device_hid_hid__connection__freebsd.cc @@ -1,243 +1,243 @@ ---- services/device/hid/hid_connection_freebsd.cc.orig 2025-05-07 06:48:23 UTC +--- services/device/hid/hid_connection_freebsd.cc.orig 2025-12-10 15:04:57 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::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->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->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->as_vector().data(); + ugd.ugd_maxlen = buffer->size(); + // FreeBSD does not require report id if it's not used + if (buffer->data()[0] == 0) { + ugd.ugd_data = buffer->as_vector().data() + 1; + ugd.ugd_maxlen = buffer->size() - 1; + } else { + 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->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->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/iridium/files/patch-services_device_hid_hid__connection__freebsd.h b/www/iridium/files/patch-services_device_hid_hid__connection__freebsd.h index f8835a646b51..e1bbe15bb7ba 100644 --- a/www/iridium/files/patch-services_device_hid_hid__connection__freebsd.h +++ b/www/iridium/files/patch-services_device_hid_hid__connection__freebsd.h @@ -1,70 +1,70 @@ ---- services/device/hid/hid_connection_freebsd.h.orig 2025-05-07 06:48:23 UTC +--- services/device/hid/hid_connection_freebsd.h.orig 2025-12-10 15:04:57 UTC +++ services/device/hid/hid_connection_freebsd.h @@ -0,0 +1,67 @@ +// 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. + +#ifndef DEVICE_HID_HID_CONNECTION_FREEBSD_H_ +#define DEVICE_HID_HID_CONNECTION_FREEBSD_H_ + +#include +#include + +#include "base/files/scoped_file.h" +#include "base/memory/weak_ptr.h" +#include "base/memory/ref_counted_memory.h" +#include "base/task/sequenced_task_runner.h" +#include "services/device/hid/hid_connection.h" + +namespace base { +class SequencedTaskRunner; +} + +namespace net { +class IOBuffer; +} + +namespace device { + +class HidConnectionFreeBSD : public HidConnection { + public: + HidConnectionFreeBSD( + scoped_refptr device_info, + base::ScopedFD fd, + scoped_refptr blocking_task_runner, + bool allow_protected_reports, + bool allow_fido_reports); + + private: + friend class base::RefCountedThreadSafe; + class BlockingTaskRunnerHelper; + + HidConnectionFreeBSD(const HidConnectionFreeBSD&) = delete; + HidConnectionFreeBSD& operator=(const HidConnectionFreeBSD&) = delete; + + ~HidConnectionFreeBSD() override; + + // HidConnection implementation. + void PlatformClose() override; + void PlatformWrite(scoped_refptr buffer, + WriteCallback callback) override; + void PlatformGetFeatureReport(uint8_t report_id, + ReadCallback callback) override; + void PlatformSendFeatureReport(scoped_refptr buffer, + WriteCallback callback) override; + + // |helper_| lives on the sequence to which |blocking_task_runner_| posts + // tasks so all calls must be posted there including this object's + // destruction. + std::unique_ptr helper_; + + const scoped_refptr blocking_task_runner_; + const scoped_refptr task_runner_; + + base::WeakPtrFactory weak_factory_{this}; +}; + +} // namespace device + +#endif // DEVICE_HID_HID_CONNECTION_FREEBSD_H_ diff --git a/www/iridium/files/patch-services_device_hid_hid__service.cc b/www/iridium/files/patch-services_device_hid_hid__service.cc index 5b04ddb9c1c5..099c86de6790 100644 --- a/www/iridium/files/patch-services_device_hid_hid__service.cc +++ b/www/iridium/files/patch-services_device_hid_hid__service.cc @@ -1,24 +1,24 @@ ---- services/device/hid/hid_service.cc.orig 2025-05-07 06:48:23 UTC +--- services/device/hid/hid_service.cc.orig 2025-12-10 15:04:57 UTC +++ services/device/hid/hid_service.cc @@ -20,6 +20,10 @@ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_UDEV) #include "services/device/hid/hid_service_linux.h" +#elif BUILDFLAG(IS_OPENBSD) +#include "services/device/hid/hid_service_fido.h" +#elif BUILDFLAG(IS_FREEBSD) +#include "services/device/hid/hid_service_freebsd.h" #elif BUILDFLAG(IS_MAC) #include "services/device/hid/hid_service_mac.h" #elif BUILDFLAG(IS_WIN) @@ -68,6 +72,10 @@ constexpr base::TaskTraits HidService::kBlockingTaskTr std::unique_ptr HidService::Create() { #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_UDEV) return std::make_unique(); +#elif BUILDFLAG(IS_OPENBSD) + return std::make_unique(); +#elif BUILDFLAG(IS_FREEBSD) + return std::make_unique(); #elif BUILDFLAG(IS_MAC) return std::make_unique(); #elif BUILDFLAG(IS_WIN) diff --git a/www/iridium/files/patch-services_device_hid_hid__service__fido.cc b/www/iridium/files/patch-services_device_hid_hid__service__fido.cc index 7b519c7d2df6..b29ab4a1001f 100644 --- a/www/iridium/files/patch-services_device_hid_hid__service__fido.cc +++ b/www/iridium/files/patch-services_device_hid_hid__service__fido.cc @@ -1,399 +1,399 @@ ---- services/device/hid/hid_service_fido.cc.orig 2025-05-07 06:48:23 UTC +--- services/device/hid/hid_service_fido.cc.orig 2025-12-10 15:04:57 UTC +++ services/device/hid/hid_service_fido.cc @@ -0,0 +1,396 @@ +// 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_service_fido.h" + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include "base/files/file.h" +#include "base/files/file_path.h" +#include "base/files/file_util.h" +#include "base/files/scoped_file.h" +#include "base/location.h" +#include "base/sequence_checker.h" +#include "base/strings/string_number_conversions.h" +#include "base/strings/string_split.h" +#include "base/strings/string_util.h" +#include "base/task/sequenced_task_runner.h" +#include "base/task/thread_pool.h" +#include "base/threading/scoped_blocking_call.h" +#include "build/build_config.h" +#include "build/chromeos_buildflags.h" +#include "components/device_event_log/device_event_log.h" +#include "device/udev_linux/scoped_udev.h" +#include "device/udev_linux/udev_watcher.h" +#include "services/device/hid/hid_connection_fido.h" + +namespace device { + +namespace { + +bool terrible_ping_kludge(int fd, const std::string &path) { + u_char data[256]; + int i, n; + struct pollfd pfd; + + for (i = 0; i < 4; i++) { + memset(data, 0, sizeof(data)); + /* broadcast channel ID */ + data[1] = 0xff; + data[2] = 0xff; + data[3] = 0xff; + data[4] = 0xff; + /* Ping command */ + data[5] = 0x81; + /* One byte ping only, Vasili */ + data[6] = 0; + data[7] = 1; + HID_LOG(EVENT) << "send ping " << i << " " << path; + if (write(fd, data, 64) == -1) { + HID_PLOG(ERROR) << "write " << path; + return false; + } + HID_LOG(EVENT) << "wait reply " << path; + memset(&pfd, 0, sizeof(pfd)); + pfd.fd = fd; + pfd.events = POLLIN; + if ((n = poll(&pfd, 1, 100)) == -1) { + HID_PLOG(EVENT) << "poll " << path; + return false; + } else if (n == 0) { + HID_LOG(EVENT) << "timed out " << path; + continue; + } + if (read(fd, data, 64) == -1) { + HID_PLOG(ERROR) << "read " << path; + return false; + } + /* + * Ping isn't always supported on the broadcast channel, + * so we might get an error, but we don't care - we're + * synched now. + */ + HID_LOG(EVENT) << "got reply " << path; + return true; + } + HID_LOG(ERROR) << "no response " << path; + return false; +} + +// HID report descriptor for U2F interface. Copied from: +// https://chromium.googlesource.com/chromiumos/platform2/+/c6c7e4e54fce11932fedaa3ea10236bf75d85a2b%5E%21/u2fd/u2fhid.cc +// Apparently Chromium wants to see these bytes, but OpenBSD fido(4) +// devices prohibit USB_GET_REPORT_DESC ioctl that could be used to +// get the bytes from the USB device. +constexpr uint8_t kU2fReportDesc[] = { + 0x06, 0xD0, 0xF1, /* Usage Page (FIDO Alliance), FIDO_USAGE_PAGE */ + 0x09, 0x01, /* Usage (U2F HID Auth. Device) FIDO_USAGE_U2FHID */ + 0xA1, 0x01, /* Collection (Application), HID_APPLICATION */ + 0x09, 0x20, /* Usage (Input Report Data), FIDO_USAGE_DATA_IN */ + 0x15, 0x00, /* Logical Minimum (0) */ + 0x26, 0xFF, 0x00, /* Logical Maximum (255) */ + 0x75, 0x08, /* Report Size (8) */ + 0x95, 0x40, /* Report Count (64), HID_INPUT_REPORT_BYTES */ + 0x81, 0x02, /* Input (Data, Var, Abs), Usage */ + 0x09, 0x21, /* Usage (Output Report Data), FIDO_USAGE_DATA_OUT */ + 0x15, 0x00, /* Logical Minimum (0) */ + 0x26, 0xFF, 0x00, /* Logical Maximum (255) */ + 0x75, 0x08, /* Report Size (8) */ + 0x95, 0x40, /* Report Count (64), HID_OUTPUT_REPORT_BYTES */ + 0x91, 0x02, /* Output (Data, Var, Abs), Usage */ + 0xC0 /* End Collection */ +}; + +} // namespace + +struct HidServiceFido::ConnectParams { + ConnectParams(scoped_refptr device_info, + bool allow_protected_reports, + bool allow_fido_reports, + ConnectCallback callback) + : device_info(std::move(device_info)), + allow_protected_reports(allow_protected_reports), + allow_fido_reports(allow_fido_reports), + callback(std::move(callback)), + task_runner(base::SequencedTaskRunner::GetCurrentDefault()), + blocking_task_runner( + base::ThreadPool::CreateSequencedTaskRunner(kBlockingTaskTraits)) {} + ~ConnectParams() {} + + scoped_refptr device_info; + bool allow_protected_reports; + bool allow_fido_reports; + ConnectCallback callback; + scoped_refptr task_runner; + scoped_refptr blocking_task_runner; + base::ScopedFD fd; +}; + +class HidServiceFido::BlockingTaskRunnerHelper : public UdevWatcher::Observer { + public: + BlockingTaskRunnerHelper(base::WeakPtr service) + : service_(std::move(service)), + task_runner_(base::SequencedTaskRunner::GetCurrentDefault()) { + DETACH_FROM_SEQUENCE(sequence_checker_); + } + + BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete; + BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete; + + ~BlockingTaskRunnerHelper() override { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + } + + void Start() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + void *library = dlopen("libudev.so", RTLD_NOW | RTLD_LOCAL); + if (library) { + dlclose(library); + watcher_ = UdevWatcher::StartWatching(this); + watcher_->EnumerateExistingDevices(); + } else { + HID_LOG(ERROR) << "No udev available, failling back to single enumeration"; + WalkFidoDevices(nullptr); + } + + task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&HidServiceFido::FirstEnumerationComplete, service_)); + } + + private: + void WalkFidoDevices(const char *name) { + fido_dev_info_t *devlist = NULL; + fido_dev_t *dev = NULL; + size_t devlist_len = 0, i; + const char *path; + int r; + const int MAX_FIDO_DEVICES = 256; + + if ((devlist = fido_dev_info_new(MAX_FIDO_DEVICES)) == NULL) { + HID_LOG(ERROR) << "fido_dev_info_new failed"; + goto out; + } + if ((r = fido_dev_info_manifest(devlist, MAX_FIDO_DEVICES, &devlist_len)) != + FIDO_OK) { + HID_LOG(ERROR) << "fido_dev_info_manifest: " << fido_strerr(r); + goto out; + } + + HID_LOG(EVENT) << "fido_dev_info_manifest found " << devlist_len + << " device(s)"; + + for (i = 0; i < devlist_len; i++) { + const fido_dev_info_t *di = fido_dev_info_ptr(devlist, i); + + if (di == NULL) { + HID_LOG(ERROR) << "fido_dev_info_ptr " << i << " failed"; + continue; + } + + if ((path = fido_dev_info_path(di)) == NULL) { + HID_LOG(ERROR) << "fido_dev_info_path " << i << " failed"; + continue; + } + + if (name != nullptr && !strcmp(path, name)) { + HID_LOG(EVENT) << "hotplug device " << i << ": " << path; + OnFidoDeviceAdded(di); + break; + } + + HID_LOG(EVENT) << "trying device " << i << ": " << path; + if ((dev = fido_dev_new()) == NULL) { + HID_LOG(ERROR) << "fido_dev_new failed"; + continue; + } + + if ((r = fido_dev_open(dev, path)) != FIDO_OK) { + HID_LOG(ERROR) << "fido_dev_open failed " << path; + fido_dev_free(&dev); + continue; + } + + fido_dev_close(dev); + fido_dev_free(&dev); + + OnFidoDeviceAdded(di); + } + out: + if (devlist != NULL) + fido_dev_info_free(&devlist, MAX_FIDO_DEVICES); + } + + void OnFidoDeviceAdded(const fido_dev_info_t *di) { + auto null_as_empty = [](const char *r) -> std::string { + return (r != nullptr) ? r : ""; + }; + std::string device_node(null_as_empty(fido_dev_info_path(di))); + std::vector report_descriptor( + kU2fReportDesc, kU2fReportDesc + sizeof(kU2fReportDesc)); + + auto device_info = base::MakeRefCounted( + device_node, /*physical_device_id*/"", fido_dev_info_vendor(di), + fido_dev_info_product(di), null_as_empty(fido_dev_info_product_string(di)), + null_as_empty(fido_dev_info_manufacturer_string(di)), + device::mojom::HidBusType::kHIDBusTypeUSB, report_descriptor, + device_node); + + task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&HidServiceFido::AddDevice, service_, device_info)); + } + + // UdevWatcher::Observer + void OnDeviceAdded(ScopedUdevDevicePtr device) override { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + + const char* subsystem = udev_device_get_subsystem(device.get()); + if (!subsystem || strcmp(subsystem, "fido") != 0) + return; + + const char* device_path = udev_device_get_syspath(device.get()); + if (!device_path) + return; + + WalkFidoDevices(device_path); + } + + void OnDeviceRemoved(ScopedUdevDevicePtr device) override { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + + const char* device_path = udev_device_get_syspath(device.get()); + if (device_path) { + task_runner_->PostTask( + FROM_HERE, base::BindOnce(&HidServiceFido::RemoveDevice, service_, + std::string(device_path))); + } + } + + void OnDeviceChanged(ScopedUdevDevicePtr) override {} + + SEQUENCE_CHECKER(sequence_checker_); + std::unique_ptr watcher_; + + // This weak pointer is only valid when checked on this task runner. + base::WeakPtr service_; + scoped_refptr task_runner_; +}; + +HidServiceFido::HidServiceFido() + : blocking_task_runner_( + base::ThreadPool::CreateSequencedTaskRunner(kBlockingTaskTraits)), + helper_(nullptr, base::OnTaskRunnerDeleter(blocking_task_runner_)) { + // We need to properly initialize |blocking_task_helper_| here because we need + // |weak_factory_| to be created first. + helper_.reset(new BlockingTaskRunnerHelper(weak_factory_.GetWeakPtr())); + blocking_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::Start, + base::Unretained(helper_.get()))); +} + +HidServiceFido::~HidServiceFido() = default; + +base::WeakPtr HidServiceFido::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + +void HidServiceFido::Connect(const std::string& device_guid, + bool allow_protected_reports, + bool allow_fido_reports, + ConnectCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + const auto& map_entry = devices().find(device_guid); + if (map_entry == devices().end()) { + base::SequencedTaskRunner::GetCurrentDefault()->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), nullptr)); + return; + } + scoped_refptr device_info = map_entry->second; + + auto params = + std::make_unique(device_info, allow_protected_reports, + allow_fido_reports, std::move(callback)); + scoped_refptr blocking_task_runner = + params->blocking_task_runner; + blocking_task_runner->PostTask( + FROM_HERE, base::BindOnce(&HidServiceFido::OpenOnBlockingThread, + std::move(params))); +} + +// static +void HidServiceFido::OpenOnBlockingThread( + std::unique_ptr params) { + base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, + base::BlockingType::MAY_BLOCK); + scoped_refptr task_runner = params->task_runner; + + base::FilePath device_path(params->device_info->device_node()); + base::File device_file; + int flags = + base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE; + device_file.Initialize(device_path, flags); + if (!device_file.IsValid()) { + base::File::Error file_error = device_file.error_details(); + + if (file_error == base::File::FILE_ERROR_ACCESS_DENIED) { + HID_LOG(EVENT) + << "Access denied opening device read-write, trying read-only."; + flags = base::File::FLAG_OPEN | base::File::FLAG_READ; + device_file.Initialize(device_path, flags); + } + } + if (!device_file.IsValid()) { + HID_LOG(EVENT) << "Failed to open '" << params->device_info->device_node() + << "': " + << base::File::ErrorToString(device_file.error_details()); + task_runner->PostTask(FROM_HERE, + base::BindOnce(std::move(params->callback), nullptr)); + return; + } + if (!terrible_ping_kludge(device_file.GetPlatformFile(), params->device_info->device_node())) { + HID_LOG(EVENT) << "Failed to ping " << params->device_info->device_node(); + task_runner->PostTask(FROM_HERE, base::BindOnce(std::move(params->callback), nullptr)); + return; + } + params->fd.reset(device_file.TakePlatformFile()); + + task_runner->PostTask(FROM_HERE, base::BindOnce(&HidServiceFido::FinishOpen, + std::move(params))); +} + +// static +void HidServiceFido::FinishOpen(std::unique_ptr params) { + DCHECK(params->fd.is_valid()); + + if (!base::SetNonBlocking(params->fd.get())) { + HID_PLOG(DEBUG) << "Failed to set the non-blocking flag on the device fd"; + std::move(params->callback).Run(nullptr); + return; + } + + std::move(params->callback) + .Run(base::MakeRefCounted( + std::move(params->device_info), std::move(params->fd), + std::move(params->blocking_task_runner), + params->allow_protected_reports, params->allow_fido_reports)); +} + +} // namespace device diff --git a/www/iridium/files/patch-services_device_hid_hid__service__fido.h b/www/iridium/files/patch-services_device_hid_hid__service__fido.h index 0319556c27cb..863d2f5e6654 100644 --- a/www/iridium/files/patch-services_device_hid_hid__service__fido.h +++ b/www/iridium/files/patch-services_device_hid_hid__service__fido.h @@ -1,68 +1,68 @@ ---- services/device/hid/hid_service_fido.h.orig 2025-05-07 06:48:23 UTC +--- services/device/hid/hid_service_fido.h.orig 2025-12-10 15:04:57 UTC +++ services/device/hid/hid_service_fido.h @@ -0,0 +1,65 @@ +// 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. + +#ifndef SERVICES_DEVICE_HID_HID_SERVICE_LINUX_H_ +#define SERVICES_DEVICE_HID_HID_SERVICE_LINUX_H_ + +#include + +#include "base/compiler_specific.h" +#include "base/files/scoped_file.h" +#include "base/memory/weak_ptr.h" +#include "base/task/sequenced_task_runner.h" +#include "build/build_config.h" +#include "build/chromeos_buildflags.h" +#include "services/device/hid/hid_device_info.h" +#include "services/device/hid/hid_service.h" + +namespace device { + +class HidServiceFido : public HidService { + public: + HidServiceFido(); + HidServiceFido(HidServiceFido&) = delete; + HidServiceFido& operator=(HidServiceFido&) = delete; + ~HidServiceFido() override; + + // HidService: + void Connect(const std::string& device_id, + bool allow_protected_reports, + bool allow_fido_reports, + ConnectCallback callback) override; + base::WeakPtr GetWeakPtr() override; + + private: + struct ConnectParams; + class BlockingTaskRunnerHelper; + +// These functions implement the process of locating, requesting access to and +// opening a device. Because this operation crosses multiple threads these +// functions are static and the necessary parameters are passed as a single +// struct. +#if BUILDFLAG(IS_CHROMEOS_ASH) + static void OnPathOpenComplete(std::unique_ptr params, + base::ScopedFD fd); + static void OnPathOpenError(const std::string& device_path, + ConnectCallback callback, + const std::string& error_name, + const std::string& error_message); +#else + static void OpenOnBlockingThread(std::unique_ptr params); +#endif + static void FinishOpen(std::unique_ptr params); + + const scoped_refptr blocking_task_runner_; + + // |helper_| lives on the sequence |blocking_task_runner_| posts to and holds + // a weak reference back to the service that owns it. + std::unique_ptr helper_; + base::WeakPtrFactory weak_factory_{this}; +}; + +} // namespace device + +#endif // SERVICES_DEVICE_HID_HID_SERVICE_LINUX_H_ diff --git a/www/iridium/files/patch-services_device_hid_hid__service__freebsd.cc b/www/iridium/files/patch-services_device_hid_hid__service__freebsd.cc index 1621185e3a7e..e7a91c8dd7d6 100644 --- a/www/iridium/files/patch-services_device_hid_hid__service__freebsd.cc +++ b/www/iridium/files/patch-services_device_hid_hid__service__freebsd.cc @@ -1,398 +1,398 @@ ---- services/device/hid/hid_service_freebsd.cc.orig 2025-05-07 06:48:23 UTC +--- services/device/hid/hid_service_freebsd.cc.orig 2025-12-10 15:04:57 UTC +++ services/device/hid/hid_service_freebsd.cc @@ -0,0 +1,395 @@ +// Copyright 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_service_freebsd.h" + +#include +#include +#include +#include + +#include +#include +#include + +#include "base/files/file_descriptor_watcher_posix.h" +#include "base/files/file_enumerator.h" +#include "base/files/file_util.h" +#include "base/files/file.h" +#include "base/location.h" +#include "base/logging.h" +#include "base/posix/eintr_wrapper.h" +#include "base/stl_util.h" +#include "base/strings/pattern.h" +#include "base/strings/stringprintf.h" +#include "base/strings/sys_string_conversions.h" +#include "base/strings/string_util.h" +#include "base/strings/string_split.h" +#include "base/task/single_thread_task_runner.h" +#include "base/task/thread_pool.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_connection_freebsd.h" + +const int kMaxPermissionChecks = 5; + +namespace device { + +struct HidServiceFreeBSD::ConnectParams { + ConnectParams(scoped_refptr device_info, + bool allow_protected_reports, + bool allow_fido_reports, + ConnectCallback callback) + : device_info(std::move(device_info)), + allow_protected_reports(allow_protected_reports), + allow_fido_reports(allow_fido_reports), + callback(std::move(callback)), + task_runner(base::SequencedTaskRunner::GetCurrentDefault()), + blocking_task_runner( + base::ThreadPool::CreateSequencedTaskRunner(kBlockingTaskTraits)) {} + ~ConnectParams() {} + + scoped_refptr device_info; + bool allow_protected_reports; + bool allow_fido_reports; + ConnectCallback callback; + scoped_refptr task_runner; + scoped_refptr blocking_task_runner; + base::ScopedFD fd; +}; + +class HidServiceFreeBSD::BlockingTaskRunnerHelper { + public: + BlockingTaskRunnerHelper(base::WeakPtr service) + : service_(std::move(service)), + task_runner_(base::SequencedTaskRunner::GetCurrentDefault()) { + DETACH_FROM_SEQUENCE(sequence_checker_); + + timer_.reset(new base::RepeatingTimer()); + devd_buffer_ = new net::IOBufferWithSize(1024); + } + + BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete; + BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete; + + ~BlockingTaskRunnerHelper() { + } + + void Start() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + const base::FilePath kDevRoot("/dev"); + const std::string kUHIDPattern("/dev/uhid*"); + + base::FileEnumerator enumerator(kDevRoot, false, base::FileEnumerator::FILES); + do { + const base::FilePath next_device_path(enumerator.Next()); + const std::string next_device = next_device_path.value(); + if (next_device.empty()) + break; + + if (base::MatchPattern(next_device, kUHIDPattern)) + OnDeviceAdded(next_device.substr(5)); + } while (true); + + SetupDevdMonitor(); + + task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&HidServiceFreeBSD::FirstEnumerationComplete, service_)); + } + + bool HaveReadWritePermissions(std::string device_id) { + std::string device_node = "/dev/" + device_id; + base::AssertBlockingAllowed(); + + base::FilePath device_path(device_node); + base::File device_file; + int flags = + base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE; + device_file.Initialize(device_path, flags); + if (!device_file.IsValid()) + return false; + + return true; + } + + void OnDeviceAdded(std::string device_id) { + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + std::string device_node = "/dev/" + device_id; + uint16_t vendor_id = 0xffff; + uint16_t product_id = 0xffff; + std::string product_name = ""; + std::string serial_number = ""; + + std::vector report_descriptor; + + base::AssertBlockingAllowed(); + + base::FilePath device_path(device_node); + base::File device_file; + int flags = + base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE; + device_file.Initialize(device_path, flags); + if (!device_file.IsValid()) { + HID_LOG(ERROR) << "Failed to open '" << device_node + << "': " + << base::File::ErrorToString(device_file.error_details()); + return; + } + + base::ScopedFD fd; + fd.reset(device_file.TakePlatformFile()); + + struct usb_gen_descriptor ugd; + ugd.ugd_data = NULL; + ugd.ugd_maxlen = 0xffff; + int result = HANDLE_EINTR( + ioctl(fd.get(), USB_GET_REPORT_DESC, &ugd)); + + if (result < 0) { + HID_LOG(ERROR) << "Failed to get report descriptor size"; + return; + } + + report_descriptor.resize(ugd.ugd_actlen); + + ugd.ugd_data = report_descriptor.data(); + ugd.ugd_maxlen = ugd.ugd_actlen; + result = HANDLE_EINTR( + ioctl(fd.get(), USB_GET_REPORT_DESC, &ugd)); + + if (result < 0) { + HID_LOG(ERROR) << "Failed to get report descriptor"; + return; + } + + scoped_refptr device_info(new HidDeviceInfo( + device_id, + /*physical_device_id*/"", + vendor_id, + product_id, + product_name, + serial_number, + device::mojom::HidBusType::kHIDBusTypeUSB, + report_descriptor, + device_node)); + + task_runner_->PostTask(FROM_HERE, base::BindOnce(&HidServiceFreeBSD::AddDevice, + service_, device_info)); + } + + void OnDeviceRemoved(std::string device_id) { + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + task_runner_->PostTask( + FROM_HERE, base::BindOnce(&HidServiceFreeBSD::RemoveDevice, service_, + device_id)); + } + + private: + + void CheckPendingPermissionChange() { + base::AssertBlockingAllowed(); + std::map::iterator it; + for (it = permissions_checks_attempts_.begin(); it != permissions_checks_attempts_.end();) { + std::string device_name = it->first; + bool keep = true; + if (HaveReadWritePermissions(device_name)) { + OnDeviceAdded(device_name); + keep = false; + } + else if (it->second-- <= 0) { + HID_LOG(ERROR) << "Still don't have write permissions to '" << device_name + << "' after " << kMaxPermissionChecks << " attempts"; + keep = false; + } + + if (keep) + ++it; + else + permissions_checks_attempts_.erase(it++); + } + + if (permissions_checks_attempts_.empty()) + timer_->Stop(); + } + + void SetupDevdMonitor() { + base::AssertBlockingAllowed(); + + int devd_fd = socket(AF_UNIX, SOCK_SEQPACKET, 0); + if (devd_fd < 0) + return; + + struct sockaddr_un sa; + + sa.sun_family = AF_UNIX; + strlcpy(sa.sun_path, "/var/run/devd.seqpacket.pipe", sizeof(sa.sun_path)); + if (connect(devd_fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) { + close(devd_fd); + return; + } + + devd_fd_.reset(devd_fd); + file_watcher_ = base::FileDescriptorWatcher::WatchReadable( + devd_fd_.get(), base::BindRepeating(&BlockingTaskRunnerHelper::OnDevdMessageCanBeRead, + base::Unretained(this))); + } + + void OnDevdMessageCanBeRead() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + ssize_t bytes_read = HANDLE_EINTR(recv(devd_fd_.get(), devd_buffer_->data(), + devd_buffer_->size() - 1, MSG_WAITALL)); + if (bytes_read < 0) { + if (errno != EAGAIN) { + HID_LOG(ERROR) << "Read failed"; + file_watcher_.reset(); + } + return; + } + + devd_buffer_->data()[bytes_read] = 0; + char *data = devd_buffer_->data(); + // It may take some time for devd to change permissions + // on /dev/uhidX node. So do not fail immediately if + // open fail. Retry each second for kMaxPermissionChecks + // times before giving up entirely + if (base::StartsWith(data, "+uhid", base::CompareCase::SENSITIVE)) { + std::vector parts = base::SplitString( + data, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); + if (!parts.empty()) { + std::string device_name = parts[0].substr(1); // skip '+' + if (HaveReadWritePermissions(device_name)) + OnDeviceAdded(parts[0].substr(1)); + else { + // Do not re-add to checks + if (permissions_checks_attempts_.find(device_name) == permissions_checks_attempts_.end()) { + permissions_checks_attempts_.insert(std::pair(device_name, kMaxPermissionChecks)); + timer_->Start(FROM_HERE, base::Seconds(1), + this, &BlockingTaskRunnerHelper::CheckPendingPermissionChange); + } + } + } + } + + if (base::StartsWith(data, "-uhid", base::CompareCase::SENSITIVE)) { + std::vector parts = base::SplitString( + data, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); + if (!parts.empty()) { + std::string device_name = parts[0].substr(1); // skip '-' + auto it = permissions_checks_attempts_.find(device_name); + if (it != permissions_checks_attempts_.end()) { + permissions_checks_attempts_.erase(it); + if (permissions_checks_attempts_.empty()) + timer_->Stop(); + } + OnDeviceRemoved(parts[0].substr(1)); + } + } + } + + SEQUENCE_CHECKER(sequence_checker_); + + // This weak pointer is only valid when checked on this task runner. + base::WeakPtr service_; + scoped_refptr task_runner_; + std::unique_ptr file_watcher_; + std::unique_ptr timer_; + base::ScopedFD devd_fd_; + scoped_refptr devd_buffer_; + std::map permissions_checks_attempts_; +}; + +HidServiceFreeBSD::HidServiceFreeBSD() + : blocking_task_runner_( + base::ThreadPool::CreateSequencedTaskRunner(kBlockingTaskTraits)), + helper_(nullptr, base::OnTaskRunnerDeleter(blocking_task_runner_)) { + helper_.reset(new BlockingTaskRunnerHelper(weak_factory_.GetWeakPtr())); + blocking_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&BlockingTaskRunnerHelper::Start, base::Unretained(helper_.get()))); +} + +HidServiceFreeBSD::~HidServiceFreeBSD() { + blocking_task_runner_->DeleteSoon(FROM_HERE, helper_.release()); +} + +base::WeakPtr HidServiceFreeBSD::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + +// static +void HidServiceFreeBSD::OpenOnBlockingThread( + std::unique_ptr params) { + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + scoped_refptr task_runner = params->task_runner; + + base::FilePath device_path(params->device_info->device_node()); + base::File device_file; + int flags = + base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE; + device_file.Initialize(device_path, flags); + if (!device_file.IsValid()) { + HID_LOG(EVENT) << "Failed to open '" << params->device_info->device_node() + << "': " + << base::File::ErrorToString(device_file.error_details()); + task_runner->PostTask(FROM_HERE, + base::BindOnce(std::move(params->callback), nullptr)); + return; + } + params->fd.reset(device_file.TakePlatformFile()); + task_runner->PostTask(FROM_HERE, base::BindOnce(&HidServiceFreeBSD::FinishOpen, + std::move(params))); +} + +void HidServiceFreeBSD::Connect(const std::string& device_guid, + bool allow_protected_reports, + bool allow_fido_reports, + ConnectCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + const auto& map_entry = devices().find(device_guid); + if (map_entry == devices().end()) { + base::SequencedTaskRunner::GetCurrentDefault()->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), nullptr)); + return; + } + + scoped_refptr device_info = map_entry->second; + + auto params = std::make_unique(device_info, + allow_protected_reports, + allow_fido_reports, + std::move(callback)); + scoped_refptr blocking_task_runner = + params->blocking_task_runner; + + blocking_task_runner->PostTask( + FROM_HERE, base::BindOnce(&HidServiceFreeBSD::OpenOnBlockingThread, + std::move(params))); +} + +// static +void HidServiceFreeBSD::FinishOpen(std::unique_ptr params) { + DCHECK(params->fd.is_valid()); + + if (!base::SetNonBlocking(params->fd.get())) { + HID_PLOG(ERROR) << "Failed to set the non-blocking flag on the device fd"; + std::move(params->callback).Run(nullptr); + } + + std::move(params->callback).Run(base::MakeRefCounted( + std::move(params->device_info), + std::move(params->fd), + std::move(params->blocking_task_runner), + params->allow_protected_reports, + params->allow_fido_reports + )); +} + +} // namespace device diff --git a/www/iridium/files/patch-services_device_hid_hid__service__freebsd.h b/www/iridium/files/patch-services_device_hid_hid__service__freebsd.h index 36dd492a4948..7cfe36bd3df6 100644 --- a/www/iridium/files/patch-services_device_hid_hid__service__freebsd.h +++ b/www/iridium/files/patch-services_device_hid_hid__service__freebsd.h @@ -1,52 +1,52 @@ ---- services/device/hid/hid_service_freebsd.h.orig 2025-05-07 06:48:23 UTC +--- services/device/hid/hid_service_freebsd.h.orig 2025-12-10 15:04:57 UTC +++ services/device/hid/hid_service_freebsd.h @@ -0,0 +1,49 @@ +// Copyright 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. + +#ifndef DEVICE_HID_HID_SERVICE_FREEBSD_H_ +#define DEVICE_HID_HID_SERVICE_FREEBSD_H_ + +#include + +#include "base/memory/ref_counted.h" +#include "base/memory/weak_ptr.h" +#include "base/timer/timer.h" +#include "services/device/hid/hid_service.h" +#include "net/base/io_buffer.h" + +namespace device { + +class HidServiceFreeBSD : public HidService { + public: + HidServiceFreeBSD(); + + HidServiceFreeBSD(const HidServiceFreeBSD&) = delete; + HidServiceFreeBSD& operator=(const HidServiceFreeBSD&) = delete; + + ~HidServiceFreeBSD() override; + + void Connect(const std::string& device_guid, + bool allow_protected_reports, + bool allow_fido_reports, + ConnectCallback connect) override; + base::WeakPtr GetWeakPtr() override; + + private: + struct ConnectParams; + class BlockingTaskRunnerHelper; + + static void OpenOnBlockingThread(std::unique_ptr params); + static void FinishOpen(std::unique_ptr params); + + const scoped_refptr blocking_task_runner_; + // |helper_| lives on the sequence |blocking_task_runner_| posts to and holds + // a weak reference back to the service that owns it. + std::unique_ptr helper_; + base::WeakPtrFactory weak_factory_{this}; +}; + +} // namespace device + +#endif // DEVICE_HID_HID_SERVICE_FREEBSD_H_ diff --git a/www/iridium/files/patch-services_device_public_cpp_device__features.cc b/www/iridium/files/patch-services_device_public_cpp_device__features.cc index 991c1a86cb28..93e6a54e1a9f 100644 --- a/www/iridium/files/patch-services_device_public_cpp_device__features.cc +++ b/www/iridium/files/patch-services_device_public_cpp_device__features.cc @@ -1,20 +1,11 @@ ---- services/device/public/cpp/device_features.cc.orig 2025-11-06 10:11:34 UTC +--- services/device/public/cpp/device_features.cc.orig 2025-12-10 15:04:57 UTC +++ services/device/public/cpp/device_features.cc -@@ -81,7 +81,7 @@ BASE_FEATURE(kBatteryStatusManagerBroadcastReceiverInB - // Modifies the internal allowlist behavior that enables privileged extensions - // to bypass the HID blocklist when accessing FIDO devices. When enabled, - // privileged extensions can access non-FIDO interfaces on known security keys. --#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(kSecurityKeyHidInterfacesAreFido, - base::FEATURE_ENABLED_BY_DEFAULT); - #else -@@ -130,7 +130,7 @@ bool IsOsLevelGeolocationPermissionSupportEnabled() { +@@ -125,7 +125,7 @@ bool IsOsLevelGeolocationPermissionSupportEnabled() { // a USB interface is busy. #if BUILDFLAG(IS_ANDROID) BASE_FEATURE(kAutomaticUsbDetach, base::FEATURE_ENABLED_BY_DEFAULT); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_FEATURE(kAutomaticUsbDetach, base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_ANDROID) diff --git a/www/iridium/files/patch-services_device_public_cpp_device__features.h b/www/iridium/files/patch-services_device_public_cpp_device__features.h index a54693d4a948..36dacee05f3b 100644 --- a/www/iridium/files/patch-services_device_public_cpp_device__features.h +++ b/www/iridium/files/patch-services_device_public_cpp_device__features.h @@ -1,11 +1,11 @@ ---- services/device/public/cpp/device_features.h.orig 2025-05-07 06:48:23 UTC +--- services/device/public/cpp/device_features.h.orig 2025-12-10 15:04:57 UTC +++ services/device/public/cpp/device_features.h @@ -53,7 +53,7 @@ extern const DEVICE_FEATURES_EXPORT DEVICE_FEATURES_EXPORT bool IsOsLevelGeolocationPermissionSupportEnabled(); -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) DEVICE_FEATURES_EXPORT BASE_DECLARE_FEATURE(kAutomaticUsbDetach); #endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-services_device_public_cpp_generic__sensor_sensor__reading.h b/www/iridium/files/patch-services_device_public_cpp_generic__sensor_sensor__reading.h index f4b585b8ef0f..72e9b59b4214 100644 --- a/www/iridium/files/patch-services_device_public_cpp_generic__sensor_sensor__reading.h +++ b/www/iridium/files/patch-services_device_public_cpp_generic__sensor_sensor__reading.h @@ -1,11 +1,11 @@ ---- services/device/public/cpp/generic_sensor/sensor_reading.h.orig 2025-05-07 06:48:23 UTC +--- services/device/public/cpp/generic_sensor/sensor_reading.h.orig 2025-12-10 15:04:57 UTC +++ services/device/public/cpp/generic_sensor/sensor_reading.h @@ -8,6 +8,8 @@ #include #include +#include + #include namespace device { diff --git a/www/iridium/files/patch-services_device_public_mojom_BUILD.gn b/www/iridium/files/patch-services_device_public_mojom_BUILD.gn index b1cf5e9bd14d..c1f1145a27e5 100644 --- a/www/iridium/files/patch-services_device_public_mojom_BUILD.gn +++ b/www/iridium/files/patch-services_device_public_mojom_BUILD.gn @@ -1,11 +1,11 @@ ---- services/device/public/mojom/BUILD.gn.orig 2025-09-11 13:19:19 UTC +--- services/device/public/mojom/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ services/device/public/mojom/BUILD.gn @@ -95,7 +95,7 @@ mojom("device_service") { enable_js_fuzzing = false enabled_features = [] - if ((is_linux || is_chromeos) && use_udev) { + if ((is_linux || is_chromeos) && !is_bsd && use_udev) { enabled_features += [ "enable_input_device_manager" ] } diff --git a/www/iridium/files/patch-services_device_serial_BUILD.gn b/www/iridium/files/patch-services_device_serial_BUILD.gn index 75f71cea5f53..2693d7f3370e 100644 --- a/www/iridium/files/patch-services_device_serial_BUILD.gn +++ b/www/iridium/files/patch-services_device_serial_BUILD.gn @@ -1,11 +1,11 @@ ---- services/device/serial/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- services/device/serial/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ services/device/serial/BUILD.gn @@ -4,7 +4,7 @@ import("//build/config/features.gni") -if (is_win || ((is_linux || is_chromeos) && use_udev) || is_mac || is_android) { +if (is_win || ((!is_bsd && is_linux || is_chromeos) && use_udev) || is_mac || is_android) { config("platform_support") { visibility = [ ":serial" ] if (is_win) { diff --git a/www/iridium/files/patch-services_device_serial_serial__device__enumerator.cc b/www/iridium/files/patch-services_device_serial_serial__device__enumerator.cc index e6557122c61d..c7900da53ffa 100644 --- a/www/iridium/files/patch-services_device_serial_serial__device__enumerator.cc +++ b/www/iridium/files/patch-services_device_serial_serial__device__enumerator.cc @@ -1,20 +1,20 @@ ---- services/device/serial/serial_device_enumerator.cc.orig 2025-09-11 13:19:19 UTC +--- services/device/serial/serial_device_enumerator.cc.orig 2025-12-10 15:04:57 UTC +++ services/device/serial/serial_device_enumerator.cc @@ -12,7 +12,7 @@ #include "build/build_config.h" #include "components/device_event_log/device_event_log.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "services/device/serial/serial_device_enumerator_linux.h" #elif BUILDFLAG(IS_MAC) #include "services/device/serial/serial_device_enumerator_mac.h" @@ -27,7 +27,7 @@ namespace device { // static std::unique_ptr SerialDeviceEnumerator::Create( scoped_refptr ui_task_runner) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return SerialDeviceEnumeratorLinux::Create(); #elif BUILDFLAG(IS_MAC) return std::make_unique(); diff --git a/www/iridium/files/patch-services_device_serial_serial__io__handler__posix.cc b/www/iridium/files/patch-services_device_serial_serial__io__handler__posix.cc index 919b12442640..c22f9425d741 100644 --- a/www/iridium/files/patch-services_device_serial_serial__io__handler__posix.cc +++ b/www/iridium/files/patch-services_device_serial_serial__io__handler__posix.cc @@ -1,11 +1,11 @@ ---- services/device/serial/serial_io_handler_posix.cc.orig 2025-10-28 14:29:43 UTC +--- services/device/serial/serial_io_handler_posix.cc.orig 2025-12-10 15:04:57 UTC +++ services/device/serial/serial_io_handler_posix.cc @@ -70,7 +70,7 @@ bool BitrateToSpeedConstant(int bitrate, speed_t* spee BITRATE_TO_SPEED_CASE(9600) BITRATE_TO_SPEED_CASE(19200) BITRATE_TO_SPEED_CASE(38400) -#if !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) BITRATE_TO_SPEED_CASE(57600) BITRATE_TO_SPEED_CASE(115200) BITRATE_TO_SPEED_CASE(230400) diff --git a/www/iridium/files/patch-services_device_time__zone__monitor_time__zone__monitor__linux.cc b/www/iridium/files/patch-services_device_time__zone__monitor_time__zone__monitor__linux.cc index af1ebf10b267..a7955dd28e79 100644 --- a/www/iridium/files/patch-services_device_time__zone__monitor_time__zone__monitor__linux.cc +++ b/www/iridium/files/patch-services_device_time__zone__monitor_time__zone__monitor__linux.cc @@ -1,15 +1,15 @@ ---- services/device/time_zone_monitor/time_zone_monitor_linux.cc.orig 2025-05-07 06:48:23 UTC +--- services/device/time_zone_monitor/time_zone_monitor_linux.cc.orig 2025-12-10 15:04:57 UTC +++ services/device/time_zone_monitor/time_zone_monitor_linux.cc @@ -131,9 +131,12 @@ class TimeZoneMonitorLinuxImpl // false positives are harmless, assuming the false positive rate is // reasonable. const auto kFilesToWatch = std::to_array({ +#if BUILDFLAG(IS_BSD) "/etc/localtime", +#else "/etc/timezone", "/etc/TZ", +#endif }); for (size_t index = 0; index < std::size(kFilesToWatch); ++index) { file_path_watchers_.push_back(std::make_unique()); diff --git a/www/iridium/files/patch-services_device_usb_BUILD.gn b/www/iridium/files/patch-services_device_usb_BUILD.gn index 14505f455761..cc235e3e3de1 100644 --- a/www/iridium/files/patch-services_device_usb_BUILD.gn +++ b/www/iridium/files/patch-services_device_usb_BUILD.gn @@ -1,34 +1,34 @@ ---- services/device/usb/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- services/device/usb/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ services/device/usb/BUILD.gn @@ -90,7 +90,7 @@ static_library("usb") { deps += [ "//third_party/re2" ] } - if (is_mac) { + if (is_mac || is_openbsd) { # These sources and deps are required for libusb. # TODO(crbug.com/40136337) Remove these sources. sources += [ @@ -113,6 +113,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", @@ -134,7 +141,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/iridium/files/patch-services_device_usb_usb__device__handle__usbfs.cc b/www/iridium/files/patch-services_device_usb_usb__device__handle__usbfs.cc index 1695911f76b3..6810fbee72f4 100644 --- a/www/iridium/files/patch-services_device_usb_usb__device__handle__usbfs.cc +++ b/www/iridium/files/patch-services_device_usb_usb__device__handle__usbfs.cc @@ -1,47 +1,47 @@ ---- services/device/usb/usb_device_handle_usbfs.cc.orig 2025-10-28 14:29:43 UTC +--- services/device/usb/usb_device_handle_usbfs.cc.orig 2025-12-10 15:04:57 UTC +++ services/device/usb/usb_device_handle_usbfs.cc @@ -34,7 +34,7 @@ #include "chromeos/dbus/permission_broker/permission_broker_client.h" #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/metrics/histogram_macros.h" #include "services/device/public/cpp/device_features.h" #include "services/device/usb/usb_interface_detach_allowlist.h" @@ -51,7 +51,7 @@ using mojom::UsbTransferType; namespace { -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Outcome of detaching a kernel driver before ClaimInterface(). // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. @@ -293,7 +293,7 @@ bool UsbDeviceHandleUsbfs::BlockingTaskRunnerHelper::R return true; } -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool UsbDeviceHandleUsbfs::BlockingTaskRunnerHelper::DetachInterface( int interface_number, const CombinedInterfaceInfo& interface_info) { @@ -630,7 +630,7 @@ void UsbDeviceHandleUsbfs::ClaimInterface(int interfac return; } #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(features::kAutomaticUsbDetach)) { const mojom::UsbConfigurationInfo* config = device_->GetActiveConfiguration(); @@ -976,7 +976,7 @@ void UsbDeviceHandleUsbfs::ReleaseInterfaceComplete(in return; } #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(features::kAutomaticUsbDetach)) { helper_.AsyncCall(&BlockingTaskRunnerHelper::ReattachInterface) .WithArgs(interface_number) diff --git a/www/iridium/files/patch-services_device_usb_usb__device__handle__usbfs.h b/www/iridium/files/patch-services_device_usb_usb__device__handle__usbfs.h index b55e5874fd60..0d99bb766fff 100644 --- a/www/iridium/files/patch-services_device_usb_usb__device__handle__usbfs.h +++ b/www/iridium/files/patch-services_device_usb_usb__device__handle__usbfs.h @@ -1,38 +1,38 @@ ---- services/device/usb/usb_device_handle_usbfs.h.orig 2025-05-07 06:48:23 UTC +--- services/device/usb/usb_device_handle_usbfs.h.orig 2025-12-10 15:04:57 UTC +++ services/device/usb/usb_device_handle_usbfs.h -@@ -19,7 +19,7 @@ +@@ -20,7 +20,7 @@ #include "base/threading/sequence_bound.h" #include "services/device/usb/usb_device_handle.h" -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/containers/flat_set.h" #endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) -@@ -215,7 +215,7 @@ class UsbDeviceHandleUsbfs::BlockingTaskRunnerHelper { +@@ -216,7 +216,7 @@ class UsbDeviceHandleUsbfs::BlockingTaskRunnerHelper { bool ClearHalt(uint8_t endpoint_address); void DiscardUrb(Transfer* transfer); -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Detach the interface from a kernel driver before ClaimInterface virtual bool DetachInterface(int interface_number, const CombinedInterfaceInfo& interfaceInfo); -@@ -228,7 +228,7 @@ class UsbDeviceHandleUsbfs::BlockingTaskRunnerHelper { +@@ -229,7 +229,7 @@ class UsbDeviceHandleUsbfs::BlockingTaskRunnerHelper { // Called when |fd_| is writable without blocking. void OnFileCanWriteWithoutBlocking(); -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Called from |DetachInterface|. std::string GetKernelDriver(int interface_number) const; #endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) -@@ -240,7 +240,7 @@ class UsbDeviceHandleUsbfs::BlockingTaskRunnerHelper { +@@ -241,7 +241,7 @@ class UsbDeviceHandleUsbfs::BlockingTaskRunnerHelper { std::unique_ptr watch_controller_; SEQUENCE_CHECKER(sequence_checker_); -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // All interfaces that have been detached from kernel drivers base::flat_set detached_interfaces_; #endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-services_device_usb_usb__service.cc b/www/iridium/files/patch-services_device_usb_usb__service.cc index 728b343cf68b..194e16d811be 100644 --- a/www/iridium/files/patch-services_device_usb_usb__service.cc +++ b/www/iridium/files/patch-services_device_usb_usb__service.cc @@ -1,35 +1,35 @@ ---- services/device/usb/usb_service.cc.orig 2025-09-11 13:19:19 UTC +--- services/device/usb/usb_service.cc.orig 2025-12-10 15:04:57 UTC +++ services/device/usb/usb_service.cc @@ -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" #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 { @@ -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()); #elif BUILDFLAG(IS_MAC) + return base::WrapUnique(new UsbServiceImpl()); +#elif BUILDFLAG(IS_BSD) return base::WrapUnique(new UsbServiceImpl()); #else return nullptr; diff --git a/www/iridium/files/patch-services_device_usb_usb__service__fake.cc b/www/iridium/files/patch-services_device_usb_usb__service__fake.cc index 95ea9e0ab812..53f5cc5af492 100644 --- a/www/iridium/files/patch-services_device_usb_usb__service__fake.cc +++ b/www/iridium/files/patch-services_device_usb_usb__service__fake.cc @@ -1,53 +1,53 @@ ---- services/device/usb/usb_service_fake.cc.orig 2025-09-11 13:19:19 UTC +--- services/device/usb/usb_service_fake.cc.orig 2025-12-10 15:04:57 UTC +++ services/device/usb/usb_service_fake.cc @@ -0,0 +1,50 @@ +// 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/usb/usb_service_fake.h" + +#include + +#include +#include +#include +#include + +#include "base/barrier_closure.h" +#include "base/containers/contains.h" +#include "base/location.h" +#include "base/notimplemented.h" +#include "base/memory/ref_counted_memory.h" +#include "base/memory/weak_ptr.h" +#include "base/strings/string_number_conversions.h" +#include "base/strings/utf_string_conversions.h" +#include "base/task/sequenced_task_runner.h" +#include "base/task/single_thread_task_runner.h" +#include "base/task/thread_pool.h" +#include "base/threading/scoped_blocking_call.h" +#include "build/build_config.h" +#include "components/device_event_log/device_event_log.h" +#include "services/device/usb/usb_device_handle.h" +#include "services/device/usb/usb_error.h" +#include "services/device/usb/webusb_descriptors.h" + +namespace device { + +UsbServiceImpl::UsbServiceImpl() + : task_runner_(base::SequencedTaskRunner::GetCurrentDefault()) { + NOTIMPLEMENTED(); +} + +UsbServiceImpl::~UsbServiceImpl() { + NOTIMPLEMENTED(); + NotifyWillDestroyUsbService(); +} + +void UsbServiceImpl::GetDevices(GetDevicesCallback callback) { + NOTIMPLEMENTED(); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + UsbService::GetDevices(std::move(callback)); +} + +} // namespace device diff --git a/www/iridium/files/patch-services_device_usb_usb__service__fake.h b/www/iridium/files/patch-services_device_usb_usb__service__fake.h index 0a5c9739abff..039d8339b85e 100644 --- a/www/iridium/files/patch-services_device_usb_usb__service__fake.h +++ b/www/iridium/files/patch-services_device_usb_usb__service__fake.h @@ -1,51 +1,51 @@ ---- services/device/usb/usb_service_fake.h.orig 2025-05-07 06:48:23 UTC +--- services/device/usb/usb_service_fake.h.orig 2025-12-10 15:04:57 UTC +++ services/device/usb/usb_service_fake.h @@ -0,0 +1,48 @@ +// Copyright 2015 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef SERVICES_DEVICE_USB_USB_SERVICE_IMPL_H_ +#define SERVICES_DEVICE_USB_USB_SERVICE_IMPL_H_ + +#include "services/device/usb/usb_service.h" + +#include + +#include +#include +#include +#include + +#include "base/containers/queue.h" +#include "base/memory/weak_ptr.h" +#include "build/build_config.h" +#include "services/device/usb/usb_context.h" +#include "services/device/usb/usb_device_impl.h" +#include "third_party/abseil-cpp/absl/types/optional.h" + +namespace device { + +class UsbDeviceImpl; + +class UsbServiceImpl final : public UsbService { + public: + UsbServiceImpl(); + + UsbServiceImpl(const UsbServiceImpl&) = delete; + UsbServiceImpl& operator=(const UsbServiceImpl&) = delete; + + ~UsbServiceImpl() override; + + private: + // device::UsbService implementation + void GetDevices(GetDevicesCallback callback) override; + + void OnUsbContext(scoped_refptr context); + + scoped_refptr task_runner_; +}; + +} // namespace device + +#endif // SERVICES_DEVICE_USB_USB_SERVICE_IMPL_H_ diff --git a/www/iridium/files/patch-services_network_BUILD.gn b/www/iridium/files/patch-services_network_BUILD.gn index ad0f7d4c93ac..37f563c5c9a4 100644 --- a/www/iridium/files/patch-services_network_BUILD.gn +++ b/www/iridium/files/patch-services_network_BUILD.gn @@ -1,10 +1,10 @@ ---- services/network/BUILD.gn.orig 2025-10-28 14:29:43 UTC +--- services/network/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ services/network/BUILD.gn -@@ -426,7 +426,6 @@ if (is_linux || is_chromeos) { +@@ -423,7 +423,6 @@ if (is_linux || is_chromeos) { ] deps = [ "//base", - "//sandbox/linux:sandbox_services", "//sandbox/policy", ] configs += [ "//build/config/compiler:wexit_time_destructors" ] diff --git a/www/iridium/files/patch-services_network_network__context.cc b/www/iridium/files/patch-services_network_network__context.cc index 29e47fd741c7..880a444f2435 100644 --- a/www/iridium/files/patch-services_network_network__context.cc +++ b/www/iridium/files/patch-services_network_network__context.cc @@ -1,20 +1,20 @@ ---- services/network/network_context.cc.orig 2025-11-06 10:11:34 UTC +--- services/network/network_context.cc.orig 2025-12-10 15:04:57 UTC +++ services/network/network_context.cc @@ -630,7 +630,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_) { -@@ -2620,7 +2620,7 @@ void NetworkContext::OnHttpAuthDynamicParamsChanged( +@@ -2627,7 +2627,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/iridium/files/patch-services_network_network__context.h b/www/iridium/files/patch-services_network_network__context.h index 4e3fc13cbb9c..488fa0b644ca 100644 --- a/www/iridium/files/patch-services_network_network__context.h +++ b/www/iridium/files/patch-services_network_network__context.h @@ -1,11 +1,11 @@ ---- services/network/network_context.h.orig 2025-11-06 10:11:34 UTC +--- services/network/network_context.h.orig 2025-12-10 15:04:57 UTC +++ services/network/network_context.h -@@ -751,7 +751,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -757,7 +757,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/iridium/files/patch-services_network_network__sandbox__hook__linux.cc b/www/iridium/files/patch-services_network_network__sandbox__hook__linux.cc index 0b80905121cf..35fc82efc92e 100644 --- a/www/iridium/files/patch-services_network_network__sandbox__hook__linux.cc +++ b/www/iridium/files/patch-services_network_network__sandbox__hook__linux.cc @@ -1,37 +1,37 @@ ---- services/network/network_sandbox_hook_linux.cc.orig 2025-05-07 06:48:23 UTC +--- services/network/network_sandbox_hook_linux.cc.orig 2025-12-10 15:04:57 UTC +++ services/network/network_sandbox_hook_linux.cc @@ -15,11 +15,14 @@ #include "sandbox/linux/syscall_broker/broker_file_permission.h" #include "sandbox/policy/features.h" +#if !BUILDFLAG(IS_BSD) using sandbox::syscall_broker::BrokerFilePermission; using sandbox::syscall_broker::MakeBrokerCommandSet; +#endif namespace network { +#if !BUILDFLAG(IS_BSD) sandbox::syscall_broker::BrokerCommandSet GetNetworkBrokerCommandSet() { return MakeBrokerCommandSet({ sandbox::syscall_broker::COMMAND_ACCESS, @@ -103,9 +106,11 @@ void LoadNetworkLibraries() { } } #endif // BUILDFLAG(IS_CHROMEOS) +#endif bool NetworkPreSandboxHook(std::vector network_context_parent_dirs, sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) #if BUILDFLAG(IS_CHROMEOS) LoadNetworkLibraries(); #endif @@ -118,6 +123,7 @@ bool NetworkPreSandboxHook(std::vector ne GetNetworkBrokerCommandSet(), GetNetworkFilePermissions(std::move(network_context_parent_dirs)), options); +#endif return true; } diff --git a/www/iridium/files/patch-services_network_network__sandbox__hook__linux.h b/www/iridium/files/patch-services_network_network__sandbox__hook__linux.h index 597cd9f34b23..4e154d202793 100644 --- a/www/iridium/files/patch-services_network_network__sandbox__hook__linux.h +++ b/www/iridium/files/patch-services_network_network__sandbox__hook__linux.h @@ -1,14 +1,14 @@ ---- services/network/network_sandbox_hook_linux.h.orig 2025-05-07 06:48:23 UTC +--- services/network/network_sandbox_hook_linux.h.orig 2025-12-10 15:04:57 UTC +++ services/network/network_sandbox_hook_linux.h @@ -6,7 +6,11 @@ #define SERVICES_NETWORK_NETWORK_SANDBOX_HOOK_LINUX_H_ #include "base/component_export.h" +#if defined(__OpenBSD__) || defined(__FreeBSD__) +#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif namespace network { diff --git a/www/iridium/files/patch-services_network_network__service.cc b/www/iridium/files/patch-services_network_network__service.cc index a185eb2c1d96..06a52945b80e 100644 --- a/www/iridium/files/patch-services_network_network__service.cc +++ b/www/iridium/files/patch-services_network_network__service.cc @@ -1,34 +1,34 @@ ---- services/network/network_service.cc.orig 2025-10-28 14:29:43 UTC +--- services/network/network_service.cc.orig 2025-12-10 15:04:57 UTC +++ services/network/network_service.cc @@ -108,11 +108,11 @@ #include "third_party/boringssl/src/include/openssl/cpu.h" #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CASTOS) #include "components/os_crypt/sync/key_storage_config_linux.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "services/network/network_change_notifier_passive_factory.h" #endif @@ -1041,7 +1041,7 @@ void NetworkService::SetExplicitlyAllowedPorts( net::SetExplicitlyAllowedPorts(ports); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void NetworkService::SetGssapiLibraryLoadObserver( mojo::PendingRemote gssapi_library_load_observer) { @@ -1180,7 +1180,7 @@ NetworkService::CreateHttpAuthHandlerFactory(NetworkCo ); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void NetworkService::OnBeforeGssapiLibraryLoad() { if (gssapi_library_load_observer_.is_bound()) { gssapi_library_load_observer_->OnBeforeGssapiLibraryLoad(); diff --git a/www/iridium/files/patch-services_network_network__service.h b/www/iridium/files/patch-services_network_network__service.h index bb0097c72792..b7e56fdb5b0f 100644 --- a/www/iridium/files/patch-services_network_network__service.h +++ b/www/iridium/files/patch-services_network_network__service.h @@ -1,29 +1,29 @@ ---- services/network/network_service.h.orig 2025-10-28 14:29:43 UTC +--- services/network/network_service.h.orig 2025-12-10 15:04:57 UTC +++ services/network/network_service.h @@ -243,7 +243,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService const std::vector& settings) override; void SetExplicitlyAllowedPorts(const std::vector& ports) override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void SetGssapiLibraryLoadObserver( mojo::PendingRemote gssapi_library_load_observer) override; @@ -292,7 +292,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService std::unique_ptr CreateHttpAuthHandlerFactory( NetworkContext* network_context); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // This is called just before a GSSAPI library may be loaded. void OnBeforeGssapiLibraryLoad(); #endif // BUILDFLAG(IS_LINUX) @@ -542,7 +542,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService // leaking stale listeners between tests. std::unique_ptr mock_network_change_notifier_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) mojo::Remote gssapi_library_load_observer_; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-services_network_public_cpp_BUILD.gn b/www/iridium/files/patch-services_network_public_cpp_BUILD.gn index 34bc0bc6626d..6e0a82d5d84a 100644 --- a/www/iridium/files/patch-services_network_public_cpp_BUILD.gn +++ b/www/iridium/files/patch-services_network_public_cpp_BUILD.gn @@ -1,11 +1,11 @@ ---- services/network/public/cpp/BUILD.gn.orig 2025-09-11 13:19:19 UTC +--- services/network/public/cpp/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ services/network/public/cpp/BUILD.gn -@@ -699,7 +699,7 @@ component("cpp_base") { +@@ -721,7 +721,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/iridium/files/patch-services_network_public_cpp_features.cc b/www/iridium/files/patch-services_network_public_cpp_features.cc index ac55d0488787..e4efd144ca8b 100644 --- a/www/iridium/files/patch-services_network_public_cpp_features.cc +++ b/www/iridium/files/patch-services_network_public_cpp_features.cc @@ -1,20 +1,20 @@ ---- services/network/public/cpp/features.cc.orig 2025-11-06 10:11:34 UTC +--- services/network/public/cpp/features.cc.orig 2025-12-10 15:04:57 UTC +++ services/network/public/cpp/features.cc @@ -93,7 +93,7 @@ BASE_FEATURE(kSplitAuthCacheByNetworkIsolationKey, // Enable usage of hardcoded DoH upgrade mapping for use in automatic mode. BASE_FEATURE(kDnsOverHttpsUpgrade, #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) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -345,7 +345,7 @@ BASE_FEATURE(kAvoidResourceRequestCopies, base::FEATUR +@@ -361,7 +361,7 @@ BASE_FEATURE(kAvoidResourceRequestCopies, base::FEATUR // https://github.com/WICG/document-isolation-policy BASE_FEATURE(kDocumentIsolationPolicy, #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/iridium/files/patch-services_network_public_mojom_BUILD.gn b/www/iridium/files/patch-services_network_public_mojom_BUILD.gn index d420edf60763..65f0b5697d86 100644 --- a/www/iridium/files/patch-services_network_public_mojom_BUILD.gn +++ b/www/iridium/files/patch-services_network_public_mojom_BUILD.gn @@ -1,34 +1,34 @@ ---- services/network/public/mojom/BUILD.gn.orig 2025-09-11 13:19:19 UTC +--- services/network/public/mojom/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ services/network/public/mojom/BUILD.gn -@@ -690,11 +690,11 @@ mojom("url_loader_base") { - } +@@ -719,11 +719,11 @@ mojom("url_loader_base") { + ] enabled_features = [] - if (is_android || is_chromeos || is_linux) { + if (!is_bsd && (is_android || is_chromeos || is_linux)) { enabled_features += [ "network_change_notifier_in_browser" ] } - if (is_linux) { + if (is_linux && !is_bsd) { # TODO(crbug.com/40263697): Remove this once is_linux in the mojom IDL does # not include lacros. enabled_features += [ "use_network_interface_change_listener" ] -@@ -1007,7 +1007,7 @@ mojom("url_loader_base") { +@@ -1044,7 +1044,7 @@ mojom("url_loader_base") { }, ] - if (is_linux) { + if (is_linux && !is_bsd) { cpp_typemaps += [ { types = [ -@@ -1797,7 +1797,7 @@ mojom("mojom") { +@@ -1830,7 +1830,7 @@ mojom("mojom") { } } - if (is_linux) { + if (is_linux && !is_bsd) { # TODO(crbug.com/40263697): Remove this once is_linux in the mojom IDL does # not include lacros. enabled_features += [ "use_network_interface_change_listener" ] diff --git a/www/iridium/files/patch-services_network_shared__dictionary_shared__dictionary__writer__in__memory.h b/www/iridium/files/patch-services_network_shared__dictionary_shared__dictionary__writer__in__memory.h index 936488739e04..f3d36f01fc41 100644 --- a/www/iridium/files/patch-services_network_shared__dictionary_shared__dictionary__writer__in__memory.h +++ b/www/iridium/files/patch-services_network_shared__dictionary_shared__dictionary__writer__in__memory.h @@ -1,11 +1,11 @@ ---- services/network/shared_dictionary/shared_dictionary_writer_in_memory.h.orig 2025-09-11 13:19:19 UTC +--- services/network/shared_dictionary/shared_dictionary_writer_in_memory.h.orig 2025-12-10 15:04:57 UTC +++ services/network/shared_dictionary/shared_dictionary_writer_in_memory.h @@ -9,6 +9,8 @@ #include #include +#include + #include "base/component_export.h" #include "base/functional/callback.h" #include "crypto/hash.h" diff --git a/www/iridium/files/patch-services_on__device__model_ml_BUILD.gn b/www/iridium/files/patch-services_on__device__model_ml_BUILD.gn index a0973ed1dd82..8814cf68c7ec 100644 --- a/www/iridium/files/patch-services_on__device__model_ml_BUILD.gn +++ b/www/iridium/files/patch-services_on__device__model_ml_BUILD.gn @@ -1,11 +1,11 @@ ---- services/on_device_model/ml/BUILD.gn.orig 2025-11-06 10:11:34 UTC +--- services/on_device_model/ml/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ services/on_device_model/ml/BUILD.gn @@ -82,7 +82,7 @@ if (use_blink || (is_ios && build_with_internal_optimi if (!is_fuchsia) { deps += [ "//services/on_device_model/safety:bert_safety_model" ] } - if (is_win || is_mac || is_linux) { + if ((is_win || is_mac || is_linux) && !is_bsd) { deps += [ "//third_party/xnnpack" ] } public_deps = [ diff --git a/www/iridium/files/patch-services_on__device__model_ml_gpu__blocklist.cc b/www/iridium/files/patch-services_on__device__model_ml_gpu__blocklist.cc index d1880aecc250..6fc2a04c7bec 100644 --- a/www/iridium/files/patch-services_on__device__model_ml_gpu__blocklist.cc +++ b/www/iridium/files/patch-services_on__device__model_ml_gpu__blocklist.cc @@ -1,11 +1,11 @@ ---- services/on_device_model/ml/gpu_blocklist.cc.orig 2025-11-12 18:20:14 UTC +--- services/on_device_model/ml/gpu_blocklist.cc.orig 2025-12-10 15:04:57 UTC +++ services/on_device_model/ml/gpu_blocklist.cc @@ -24,7 +24,7 @@ const base::FeatureParam kGpuBlockList{ &optimization_guide::features::kOnDeviceModelPerformanceParams, "on_device_model_gpu_block_list", // These devices are nearly always crashing or have very low performance. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - "8086:64a0|" // TODO(b/456603738): Remove when fixed. + "8086:64a0|8086:e20b|" // TODO(b/456603738): Remove when fixed. #endif // BUILDFLAG(IS_LINUX) "8086:412|8086:a16|8086:41e|8086:416|8086:402|8086:166|8086:1616|8086:22b1|" diff --git a/www/iridium/files/patch-services_on__device__model_ml_on__device__model__executor.cc b/www/iridium/files/patch-services_on__device__model_ml_on__device__model__executor.cc index fb07ee161e55..4c5e527ee496 100644 --- a/www/iridium/files/patch-services_on__device__model_ml_on__device__model__executor.cc +++ b/www/iridium/files/patch-services_on__device__model_ml_on__device__model__executor.cc @@ -1,10 +1,10 @@ ---- services/on_device_model/ml/on_device_model_executor.cc.orig 2025-11-06 10:11:34 UTC +--- services/on_device_model/ml/on_device_model_executor.cc.orig 2025-12-10 15:04:57 UTC +++ services/on_device_model/ml/on_device_model_executor.cc @@ -34,6 +34,7 @@ #include "services/on_device_model/public/mojom/on_device_model.mojom.h" #include "services/on_device_model/public/mojom/on_device_model_service.mojom.h" +// XXX PORT #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) #include "third_party/xnnpack/src/include/xnnpack.h" // nogncheck #endif diff --git a/www/iridium/files/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc b/www/iridium/files/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc index b5d8a5b89400..22e7d8dab575 100644 --- a/www/iridium/files/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc +++ b/www/iridium/files/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc @@ -1,65 +1,65 @@ ---- services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc.orig 2025-09-11 13:19:19 UTC +--- services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc.orig 2025-12-10 15:04:57 UTC +++ services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc -@@ -55,7 +55,7 @@ uint32_t CalculatePrivateFootprintKb(const mojom::RawO +@@ -56,7 +56,7 @@ uint32_t CalculatePrivateFootprintKb(const mojom::RawO uint32_t shared_resident_kb) { DCHECK(os_dump.platform_private_footprint); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) uint64_t rss_anon_bytes = os_dump.platform_private_footprint->rss_anon_bytes; uint64_t vm_swap_bytes = os_dump.platform_private_footprint->vm_swap_bytes; return (rss_anon_bytes + vm_swap_bytes) / 1024; -@@ -84,7 +84,7 @@ memory_instrumentation::mojom::OSMemDumpPtr CreatePubl +@@ -85,7 +85,7 @@ memory_instrumentation::mojom::OSMemDumpPtr CreatePubl os_dump->is_peak_rss_resettable = internal_os_dump.is_peak_rss_resettable; os_dump->private_footprint_kb = CalculatePrivateFootprintKb(internal_os_dump, shared_resident_kb); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) os_dump->private_footprint_swap_kb = internal_os_dump.platform_private_footprint->vm_swap_bytes / 1024; os_dump->mappings_count = internal_os_dump.mappings_count; -@@ -223,7 +223,7 @@ void QueuedRequestDispatcher::SetUpAndDispatch( +@@ -224,7 +224,7 @@ void QueuedRequestDispatcher::SetUpAndDispatch( // On most platforms each process can dump data about their own process // so ask each process to do so Linux is special see below. -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) request->pending_responses.insert({client_info.pid, ResponseType::kOSDump}); client->RequestOSMemoryDump( request->memory_map_option(), request->memory_dump_flags(), -@@ -238,7 +238,7 @@ void QueuedRequestDispatcher::SetUpAndDispatch( +@@ -239,7 +239,7 @@ void QueuedRequestDispatcher::SetUpAndDispatch( // In some cases, OS stats can only be dumped from a privileged process to // get around to sandboxing/selinux restrictions (see crbug.com/461788). -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::vector pids; mojom::ClientProcess* browser_client = nullptr; base::ProcessId browser_client_pid = base::kNullProcessId; @@ -285,7 +285,7 @@ void QueuedRequestDispatcher::SetUpAndDispatchVmRegion const OsCallback& os_callback) { // On Linux, OS stats can only be dumped from a privileged process to // get around to sandboxing/selinux restrictions (see crbug.com/461788). -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojom::ClientProcess* browser_client = nullptr; base::ProcessId browser_client_pid = 0; for (const auto& client_info : clients) { @@ -335,7 +335,7 @@ QueuedRequestDispatcher::FinalizeVmRegionRequest( // each client process provides 1 OS dump, % the case where the client is // disconnected mid dump. OSMemDumpMap& extra_os_dumps = response.second.os_dumps; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) for (auto& kv : extra_os_dumps) { auto pid = kv.first == base::kNullProcessId ? original_pid : kv.first; DCHECK(results.find(pid) == results.end()); @@ -396,7 +396,7 @@ void QueuedRequestDispatcher::Finalize(QueuedRequest* // crash). In the latter case (OS_LINUX) we expect the full map to come // from the browser process response. OSMemDumpMap& extra_os_dumps = response.second.os_dumps; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) for (const auto& kv : extra_os_dumps) { auto pid = kv.first == base::kNullProcessId ? original_pid : kv.first; DCHECK_EQ(pid_to_os_dump[pid], nullptr); diff --git a/www/iridium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn b/www/iridium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn index 4988e1a00d66..5d3109addc03 100644 --- a/www/iridium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn +++ b/www/iridium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn @@ -1,16 +1,16 @@ ---- services/resource_coordinator/public/cpp/memory_instrumentation/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- services/resource_coordinator/public/cpp/memory_instrumentation/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ services/resource_coordinator/public/cpp/memory_instrumentation/BUILD.gn @@ -27,8 +27,12 @@ component("memory_instrumentation") { sources += [ "os_metrics_win.cc" ] } - if (is_android || is_linux || is_chromeos) { + if ((is_android || is_linux || is_chromeos) && !is_bsd) { sources += [ "os_metrics_linux.cc" ] + } + + if (is_bsd) { + sources += [ "os_metrics_bsd.cc" ] } if (is_fuchsia) { diff --git a/www/iridium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h b/www/iridium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h index 261c87d2d3f3..6020e6b3ac01 100644 --- a/www/iridium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h +++ b/www/iridium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h @@ -1,20 +1,20 @@ ---- services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h.orig 2025-06-19 07:37:57 UTC +--- services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h.orig 2025-12-10 15:04:57 UTC +++ services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h @@ -65,7 +65,7 @@ class COMPONENT_EXPORT( static std::vector GetProcessMemoryMaps( base::ProcessHandle); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) static void SetProcSmapsForTesting(FILE*); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || // BUILDFLAG(IS_ANDROID) @@ -87,7 +87,7 @@ class COMPONENT_EXPORT( GetMemoryInfo(base::ProcessHandle handle); #endif // !BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Provides information on the dump state of resident pages. These values are // written to logs. New enum values can be added, but existing enums must // never be renumbered or deleted and reused. diff --git a/www/iridium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__bsd.cc b/www/iridium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__bsd.cc index d53051b69154..69e55e75a838 100644 --- a/www/iridium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__bsd.cc +++ b/www/iridium/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__bsd.cc @@ -1,64 +1,64 @@ ---- services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_bsd.cc.orig 2025-09-11 13:19:19 UTC +--- services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_bsd.cc.orig 2025-12-10 15:04:57 UTC +++ services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_bsd.cc @@ -0,0 +1,61 @@ +// Copyright 2022 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/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h" + +#include "base/notimplemented.h" + +#include "base/memory/page_size.h" +#include "base/process/process.h" +#include "base/process/process_handle.h" + +#include + +#include + +#if BUILDFLAG(IS_OPENBSD) +#define vm_rssize info.p_vm_rssize +#elif BUILDFLAG(IS_FREEBSD) +#include +#define vm_rssize info.ki_rssize +#endif + +namespace memory_instrumentation { + +// static +bool OSMetrics::FillOSMemoryDump(base::ProcessId pid, + const MemDumpFlagSet& flags, + mojom::RawOSMemDump* dump) { + base::Process process = pid == base::kNullProcessId + ? base::Process::Current() + : base::Process::Open(pid); + const size_t kPageSize = base::GetPageSize(); + struct kinfo_proc info; + size_t length = sizeof(struct kinfo_proc); +#if BUILDFLAG(IS_OPENBSD) + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process.Handle(), + static_cast(length), 1 }; +#elif BUILDFLAG(IS_FREEBSD) + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process.Handle() }; +#endif + + if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) + return false; + + dump->resident_set_kb = (vm_rssize * kPageSize) / 1024; + dump->platform_private_footprint->rss_anon_bytes = + vm_rssize * kPageSize; + dump->platform_private_footprint->vm_swap_bytes = 0; + + return true; +} + +// static +std::vector OSMetrics::GetProcessMemoryMaps( + base::ProcessId) { + NOTIMPLEMENTED(); + return std::vector(); +} + +} // namespace memory_instrumentation diff --git a/www/iridium/files/patch-services_screen__ai_public_cpp_utilities.cc b/www/iridium/files/patch-services_screen__ai_public_cpp_utilities.cc index 78b6b1c580ac..66c0986316ab 100644 --- a/www/iridium/files/patch-services_screen__ai_public_cpp_utilities.cc +++ b/www/iridium/files/patch-services_screen__ai_public_cpp_utilities.cc @@ -1,29 +1,29 @@ ---- services/screen_ai/public/cpp/utilities.cc.orig 2025-09-11 13:19:19 UTC +--- services/screen_ai/public/cpp/utilities.cc.orig 2025-12-10 15:04:57 UTC +++ services/screen_ai/public/cpp/utilities.cc @@ -21,7 +21,7 @@ namespace { // The maximum image dimension which is processed without downsampling by OCR. constexpr uint32_t kMaxImageDimensionForOcr = 2048; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) constexpr char kBinaryPathSwitch[] = "screen-ai-binary"; #endif @@ -42,7 +42,7 @@ constexpr char kScreenAIDlcRootPath[] = #endif #if BUILDFLAG(ENABLE_SCREEN_AI_BROWSERTESTS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) constexpr base::FilePath::CharType kScreenAIResourcePathForTests[] = FILE_PATH_LITERAL("third_party/screen-ai/linux/resources"); #elif BUILDFLAG(IS_MAC) @@ -131,7 +131,7 @@ base::FilePath GetComponentBinaryPathForTests() { const char* GetBinaryPathSwitch() { // This is only used on Linux and ChromeOS. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return kBinaryPathSwitch; #else return nullptr; diff --git a/www/iridium/files/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc b/www/iridium/files/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc index 22895d1a3eb6..42823354f669 100644 --- a/www/iridium/files/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc +++ b/www/iridium/files/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc @@ -1,18 +1,18 @@ ---- services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.cc.orig 2025-09-11 13:19:19 UTC +--- services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.cc.orig 2025-12-10 15:04:57 UTC +++ services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.cc @@ -70,6 +70,7 @@ bool ScreenAIPreSandboxHook(base::FilePath binary_path } } +#if !BUILDFLAG(IS_BSD) auto* instance = sandbox::policy::SandboxLinux::GetInstance(); std::vector permissions{ @@ -91,6 +92,7 @@ bool ScreenAIPreSandboxHook(base::FilePath binary_path sandbox::syscall_broker::COMMAND_OPEN}), permissions, options); instance->EngageNamespaceSandboxIfPossible(); +#endif return true; } diff --git a/www/iridium/files/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h b/www/iridium/files/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h index 429079309647..5c84a8346d25 100644 --- a/www/iridium/files/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h +++ b/www/iridium/files/patch-services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.h @@ -1,16 +1,16 @@ ---- services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h.orig 2025-05-07 06:48:23 UTC +--- services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h.orig 2025-12-10 15:04:57 UTC +++ services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h @@ -6,7 +6,13 @@ #define SERVICES_SCREEN_AI_SANDBOX_SCREEN_AI_SANDBOX_HOOK_LINUX_H_ #include "base/files/file_path.h" +#include "build/build_config.h" + +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif namespace screen_ai { diff --git a/www/iridium/files/patch-services_screen__ai_screen__ai__service__impl.cc b/www/iridium/files/patch-services_screen__ai_screen__ai__service__impl.cc index 49f3d4c96840..a850154e88d9 100644 --- a/www/iridium/files/patch-services_screen__ai_screen__ai__service__impl.cc +++ b/www/iridium/files/patch-services_screen__ai_screen__ai__service__impl.cc @@ -1,20 +1,20 @@ ---- services/screen_ai/screen_ai_service_impl.cc.orig 2025-09-11 13:19:19 UTC +--- services/screen_ai/screen_ai_service_impl.cc.orig 2025-12-10 15:04:57 UTC +++ services/screen_ai/screen_ai_service_impl.cc -@@ -38,7 +38,7 @@ +@@ -34,7 +34,7 @@ #include "ui/accessibility/ax_tree_id.h" #include "ui/gfx/geometry/rect_f.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "partition_alloc/buildflags.h" #if PA_BUILDFLAG( \ -@@ -266,7 +266,7 @@ ScreenAIService::ScreenAIService( +@@ -237,7 +237,7 @@ ScreenAIService::ScreenAIService( : factory_receiver_(this, std::move(receiver)), ocr_receiver_(this), main_content_extraction_receiver_(this) { -#if BUILDFLAG(IS_LINUX) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && \ PA_BUILDFLAG( \ ENABLE_ALLOCATOR_SHIM_PARTITION_ALLOC_DISPATCH_WITH_ADVANCED_CHECKS_SUPPORT) // TODO(crbug.com/418199684): Remove when the bug is fixed. diff --git a/www/iridium/files/patch-services_service__manager_BUILD.gn b/www/iridium/files/patch-services_service__manager_BUILD.gn index 1db147769783..8fc264632891 100644 --- a/www/iridium/files/patch-services_service__manager_BUILD.gn +++ b/www/iridium/files/patch-services_service__manager_BUILD.gn @@ -1,11 +1,11 @@ ---- services/service_manager/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- services/service_manager/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ services/service_manager/BUILD.gn @@ -65,7 +65,7 @@ source_set("service_manager") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { deps += [ "//sandbox/linux:sandbox_services" ] } } diff --git a/www/iridium/files/patch-services_service__manager_public_cpp_service__executable_BUILD.gn b/www/iridium/files/patch-services_service__manager_public_cpp_service__executable_BUILD.gn index 9db4e62fa2a8..127e6fd8f090 100644 --- a/www/iridium/files/patch-services_service__manager_public_cpp_service__executable_BUILD.gn +++ b/www/iridium/files/patch-services_service__manager_public_cpp_service__executable_BUILD.gn @@ -1,11 +1,11 @@ ---- services/service_manager/public/cpp/service_executable/BUILD.gn.orig 2025-05-07 06:48:23 UTC +--- services/service_manager/public/cpp/service_executable/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ services/service_manager/public/cpp/service_executable/BUILD.gn @@ -22,7 +22,7 @@ source_set("support") { "//services/service_manager/public/mojom", ] - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { deps += [ "//sandbox/linux:sandbox", "//sandbox/linux:sandbox_services", diff --git a/www/iridium/files/patch-services_shape__detection_shape__detection__sandbox__hook.cc b/www/iridium/files/patch-services_shape__detection_shape__detection__sandbox__hook.cc index fccd936f6276..7e146dd1609d 100644 --- a/www/iridium/files/patch-services_shape__detection_shape__detection__sandbox__hook.cc +++ b/www/iridium/files/patch-services_shape__detection_shape__detection__sandbox__hook.cc @@ -1,13 +1,13 @@ ---- services/shape_detection/shape_detection_sandbox_hook.cc.orig 2025-09-11 13:19:19 UTC +--- services/shape_detection/shape_detection_sandbox_hook.cc.orig 2025-12-10 15:04:57 UTC +++ services/shape_detection/shape_detection_sandbox_hook.cc @@ -31,8 +31,10 @@ bool ShapeDetectionPreSandboxHook( DVLOG(1) << "Successfully opened Chrome Shape Detection shared library."; } #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) +#if !BUILDFLAG(IS_BSD) auto* instance = sandbox::policy::SandboxLinux::GetInstance(); instance->EngageNamespaceSandboxIfPossible(); +#endif return true; } diff --git a/www/iridium/files/patch-services_shape__detection_shape__detection__sandbox__hook.h b/www/iridium/files/patch-services_shape__detection_shape__detection__sandbox__hook.h index cf5780834257..b11609bf3b1d 100644 --- a/www/iridium/files/patch-services_shape__detection_shape__detection__sandbox__hook.h +++ b/www/iridium/files/patch-services_shape__detection_shape__detection__sandbox__hook.h @@ -1,16 +1,16 @@ ---- services/shape_detection/shape_detection_sandbox_hook.h.orig 2025-09-11 13:19:19 UTC +--- services/shape_detection/shape_detection_sandbox_hook.h.orig 2025-12-10 15:04:57 UTC +++ services/shape_detection/shape_detection_sandbox_hook.h @@ -5,7 +5,13 @@ #ifndef SERVICES_SHAPE_DETECTION_SHAPE_DETECTION_SANDBOX_HOOK_H_ #define SERVICES_SHAPE_DETECTION_SHAPE_DETECTION_SANDBOX_HOOK_H_ +#include "build/build_config.h" + +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif namespace shape_detection { diff --git a/www/iridium/files/patch-services_shape__detection_shape__detection__service.cc b/www/iridium/files/patch-services_shape__detection_shape__detection__service.cc index 924c9abb0059..1334deebd293 100644 --- a/www/iridium/files/patch-services_shape__detection_shape__detection__service.cc +++ b/www/iridium/files/patch-services_shape__detection_shape__detection__service.cc @@ -1,20 +1,20 @@ ---- services/shape_detection/shape_detection_service.cc.orig 2025-10-28 14:29:43 UTC +--- services/shape_detection/shape_detection_service.cc.orig 2025-12-10 15:04:57 UTC +++ services/shape_detection/shape_detection_service.cc @@ -22,7 +22,7 @@ #elif BUILDFLAG(IS_ANDROID) // No C++ code, barcode detection comes from Java. #elif BUILDFLAG(GOOGLE_CHROME_BRANDING) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) #include "services/shape_detection/barcode_detection_provider_chrome.h" #else #include "services/shape_detection/barcode_detection_provider_impl.h" @@ -56,7 +56,7 @@ void ShapeDetectionService::BindBarcodeDetectionProvid #elif BUILDFLAG(IS_MAC) BarcodeDetectionProviderMac::Create(std::move(receiver)); #elif BUILDFLAG(GOOGLE_CHROME_BRANDING) && \ - (BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)) + (BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) BarcodeDetectionProviderChrome::Create(std::move(receiver)); #else BarcodeDetectionProviderImpl::Create(std::move(receiver)); diff --git a/www/iridium/files/patch-services_tracing_public_cpp_perfetto_track__name__recorder.cc b/www/iridium/files/patch-services_tracing_public_cpp_perfetto_track__name__recorder.cc index bb00b0452cf7..af4537e8051b 100644 --- a/www/iridium/files/patch-services_tracing_public_cpp_perfetto_track__name__recorder.cc +++ b/www/iridium/files/patch-services_tracing_public_cpp_perfetto_track__name__recorder.cc @@ -1,11 +1,11 @@ ---- services/tracing/public/cpp/perfetto/track_name_recorder.cc.orig 2025-10-28 14:29:43 UTC +--- services/tracing/public/cpp/perfetto/track_name_recorder.cc.orig 2025-12-10 15:04:57 UTC +++ services/tracing/public/cpp/perfetto/track_name_recorder.cc @@ -53,7 +53,7 @@ void FillThreadTrack(const perfetto::ThreadTrack& trac desc.mutable_chrome_thread()->set_thread_type( static_cast(thread_type)); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_AIX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) if (base::GetCurrentProcId() != base::trace_event::TraceLog::GetInstance()->process_id()) { desc.mutable_chrome_thread()->set_is_sandboxed_tid(true); diff --git a/www/iridium/files/patch-services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc b/www/iridium/files/patch-services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc index 01f75d2ac217..86ae777c3974 100644 --- a/www/iridium/files/patch-services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc +++ b/www/iridium/files/patch-services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc @@ -1,38 +1,38 @@ ---- services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc.orig 2025-10-28 14:29:43 UTC +--- services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc.orig 2025-12-10 15:04:57 UTC +++ services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc @@ -39,7 +39,7 @@ #include "third_party/perfetto/protos/perfetto/trace/track_event/process_descriptor.pbzero.h" #include "third_party/perfetto/protos/perfetto/trace/track_event/thread_descriptor.pbzero.h" -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) #include "base/profiler/thread_delegate_posix.h" #define INITIALIZE_THREAD_DELEGATE_POSIX 1 #else // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) @@ -261,7 +261,7 @@ struct FrameDetails { ANDROID_ARM64_UNWINDING_SUPPORTED || ANDROID_CFI_UNWINDING_SUPPORTED || \ (BUILDFLAG(IS_CHROMEOS) && \ (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM64))) || \ - BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Returns whether stack sampling is supported on the current platform. bool IsStackSamplingSupported() { return base::StackSamplingProfiler::IsSupportedForCurrentPlatform(); @@ -381,7 +381,7 @@ void TracingSamplerProfiler::TracingProfileBuilder::Wr thread_descriptor->set_reference_timestamp_us( last_timestamp_.since_origin().InMicroseconds()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_AIX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) if (base::GetCurrentProcId() != base::trace_event::TraceLog::GetInstance()->process_id()) { auto* chrome_thread = track_descriptor->set_chrome_thread(); @@ -653,7 +653,7 @@ bool TracingSamplerProfiler::IsStackUnwindingSupported ANDROID_ARM64_UNWINDING_SUPPORTED || ANDROID_CFI_UNWINDING_SUPPORTED || \ (BUILDFLAG(IS_CHROMEOS) && \ (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM64))) || \ - BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return IsStackSamplingSupported(); #else return false; diff --git a/www/iridium/files/patch-services_tracing_public_cpp_system__metrics__sampler.cc b/www/iridium/files/patch-services_tracing_public_cpp_system__metrics__sampler.cc index 119fd3390f0b..778d92bff951 100644 --- a/www/iridium/files/patch-services_tracing_public_cpp_system__metrics__sampler.cc +++ b/www/iridium/files/patch-services_tracing_public_cpp_system__metrics__sampler.cc @@ -1,13 +1,13 @@ ---- services/tracing/public/cpp/system_metrics_sampler.cc.orig 2025-06-19 07:37:57 UTC +--- services/tracing/public/cpp/system_metrics_sampler.cc.orig 2025-12-10 15:04:57 UTC +++ services/tracing/public/cpp/system_metrics_sampler.cc @@ -166,8 +166,8 @@ void SystemMetricsSampler::ProcessSampler::SampleProce TRACE_COUNTER(TRACE_DISABLED_BY_DEFAULT("system_metrics"), "PhysicalMemoryFootprint", memory_info->physical_footprint_bytes); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)) && defined(notyet) TRACE_COUNTER(TRACE_DISABLED_BY_DEFAULT("system_metrics"), "VmSwapMemory", memory_info->vm_swap_bytes); TRACE_COUNTER(TRACE_DISABLED_BY_DEFAULT("system_metrics"), "RssAnonMemory", diff --git a/www/iridium/files/patch-services_video__capture_public_mojom_video__capture__service.mojom b/www/iridium/files/patch-services_video__capture_public_mojom_video__capture__service.mojom index bd4c807d964c..737d10166582 100644 --- a/www/iridium/files/patch-services_video__capture_public_mojom_video__capture__service.mojom +++ b/www/iridium/files/patch-services_video__capture_public_mojom_video__capture__service.mojom @@ -1,15 +1,15 @@ ---- services/video_capture/public/mojom/video_capture_service.mojom.orig 2025-05-07 06:48:23 UTC +--- services/video_capture/public/mojom/video_capture_service.mojom.orig 2025-12-10 15:04:57 UTC +++ services/video_capture/public/mojom/video_capture_service.mojom @@ -25,10 +25,10 @@ interface AcceleratorFactory { pending_receiver jda); }; -[EnableIf=is_fuchsia] +[EnableIf=is_openbsd] const sandbox.mojom.Sandbox kVideoCaptureSandbox = sandbox.mojom.Sandbox.kVideoCapture; -[EnableIfNot=is_fuchsia] +[EnableIfNot=is_openbsd] const sandbox.mojom.Sandbox kVideoCaptureSandbox = sandbox.mojom.Sandbox.kNoSandbox; diff --git a/www/iridium/files/patch-services_video__effects_video__effects__sandbox__hook__linux.cc b/www/iridium/files/patch-services_video__effects_video__effects__sandbox__hook__linux.cc deleted file mode 100644 index 96c557b420ca..000000000000 --- a/www/iridium/files/patch-services_video__effects_video__effects__sandbox__hook__linux.cc +++ /dev/null @@ -1,27 +0,0 @@ ---- services/video_effects/video_effects_sandbox_hook_linux.cc.orig 2025-05-07 06:48:23 UTC -+++ services/video_effects/video_effects_sandbox_hook_linux.cc -@@ -6,7 +6,13 @@ - - #include - -+#include "build/build_config.h" -+ -+#if BUILDFLAG(IS_BSD) -+#include "sandbox/policy/sandbox.h" -+#else - #include "sandbox/policy/linux/sandbox_linux.h" -+#endif - #include "services/on_device_model/ml/chrome_ml_holder.h" - - namespace video_effects { -@@ -29,8 +35,10 @@ bool VideoEffectsPreSandboxHook( - DVLOG(1) << "Successfully opened Chrome ML shared library."; - } - -+#if !BUILDFLAG(IS_BSD) - auto* instance = sandbox::policy::SandboxLinux::GetInstance(); - instance->EngageNamespaceSandboxIfPossible(); -+#endif - return true; - } - diff --git a/www/iridium/files/patch-services_video__effects_video__effects__sandbox__hook__linux.h b/www/iridium/files/patch-services_video__effects_video__effects__sandbox__hook__linux.h deleted file mode 100644 index 3c90df573d76..000000000000 --- a/www/iridium/files/patch-services_video__effects_video__effects__sandbox__hook__linux.h +++ /dev/null @@ -1,16 +0,0 @@ ---- services/video_effects/video_effects_sandbox_hook_linux.h.orig 2025-05-07 06:48:23 UTC -+++ services/video_effects/video_effects_sandbox_hook_linux.h -@@ -5,7 +5,13 @@ - #ifndef SERVICES_VIDEO_EFFECTS_VIDEO_EFFECTS_SANDBOX_HOOK_LINUX_H_ - #define SERVICES_VIDEO_EFFECTS_VIDEO_EFFECTS_SANDBOX_HOOK_LINUX_H_ - -+#include "build/build_config.h" -+ -+#if BUILDFLAG(IS_BSD) -+#include "sandbox/policy/sandbox.h" -+#else - #include "sandbox/policy/linux/sandbox_linux.h" -+#endif - - namespace video_effects { - diff --git a/www/iridium/files/patch-services_viz_public_mojom_BUILD.gn b/www/iridium/files/patch-services_viz_public_mojom_BUILD.gn index ac6e14864d45..0d05567778e3 100644 --- a/www/iridium/files/patch-services_viz_public_mojom_BUILD.gn +++ b/www/iridium/files/patch-services_viz_public_mojom_BUILD.gn @@ -1,11 +1,11 @@ ---- services/viz/public/mojom/BUILD.gn.orig 2025-10-28 14:29:43 UTC +--- services/viz/public/mojom/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ services/viz/public/mojom/BUILD.gn @@ -53,7 +53,7 @@ mojom("mojom") { # Used in thread.mojom enabled_features = [] - if (is_fuchsia || is_apple) { + if (is_fuchsia || is_apple || is_bsd) { enabled_features += [ "thread_id_is_64_bit" ] } else { enabled_features += [ "thread_id_is_32_bit" ] diff --git a/www/iridium/files/patch-skia_ext_SkMemory__new__handler.cpp b/www/iridium/files/patch-skia_ext_SkMemory__new__handler.cpp index f34f15640459..144e6b3f39c4 100644 --- a/www/iridium/files/patch-skia_ext_SkMemory__new__handler.cpp +++ b/www/iridium/files/patch-skia_ext_SkMemory__new__handler.cpp @@ -1,20 +1,20 @@ ---- skia/ext/SkMemory_new_handler.cpp.orig 2025-05-07 06:48:23 UTC +--- skia/ext/SkMemory_new_handler.cpp.orig 2025-12-10 15:04:57 UTC +++ skia/ext/SkMemory_new_handler.cpp @@ -24,7 +24,7 @@ #include #elif BUILDFLAG(IS_APPLE) #include -#else +#elif !BUILDFLAG(IS_BSD) #include #endif @@ -110,7 +110,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/iridium/files/patch-skia_ext_font__utils.cc b/www/iridium/files/patch-skia_ext_font__utils.cc index c4566fb137b1..dcfd749f59d3 100644 --- a/www/iridium/files/patch-skia_ext_font__utils.cc +++ b/www/iridium/files/patch-skia_ext_font__utils.cc @@ -1,20 +1,20 @@ ---- skia/ext/font_utils.cc.orig 2025-09-11 13:19:19 UTC +--- skia/ext/font_utils.cc.orig 2025-12-10 15:04:57 UTC +++ skia/ext/font_utils.cc @@ -21,7 +21,7 @@ #include "third_party/skia/include/ports/SkFontMgr_mac_ct.h" #endif -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "third_party/skia/include/ports/SkFontConfigInterface.h" #include "third_party/skia/include/ports/SkFontMgr_FontConfigInterface.h" #include "third_party/skia/include/ports/SkFontScanner_Fontations.h" @@ -64,7 +64,7 @@ static sk_sp fontmgr_factory() { return SkFontMgr_New_Android(nullptr, SkFontScanner_Make_Fontations()); #elif BUILDFLAG(IS_APPLE) return SkFontMgr_New_CoreText(nullptr); -#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) sk_sp fci(SkFontConfigInterface::RefGlobal()); return fci ? SkFontMgr_New_FCI(std::move(fci), SkFontScanner_Make_Fontations()) diff --git a/www/iridium/files/patch-skia_ext_skcolorspace__trfn.cc b/www/iridium/files/patch-skia_ext_skcolorspace__trfn.cc index 708e437e3a8f..0e69e941e0c6 100644 --- a/www/iridium/files/patch-skia_ext_skcolorspace__trfn.cc +++ b/www/iridium/files/patch-skia_ext_skcolorspace__trfn.cc @@ -1,11 +1,11 @@ ---- skia/ext/skcolorspace_trfn.cc.orig 2025-05-07 06:48:23 UTC +--- skia/ext/skcolorspace_trfn.cc.orig 2025-12-10 15:04:57 UTC +++ skia/ext/skcolorspace_trfn.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + #include "skia/ext/skcolorspace_trfn.h" #include diff --git a/www/iridium/files/patch-sql_database.cc b/www/iridium/files/patch-sql_database.cc new file mode 100644 index 000000000000..421d0dcbba18 --- /dev/null +++ b/www/iridium/files/patch-sql_database.cc @@ -0,0 +1,11 @@ +--- sql/database.cc.orig 2025-12-10 15:04:57 UTC ++++ sql/database.cc +@@ -106,7 +106,7 @@ bool FilePathIsFixedSSD(const base::FilePath& path) { + + return !drive_info->has_seek_penalty.value_or(false) + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + && !drive_info->is_removable.value_or(false) + #endif + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) diff --git a/www/iridium/files/patch-third__party_abseil-cpp_absl_base_config.h b/www/iridium/files/patch-third__party_abseil-cpp_absl_base_config.h index cbfb4198b9be..950b91c037c3 100644 --- a/www/iridium/files/patch-third__party_abseil-cpp_absl_base_config.h +++ b/www/iridium/files/patch-third__party_abseil-cpp_absl_base_config.h @@ -1,21 +1,21 @@ ---- third_party/abseil-cpp/absl/base/config.h.orig 2025-11-06 10:11:34 UTC +--- third_party/abseil-cpp/absl/base/config.h.orig 2025-12-10 15:04:57 UTC +++ third_party/abseil-cpp/absl/base/config.h @@ -412,7 +412,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != #ifdef ABSL_HAVE_SCHED_YIELD #error ABSL_HAVE_SCHED_YIELD cannot be directly set #elif defined(__linux__) || defined(__ros__) || defined(__native_client__) || \ - defined(__VXWORKS__) + defined(__VXWORKS__) || defined(__OpenBSD__) || defined(__FreeBSD__) #define ABSL_HAVE_SCHED_YIELD 1 #endif @@ -427,7 +427,8 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != // platforms. #ifdef ABSL_HAVE_SEMAPHORE_H #error ABSL_HAVE_SEMAPHORE_H cannot be directly set -#elif defined(__linux__) || defined(__ros__) || defined(__VXWORKS__) +#elif defined(__linux__) || defined(__ros__) || defined(__VXWORKS__) || \ + defined(__OpenBSD__) || defined(__FreeBSD__) #define ABSL_HAVE_SEMAPHORE_H 1 #endif diff --git a/www/iridium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc b/www/iridium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc index 8e5a0a68bbc9..3e58eb1b2900 100644 --- a/www/iridium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc +++ b/www/iridium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc @@ -1,52 +1,52 @@ ---- third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig 2025-11-06 10:11:34 UTC +--- third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/abseil-cpp/absl/base/internal/sysinfo.cc @@ -30,7 +30,7 @@ #include #endif -#if defined(__APPLE__) || defined(__FreeBSD__) +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) #include #endif @@ -198,6 +198,7 @@ static double GetNominalCPUFrequency() { #else +#if !defined(__OpenBSD__) && !defined(__FreeBSD__) // Helper function for reading a long from a file. Returns true if successful // and the memory location pointed to by value is set to the value read. static bool ReadLongFromFile(const char *file, long *value) { @@ -230,6 +231,7 @@ static bool ReadLongFromFile(const char *file, long *v } return ret; } +#endif #if defined(ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY) @@ -329,9 +331,11 @@ static double GetNominalCPUFrequency() { // a new mode (turbo mode). Essentially, those frequencies cannot // always be relied upon. The same reasons apply to /proc/cpuinfo as // well. +#if !defined(__OpenBSD__) && !defined(__FreeBSD__) // pledge violation if (ReadLongFromFile("/sys/devices/system/cpu/cpu0/tsc_freq_khz", &freq)) { return freq * 1e3; // Value is kHz. } +#endif #if defined(ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY) // On these platforms, the TSC frequency is the nominal CPU @@ -350,10 +354,12 @@ static double GetNominalCPUFrequency() { // If CPU scaling is in effect, we want to use the *maximum* // frequency, not whatever CPU speed some random processor happens // to be using now. +#if !defined(__OpenBSD__) && !defined(__FreeBSD__) // pledge violation if (ReadLongFromFile("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq", &freq)) { return freq * 1e3; // Value is kHz. } +#endif return 1.0; #endif // !ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY diff --git a/www/iridium/files/patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h b/www/iridium/files/patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h index b24d16c512fc..1417ef057e38 100644 --- a/www/iridium/files/patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h +++ b/www/iridium/files/patch-third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h @@ -1,11 +1,11 @@ ---- third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h.orig 2025-11-06 10:11:34 UTC +--- third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h.orig 2025-12-10 15:04:57 UTC +++ third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h @@ -35,7 +35,7 @@ #if defined(__ELF__) && !defined(__OpenBSD__) && !defined(__QNX__) && \ !defined(__asmjs__) && !defined(__wasm__) && !defined(__HAIKU__) && \ !defined(__sun) && !defined(__VXWORKS__) && !defined(__hexagon__) && \ - !defined(__XTENSA__) + !defined(__XTENSA__) && !defined(__FreeBSD__) #define ABSL_HAVE_ELF_MEM_IMAGE 1 #endif diff --git a/www/iridium/files/patch-third__party_angle_BUILD.gn b/www/iridium/files/patch-third__party_angle_BUILD.gn index 1d34b1ce66e5..fce2f36b29f3 100644 --- a/www/iridium/files/patch-third__party_angle_BUILD.gn +++ b/www/iridium/files/patch-third__party_angle_BUILD.gn @@ -1,29 +1,29 @@ ---- third_party/angle/BUILD.gn.orig 2025-09-11 13:19:19 UTC +--- third_party/angle/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ third_party/angle/BUILD.gn @@ -367,7 +367,6 @@ config("extra_warnings") { "-Wtautological-type-limit-compare", "-Wundefined-reinterpret-cast", "-Wunneeded-internal-declaration", - "-Wunused-but-set-variable", "-Wsuggest-destructor-override", "-Wsuggest-override", @@ -544,7 +543,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" ] } @@ -707,6 +706,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/iridium/files/patch-third__party_angle_src_common_platform.h b/www/iridium/files/patch-third__party_angle_src_common_platform.h index 0f84d97e0d17..1c8bf50ce4e4 100644 --- a/www/iridium/files/patch-third__party_angle_src_common_platform.h +++ b/www/iridium/files/patch-third__party_angle_src_common_platform.h @@ -1,19 +1,19 @@ ---- third_party/angle/src/common/platform.h.orig 2025-05-07 06:48:23 UTC +--- third_party/angle/src/common/platform.h.orig 2025-12-10 15:04:57 UTC +++ third_party/angle/src/common/platform.h @@ -23,7 +23,15 @@ #elif defined(__linux__) || defined(EMSCRIPTEN) # define ANGLE_PLATFORM_LINUX 1 # define ANGLE_PLATFORM_POSIX 1 -#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || \ +#elif defined(__OpenBSD__) +# define ANGLE_PLATFORM_OPENBSD 1 +# define ANGLE_PLATFORM_POSIX 1 +# define ANGLE_PLATFORM_BSD 1 +#elif defined(__FreeBSD__) +# define ANGLE_PLATFORM_FREEBSD 1 +# define ANGLE_PLATFORM_POSIX 1 +# define ANGLE_PLATFORM_BSD 1 +#elif defined(__NetBSD__) || \ defined(__DragonFly__) || defined(__sun) || defined(__GLIBC__) || defined(__GNU__) || \ defined(__QNX__) || defined(__Fuchsia__) || defined(__HAIKU__) # define ANGLE_PLATFORM_POSIX 1 diff --git a/www/iridium/files/patch-third__party_angle_src_common_platform__helpers.h b/www/iridium/files/patch-third__party_angle_src_common_platform__helpers.h index 02fcf9d3a60c..22a13c4b1d44 100644 --- a/www/iridium/files/patch-third__party_angle_src_common_platform__helpers.h +++ b/www/iridium/files/patch-third__party_angle_src_common_platform__helpers.h @@ -1,11 +1,11 @@ ---- third_party/angle/src/common/platform_helpers.h.orig 2025-05-07 06:48:23 UTC +--- third_party/angle/src/common/platform_helpers.h.orig 2025-12-10 15:04:57 UTC +++ third_party/angle/src/common/platform_helpers.h @@ -62,7 +62,7 @@ inline constexpr bool IsIOS() inline constexpr bool IsLinux() { -#if defined(ANGLE_PLATFORM_LINUX) +#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) return true; #else return false; diff --git a/www/iridium/files/patch-third__party_angle_src_common_system__utils.cpp b/www/iridium/files/patch-third__party_angle_src_common_system__utils.cpp index e03b4ea7baa2..2ff44f299cdb 100644 --- a/www/iridium/files/patch-third__party_angle_src_common_system__utils.cpp +++ b/www/iridium/files/patch-third__party_angle_src_common_system__utils.cpp @@ -1,11 +1,11 @@ ---- third_party/angle/src/common/system_utils.cpp.orig 2025-05-07 06:48:23 UTC +--- third_party/angle/src/common/system_utils.cpp.orig 2025-12-10 15:04:57 UTC +++ third_party/angle/src/common/system_utils.cpp @@ -25,7 +25,7 @@ namespace angle { std::string GetExecutableName() { -#if defined(ANGLE_PLATFORM_ANDROID) && __ANDROID_API__ >= 21 +#if (defined(ANGLE_PLATFORM_ANDROID) && __ANDROID_API__ >= 21) || defined(ANGLE_PLATFORM_BSD) // Support for "getprogname" function in bionic was introduced in L (API level 21) const char *executableName = getprogname(); return (executableName) ? std::string(executableName) : "ANGLE"; diff --git a/www/iridium/files/patch-third__party_angle_src_common_system__utils__linux.cpp b/www/iridium/files/patch-third__party_angle_src_common_system__utils__linux.cpp index 88b13a82ee96..de5300418722 100644 --- a/www/iridium/files/patch-third__party_angle_src_common_system__utils__linux.cpp +++ b/www/iridium/files/patch-third__party_angle_src_common_system__utils__linux.cpp @@ -1,37 +1,37 @@ ---- third_party/angle/src/common/system_utils_linux.cpp.orig 2025-10-28 14:29:43 UTC +--- third_party/angle/src/common/system_utils_linux.cpp.orig 2025-12-10 15:04:57 UTC +++ third_party/angle/src/common/system_utils_linux.cpp @@ -19,10 +19,15 @@ #include #include +#if ANGLE_PLATFORM_OPENBSD +#include +#endif + #include namespace angle { +#if ANGLE_PLATFORM_LINUX std::string GetExecutablePath() { // We cannot use lstat to get the size of /proc/self/exe as it always returns 0 @@ -38,6 +43,7 @@ std::string GetExecutablePath() path[result] = '\0'; return path; } +#endif std::string GetExecutableDirectory() { @@ -63,6 +69,10 @@ void SetCurrentThreadName(const char *name) // There's a 15-character (16 including '\0') limit. If the name is too big (and ERANGE is // returned), name will be ignored. ASSERT(strlen(name) < 16); +#if ANGLE_PLATFORM_OPENBSD + pthread_set_name_np(pthread_self(), name); +#else pthread_setname_np(pthread_self(), name); +#endif } } // namespace angle diff --git a/www/iridium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__internal.h b/www/iridium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__internal.h index 13357d3d5358..e8dbb4341269 100644 --- a/www/iridium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__internal.h +++ b/www/iridium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__internal.h @@ -1,16 +1,16 @@ ---- third_party/angle/src/gpu_info_util/SystemInfo_internal.h.orig 2025-05-07 06:48:23 UTC +--- third_party/angle/src/gpu_info_util/SystemInfo_internal.h.orig 2025-12-10 15:04:57 UTC +++ third_party/angle/src/gpu_info_util/SystemInfo_internal.h @@ -15,6 +15,13 @@ namespace angle { +#if defined(__OpenBSD__) || defined(__FreeBSD__) +bool CollectMesaCardInfo(std::vector *devices); +#if defined(__FreeBSD__) +bool GetPCIDevicesFreeBSD(std::vector *devices); +#endif +#endif + // Defined in SystemInfo_libpci when GPU_INFO_USE_LIBPCI is defined. bool GetPCIDevicesWithLibPCI(std::vector *devices); // Defined in SystemInfo_x11 when GPU_INFO_USE_X11 is defined. diff --git a/www/iridium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp b/www/iridium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp index 7b32d56283a3..73f862ed4144 100644 --- a/www/iridium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp +++ b/www/iridium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp @@ -1,90 +1,90 @@ ---- third_party/angle/src/gpu_info_util/SystemInfo_libpci.cpp.orig 2025-05-07 06:48:23 UTC +--- third_party/angle/src/gpu_info_util/SystemInfo_libpci.cpp.orig 2025-12-10 15:04:57 UTC +++ third_party/angle/src/gpu_info_util/SystemInfo_libpci.cpp @@ -12,6 +12,11 @@ #include #include +#if defined(__FreeBSD__) +#include +#include +#endif + #include "common/angleutils.h" #include "common/debug.h" @@ -85,6 +90,75 @@ struct LibPCI : private angle::NonCopyable }; } // anonymous namespace + +#if defined(__FreeBSD__) +// Adds an entry per PCI GPU found and fills the device and vendor ID. +bool GetPCIDevicesFreeBSD(std::vector *devices) +{ + int fd; + struct pci_conf_io conf; + struct pci_conf *matches; + uint32_t offset = 0; + + fd = open("/dev/pci", O_RDONLY); + if (fd < 0) + return false; + + matches = new struct pci_conf[32]; + conf.generation = 0; + do { + conf.pat_buf_len = 0; + conf.num_patterns = 0; + conf.patterns = NULL; + conf.match_buf_len = 32 * sizeof(struct pci_conf); + conf.num_matches = 32; + conf.matches = matches; + conf.offset = offset; + conf.status = PCI_GETCONF_ERROR; + if (ioctl(fd, PCIOCGETCONF, &conf) < 0) { + if (errno == ENODEV) + break; + } + /* PCI_GETCONF_LIST_CHANGED would require us to start over. */ + if (conf.status == PCI_GETCONF_ERROR || conf.status == PCI_GETCONF_LIST_CHANGED) { + break; + } + + for (unsigned int i = 0; i < conf.num_matches; i++) { + uint16_t device_class = (matches[i].pc_class << 8) | matches[i].pc_subclass; + + // Skip non-GPU devices + switch (device_class) + { + case PCI_CLASS_DISPLAY_VGA: + case PCI_CLASS_DISPLAY_XGA: + case PCI_CLASS_DISPLAY_3D: + break; + default: + continue; + } + + // Skip unknown devices + if (matches[i].pc_vendor == 0 || matches[i].pc_device == 0) { + continue; + } + + GPUDeviceInfo info; + info.vendorId = matches[i].pc_vendor; + info.deviceId = matches[i].pc_device; + + devices->push_back(info); + } + offset += conf.num_matches; + } while (conf.status == PCI_GETCONF_MORE_DEVS); + + delete[] matches; + + close(fd); + + return true; +} +#endif // Adds an entry per PCI GPU found and fills the device and vendor ID. bool GetPCIDevicesWithLibPCI(std::vector *devices) diff --git a/www/iridium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp b/www/iridium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp index 86fdad90ef20..965af9409564 100644 --- a/www/iridium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp +++ b/www/iridium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp @@ -1,35 +1,35 @@ ---- third_party/angle/src/gpu_info_util/SystemInfo_linux.cpp.orig 2025-05-07 06:48:23 UTC +--- third_party/angle/src/gpu_info_util/SystemInfo_linux.cpp.orig 2025-12-10 15:04:57 UTC +++ third_party/angle/src/gpu_info_util/SystemInfo_linux.cpp @@ -71,6 +71,24 @@ bool GetPCIDevicesWithLibPCI(std::vectorgpus))) + { +#if defined(__FreeBSD__) + if (!GetPCIDevicesFreeBSD(&(info->gpus))) + { +#endif +#if defined(ANGLE_USE_VULKAN_SYSTEM_INFO) + // Try vulkan backend to get GPU info + return GetSystemInfoVulkan(info); +#else + return false; +#endif +#if defined(__FreeBSD__) + } +#endif + } +#else if (!GetPCIDevicesWithLibPCI(&(info->gpus))) { #if defined(ANGLE_USE_VULKAN_SYSTEM_INFO) @@ -85,6 +103,7 @@ bool GetSystemInfo(SystemInfo *info) { return false; } +#endif GetDualGPUInfo(info); diff --git a/www/iridium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp b/www/iridium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp index 2141d6e2efd3..ace7071cd3f6 100644 --- a/www/iridium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp +++ b/www/iridium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp @@ -1,60 +1,60 @@ ---- third_party/angle/src/gpu_info_util/SystemInfo_x11.cpp.orig 2025-05-07 06:48:23 UTC +--- third_party/angle/src/gpu_info_util/SystemInfo_x11.cpp.orig 2025-12-10 15:04:57 UTC +++ third_party/angle/src/gpu_info_util/SystemInfo_x11.cpp @@ -8,6 +8,10 @@ #include "gpu_info_util/SystemInfo_internal.h" +#if defined(__OpenBSD__) || defined(__FreeBSD__) +#include +#include +#endif #include #include "common/debug.h" @@ -18,8 +22,46 @@ # error SystemInfo_x11.cpp compiled without GPU_INFO_USE_X11 #endif +#if defined(__OpenBSD__) || defined(__FreeBSD__) +#define GLX_RENDERER_VENDOR_ID_MESA 0x8183 +#define GLX_RENDERER_DEVICE_ID_MESA 0x8184 +#endif + namespace angle { + +#if defined(__OpenBSD__) || defined(__FreeBSD__) +bool CollectMesaCardInfo(std::vector *devices) +{ + unsigned int vid[3], did[3]; + + Display *display = XOpenDisplay(NULL); + if (!display) { + return false; + } + + PFNGLXQUERYRENDERERINTEGERMESAPROC queryInteger = + (PFNGLXQUERYRENDERERINTEGERMESAPROC) glXGetProcAddressARB((const GLubyte *) + "glXQueryRendererIntegerMESA"); + + if (!queryInteger) + return false; + + bool vendor_ret = + queryInteger(display, 0, 0, GLX_RENDERER_VENDOR_ID_MESA, vid); + bool device_ret = + queryInteger(display, 0, 0, GLX_RENDERER_DEVICE_ID_MESA, did); + + if (vendor_ret && device_ret) { + GPUDeviceInfo info; + info.vendorId = vid[0]; + info.deviceId = did[0]; + devices->push_back(info); + } + + return true; +} +#endif bool GetNvidiaDriverVersionWithXNVCtrl(std::string *version) { diff --git a/www/iridium/files/patch-third__party_angle_src_libANGLE_Display.cpp b/www/iridium/files/patch-third__party_angle_src_libANGLE_Display.cpp index d3bb1cdddd63..0b19e1afd292 100644 --- a/www/iridium/files/patch-third__party_angle_src_libANGLE_Display.cpp +++ b/www/iridium/files/patch-third__party_angle_src_libANGLE_Display.cpp @@ -1,56 +1,56 @@ ---- third_party/angle/src/libANGLE/Display.cpp.orig 2025-10-28 14:29:43 UTC +--- third_party/angle/src/libANGLE/Display.cpp.orig 2025-12-10 15:04:57 UTC +++ third_party/angle/src/libANGLE/Display.cpp @@ -62,7 +62,7 @@ # include "libANGLE/renderer/gl/wgl/DisplayWGL.h" # elif ANGLE_ENABLE_CGL # include "libANGLE/renderer/gl/cgl/DisplayCGL.h" -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # include "libANGLE/renderer/gl/egl/DisplayEGL.h" # if defined(ANGLE_USE_X11) # include "libANGLE/renderer/gl/glx/DisplayGLX_api.h" @@ -426,7 +426,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di impl = new rx::DisplayCGL(state); break; -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_GBM) || defined(ANGLE_USE_WAYLAND) if (platformType == 0) { @@ -477,7 +477,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di #if defined(ANGLE_ENABLE_OPENGL) # if defined(ANGLE_PLATFORM_WINDOWS) impl = new rx::DisplayWGL(state); -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_GBM) || defined(ANGLE_USE_WAYLAND) if (platformType == 0) { @@ -533,7 +533,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di impl = rx::CreateVulkanWin32Display(state); } break; -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_GBM) if (platformType == EGL_PLATFORM_GBM_KHR && rx::IsVulkanGbmDisplayAvailable()) { @@ -2150,7 +2150,7 @@ static ClientExtensions GenerateClientExtensions() extensions.platformWaylandEXT = true; #endif -#if defined(ANGLE_PLATFORM_LINUX) && (defined(ANGLE_ENABLE_OPENGL) || defined(ANGLE_ENABLE_VULKAN)) +#if (defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD)) && (defined(ANGLE_ENABLE_OPENGL) || defined(ANGLE_ENABLE_VULKAN)) extensions.platformSurfacelessMESA = true; #endif @@ -2197,7 +2197,7 @@ static ClientExtensions GenerateClientExtensions() extensions.x11Visual = true; #endif -#if defined(ANGLE_PLATFORM_LINUX) +#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) extensions.platformANGLEDeviceTypeEGLANGLE = true; #endif diff --git a/www/iridium/files/patch-third__party_angle_src_libANGLE_renderer_gl_glx_FunctionsGLX.cpp b/www/iridium/files/patch-third__party_angle_src_libANGLE_renderer_gl_glx_FunctionsGLX.cpp index 9194739ba60e..d164c912b6f3 100644 --- a/www/iridium/files/patch-third__party_angle_src_libANGLE_renderer_gl_glx_FunctionsGLX.cpp +++ b/www/iridium/files/patch-third__party_angle_src_libANGLE_renderer_gl_glx_FunctionsGLX.cpp @@ -1,15 +1,15 @@ ---- third_party/angle/src/libANGLE/renderer/gl/glx/FunctionsGLX.cpp.orig 2025-05-07 06:48:23 UTC +--- third_party/angle/src/libANGLE/renderer/gl/glx/FunctionsGLX.cpp.orig 2025-12-10 15:04:57 UTC +++ third_party/angle/src/libANGLE/renderer/gl/glx/FunctionsGLX.cpp @@ -144,10 +144,10 @@ bool FunctionsGLX::initialize(Display *xDisplay, int s // which a GLXWindow was ever created. if (!sLibHandle) { - sLibHandle = dlopen("libGL.so.1", RTLD_NOW); + sLibHandle = dlopen("libGL.so", RTLD_NOW); if (!sLibHandle) { - *errorString = std::string("Could not dlopen libGL.so.1: ") + dlerror(); + *errorString = std::string("Could not dlopen libGL.so: ") + dlerror(); return false; } } diff --git a/www/iridium/files/patch-third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h b/www/iridium/files/patch-third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h index dd03d40e6f1e..40000c2dbaab 100644 --- a/www/iridium/files/patch-third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h +++ b/www/iridium/files/patch-third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h @@ -1,11 +1,11 @@ ---- third_party/angle/src/libANGLE/renderer/vulkan/DisplayVk_api.h.orig 2025-05-07 06:48:23 UTC +--- third_party/angle/src/libANGLE/renderer/vulkan/DisplayVk_api.h.orig 2025-12-10 15:04:57 UTC +++ third_party/angle/src/libANGLE/renderer/vulkan/DisplayVk_api.h @@ -23,7 +23,7 @@ bool IsVulkanWin32DisplayAvailable(); DisplayImpl *CreateVulkanWin32Display(const egl::DisplayState &state); #endif // defined(ANGLE_PLATFORM_WINDOWS) -#if defined(ANGLE_PLATFORM_LINUX) +#if defined(ANGLE_PLATFORM_POSIX) bool IsVulkanWaylandDisplayAvailable(); DisplayImpl *CreateVulkanWaylandDisplay(const egl::DisplayState &state); diff --git a/www/iridium/files/patch-third__party_angle_util_BUILD.gn b/www/iridium/files/patch-third__party_angle_util_BUILD.gn index b4551e2befa5..13b7cee05568 100644 --- a/www/iridium/files/patch-third__party_angle_util_BUILD.gn +++ b/www/iridium/files/patch-third__party_angle_util_BUILD.gn @@ -1,11 +1,11 @@ ---- third_party/angle/util/BUILD.gn.orig 2025-09-11 13:19:19 UTC +--- third_party/angle/util/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ third_party/angle/util/BUILD.gn @@ -334,7 +334,7 @@ foreach(is_shared_library, ] libs = [] - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { libs += [ "rt", "dl", diff --git a/www/iridium/files/patch-third__party_blink_common_features.cc b/www/iridium/files/patch-third__party_blink_common_features.cc index 4867bf260c95..cceed3eaad82 100644 --- a/www/iridium/files/patch-third__party_blink_common_features.cc +++ b/www/iridium/files/patch-third__party_blink_common_features.cc @@ -1,11 +1,20 @@ ---- third_party/blink/common/features.cc.orig 2025-11-06 10:11:34 UTC +--- third_party/blink/common/features.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/common/features.cc -@@ -572,7 +572,7 @@ BASE_FEATURE_PARAM(base::TimeDelta, +@@ -588,7 +588,7 @@ BASE_FEATURE_PARAM(base::TimeDelta, BASE_FEATURE(kDevToolsImprovedNetworkError, base::FEATURE_DISABLED_BY_DEFAULT); BASE_FEATURE(kDirectCompositorThreadIpc, -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT +@@ -1946,7 +1946,7 @@ BASE_FEATURE(kPrefetchFontLookupTables, + // currently out of scope. + BASE_FEATURE(kPreloadingEagerHoverHeuristics, + #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 diff --git a/www/iridium/files/patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc b/www/iridium/files/patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc index 2943655ef77d..63986b640347 100644 --- a/www/iridium/files/patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc +++ b/www/iridium/files/patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc @@ -1,11 +1,11 @@ ---- third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc.orig 2025-09-11 13:19:19 UTC +--- third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc @@ -78,7 +78,7 @@ bool StructTraitssend_subresource_notification = data.send_subresource_notification(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!data.ReadSystemFontFamilyName(&out->system_font_family_name)) return false; #endif diff --git a/www/iridium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h b/www/iridium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h index 1275ccda3c01..5f10aa1e075d 100644 --- a/www/iridium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h +++ b/www/iridium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h @@ -1,11 +1,11 @@ ---- third_party/blink/public/common/renderer_preferences/renderer_preferences.h.orig 2025-09-11 13:19:19 UTC +--- third_party/blink/public/common/renderer_preferences/renderer_preferences.h.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/public/common/renderer_preferences/renderer_preferences.h @@ -66,7 +66,7 @@ struct BLINK_COMMON_EXPORT RendererPreferences { UserAgentOverride user_agent_override; std::string accept_languages; bool send_subresource_notification{false}; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::string system_font_family_name; #endif #if BUILDFLAG(IS_WIN) diff --git a/www/iridium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h b/www/iridium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h index 0d77a0e1927b..7e1d86acfd6a 100644 --- a/www/iridium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h +++ b/www/iridium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h @@ -1,11 +1,11 @@ ---- third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h.orig 2025-09-11 13:19:19 UTC +--- third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h @@ -185,7 +185,7 @@ struct BLINK_COMMON_EXPORT return data.send_subresource_notification; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) static const std::string& system_font_family_name( const ::blink::RendererPreferences& data) { return data.system_font_family_name; diff --git a/www/iridium/files/patch-third__party_blink_public_platform_platform.h b/www/iridium/files/patch-third__party_blink_public_platform_platform.h index 20c66d9b9b2c..8432c8c34407 100644 --- a/www/iridium/files/patch-third__party_blink_public_platform_platform.h +++ b/www/iridium/files/patch-third__party_blink_public_platform_platform.h @@ -1,11 +1,11 @@ ---- third_party/blink/public/platform/platform.h.orig 2025-09-11 13:19:19 UTC +--- third_party/blink/public/platform/platform.h.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/public/platform/platform.h -@@ -376,7 +376,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -377,7 +377,7 @@ class BLINK_PLATFORM_EXPORT Platform { return nullptr; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // This is called after the thread is created, so the embedder // can initiate an IPC to change its thread type (on Linux we can't // increase the nice value, so we need to ask the browser process). This diff --git a/www/iridium/files/patch-third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py b/www/iridium/files/patch-third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py index 4929a4c78f4a..341ff46a7302 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py +++ b/www/iridium/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 2025-05-07 06:48:23 UTC +--- third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py @@ -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/iridium/files/patch-third__party_blink_renderer_build_scripts_run__with__pythonpath.py b/www/iridium/files/patch-third__party_blink_renderer_build_scripts_run__with__pythonpath.py index 6515ec2eb6f5..57cc0c464267 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_build_scripts_run__with__pythonpath.py +++ b/www/iridium/files/patch-third__party_blink_renderer_build_scripts_run__with__pythonpath.py @@ -1,10 +1,10 @@ ---- third_party/blink/renderer/build/scripts/run_with_pythonpath.py.orig 2025-05-07 06:48:23 UTC +--- third_party/blink/renderer/build/scripts/run_with_pythonpath.py.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/build/scripts/run_with_pythonpath.py @@ -22,6 +22,7 @@ def main(): existing_pp = ( os.pathsep + env['PYTHONPATH']) if 'PYTHONPATH' in env else '' env['PYTHONPATH'] = os.pathsep.join(python_paths) + existing_pp + env['LD_LIBRARY_PATH'] = "${WRKSRC}/out/Release" sys.exit(subprocess.call([sys.executable] + args, env=env)) diff --git a/www/iridium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc b/www/iridium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc index e012f0574ed6..aec207fd86cf 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc @@ -1,35 +1,35 @@ ---- third_party/blink/renderer/controller/blink_initializer.cc.orig 2025-10-28 14:29:43 UTC +--- third_party/blink/renderer/controller/blink_initializer.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/controller/blink_initializer.cc -@@ -82,12 +82,12 @@ +@@ -83,12 +83,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 -@@ -255,7 +255,7 @@ void BlinkInitializer::RegisterInterfaces(mojo::Binder +@@ -261,7 +261,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)), -@@ -304,7 +304,7 @@ void BlinkInitializer::RegisterMemoryWatchers(Platform +@@ -310,7 +310,7 @@ void BlinkInitializer::RegisterMemoryWatchers(Platform MemorySaverController::Initialize(); #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/iridium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc b/www/iridium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc index de9619525f48..b2674e8b3052 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc @@ -1,21 +1,21 @@ ---- third_party/blink/renderer/controller/memory_usage_monitor_posix.cc.orig 2025-06-19 07:37:57 UTC +--- third_party/blink/renderer/controller/memory_usage_monitor_posix.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/controller/memory_usage_monitor_posix.cc @@ -132,15 +132,17 @@ void MemoryUsageMonitorPosix::ResetFileDescriptors() { void MemoryUsageMonitorPosix::SetProcFiles(base::File statm_file, base::File status_file) { +#if !BUILDFLAG(IS_BSD) DCHECK(statm_file.IsValid()); DCHECK(status_file.IsValid()); DCHECK_EQ(-1, statm_fd_.get()); DCHECK_EQ(-1, status_fd_.get()); statm_fd_.reset(statm_file.TakePlatformFile()); status_fd_.reset(status_file.TakePlatformFile()); +#endif } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // static void MemoryUsageMonitorPosix::Bind( mojo::PendingReceiver receiver) { diff --git a/www/iridium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.h b/www/iridium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.h index 9b01eb6d9a2c..3054f2b66fbf 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.h +++ b/www/iridium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.h @@ -1,47 +1,47 @@ ---- third_party/blink/renderer/controller/memory_usage_monitor_posix.h.orig 2025-05-07 06:48:23 UTC +--- third_party/blink/renderer/controller/memory_usage_monitor_posix.h.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/controller/memory_usage_monitor_posix.h @@ -13,7 +13,7 @@ #include "third_party/blink/renderer/controller/controller_export.h" #include "third_party/blink/renderer/controller/memory_usage_monitor.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "third_party/blink/public/mojom/memory_usage_monitor_linux.mojom-blink.h" #endif @@ -22,7 +22,7 @@ namespace blink { // MemoryUsageMonitor implementation for Android and Linux. class CONTROLLER_EXPORT MemoryUsageMonitorPosix : public MemoryUsageMonitor -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) , public mojom::blink::MemoryUsageMonitorLinux #endif @@ -30,7 +30,7 @@ class CONTROLLER_EXPORT MemoryUsageMonitorPosix public: MemoryUsageMonitorPosix() = default; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) static void Bind( mojo::PendingReceiver receiver); #endif @@ -48,7 +48,7 @@ class CONTROLLER_EXPORT MemoryUsageMonitorPosix uint64_t* vm_size, uint64_t* vm_hwm_size); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // mojom::MemoryUsageMonitorLinux implementations: void SetProcFiles(base::File statm_file, base::File status_file) override; #endif @@ -66,7 +66,7 @@ class CONTROLLER_EXPORT MemoryUsageMonitorPosix base::ScopedFD statm_fd_; base::ScopedFD status_fd_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::Receiver receiver_{this}; #endif }; diff --git a/www/iridium/files/patch-third__party_blink_renderer_core_dom_tree__scope.h b/www/iridium/files/patch-third__party_blink_renderer_core_dom_tree__scope.h index 33b165cdf621..f503fe3c4bae 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_core_dom_tree__scope.h +++ b/www/iridium/files/patch-third__party_blink_renderer_core_dom_tree__scope.h @@ -1,10 +1,10 @@ ---- third_party/blink/renderer/core/dom/tree_scope.h.orig 2025-11-06 10:11:34 UTC +--- third_party/blink/renderer/core/dom/tree_scope.h.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/core/dom/tree_scope.h @@ -28,6 +28,7 @@ #define THIRD_PARTY_BLINK_RENDERER_CORE_DOM_TREE_SCOPE_H_ #include "third_party/blink/renderer/core/core_export.h" +#include "third_party/blink/renderer/core/css/css_style_sheet.h" #include "third_party/blink/renderer/core/dom/tree_ordered_map.h" #include "third_party/blink/renderer/core/html/forms/radio_button_group_scope.h" #include "third_party/blink/renderer/core/layout/hit_test_request.h" diff --git a/www/iridium/files/patch-third__party_blink_renderer_core_editing_editing__behavior.cc b/www/iridium/files/patch-third__party_blink_renderer_core_editing_editing__behavior.cc index 1b2828538829..9efc86d87a6d 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_core_editing_editing__behavior.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_core_editing_editing__behavior.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/editing/editing_behavior.cc.orig 2025-10-28 14:29:43 UTC +--- third_party/blink/renderer/core/editing/editing_behavior.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/core/editing/editing_behavior.cc @@ -138,7 +138,7 @@ const KeyboardCodeKeyDownEntry kKeyboardCodeKeyDownEnt {VKEY_DELETE, 0, "DeleteForward"}, {VKEY_BACK, OPTION_OR_CTRL_KEY, "DeleteWordBackward"}, {VKEY_DELETE, OPTION_OR_CTRL_KEY, "DeleteWordForward"}, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {VKEY_BACK, kCtrlKey | kShiftKey, "DeleteToBeginningOfLine"}, #endif #if BUILDFLAG(IS_MAC) @@ -307,7 +307,7 @@ bool EditingBehavior::ShouldInsertCharacter(const Keyb // unexpected behaviour if (ch < ' ') return false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // According to XKB map no keyboard combinations with ctrl key are mapped to // printable characters, however we need the filter as the DomKey/text could // contain printable characters. diff --git a/www/iridium/files/patch-third__party_blink_renderer_core_execution__context_navigator__base.cc b/www/iridium/files/patch-third__party_blink_renderer_core_execution__context_navigator__base.cc index 18658df9b043..c95fe4c7d5f6 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_core_execution__context_navigator__base.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_core_execution__context_navigator__base.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/core/execution_context/navigator_base.cc.orig 2025-05-07 06:48:23 UTC +--- third_party/blink/renderer/core/execution_context/navigator_base.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/core/execution_context/navigator_base.cc @@ -31,7 +31,7 @@ String GetReducedNavigatorPlatform() { return "Win32"; #elif BUILDFLAG(IS_FUCHSIA) return ""; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return "Linux x86_64"; #elif BUILDFLAG(IS_IOS) return "iPhone"; diff --git a/www/iridium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc b/www/iridium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc index cb3044cc8d23..0d20fea856cd 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -422,7 +422,7 @@ void RecordPrerenderActivationSignalDelay(const String +@@ -423,7 +423,7 @@ void RecordPrerenderActivationSignalDelay(const String #if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN) SkFontHinting RendererPreferencesToSkiaHinting( const blink::RendererPreferences& prefs) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || 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' -@@ -3467,7 +3467,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs +@@ -3478,7 +3478,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs gfx::FontRenderParams::SUBPIXEL_RENDERING_NONE); WebFontRenderStyle::SetSubpixelPositioning( renderer_preferences_.use_subpixel_positioning); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!renderer_preferences_.system_font_family_name.empty()) { WebFontRenderStyle::SetSystemFontFamily(blink::WebString::FromUTF8( renderer_preferences_.system_font_family_name)); diff --git a/www/iridium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc b/www/iridium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc index fa0eb48d72ad..d9bb81377c95 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2025-10-28 14:29:43 UTC +--- third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -6469,7 +6469,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { +@@ -6475,7 +6475,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { } #if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // TODO(crbug.com/1090246): Fix these tests on Fuchsia and re-enable. // TODO(crbug.com/1317375): Build these tests on all platforms. #define MAYBE_SelectRangeStaysHorizontallyAlignedWhenMoved \ -@@ -6878,7 +6878,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc +@@ -6884,7 +6884,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc TEST_F(CompositedSelectionBoundsTest, LargeSelectionNoScroll) { RunTest("composited_selection_bounds_large_selection_noscroll.html"); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if !BUILDFLAG(IS_ANDROID) TEST_F(CompositedSelectionBoundsTest, Input) { web_view_helper_.GetWebView()->GetSettings()->SetDefaultFontSize(16); diff --git a/www/iridium/files/patch-third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc b/www/iridium/files/patch-third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc index 84f4841a59b1..f046d8436e19 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc.orig 2025-09-11 13:19:19 UTC +--- third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc @@ -52,7 +52,7 @@ constexpr base::TimeDelta kEncodeRowSlackBeforeDeadlin /* The value is based on user statistics on Nov 2017. */ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN)) + BUILDFLAG(IS_WIN)) || BUILDFLAG(IS_BSD) const double kIdleTaskStartTimeoutDelayMs = 1000.0; #else const double kIdleTaskStartTimeoutDelayMs = 4000.0; // For ChromeOS, Mobile diff --git a/www/iridium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc b/www/iridium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc index fd09d413c711..394420ebaed9 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/core/inspector/inspector_memory_agent.cc.orig 2025-05-07 06:48:23 UTC +--- third_party/blink/renderer/core/inspector/inspector_memory_agent.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/core/inspector/inspector_memory_agent.cc @@ -192,7 +192,7 @@ InspectorMemoryAgent::GetSamplingProfileById(uint32_t Vector InspectorMemoryAgent::Symbolize( const std::vector& addresses) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // TODO(alph): Move symbolization to the client. Vector addresses_to_symbolize; for (const void* address : addresses) { diff --git a/www/iridium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc b/www/iridium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc index 88c2da22c072..988ab379ce12 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc +++ b/www/iridium/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 2025-09-11 13:19:19 UTC +--- third_party/blink/renderer/core/layout/layout_view.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/core/layout/layout_view.cc @@ -75,7 +75,7 @@ #include "ui/display/screen_info.h" #include "ui/gfx/geometry/quad_f.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/platform/fonts/font_cache.h" #endif @@ -790,7 +790,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/iridium/files/patch-third__party_blink_renderer_core_origin__trials_origin__trial__context.cc b/www/iridium/files/patch-third__party_blink_renderer_core_origin__trials_origin__trial__context.cc index 9c2ee884636c..db7b7c929d24 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_core_origin__trials_origin__trial__context.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_core_origin__trials_origin__trial__context.cc @@ -1,11 +1,20 @@ ---- third_party/blink/renderer/core/origin_trials/origin_trial_context.cc.orig 2025-11-06 10:11:34 UTC +--- third_party/blink/renderer/core/origin_trials/origin_trial_context.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/core/origin_trials/origin_trial_context.cc @@ -559,7 +559,7 @@ bool OriginTrialContext::CanEnableTrialFromName(const } if (trial_name == "TranslationAPI") { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled(features::kTranslationAPI); #else return false; +@@ -572,7 +572,7 @@ bool OriginTrialContext::CanEnableTrialFromName(const + + if (trial_name == "WebAppInstallation") { + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + return base::FeatureList::IsEnabled(blink::features::kWebAppInstallation); + #else + return false; diff --git a/www/iridium/files/patch-third__party_blink_renderer_core_page_context__menu__controller.cc b/www/iridium/files/patch-third__party_blink_renderer_core_page_context__menu__controller.cc index 966e49a69507..62d9df96452e 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_core_page_context__menu__controller.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_core_page_context__menu__controller.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/core/page/context_menu_controller.cc.orig 2025-11-06 10:11:34 UTC +--- third_party/blink/renderer/core/page/context_menu_controller.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/core/page/context_menu_controller.cc -@@ -649,7 +649,7 @@ bool ContextMenuController::ShowContextMenu(LocalFrame +@@ -650,7 +650,7 @@ bool ContextMenuController::ShowContextMenu(LocalFrame if (potential_image_node != nullptr && IsA(potential_image_node)) { data.media_type = mojom::blink::ContextMenuDataMediaType::kCanvas; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(crbug.com/40902474): Support reading from the WebGPU front buffer // on Linux and remove the below code, which results in "Copy Image" and // "Save Image To" being grayed out in the context menu. diff --git a/www/iridium/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc b/www/iridium/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc index 4e93f3ad343b..ee1fbb55eef1 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/core/paint/paint_layer.cc.orig 2025-10-28 14:29:43 UTC +--- third_party/blink/renderer/core/paint/paint_layer.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/core/paint/paint_layer.cc @@ -123,7 +123,7 @@ namespace blink { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) struct SameSizeAsPaintLayer : GarbageCollected, DisplayItemClient { // The bit fields may fit into the machine word of DisplayItemClient which // has only 8-bit data. diff --git a/www/iridium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc b/www/iridium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc index 338e4a8c04de..d030786ea84f 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc.orig 2025-11-06 10:11:34 UTC +--- third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc @@ -122,7 +122,7 @@ bool ScrollbarThemeAura::SupportsDragSnapBack() const // Disable snapback on desktop Linux to better integrate with the desktop // behavior. Typically, Linux apps do not implement scrollbar snapback (this // is true for at least GTK and QT apps). -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return false; #else return true; @@ -396,7 +396,7 @@ ScrollbarPart ScrollbarThemeAura::PartsToInvalidateOnT bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scrollbar& scrollbar, const WebMouseEvent& event) const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (event.button == WebPointerProperties::Button::kMiddle) return true; #endif diff --git a/www/iridium/files/patch-third__party_blink_renderer_core_xml_xslt__processor.h b/www/iridium/files/patch-third__party_blink_renderer_core_xml_xslt__processor.h index 720bc102c660..934bc94c866f 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_core_xml_xslt__processor.h +++ b/www/iridium/files/patch-third__party_blink_renderer_core_xml_xslt__processor.h @@ -1,14 +1,14 @@ ---- third_party/blink/renderer/core/xml/xslt_processor.h.orig 2025-11-06 10:11:34 UTC +--- third_party/blink/renderer/core/xml/xslt_processor.h.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/core/xml/xslt_processor.h @@ -82,7 +82,11 @@ class XSLTProcessor final : public ScriptWrappable { void reset(); +#if (LIBXML_VERSION >= 21200) static void ParseErrorFunc(void* user_data, const xmlError*); +#else + static void ParseErrorFunc(void* user_data, xmlError*); +#endif static void GenericErrorFunc(void* user_data, const char* msg, ...); // Only for libXSLT callbacks diff --git a/www/iridium/files/patch-third__party_blink_renderer_core_xml_xslt__processor__libxslt.cc b/www/iridium/files/patch-third__party_blink_renderer_core_xml_xslt__processor__libxslt.cc index b5a91db9e6b2..e50c01bfb378 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_core_xml_xslt__processor__libxslt.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_core_xml_xslt__processor__libxslt.cc @@ -1,14 +1,14 @@ ---- third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc.orig 2025-05-07 06:48:23 UTC +--- third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc @@ -68,7 +68,11 @@ void XSLTProcessor::GenericErrorFunc(void*, const char // It would be nice to do something with this error message. } +#if (LIBXML_VERSION >= 21200) void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) { +#else +void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) { +#endif FrameConsole* console = static_cast(user_data); if (!console) return; diff --git a/www/iridium/files/patch-third__party_blink_renderer_modules_media_audio_audio__device__factory.cc b/www/iridium/files/patch-third__party_blink_renderer_modules_media_audio_audio__device__factory.cc index d92080121d14..f33a79b6ab5d 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_modules_media_audio_audio__device__factory.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_modules_media_audio_audio__device__factory.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/media/audio/audio_device_factory.cc.orig 2025-05-07 06:48:23 UTC +--- third_party/blink/renderer/modules/media/audio/audio_device_factory.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/modules/media/audio/audio_device_factory.cc @@ -33,7 +33,7 @@ namespace { // Set when the default factory is overridden. AudioDeviceFactory* g_factory_override = nullptr; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Due to driver deadlock issues on Windows (http://crbug/422522) there is a // chance device authorization response is never received from the browser side. // In this case we will time out, to avoid renderer hang forever waiting for diff --git a/www/iridium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc b/www/iridium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc index 7ce1f183bf7f..d3f9d1a09997 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc.orig 2025-05-07 06:48:23 UTC +--- third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc @@ -857,7 +857,7 @@ TEST_F(AudioRendererMixerManagerTest, MixerParamsLaten mixer->get_output_params_for_testing().sample_rate()); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Use 10 ms buffer (441 frames per buffer). EXPECT_EQ(output_sample_rate / 100, mixer->get_output_params_for_testing().frames_per_buffer()); diff --git a/www/iridium/files/patch-third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc b/www/iridium/files/patch-third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc index 7b0f9a175d20..9a742e7d52ea 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc @@ -1,10 +1,10 @@ ---- third_party/blink/renderer/modules/peerconnection/rtc_data_channel.cc.orig 2025-09-11 13:19:19 UTC +--- third_party/blink/renderer/modules/peerconnection/rtc_data_channel.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/modules/peerconnection/rtc_data_channel.cc @@ -538,6 +538,7 @@ void RTCDataChannel::send(Blob* data, ExceptionState& pending_messages_.push_back(message); } +#undef close void RTCDataChannel::close() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (state_ == webrtc::DataChannelInterface::kClosing || diff --git a/www/iridium/files/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc b/www/iridium/files/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc index 0c3d065f4efe..6e7b69c66019 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc.orig 2025-10-28 14:29:43 UTC +--- third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc @@ -385,7 +385,7 @@ TEST_F(WebRtcAudioRendererTest, DISABLED_VerifySinkPar SetupRenderer(kDefaultOutputDeviceId); renderer_proxy_->Start(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) static const int kExpectedBufferSize = kHardwareSampleRate / 100; #elif BUILDFLAG(IS_ANDROID) static const int kExpectedBufferSize = 2 * kHardwareSampleRate / 100; diff --git a/www/iridium/files/patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc b/www/iridium/files/patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc index f3d5788d5d49..68881b3efdb7 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc.orig 2025-05-07 06:48:23 UTC +--- third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc @@ -465,7 +465,7 @@ class AudioWorkletThreadPriorityTest // TODO(crbug.com/1022888): The worklet thread priority is always NORMAL // on OS_LINUX and OS_CHROMEOS regardless of the thread priority setting. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (expected_priority == base::ThreadPriorityForTest::kRealtimeAudio || expected_priority == base::ThreadPriorityForTest::kDisplay) { EXPECT_EQ(actual_priority, base::ThreadPriorityForTest::kNormal); diff --git a/www/iridium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc b/www/iridium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc index 48c14e860a10..e7660ee15f8a 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc +++ b/www/iridium/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 2025-11-06 10:11:34 UTC +--- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2025-12-10 15:04:57 UTC +++ third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -6621,7 +6621,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid +@@ -6588,7 +6588,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid // unmultiply has been requested or we need to never premultiply for Image // creation from a VideoFrame. -#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 - + Lohit Bengali diff --git a/www/iridium/files/patch-ui_strings_translations_app__locale__settings__ja.xtb b/www/iridium/files/patch-ui_strings_translations_app__locale__settings__ja.xtb index 68b8e2f6b790..290ea5767448 100644 --- a/www/iridium/files/patch-ui_strings_translations_app__locale__settings__ja.xtb +++ b/www/iridium/files/patch-ui_strings_translations_app__locale__settings__ja.xtb @@ -1,11 +1,11 @@ ---- ui/strings/translations/app_locale_settings_ja.xtb.orig 2025-05-07 06:48:23 UTC +--- ui/strings/translations/app_locale_settings_ja.xtb.orig 2025-12-10 15:04:57 UTC +++ ui/strings/translations/app_locale_settings_ja.xtb @@ -12,7 +12,7 @@ Helvetica,Hiragino Kaku Gothic ProN,sans-serif - + VL PGothic,Sazanami Gothic,Kochi Gothic,sans-serif diff --git a/www/iridium/files/patch-ui_strings_translations_app__locale__settings__ko.xtb b/www/iridium/files/patch-ui_strings_translations_app__locale__settings__ko.xtb index 7b17e7d9e62a..2d58389e476f 100644 --- a/www/iridium/files/patch-ui_strings_translations_app__locale__settings__ko.xtb +++ b/www/iridium/files/patch-ui_strings_translations_app__locale__settings__ko.xtb @@ -1,11 +1,11 @@ ---- ui/strings/translations/app_locale_settings_ko.xtb.orig 2025-05-07 06:48:23 UTC +--- ui/strings/translations/app_locale_settings_ko.xtb.orig 2025-12-10 15:04:57 UTC +++ ui/strings/translations/app_locale_settings_ko.xtb @@ -12,7 +12,7 @@ Helvetica,Apple SD Gothic Neo,AppleGothic,sans-serif - + Noto Sans CJK KR,NanumGothic,UnDotum,Baekmuk Gulim,sans-serif diff --git a/www/iridium/files/patch-ui_strings_translations_app__locale__settings__ml.xtb b/www/iridium/files/patch-ui_strings_translations_app__locale__settings__ml.xtb index 20a12e23e0ab..132634f0a0ca 100644 --- a/www/iridium/files/patch-ui_strings_translations_app__locale__settings__ml.xtb +++ b/www/iridium/files/patch-ui_strings_translations_app__locale__settings__ml.xtb @@ -1,11 +1,11 @@ ---- ui/strings/translations/app_locale_settings_ml.xtb.orig 2025-05-07 06:48:23 UTC +--- ui/strings/translations/app_locale_settings_ml.xtb.orig 2025-12-10 15:04:57 UTC +++ ui/strings/translations/app_locale_settings_ml.xtb @@ -9,7 +9,7 @@ 'Segoe UI',Arial,AnjaliOldLipi,Rachana,Kartika Arial,AnjaliOldLipi,Rachana,Kartika - + Arial,AnjaliOldLipi,Rachana,Kartika,sans-serif diff --git a/www/iridium/files/patch-ui_strings_translations_app__locale__settings__th.xtb b/www/iridium/files/patch-ui_strings_translations_app__locale__settings__th.xtb index 53946d6d4b47..59d283b243af 100644 --- a/www/iridium/files/patch-ui_strings_translations_app__locale__settings__th.xtb +++ b/www/iridium/files/patch-ui_strings_translations_app__locale__settings__th.xtb @@ -1,11 +1,11 @@ ---- ui/strings/translations/app_locale_settings_th.xtb.orig 2025-05-07 06:48:23 UTC +--- ui/strings/translations/app_locale_settings_th.xtb.orig 2025-12-10 15:04:57 UTC +++ ui/strings/translations/app_locale_settings_th.xtb @@ -6,7 +6,7 @@ Tahoma,sans-serif Tahoma,sans-serif - + Norasi,Waree,Garuda,Loma,sans-serif diff --git a/www/iridium/files/patch-ui_strings_translations_app__locale__settings__zh-CN.xtb b/www/iridium/files/patch-ui_strings_translations_app__locale__settings__zh-CN.xtb index c8b04ba00429..912acea58fb8 100644 --- a/www/iridium/files/patch-ui_strings_translations_app__locale__settings__zh-CN.xtb +++ b/www/iridium/files/patch-ui_strings_translations_app__locale__settings__zh-CN.xtb @@ -1,11 +1,11 @@ ---- ui/strings/translations/app_locale_settings_zh-CN.xtb.orig 2025-05-07 06:48:23 UTC +--- ui/strings/translations/app_locale_settings_zh-CN.xtb.orig 2025-12-10 15:04:57 UTC +++ ui/strings/translations/app_locale_settings_zh-CN.xtb @@ -12,7 +12,7 @@ Helvetica,PingFang SC,STHeiti,sans-serif - + Noto Sans CJK SC, WenQuanYi Zen Hei, sans-serif diff --git a/www/iridium/files/patch-ui_strings_translations_app__locale__settings__zh-TW.xtb b/www/iridium/files/patch-ui_strings_translations_app__locale__settings__zh-TW.xtb index c8502b5d00c7..48203115b183 100644 --- a/www/iridium/files/patch-ui_strings_translations_app__locale__settings__zh-TW.xtb +++ b/www/iridium/files/patch-ui_strings_translations_app__locale__settings__zh-TW.xtb @@ -1,11 +1,11 @@ ---- ui/strings/translations/app_locale_settings_zh-TW.xtb.orig 2025-05-07 06:48:23 UTC +--- ui/strings/translations/app_locale_settings_zh-TW.xtb.orig 2025-12-10 15:04:57 UTC +++ ui/strings/translations/app_locale_settings_zh-TW.xtb @@ -12,7 +12,7 @@ Helvetica,PingFang TC,Heiti TC,sans-serif - + Noto Sans CJK TC, WenQuanYi Zen Hei, sans-serif diff --git a/www/iridium/files/patch-ui_views_BUILD.gn b/www/iridium/files/patch-ui_views_BUILD.gn index e8843ff59aa1..2555afcb082c 100644 --- a/www/iridium/files/patch-ui_views_BUILD.gn +++ b/www/iridium/files/patch-ui_views_BUILD.gn @@ -1,10 +1,10 @@ ---- ui/views/BUILD.gn.orig 2025-11-06 10:11:34 UTC +--- ui/views/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ ui/views/BUILD.gn -@@ -835,7 +835,6 @@ component("views") { +@@ -834,7 +834,6 @@ component("views") { "windows_stationarity_monitor_aura.cc", ] deps += [ - "//components/crash/core/common:crash_key", "//ui/aura", "//ui/base/cursor/mojom:cursor_type_shared", "//ui/events", diff --git a/www/iridium/files/patch-ui_views_accessibility_view__accessibility.cc b/www/iridium/files/patch-ui_views_accessibility_view__accessibility.cc index fcc6474c5f58..18328eed2b4f 100644 --- a/www/iridium/files/patch-ui_views_accessibility_view__accessibility.cc +++ b/www/iridium/files/patch-ui_views_accessibility_view__accessibility.cc @@ -1,20 +1,20 @@ ---- ui/views/accessibility/view_accessibility.cc.orig 2025-05-07 06:48:23 UTC +--- ui/views/accessibility/view_accessibility.cc.orig 2025-12-10 15:04:57 UTC +++ ui/views/accessibility/view_accessibility.cc @@ -34,7 +34,7 @@ #include "ui/views/accessibility/view_ax_platform_node_delegate_win.h" #elif BUILDFLAG(IS_MAC) #include "ui/views/accessibility/view_ax_platform_node_delegate_mac.h" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/views/accessibility/view_ax_platform_node_delegate_auralinux.h" #endif @@ -101,7 +101,7 @@ std::unique_ptr ViewAccessibility:: return ViewAXPlatformNodeDelegateWin::CreatePlatformSpecific(view); #elif BUILDFLAG(IS_MAC) return ViewAXPlatformNodeDelegateMac::CreatePlatformSpecific(view); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return ViewAXPlatformNodeDelegateAuraLinux::CreatePlatformSpecific(view); #endif } diff --git a/www/iridium/files/patch-ui_views_controls_prefix__selector.cc b/www/iridium/files/patch-ui_views_controls_prefix__selector.cc index 9cd23a2145ab..9954f8becd3a 100644 --- a/www/iridium/files/patch-ui_views_controls_prefix__selector.cc +++ b/www/iridium/files/patch-ui_views_controls_prefix__selector.cc @@ -1,11 +1,11 @@ ---- ui/views/controls/prefix_selector.cc.orig 2025-09-11 13:19:19 UTC +--- ui/views/controls/prefix_selector.cc.orig 2025-12-10 15:04:57 UTC +++ ui/views/controls/prefix_selector.cc @@ -193,7 +193,7 @@ bool PrefixSelector::ShouldDoLearning() { 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) bool PrefixSelector::SetCompositionFromExistingText( const gfx::Range& range, const std::vector& ui_ime_text_spans) { diff --git a/www/iridium/files/patch-ui_views_controls_prefix__selector.h b/www/iridium/files/patch-ui_views_controls_prefix__selector.h index 0f756af397fd..5f6a686c6010 100644 --- a/www/iridium/files/patch-ui_views_controls_prefix__selector.h +++ b/www/iridium/files/patch-ui_views_controls_prefix__selector.h @@ -1,11 +1,11 @@ ---- ui/views/controls/prefix_selector.h.orig 2025-05-07 06:48:23 UTC +--- ui/views/controls/prefix_selector.h.orig 2025-12-10 15:04:57 UTC +++ ui/views/controls/prefix_selector.h @@ -91,7 +91,7 @@ class VIEWS_EXPORT PrefixSelector : public ui::TextInp ukm::SourceId GetClientSourceForMetrics() const override; bool ShouldDoLearning() override; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool SetCompositionFromExistingText( const gfx::Range& range, const std::vector& ui_ime_text_spans) override; diff --git a/www/iridium/files/patch-ui_views_controls_textfield_textfield.cc b/www/iridium/files/patch-ui_views_controls_textfield_textfield.cc index f902d9d4c01f..0c820cd323c4 100644 --- a/www/iridium/files/patch-ui_views_controls_textfield_textfield.cc +++ b/www/iridium/files/patch-ui_views_controls_textfield_textfield.cc @@ -1,65 +1,65 @@ ---- ui/views/controls/textfield/textfield.cc.orig 2025-11-06 10:11:34 UTC +--- ui/views/controls/textfield/textfield.cc.orig 2025-12-10 15:04:57 UTC +++ ui/views/controls/textfield/textfield.cc @@ -86,7 +86,7 @@ #include "base/win/win_util.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/base/ime/linux/text_edit_command_auralinux.h" #include "ui/base/ime/text_input_flags.h" #include "ui/linux/linux_ui.h" @@ -183,7 +183,7 @@ bool IsControlKeyModifier(int flags) { // Control-modified key combination, but we cannot extend it to other platforms // as Control has different meanings and behaviors. // https://crrev.com/2580483002/#msg46 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return flags & ui::EF_CONTROL_DOWN; #else return false; @@ -794,7 +794,7 @@ bool Textfield::OnKeyPressed(const ui::KeyEvent& event return handled; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!handled) { if (auto* linux_ui = ui::LinuxUi::instance()) { const auto command = @@ -979,7 +979,7 @@ void Textfield::AboutToRequestFocusFromTabTraversal(bo } bool Textfield::SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Skip any accelerator handling that conflicts with custom keybindings. if (auto* linux_ui = ui::LinuxUi::instance()) { if (IsTextEditCommandEnabled(linux_ui->GetTextEditCommandForEvent( -@@ -2070,7 +2070,7 @@ bool Textfield::ShouldDoLearning() { +@@ -2079,7 +2079,7 @@ bool Textfield::ShouldDoLearning() { 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) // TODO(crbug.com/41452689): Implement this method to support Korean IME // reconversion feature on native text fields (e.g. find bar). bool Textfield::SetCompositionFromExistingText( -@@ -2586,7 +2586,7 @@ ui::TextEditCommand Textfield::GetCommandForKeyEvent( +@@ -2595,7 +2595,7 @@ ui::TextEditCommand Textfield::GetCommandForKeyEvent( #endif return ui::TextEditCommand::DELETE_BACKWARD; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Only erase by line break on Linux and ChromeOS. if (shift) { return ui::TextEditCommand::DELETE_TO_BEGINNING_OF_LINE; -@@ -2594,7 +2594,7 @@ ui::TextEditCommand Textfield::GetCommandForKeyEvent( +@@ -2603,7 +2603,7 @@ ui::TextEditCommand Textfield::GetCommandForKeyEvent( #endif return ui::TextEditCommand::DELETE_WORD_BACKWARD; case ui::VKEY_DELETE: -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Only erase by line break on Linux and ChromeOS. if (shift && control) { return ui::TextEditCommand::DELETE_TO_END_OF_LINE; diff --git a/www/iridium/files/patch-ui_views_controls_textfield_textfield.h b/www/iridium/files/patch-ui_views_controls_textfield_textfield.h index 58d36ed4f491..dd2b56a5fd68 100644 --- a/www/iridium/files/patch-ui_views_controls_textfield_textfield.h +++ b/www/iridium/files/patch-ui_views_controls_textfield_textfield.h @@ -1,20 +1,20 @@ ---- ui/views/controls/textfield/textfield.h.orig 2025-09-11 13:19:19 UTC +--- ui/views/controls/textfield/textfield.h.orig 2025-12-10 15:04:57 UTC +++ ui/views/controls/textfield/textfield.h -@@ -48,7 +48,7 @@ +@@ -49,7 +49,7 @@ #include "ui/views/view_observer.h" #include "ui/views/word_lookup_client.h" -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #endif -@@ -478,7 +478,7 @@ class VIEWS_EXPORT Textfield : public View, +@@ -481,7 +481,7 @@ class VIEWS_EXPORT Textfield : public View, // Set whether the text should be used to improve typing suggestions. void SetShouldDoLearning(bool value) { should_do_learning_ = value; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool SetCompositionFromExistingText( const gfx::Range& range, const std::vector& ui_ime_text_spans) override; diff --git a/www/iridium/files/patch-ui_views_examples_widget__example.cc b/www/iridium/files/patch-ui_views_examples_widget__example.cc index 18d8d8bbb1f4..907698576be4 100644 --- a/www/iridium/files/patch-ui_views_examples_widget__example.cc +++ b/www/iridium/files/patch-ui_views_examples_widget__example.cc @@ -1,11 +1,11 @@ ---- ui/views/examples/widget_example.cc.orig 2025-05-07 06:48:23 UTC +--- ui/views/examples/widget_example.cc.orig 2025-12-10 15:04:57 UTC +++ ui/views/examples/widget_example.cc @@ -51,7 +51,7 @@ void WidgetExample::CreateExampleView(View* container) modal_button->SetCallback( base::BindRepeating(&WidgetExample::CreateDialogWidget, base::Unretained(this), modal_button, true)); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Windows does not support TYPE_CONTROL top-level widgets. LabelButton* control_button = BuildButton( container, GetStringUTF16(IDS_WIDGET_CHILD_WIDGET_BUTTON_LABEL)); diff --git a/www/iridium/files/patch-ui_views_focus_focus__manager.cc b/www/iridium/files/patch-ui_views_focus_focus__manager.cc index f1e70f2f70d0..507d2a75e2bc 100644 --- a/www/iridium/files/patch-ui_views_focus_focus__manager.cc +++ b/www/iridium/files/patch-ui_views_focus_focus__manager.cc @@ -1,20 +1,20 @@ ---- ui/views/focus/focus_manager.cc.orig 2025-11-06 10:11:34 UTC +--- ui/views/focus/focus_manager.cc.orig 2025-12-10 15:04:57 UTC +++ ui/views/focus/focus_manager.cc @@ -616,7 +616,7 @@ bool FocusManager::RedirectAcceleratorToBubbleAnchorWi return false; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Processing an accelerator can delete things. Because we // need these objects afterwards on Linux, save widget_ as weak pointer and // save the close_on_deactivate property value of widget_delegate in a @@ -631,7 +631,7 @@ bool FocusManager::RedirectAcceleratorToBubbleAnchorWi const bool accelerator_processed = focus_manager->ProcessAccelerator(accelerator); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Need to manually close the bubble widget on Linux. On Linux when the // bubble is shown, the main widget remains active. Because of that when // focus is set to the main widget to process accelerator, the main widget diff --git a/www/iridium/files/patch-ui_views_style_platform__style.cc b/www/iridium/files/patch-ui_views_style_platform__style.cc index 93fe10b0056c..24fd9e3d0a11 100644 --- a/www/iridium/files/patch-ui_views_style_platform__style.cc +++ b/www/iridium/files/patch-ui_views_style_platform__style.cc @@ -1,20 +1,20 @@ ---- ui/views/style/platform_style.cc.orig 2025-05-07 06:48:23 UTC +--- ui/views/style/platform_style.cc.orig 2025-12-10 15:04:57 UTC +++ ui/views/style/platform_style.cc @@ -23,7 +23,7 @@ #include "ui/views/controls/focusable_border.h" #include "ui/views/controls/scrollbar/scroll_bar_views.h" -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/views/controls/scrollbar/overlay_scroll_bar.h" #endif #endif @@ -35,7 +35,7 @@ namespace views { // static std::unique_ptr PlatformStyle::CreateScrollBar( ScrollBar::Orientation orientation) { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return std::make_unique(orientation); #else return std::make_unique(orientation); diff --git a/www/iridium/files/patch-ui_views_style_platform__style.h b/www/iridium/files/patch-ui_views_style_platform__style.h index 4c202f5594de..31c98e32ef7e 100644 --- a/www/iridium/files/patch-ui_views_style_platform__style.h +++ b/www/iridium/files/patch-ui_views_style_platform__style.h @@ -1,11 +1,11 @@ ---- ui/views/style/platform_style.h.orig 2025-05-07 06:48:23 UTC +--- ui/views/style/platform_style.h.orig 2025-12-10 15:04:57 UTC +++ ui/views/style/platform_style.h @@ -84,7 +84,7 @@ class VIEWS_EXPORT PlatformStyle { // Default setting at bubble creation time for whether arrow will be adjusted // for bubbles going off-screen to bring more bubble area into view. Linux // clips bubble windows that extend outside their parent window bounds. - static constexpr bool kAdjustBubbleIfOffscreen = !BUILDFLAG(IS_LINUX); + static constexpr bool kAdjustBubbleIfOffscreen = (!BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)); // Default focus behavior on the platform. static constexpr View::FocusBehavior kDefaultFocusBehavior = diff --git a/www/iridium/files/patch-ui_views_test_ui__controls__factory__desktop__aura__ozone.cc b/www/iridium/files/patch-ui_views_test_ui__controls__factory__desktop__aura__ozone.cc index aa4da693d542..298e47fb5625 100644 --- a/www/iridium/files/patch-ui_views_test_ui__controls__factory__desktop__aura__ozone.cc +++ b/www/iridium/files/patch-ui_views_test_ui__controls__factory__desktop__aura__ozone.cc @@ -1,11 +1,11 @@ ---- ui/views/test/ui_controls_factory_desktop_aura_ozone.cc.orig 2025-05-07 06:48:23 UTC +--- ui/views/test/ui_controls_factory_desktop_aura_ozone.cc.orig 2025-12-10 15:04:57 UTC +++ ui/views/test/ui_controls_factory_desktop_aura_ozone.cc @@ -237,7 +237,7 @@ bool SendMouseClick(MouseButton type, gfx::NativeWindo window_hint); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // static void ForceUseScreenCoordinatesOnce() { g_ozone_ui_controls_test_helper->ForceUseScreenCoordinatesOnce(); diff --git a/www/iridium/files/patch-ui_views_views__delegate.cc b/www/iridium/files/patch-ui_views_views__delegate.cc index 7f47017b6267..449829cae88f 100644 --- a/www/iridium/files/patch-ui_views_views__delegate.cc +++ b/www/iridium/files/patch-ui_views_views__delegate.cc @@ -1,11 +1,11 @@ ---- ui/views/views_delegate.cc.orig 2025-09-11 13:19:19 UTC +--- ui/views/views_delegate.cc.orig 2025-12-10 15:04:57 UTC +++ ui/views/views_delegate.cc @@ -92,7 +92,7 @@ bool ViewsDelegate::IsWindowInMetro(gfx::NativeWindow return false; } #elif BUILDFLAG(ENABLE_DESKTOP_AURA) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) gfx::ImageSkia* ViewsDelegate::GetDefaultWindowIcon() const { return nullptr; } diff --git a/www/iridium/files/patch-ui_views_views__delegate.h b/www/iridium/files/patch-ui_views_views__delegate.h index 6c85d6dd0179..92a1e29a8f44 100644 --- a/www/iridium/files/patch-ui_views_views__delegate.h +++ b/www/iridium/files/patch-ui_views_views__delegate.h @@ -1,11 +1,11 @@ ---- ui/views/views_delegate.h.orig 2025-06-19 07:37:57 UTC +--- ui/views/views_delegate.h.orig 2025-12-10 15:04:57 UTC +++ ui/views/views_delegate.h @@ -143,7 +143,7 @@ class VIEWS_EXPORT ViewsDelegate { // environment. virtual bool IsWindowInMetro(gfx::NativeWindow window) const; #elif BUILDFLAG(ENABLE_DESKTOP_AURA) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) virtual gfx::ImageSkia* GetDefaultWindowIcon() const; #endif diff --git a/www/iridium/files/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc b/www/iridium/files/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc index d28f36a835ed..c2680d4f5420 100644 --- a/www/iridium/files/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc +++ b/www/iridium/files/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc @@ -1,11 +1,11 @@ ---- ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.cc.orig 2025-05-07 06:48:23 UTC +--- ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.cc.orig 2025-12-10 15:04:57 UTC +++ ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.cc @@ -203,7 +203,7 @@ DragOperation DesktopDragDropClientOzone::StartDragAnd return selected_operation_; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void DesktopDragDropClientOzone::UpdateDragImage(const gfx::ImageSkia& image, const gfx::Vector2d& offset) { DCHECK(drag_handler_); diff --git a/www/iridium/files/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h b/www/iridium/files/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h index 73d89aa3b8a2..f55a84e099bf 100644 --- a/www/iridium/files/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h +++ b/www/iridium/files/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h @@ -1,20 +1,20 @@ ---- ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.h.orig 2025-05-07 06:48:23 UTC +--- ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.h.orig 2025-12-10 15:04:57 UTC +++ ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.h @@ -67,7 +67,7 @@ class VIEWS_EXPORT DesktopDragDropClientOzone // The offset of |drag_widget_| relative to the mouse position. gfx::Vector2d offset; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // The last received drag location. The drag widget is moved asynchronously // so its position is updated when the UI thread has time for that. When // the first change to the location happens, a call to UpdateDragWidget() @@ -88,7 +88,7 @@ class VIEWS_EXPORT DesktopDragDropClientOzone const gfx::Point& root_location, int allowed_operations, ui::mojom::DragEventSource source) override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void UpdateDragImage(const gfx::ImageSkia& image, const gfx::Vector2d& offset) override; #endif diff --git a/www/iridium/files/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc b/www/iridium/files/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc index 168fb4412b46..1367fadbf3d4 100644 --- a/www/iridium/files/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc +++ b/www/iridium/files/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc @@ -1,29 +1,29 @@ ---- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc.orig 2025-11-06 10:11:34 UTC +--- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc.orig 2025-12-10 15:04:57 UTC +++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc @@ -51,7 +51,7 @@ #include "ui/wm/core/window_util.h" #include "ui/wm/public/window_move_client.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone_linux.h" #endif -@@ -358,7 +358,7 @@ std::unique_ptr +@@ -357,7 +357,7 @@ std::unique_ptr DesktopWindowTreeHostPlatform::CreateDragDropClient() { ui::WmDragHandler* drag_handler = ui::GetWmDragHandler(*(platform_window())); std::unique_ptr drag_drop_client = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::make_unique(window(), drag_handler); #else std::make_unique(window(), drag_handler); -@@ -1189,7 +1189,7 @@ bool DesktopWindowTreeHostPlatform::RotateFocusForWidg +@@ -1188,7 +1188,7 @@ bool DesktopWindowTreeHostPlatform::RotateFocusForWidg // DesktopWindowTreeHost: // Linux subclasses this host and adds some Linux specific bits. -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // static DesktopWindowTreeHost* DesktopWindowTreeHost::Create( internal::NativeWidgetDelegate* native_widget_delegate, diff --git a/www/iridium/files/patch-ui_views_widget_root__view.cc b/www/iridium/files/patch-ui_views_widget_root__view.cc index ed1eace5c6f2..a8548217e53c 100644 --- a/www/iridium/files/patch-ui_views_widget_root__view.cc +++ b/www/iridium/files/patch-ui_views_widget_root__view.cc @@ -1,11 +1,11 @@ ---- ui/views/widget/root_view.cc.orig 2025-05-07 06:48:23 UTC +--- ui/views/widget/root_view.cc.orig 2025-12-10 15:04:57 UTC +++ ui/views/widget/root_view.cc @@ -169,7 +169,7 @@ class AnnounceTextView : public View { #if BUILDFLAG(IS_CHROMEOS) // On ChromeOS, kAlert role can invoke an unnecessary event on reparenting. GetViewAccessibility().SetRole(ax::mojom::Role::kStaticText); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(crbug.com/40658933): Use live regions (do not use alerts). // May require setting kLiveStatus, kContainerLiveStatus to "polite". GetViewAccessibility().SetRole(ax::mojom::Role::kAlert); diff --git a/www/iridium/files/patch-ui_views_widget_widget.cc b/www/iridium/files/patch-ui_views_widget_widget.cc index 2a0acad59442..6d924169daa4 100644 --- a/www/iridium/files/patch-ui_views_widget_widget.cc +++ b/www/iridium/files/patch-ui_views_widget_widget.cc @@ -1,20 +1,20 @@ ---- ui/views/widget/widget.cc.orig 2025-11-06 10:11:34 UTC +--- ui/views/widget/widget.cc.orig 2025-12-10 15:04:57 UTC +++ ui/views/widget/widget.cc @@ -64,7 +64,7 @@ #include "ui/views/widget/widget_removals_observer.h" #include "ui/views/window/dialog_delegate.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui.h" #endif -@@ -2519,7 +2519,7 @@ const ui::NativeTheme* Widget::GetNativeTheme() const +@@ -2545,7 +2545,7 @@ const ui::NativeTheme* Widget::GetNativeTheme() const return parent_->GetNativeTheme(); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (auto* linux_ui_theme = ui::LinuxUiTheme::GetForWindow(GetNativeWindow())) { return linux_ui_theme->GetNativeTheme(); diff --git a/www/iridium/files/patch-ui_views_widget_widget.h b/www/iridium/files/patch-ui_views_widget_widget.h index f3bc28503507..67301c794fb5 100644 --- a/www/iridium/files/patch-ui_views_widget_widget.h +++ b/www/iridium/files/patch-ui_views_widget_widget.h @@ -1,11 +1,11 @@ ---- ui/views/widget/widget.h.orig 2025-11-06 10:11:34 UTC +--- ui/views/widget/widget.h.orig 2025-12-10 15:04:57 UTC +++ ui/views/widget/widget.h @@ -489,7 +489,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWid bool force_system_menu_for_frameless = false; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Only used by X11, for root level windows. Specifies the res_name and // res_class fields, respectively, of the WM_CLASS window property. Controls // window grouping and desktop file matching in Linux window managers. diff --git a/www/iridium/files/patch-ui_views_window_default__frame__view.cc b/www/iridium/files/patch-ui_views_window_default__frame__view.cc index ecc0408120fc..e777b422d290 100644 --- a/www/iridium/files/patch-ui_views_window_default__frame__view.cc +++ b/www/iridium/files/patch-ui_views_window_default__frame__view.cc @@ -1,11 +1,11 @@ ---- ui/views/window/default_frame_view.cc.orig 2025-11-06 10:11:34 UTC +--- ui/views/window/default_frame_view.cc.orig 2025-12-10 15:04:57 UTC +++ ui/views/window/default_frame_view.cc @@ -285,7 +285,7 @@ int DefaultFrameView::NonClientTopBorderHeight() const int DefaultFrameView::CaptionButtonY() const { // Maximized buttons start at window top so that even if their images aren't // drawn flush with the screen edge, they still obey Fitts' Law. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return FrameBorderThickness(); #else return widget_->IsMaximized() ? FrameBorderThickness() diff --git a/www/iridium/files/patch-ui_views_window_dialog__delegate.cc b/www/iridium/files/patch-ui_views_window_dialog__delegate.cc index c2bcc62a1c8b..a9db974ee1e9 100644 --- a/www/iridium/files/patch-ui_views_window_dialog__delegate.cc +++ b/www/iridium/files/patch-ui_views_window_dialog__delegate.cc @@ -1,11 +1,11 @@ ---- ui/views/window/dialog_delegate.cc.orig 2025-09-11 13:19:19 UTC +--- ui/views/window/dialog_delegate.cc.orig 2025-12-10 15:04:57 UTC +++ ui/views/window/dialog_delegate.cc @@ -108,7 +108,7 @@ Widget* DialogDelegate::CreateDialogWidget( // static bool DialogDelegate::CanSupportCustomFrame(gfx::NativeView parent) { -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_DESKTOP_AURA) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(ENABLE_DESKTOP_AURA) // The new style doesn't support unparented dialogs on Linux desktop. return parent != nullptr; #else diff --git a/www/iridium/files/patch-ui_views_window_frame__background.cc b/www/iridium/files/patch-ui_views_window_frame__background.cc index d1267d2661bd..b158f0f36873 100644 --- a/www/iridium/files/patch-ui_views_window_frame__background.cc +++ b/www/iridium/files/patch-ui_views_window_frame__background.cc @@ -1,11 +1,11 @@ ---- ui/views/window/frame_background.cc.orig 2025-05-07 06:48:23 UTC +--- ui/views/window/frame_background.cc.orig 2025-12-10 15:04:57 UTC +++ ui/views/window/frame_background.cc @@ -110,7 +110,7 @@ void FrameBackground::PaintMaximized(gfx::Canvas* canv int width) const { // Fill the top with the frame color first so we have a constant background // for areas not covered by the theme image. -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ BUILDFLAG(ENABLE_DESKTOP_AURA) ui::NativeTheme::FrameTopAreaExtraParams frame_top_area; frame_top_area.use_custom_frame = use_custom_frame_; diff --git a/www/iridium/files/patch-v8_BUILD.gn b/www/iridium/files/patch-v8_BUILD.gn index 536ad35c47e1..a0f11e2b5192 100644 --- a/www/iridium/files/patch-v8_BUILD.gn +++ b/www/iridium/files/patch-v8_BUILD.gn @@ -1,73 +1,73 @@ ---- v8/BUILD.gn.orig 2025-11-06 10:11:34 UTC +--- v8/BUILD.gn.orig 2025-12-10 15:04:57 UTC +++ v8/BUILD.gn -@@ -989,6 +989,8 @@ external_v8_defines = [ +@@ -990,6 +990,8 @@ external_v8_defines = [ "V8_TARGET_OS_MACOS", "V8_TARGET_OS_WIN", "V8_TARGET_OS_CHROMEOS", + "V8_TARGET_OS_OPENBSD", + "V8_TARGET_OS_FREEBSD", ] enabled_external_v8_defines = [ -@@ -1063,6 +1065,12 @@ if (target_os == "android") { +@@ -1064,6 +1066,12 @@ if (target_os == "android") { } else if (target_os == "chromeos") { enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ] enabled_external_v8_defines += [ "V8_TARGET_OS_CHROMEOS" ] +} else if (target_os == "openbsd") { + enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ] + enabled_external_v8_defines += [ "V8_TARGET_OS_OPENBSD" ] +} else if (target_os == "freebsd") { + enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ] + enabled_external_v8_defines += [ "V8_TARGET_OS_FREEBSD" ] } disabled_external_v8_defines = external_v8_defines - enabled_external_v8_defines -@@ -1777,7 +1785,6 @@ config("strict_warnings") { +@@ -1778,7 +1786,6 @@ config("strict_warnings") { } cflags += [ "-Wmissing-field-initializers", - "-Wunnecessary-virtual-specifier", ] } } -@@ -2624,6 +2631,12 @@ template("run_mksnapshot") { +@@ -2625,6 +2632,12 @@ template("run_mksnapshot") { if (!v8_enable_builtins_profiling && v8_enable_builtins_reordering) { args += [ "--reorder-builtins" ] } + + if (v8_current_cpu == "x86") { + args -= [ + "--abort-on-bad-builtin-profile-data", + ] + } } # This is needed to distinguish between generating code for the simulator -@@ -6875,7 +6888,7 @@ v8_component("v8_libbase") { +@@ -6879,7 +6892,7 @@ v8_component("v8_libbase") { } } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "src/base/debug/stack_trace_posix.cc", "src/base/platform/platform-linux.cc", -@@ -6886,6 +6899,18 @@ v8_component("v8_libbase") { +@@ -6890,6 +6903,18 @@ v8_component("v8_libbase") { "dl", "rt", ] + } else if (is_openbsd) { + sources += [ + "src/base/debug/stack_trace_posix.cc", + "src/base/platform/platform-openbsd.cc", + ] + libs = [ "execinfo" ] + } else if (is_freebsd) { + sources += [ + "src/base/debug/stack_trace_posix.cc", + "src/base/platform/platform-freebsd.cc", + ] + libs = [ "execinfo" ] } else if (current_os == "aix") { sources += [ "src/base/debug/stack_trace_posix.cc", diff --git a/www/iridium/files/patch-v8_include_v8-internal.h b/www/iridium/files/patch-v8_include_v8-internal.h index 44cba8914a97..b93ca608fd41 100644 --- a/www/iridium/files/patch-v8_include_v8-internal.h +++ b/www/iridium/files/patch-v8_include_v8-internal.h @@ -1,11 +1,11 @@ ---- v8/include/v8-internal.h.orig 2025-05-07 06:48:23 UTC +--- v8/include/v8-internal.h.orig 2025-12-10 15:04:57 UTC +++ v8/include/v8-internal.h -@@ -232,7 +232,7 @@ using SandboxedPointer_t = Address; +@@ -218,7 +218,7 @@ using SandboxedPointer_t = Address; #ifdef V8_ENABLE_SANDBOX // Size of the sandbox, excluding the guard regions surrounding it. -#if defined(V8_TARGET_OS_ANDROID) +#if (defined(V8_TARGET_OS_ANDROID) || defined(V8_TARGET_OS_OPENBSD)) // On Android, most 64-bit devices seem to be configured with only 39 bits of // virtual address space for userspace. As such, limit the sandbox to 128GB (a // quarter of the total available address space). diff --git a/www/iridium/files/patch-v8_include_v8config.h b/www/iridium/files/patch-v8_include_v8config.h index ae9d30b24aca..93af6c04446e 100644 --- a/www/iridium/files/patch-v8_include_v8config.h +++ b/www/iridium/files/patch-v8_include_v8config.h @@ -1,45 +1,45 @@ ---- v8/include/v8config.h.orig 2025-11-06 10:11:34 UTC +--- v8/include/v8config.h.orig 2025-12-10 15:04:57 UTC +++ v8/include/v8config.h @@ -207,6 +207,8 @@ path. Add it with -I to the command line && !defined(V8_TARGET_OS_IOS) \ && !defined(V8_TARGET_OS_TVOS) \ && !defined(V8_TARGET_OS_LINUX) \ + && !defined(V8_TARGET_OS_OPENBSD) \ + && !defined(V8_TARGET_OS_FREEBSD) \ && !defined(V8_TARGET_OS_MACOS) \ && !defined(V8_TARGET_OS_WIN) \ && !defined(V8_TARGET_OS_CHROMEOS) @@ -220,6 +222,8 @@ path. Add it with -I to the command line || defined(V8_TARGET_OS_IOS) \ || defined(V8_TARGET_OS_TVOS) \ || defined(V8_TARGET_OS_LINUX) \ + || defined(V8_TARGET_OS_OPENBSD) \ + || defined(V8_TARGET_OS_FREEBSD) \ || defined(V8_TARGET_OS_MACOS) \ || defined(V8_TARGET_OS_WIN) \ || defined(V8_TARGET_OS_CHROMEOS) @@ -247,6 +251,16 @@ path. Add it with -I to the command line # define V8_TARGET_OS_LINUX #endif +#ifdef V8_OS_OPENBSD +# define V8_TARGET_OS_OPENBSD +# define V8_TARGET_OS_BSD +#endif + +#ifdef V8_OS_FREEBSD +# define V8_TARGET_OS_OPENBSD +# define V8_TARGET_OS_BSD +#endif + #ifdef V8_OS_MACOS # define V8_TARGET_OS_MACOS #endif @@ -394,6 +408,7 @@ path. Add it with -I to the command line #if (defined(_M_X64) || defined(__x86_64__) /* x64 (everywhere) */ \ || ((defined(__AARCH64EL__) || defined(_M_ARM64)) /* arm64, but ... */ \ && !defined(_WIN32))) /* not on windows */ \ + && !defined(__OpenBSD__) /* not on OpenBSD */ \ && !defined(COMPONENT_BUILD) /* no component build */\ && __clang_major__ >= 17 /* clang >= 17 */ # define V8_HAS_ATTRIBUTE_PRESERVE_MOST (__has_attribute(preserve_most)) diff --git a/www/iridium/files/patch-v8_src_api_api.cc b/www/iridium/files/patch-v8_src_api_api.cc index 75047d02f5a6..503e25c4fa26 100644 --- a/www/iridium/files/patch-v8_src_api_api.cc +++ b/www/iridium/files/patch-v8_src_api_api.cc @@ -1,20 +1,20 @@ ---- v8/src/api/api.cc.orig 2025-11-06 10:11:34 UTC +--- v8/src/api/api.cc.orig 2025-12-10 15:04:57 UTC +++ v8/src/api/api.cc @@ -159,7 +159,7 @@ #include "src/objects/intl-objects.h" #endif // V8_INTL_SUPPORT -#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_FREEBSD +#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_FREEBSD || V8_OS_OPENBSD #include #include -@@ -6480,7 +6480,7 @@ bool v8::V8::Initialize(const int build_config) { +@@ -6273,7 +6273,7 @@ bool v8::V8::Initialize(const int build_config) { return true; } -#if V8_OS_LINUX || V8_OS_DARWIN +#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_FREEBSD || V8_OS_OPENBSD bool TryHandleWebAssemblyTrapPosix(int sig_code, siginfo_t* info, void* context) { #if V8_ENABLE_WEBASSEMBLY && V8_TRAP_HANDLER_SUPPORTED diff --git a/www/iridium/files/patch-v8_src_base_atomicops.h b/www/iridium/files/patch-v8_src_base_atomicops.h index b786315209b9..7e122caee565 100644 --- a/www/iridium/files/patch-v8_src_base_atomicops.h +++ b/www/iridium/files/patch-v8_src_base_atomicops.h @@ -1,24 +1,24 @@ ---- v8/src/base/atomicops.h.orig 2025-11-06 10:11:34 UTC +--- v8/src/base/atomicops.h.orig 2025-12-10 15:04:57 UTC +++ v8/src/base/atomicops.h -@@ -57,10 +57,10 @@ using Atomic64 = SbAtomic64; +@@ -32,10 +32,10 @@ using Atomic64 = SbAtomic64; using Atomic8 = char; using Atomic16 = int16_t; using Atomic32 = int32_t; -#if defined(V8_HOST_ARCH_64_BIT) +#if defined(V8_HOST_ARCH_64_BIT) || defined(V8_OS_OPENBSD) // We need to be able to go between Atomic64 and AtomicWord implicitly. This // means Atomic64 and AtomicWord should be the same type on 64-bit. -#if defined(__ILP32__) +#if defined(__ILP32__) && !defined(V8_OS_OPENBSD) using Atomic64 = int64_t; #else using Atomic64 = intptr_t; -@@ -281,7 +281,7 @@ inline Atomic32 SeqCst_Load(volatile const Atomic32* p - std::memory_order_seq_cst); - } +@@ -59,7 +59,7 @@ inline void SeqCst_MemoryFence() { + template + concept AtomicTypeForTrivialOperations = -#if defined(V8_HOST_ARCH_64_BIT) +#if defined(V8_HOST_ARCH_64_BIT) || defined(V8_OS_OPENBSD) - - inline Atomic64 Relaxed_CompareAndSwap(volatile Atomic64* ptr, - Atomic64 old_value, Atomic64 new_value) { + std::is_same_v || + #endif + std::is_same_v || std::is_same_v || diff --git a/www/iridium/files/patch-v8_src_base_platform_memory.h b/www/iridium/files/patch-v8_src_base_platform_memory.h index 7a9cee68a1eb..58f46ab0d654 100644 --- a/www/iridium/files/patch-v8_src_base_platform_memory.h +++ b/www/iridium/files/patch-v8_src_base_platform_memory.h @@ -1,18 +1,18 @@ ---- v8/src/base/platform/memory.h.orig 2025-05-07 06:48:23 UTC +--- v8/src/base/platform/memory.h.orig 2025-12-10 15:04:57 UTC +++ v8/src/base/platform/memory.h @@ -21,13 +21,13 @@ #include #elif V8_OS_OPENBSD #include -#elif V8_OS_ZOS +#elif (V8_OS_ZOS || V8_OS_BSD) #include #else #include #endif -#if (V8_OS_POSIX && !V8_OS_AIX && !V8_OS_SOLARIS && !V8_OS_ZOS && !V8_OS_OPENBSD) || V8_OS_WIN +#if (V8_OS_POSIX && !V8_OS_AIX && !V8_OS_SOLARIS && !V8_OS_ZOS && !V8_OS_BSD) || V8_OS_WIN #define V8_HAS_MALLOC_USABLE_SIZE 1 #endif diff --git a/www/iridium/files/patch-v8_src_base_platform_platform-freebsd.cc b/www/iridium/files/patch-v8_src_base_platform_platform-freebsd.cc index 125440a23053..17f5d2a1c5df 100644 --- a/www/iridium/files/patch-v8_src_base_platform_platform-freebsd.cc +++ b/www/iridium/files/patch-v8_src_base_platform_platform-freebsd.cc @@ -1,32 +1,32 @@ ---- v8/src/base/platform/platform-freebsd.cc.orig 2025-05-07 06:48:23 UTC +--- v8/src/base/platform/platform-freebsd.cc.orig 2025-12-10 15:04:57 UTC +++ v8/src/base/platform/platform-freebsd.cc @@ -43,14 +43,10 @@ TimezoneCache* OS::CreateTimezoneCache() { return new PosixDefaultTimezoneCache(); } -static unsigned StringToLong(char* buffer) { - return static_cast(strtol(buffer, nullptr, 16)); -} - std::vector OS::GetSharedLibraryAddresses() { std::vector result; int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_VMMAP, getpid()}; - size_t miblen = sizeof(mib) / sizeof(mib[0]); + unsigned int miblen = sizeof(mib) / sizeof(mib[0]); size_t buffer_size; if (sysctl(mib, miblen, nullptr, &buffer_size, nullptr, 0) == 0) { // Overallocate the buffer by 1/3 to account for concurrent @@ -82,8 +78,13 @@ std::vector OS::GetSharedLib lib_name = std::string(path); } result.push_back(SharedLibraryAddress( +#if defined(__i386__) || defined(OS_FREEBSD) + lib_name, static_cast(map->kve_start), + static_cast(map->kve_end))); +#else lib_name, reinterpret_cast(map->kve_start), reinterpret_cast(map->kve_end))); +#endif } start += ssize; diff --git a/www/iridium/files/patch-v8_src_base_platform_platform-openbsd.cc b/www/iridium/files/patch-v8_src_base_platform_platform-openbsd.cc index 7dfe2bf94086..86d528828a9f 100644 --- a/www/iridium/files/patch-v8_src_base_platform_platform-openbsd.cc +++ b/www/iridium/files/patch-v8_src_base_platform_platform-openbsd.cc @@ -1,28 +1,28 @@ ---- v8/src/base/platform/platform-openbsd.cc.orig 2025-05-07 06:48:23 UTC +--- v8/src/base/platform/platform-openbsd.cc.orig 2025-12-10 15:04:57 UTC +++ v8/src/base/platform/platform-openbsd.cc @@ -6,6 +6,7 @@ // POSIX-compatible parts, the implementation is in platform-posix.cc. #include +#include #include #include #include @@ -121,6 +122,17 @@ void OS::SignalCodeMovingGC() { } void OS::AdjustSchedulingParams() {} + +// static +Stack::StackSlot Stack::ObtainCurrentThreadStackStart() { + stack_t ss; + void *base; + if (pthread_stackseg_np(pthread_self(), &ss) != 0) + return nullptr; + + base = (void*)((size_t) ss.ss_sp - ss.ss_size); + return reinterpret_cast(base) + ss.ss_size; +} std::optional OS::GetFirstFreeMemoryRangeWithin( OS::Address boundary_start, OS::Address boundary_end, size_t minimum_size, diff --git a/www/iridium/files/patch-v8_src_base_platform_platform-posix.cc b/www/iridium/files/patch-v8_src_base_platform_platform-posix.cc index 234bf59c2ed4..f198d5562597 100644 --- a/www/iridium/files/patch-v8_src_base_platform_platform-posix.cc +++ b/www/iridium/files/patch-v8_src_base_platform_platform-posix.cc @@ -1,53 +1,53 @@ ---- v8/src/base/platform/platform-posix.cc.orig 2025-09-11 13:19:19 UTC +--- v8/src/base/platform/platform-posix.cc.orig 2025-12-10 15:04:57 UTC +++ v8/src/base/platform/platform-posix.cc @@ -78,7 +78,7 @@ #include #endif -#if V8_OS_FREEBSD || V8_OS_DARWIN || V8_OS_OPENBSD || V8_OS_SOLARIS +#if V8_OS_FREEBSD || V8_OS_DARWIN || V8_OS_BSD || V8_OS_SOLARIS #define MAP_ANONYMOUS MAP_ANON #endif -@@ -353,8 +353,15 @@ void OS::SetRandomMmapSeed(int64_t seed) { +@@ -361,8 +361,15 @@ void OS::SetRandomMmapSeed(int64_t seed) { } } +#if V8_OS_OPENBSD +// Allow OpenBSD's mmap to select a random address on OpenBSD // static void* OS::GetRandomMmapAddr() { + return nullptr; +} +#else +// static +void* OS::GetRandomMmapAddr() { uintptr_t raw_addr; { MutexGuard guard(rng_mutex.Pointer()); -@@ -451,6 +458,7 @@ void* OS::GetRandomMmapAddr() { +@@ -459,6 +466,7 @@ void* OS::GetRandomMmapAddr() { #endif return reinterpret_cast(raw_addr); } +#endif // TODO(bbudge) Move Cygwin and Fuchsia stuff into platform-specific files. #if !V8_OS_CYGWIN && !V8_OS_FUCHSIA -@@ -739,7 +747,7 @@ void OS::DestroySharedMemoryHandle(PlatformSharedMemor +@@ -759,7 +767,7 @@ void OS::DestroySharedMemoryHandle(PlatformSharedMemor #if !V8_OS_ZOS // static bool OS::HasLazyCommits() { -#if V8_OS_AIX || V8_OS_LINUX || V8_OS_DARWIN +#if V8_OS_AIX || V8_OS_LINUX || V8_OS_DARWIN || V8_OS_BSD return true; #else // TODO(bbudge) Return true for all POSIX platforms. -@@ -1388,7 +1396,7 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* +@@ -1409,7 +1417,7 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* // keep this version in POSIX as most Linux-compatible derivatives will // support it. MacOS and FreeBSD are different here. #if !defined(V8_OS_FREEBSD) && !defined(V8_OS_DARWIN) && !defined(_AIX) && \ - !defined(V8_OS_SOLARIS) + !defined(V8_OS_SOLARIS) && !defined(V8_OS_OPENBSD) namespace { #if DEBUG diff --git a/www/iridium/files/patch-v8_src_base_sys-info.cc b/www/iridium/files/patch-v8_src_base_sys-info.cc index 7e24563e995a..1ab60467da6b 100644 --- a/www/iridium/files/patch-v8_src_base_sys-info.cc +++ b/www/iridium/files/patch-v8_src_base_sys-info.cc @@ -1,11 +1,11 @@ ---- v8/src/base/sys-info.cc.orig 2025-05-07 06:48:23 UTC +--- v8/src/base/sys-info.cc.orig 2025-12-10 15:04:57 UTC +++ v8/src/base/sys-info.cc @@ -36,7 +36,7 @@ namespace base { // static int SysInfo::NumberOfProcessors() { #if V8_OS_OPENBSD - int mib[2] = {CTL_HW, HW_NCPU}; + int mib[2] = {CTL_HW, HW_NCPUONLINE}; int ncpu = 0; size_t len = sizeof(ncpu); if (sysctl(mib, arraysize(mib), &ncpu, &len, nullptr, 0) != 0) { diff --git a/www/iridium/files/patch-v8_src_diagnostics_perf-jit.cc b/www/iridium/files/patch-v8_src_diagnostics_perf-jit.cc index 88912e1d5988..7a145a810b5f 100644 --- a/www/iridium/files/patch-v8_src_diagnostics_perf-jit.cc +++ b/www/iridium/files/patch-v8_src_diagnostics_perf-jit.cc @@ -1,11 +1,11 @@ ---- v8/src/diagnostics/perf-jit.cc.orig 2025-06-19 07:37:57 UTC +--- v8/src/diagnostics/perf-jit.cc.orig 2025-12-10 15:04:57 UTC +++ v8/src/diagnostics/perf-jit.cc @@ -31,7 +31,7 @@ #include "src/flags/flags.h" // Only compile the {PerfJitLogger} on Linux & Darwin. -#if V8_OS_LINUX || V8_OS_DARWIN +#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_BSD #include #include diff --git a/www/iridium/files/patch-v8_src_diagnostics_perf-jit.h b/www/iridium/files/patch-v8_src_diagnostics_perf-jit.h index b1cc0848ce0d..7f399ed85dd1 100644 --- a/www/iridium/files/patch-v8_src_diagnostics_perf-jit.h +++ b/www/iridium/files/patch-v8_src_diagnostics_perf-jit.h @@ -1,11 +1,11 @@ ---- v8/src/diagnostics/perf-jit.h.orig 2025-06-19 07:37:57 UTC +--- v8/src/diagnostics/perf-jit.h.orig 2025-12-10 15:04:57 UTC +++ v8/src/diagnostics/perf-jit.h @@ -31,7 +31,7 @@ #include "include/v8config.h" // {PerfJitLogger} is only implemented on Linux & Darwin. -#if V8_OS_LINUX || V8_OS_DARWIN +#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_BSD #include "src/logging/log.h" diff --git a/www/iridium/files/patch-v8_src_execution_isolate.cc b/www/iridium/files/patch-v8_src_execution_isolate.cc index 7bffc398de97..1ef39377739d 100644 --- a/www/iridium/files/patch-v8_src_execution_isolate.cc +++ b/www/iridium/files/patch-v8_src_execution_isolate.cc @@ -1,27 +1,27 @@ ---- v8/src/execution/isolate.cc.orig 2025-11-06 10:11:34 UTC +--- v8/src/execution/isolate.cc.orig 2025-12-10 15:04:57 UTC +++ v8/src/execution/isolate.cc @@ -176,6 +176,10 @@ #include "src/execution/simulator-base.h" #endif +#if defined(V8_OS_OPENBSD) +#include +#endif + extern "C" const uint8_t v8_Default_embedded_blob_code_[]; extern "C" uint32_t v8_Default_embedded_blob_code_size_; extern "C" const uint8_t v8_Default_embedded_blob_data_[]; -@@ -5235,6 +5239,13 @@ void Isolate::InitializeDefaultEmbeddedBlob() { +@@ -5251,6 +5255,13 @@ void Isolate::InitializeDefaultEmbeddedBlob() { uint32_t code_size = DefaultEmbeddedBlobCodeSize(); const uint8_t* data = DefaultEmbeddedBlobData(); uint32_t data_size = DefaultEmbeddedBlobDataSize(); + +#if defined(V8_OS_OPENBSD) && !defined(V8_TARGET_ARCH_IA32) + if (code_size > 0) { + mprotect(reinterpret_cast(const_cast(code)), + code_size, PROT_READ | PROT_EXEC); + } +#endif if (StickyEmbeddedBlobCode() != nullptr) { base::MutexGuard guard(current_embedded_blob_refcount_mutex_.Pointer()); diff --git a/www/iridium/files/patch-v8_src_flags_flags.cc b/www/iridium/files/patch-v8_src_flags_flags.cc index 83120017b7e8..8e661fcc9e06 100644 --- a/www/iridium/files/patch-v8_src_flags_flags.cc +++ b/www/iridium/files/patch-v8_src_flags_flags.cc @@ -1,24 +1,24 @@ ---- v8/src/flags/flags.cc.orig 2025-11-06 10:11:34 UTC +--- v8/src/flags/flags.cc.orig 2025-12-10 15:04:57 UTC +++ v8/src/flags/flags.cc @@ -16,6 +16,10 @@ #include #include +#if V8_OS_OPENBSD +#include +#endif + #include "src/base/fpu.h" #include "src/base/hashing.h" #include "src/base/lazy-instance.h" -@@ -836,6 +840,10 @@ void FlagList::FreezeFlags() { +@@ -838,6 +842,10 @@ void FlagList::FreezeFlags() { // Note that for string flags we only protect the pointer itself, but not the // string storage. TODO(12887): Fix this. base::OS::SetDataReadOnly(&v8_flags, sizeof(v8_flags)); +#if V8_OS_OPENBSD + if (mimmutable(&v8_flags, sizeof(v8_flags)) == -1) + FATAL("unable to set immutability of v8_flags"); +#endif } // static diff --git a/www/iridium/files/patch-v8_src_libsampler_sampler.cc b/www/iridium/files/patch-v8_src_libsampler_sampler.cc index cc09b4410af2..06e47aaa8af4 100644 --- a/www/iridium/files/patch-v8_src_libsampler_sampler.cc +++ b/www/iridium/files/patch-v8_src_libsampler_sampler.cc @@ -1,19 +1,19 @@ ---- v8/src/libsampler/sampler.cc.orig 2025-09-11 13:19:19 UTC +--- v8/src/libsampler/sampler.cc.orig 2025-12-10 15:04:57 UTC +++ v8/src/libsampler/sampler.cc @@ -527,6 +527,16 @@ void SignalHandler::FillRegisterState(void* context, R state->pc = reinterpret_cast(mcontext.__gregs[_REG_PC]); state->sp = reinterpret_cast(mcontext.__gregs[_REG_SP]); state->fp = reinterpret_cast(mcontext.__gregs[_REG_FP]); +#elif V8_HOST_ARCH_ARM64 +#ifdef __CHERI_PURE_CAPABILITY__ + state->pc = reinterpret_cast(mcontext.mc_capregs.cap_elr); + state->sp = reinterpret_cast(mcontext.mc_capregs.cap_sp); + state->fp = reinterpret_cast(mcontext.mc_capregs.cap_x[29]); +#else // !__CHERI_PURE_CAPABILITY__ + state->pc = reinterpret_cast(mcontext.mc_gpregs.gp_elr); + state->sp = reinterpret_cast(mcontext.mc_gpregs.gp_sp); + state->fp = reinterpret_cast(mcontext.mc_gpregs.gp_x[29]); +#endif // __CHERI_PURE_CAPABILITY__ #endif // V8_HOST_ARCH_* #elif V8_OS_NETBSD #if V8_HOST_ARCH_IA32 diff --git a/www/iridium/files/patch-v8_src_objects_js-temporal-zoneinfo64.cc b/www/iridium/files/patch-v8_src_objects_js-temporal-zoneinfo64.cc index b464627626dc..2c6e0e5008e7 100644 --- a/www/iridium/files/patch-v8_src_objects_js-temporal-zoneinfo64.cc +++ b/www/iridium/files/patch-v8_src_objects_js-temporal-zoneinfo64.cc @@ -1,11 +1,11 @@ ---- v8/src/objects/js-temporal-zoneinfo64.cc.orig 2025-11-06 10:11:34 UTC +--- v8/src/objects/js-temporal-zoneinfo64.cc.orig 2025-12-10 15:04:57 UTC +++ v8/src/objects/js-temporal-zoneinfo64.cc @@ -11,7 +11,7 @@ #include "temporal_rs/TimeZone.hpp" #ifdef V8_INTL_SUPPORT -#include "udatamem.h" +#include "../../third_party/icu/source/common/udatamem.h" #else // Defined in builtins-temporal-zoneinfo64-data.cc, generated by // include-file-as-bytes.py diff --git a/www/iridium/files/patch-v8_src_sandbox_sandbox.cc b/www/iridium/files/patch-v8_src_sandbox_sandbox.cc index ee6231913f0b..eb248d7e9377 100644 --- a/www/iridium/files/patch-v8_src_sandbox_sandbox.cc +++ b/www/iridium/files/patch-v8_src_sandbox_sandbox.cc @@ -1,11 +1,11 @@ ---- v8/src/sandbox/sandbox.cc.orig 2025-05-07 06:48:23 UTC +--- v8/src/sandbox/sandbox.cc.orig 2025-12-10 15:04:57 UTC +++ v8/src/sandbox/sandbox.cc @@ -59,7 +59,7 @@ static Address DetermineAddressSpaceLimit() { } #endif // V8_TARGET_ARCH_X64 -#if defined(V8_TARGET_ARCH_ARM64) && defined(V8_TARGET_OS_ANDROID) +#if defined(V8_TARGET_ARCH_ARM64) && (defined(V8_TARGET_OS_ANDROID) || defined(V8_TARGET_OS_OPENBSD)) // On Arm64 Android assume a 40-bit virtual address space (39 bits for // userspace and kernel each) as that appears to be the most common // configuration and there seems to be no easy way to retrieve the actual diff --git a/www/iridium/files/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.cc b/www/iridium/files/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.cc index cabd4be1d35b..37aa1272dead 100644 --- a/www/iridium/files/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.cc +++ b/www/iridium/files/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.cc @@ -1,11 +1,11 @@ ---- v8/src/snapshot/embedded/platform-embedded-file-writer-base.cc.orig 2025-05-07 06:48:23 UTC +--- v8/src/snapshot/embedded/platform-embedded-file-writer-base.cc.orig 2025-12-10 15:04:57 UTC +++ v8/src/snapshot/embedded/platform-embedded-file-writer-base.cc -@@ -148,6 +148,8 @@ EmbeddedTargetOs ToEmbeddedTargetOs(const char* s) { +@@ -150,6 +150,8 @@ EmbeddedTargetOs ToEmbeddedTargetOs(const char* s) { return EmbeddedTargetOs::kStarboard; } else if (string == "zos") { return EmbeddedTargetOs::kZOS; + } else if (string == "openbsd") { + return EmbeddedTargetOs::kOpenBSD; } else { return EmbeddedTargetOs::kGeneric; } diff --git a/www/iridium/files/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.h b/www/iridium/files/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.h index 13c58e79d457..bb9473599d51 100644 --- a/www/iridium/files/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.h +++ b/www/iridium/files/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.h @@ -1,10 +1,10 @@ ---- v8/src/snapshot/embedded/platform-embedded-file-writer-base.h.orig 2025-05-07 06:48:23 UTC +--- v8/src/snapshot/embedded/platform-embedded-file-writer-base.h.orig 2025-12-10 15:04:57 UTC +++ v8/src/snapshot/embedded/platform-embedded-file-writer-base.h -@@ -36,6 +36,7 @@ enum class EmbeddedTargetOs { +@@ -37,6 +37,7 @@ enum class EmbeddedTargetOs { kWin, kStarboard, kZOS, + kOpenBSD, kGeneric, // Everything not covered above falls in here. }; diff --git a/www/iridium/files/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc b/www/iridium/files/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc index b5d6bfd673fa..0c677c6de1fb 100644 --- a/www/iridium/files/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc +++ b/www/iridium/files/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc @@ -1,42 +1,42 @@ ---- v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc.orig 2025-05-07 06:48:23 UTC +--- v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc.orig 2025-12-10 15:04:57 UTC +++ v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc @@ -9,6 +9,10 @@ #include "src/objects/instruction-stream.h" +#if V8_OS_OPENBSD +#include +#endif + namespace v8 { namespace internal { @@ -35,6 +39,10 @@ const char* DirectiveAsString(DataDirective directive) void PlatformEmbeddedFileWriterGeneric::SectionText() { if (target_os_ == EmbeddedTargetOs::kChromeOS) { fprintf(fp_, ".section .text.hot.embedded\n"); +#if !defined(V8_TARGET_ARCH_IA32) + } else if (target_os_ == EmbeddedTargetOs::kOpenBSD) { + fprintf(fp_, ".section .openbsd.mutable,\"a\"\n"); +#endif } else { fprintf(fp_, ".section .text\n"); } -@@ -66,6 +74,8 @@ void PlatformEmbeddedFileWriterGeneric::AlignToCodeAli - // On these architectures and platforms, we remap the builtins, so need these - // to be aligned on a page boundary. +@@ -75,6 +83,8 @@ void PlatformEmbeddedFileWriterGeneric::AlignToCodeAli + #else fprintf(fp_, ".balign 4096\n"); + #endif +#elif defined(V8_OS_OPENBSD) && !defined(V8_TARGET_ARCH_IA32) + fprintf(fp_, ".balign %d\n", PAGE_SIZE); #elif V8_TARGET_ARCH_X64 // On x64 use 64-bytes code alignment to allow 64-bytes loop header alignment. static_assert(64 >= kCodeAlignment); -@@ -86,6 +96,8 @@ void PlatformEmbeddedFileWriterGeneric::AlignToPageSiz - (V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64) - // Since the builtins are remapped, need to pad until the next page boundary. +@@ -102,6 +112,8 @@ void PlatformEmbeddedFileWriterGeneric::AlignToPageSiz + #else fprintf(fp_, ".balign 4096\n"); + #endif +#elif defined(V8_OS_OPENBSD) && !defined(V8_TARGET_ARCH_IA32) + fprintf(fp_, ".balign %d\n", PAGE_SIZE); #endif } diff --git a/www/iridium/files/patch-v8_src_trap-handler_handler-inside-posix.cc b/www/iridium/files/patch-v8_src_trap-handler_handler-inside-posix.cc index 4205421a300e..322d4eefced7 100644 --- a/www/iridium/files/patch-v8_src_trap-handler_handler-inside-posix.cc +++ b/www/iridium/files/patch-v8_src_trap-handler_handler-inside-posix.cc @@ -1,26 +1,26 @@ ---- v8/src/trap-handler/handler-inside-posix.cc.orig 2025-09-11 13:19:19 UTC +--- v8/src/trap-handler/handler-inside-posix.cc.orig 2025-12-10 15:04:57 UTC +++ v8/src/trap-handler/handler-inside-posix.cc @@ -62,6 +62,8 @@ namespace trap_handler { #define CONTEXT_REG(reg, REG) &uc->uc_mcontext->__ss.__##reg #elif V8_OS_FREEBSD #define CONTEXT_REG(reg, REG) &uc->uc_mcontext.mc_##reg +#elif V8_OS_OPENBSD +#define CONTEXT_REG(reg, REG) &uc->sc_##reg #else #error "Unsupported platform." #endif @@ -81,8 +83,12 @@ bool IsKernelGeneratedSignal(siginfo_t* info) { // si_code at its default of 0 for signals that don’t originate in hardware. // The other conditions are only relevant for Linux. return info->si_code > 0 && info->si_code != SI_USER && - info->si_code != SI_QUEUE && info->si_code != SI_TIMER && - info->si_code != SI_ASYNCIO && info->si_code != SI_MESGQ; + info->si_code != SI_QUEUE && info->si_code != SI_TIMER +#ifdef V8_OS_OPENBSD + ; +#else + && info->si_code != SI_ASYNCIO && info->si_code != SI_MESGQ; +#endif } class UnmaskOobSignalScope { diff --git a/www/iridium/files/patch-v8_src_trap-handler_handler-inside-posix.h b/www/iridium/files/patch-v8_src_trap-handler_handler-inside-posix.h index 04476215cd3a..d31c0a47bd90 100644 --- a/www/iridium/files/patch-v8_src_trap-handler_handler-inside-posix.h +++ b/www/iridium/files/patch-v8_src_trap-handler_handler-inside-posix.h @@ -1,11 +1,11 @@ ---- v8/src/trap-handler/handler-inside-posix.h.orig 2025-05-07 06:48:23 UTC +--- v8/src/trap-handler/handler-inside-posix.h.orig 2025-12-10 15:04:57 UTC +++ v8/src/trap-handler/handler-inside-posix.h @@ -13,7 +13,7 @@ namespace v8 { namespace internal { namespace trap_handler { -#if V8_OS_LINUX || V8_OS_FREEBSD +#if V8_OS_LINUX || V8_OS_FREEBSD || V8_OS_OPENBSD constexpr int kOobSignal = SIGSEGV; #elif V8_OS_DARWIN constexpr int kOobSignal = SIGBUS; diff --git a/www/iridium/files/patch-v8_src_trap-handler_trap-handler.h b/www/iridium/files/patch-v8_src_trap-handler_trap-handler.h index 80cb1fb0dd3d..862a4fc3251c 100644 --- a/www/iridium/files/patch-v8_src_trap-handler_trap-handler.h +++ b/www/iridium/files/patch-v8_src_trap-handler_trap-handler.h @@ -1,11 +1,11 @@ ---- v8/src/trap-handler/trap-handler.h.orig 2025-06-19 07:37:57 UTC +--- v8/src/trap-handler/trap-handler.h.orig 2025-12-10 15:04:57 UTC +++ v8/src/trap-handler/trap-handler.h @@ -18,7 +18,7 @@ namespace v8::internal::trap_handler { // X64 on Linux, Windows, MacOS, FreeBSD. #if V8_HOST_ARCH_X64 && V8_TARGET_ARCH_X64 && \ ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_DARWIN || \ - V8_OS_FREEBSD) + V8_OS_FREEBSD || V8_OS_OPENBSD) #define V8_TRAP_HANDLER_SUPPORTED true // Arm64 native on Linux, Windows, MacOS. #elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_ARM64 && \ diff --git a/www/iridium/files/patch-v8_tools_run.py b/www/iridium/files/patch-v8_tools_run.py index ded6264b29d2..64e3e3c80f0e 100644 --- a/www/iridium/files/patch-v8_tools_run.py +++ b/www/iridium/files/patch-v8_tools_run.py @@ -1,11 +1,11 @@ ---- v8/tools/run.py.orig 2025-05-07 06:48:23 UTC +--- v8/tools/run.py.orig 2025-12-10 15:04:57 UTC +++ v8/tools/run.py @@ -21,7 +21,7 @@ if cmd and cmd[0] == '--redirect-stdout': kwargs = dict(stdout=subprocess.PIPE) cmd = cmd[2:] -process = subprocess.Popen(cmd, **kwargs) +process = subprocess.Popen(cmd, env={"LD_LIBRARY_PATH":"${WRKSRC}/out/Release"}, **kwargs) stdout, _ = process.communicate() if stdout_file: with stdout_file.open('w') as f: